/* Дар · оформление «Небо»: светлый голубой, белые карточки, мягкие тени */
:root {
  --bg: #F1F5FC; --bg2: #E5EDFA; --card: #FFFFFF; --ink: #0F1B33; --muted: #68768F; --line: #DCE5F3;
  --pri: #2F6BFF; --pri2: #5E9BFF; --pri-ink: #fff; --pri-soft: #E4ECFF;
  --gold: #FFAE35; --gold-soft: #FFF2DB; --clay: #FF6F61; --clay-soft: #FFE7E3; --sky: #12B5CB; --sky-soft: #DBF4F8; --vio: #7A68F5; --vio-soft: #ECE9FF; --leaf: #2FBF85;
  --ok: #18A870; --ok-soft: #DDF6EA; --bad: #F0604B; --bad-soft: #FFE6E1;
  --grad: linear-gradient(135deg, var(--pri2), var(--pri));
  --blob1: #CFE0FF; --blob2: #E3DDFF; --blob3: #CFF2F6; --glass: rgba(255, 255, 255, .78);
  --r: 24px; --r2: 16px; --shadow: 0 12px 32px rgba(38, 82, 180, .12); --shadow2: 0 4px 16px rgba(38, 82, 180, .07);
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --fs: 16px; --tab: 66px; --maxw: 600px;
}
[data-theme=dawn] { --bg: #FBF6EC; --bg2: #F4ECDC; --card: #FFFDF8; --ink: #2C2A25; --muted: #7C7567; --line: #EADFCB; --pri: #5E7B4C; --pri2: #7E9E66; --pri-soft: #E7EEDD; --gold: #E2A63B; --gold-soft: #FBEFD3; --clay: #C96F4A; --clay-soft: #F8E3D8; --sky: #6F9BBF; --sky-soft: #E1ECF4; --vio: #8E7CB8; --vio-soft: #EDE7F5; --blob1: #FBEFD3; --blob2: #E7EEDD; --blob3: #F8E3D8; --glass: rgba(255, 253, 248, .82); --shadow: 0 12px 32px rgba(92, 70, 30, .1); --shadow2: 0 4px 16px rgba(92, 70, 30, .06); }
[data-theme=mint] { --bg: #F0F8F6; --bg2: #E1F1EE; --line: #D5E9E5; --pri: #0FA08C; --pri2: #37C6A9; --pri-soft: #DAF3EE; --muted: #5F7A78; --ink: #0E2A2B; --blob1: #CDEFE8; --blob2: #D6E8FF; --blob3: #E4F6D8; --shadow: 0 12px 32px rgba(15, 120, 110, .12); --shadow2: 0 4px 16px rgba(15, 120, 110, .07); }
[data-theme=night] { --bg: #0B1220; --bg2: #121B2E; --card: #151F35; --ink: #EAF0FF; --muted: #93A1BD; --line: #233352; --pri: #5C93FF; --pri2: #86B3FF; --pri-ink: #06122B; --pri-soft: #1B2B4D; --gold: #FFC45E; --gold-soft: #3A2F18; --clay: #FF8D7E; --clay-soft: #3C2222; --sky: #49CFE0; --sky-soft: #12343C; --vio: #A193FF; --vio-soft: #262348; --ok: #4FD49B; --ok-soft: #123526; --bad: #FF8A76; --bad-soft: #40211C; --blob1: #15264A; --blob2: #1F1B45; --blob3: #0F2E36; --glass: rgba(21, 31, 53, .8); --shadow: 0 12px 32px rgba(0, 0, 0, .4); --shadow2: 0 4px 16px rgba(0, 0, 0, .3); }
[data-size="1"] { --fs: 18px; } [data-size="2"] { --fs: 20px; }
[data-mode=kid] { --fs: 18px; --r: 28px; }
[data-mode=kid][data-size="1"] { --fs: 20px; } [data-mode=kid][data-size="2"] { --fs: 22px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui); font-weight: 500; line-height: 1.5; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.lock { overflow: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
a { color: var(--pri); }
h1, h2, h3, p { margin: 0; }
.ic { width: 1.5em; height: 1.5em; flex: none; }

#app { max-width: var(--maxw); margin: 0 auto; padding: 0 16px calc(var(--tab) + 44px + env(safe-area-inset-bottom)); min-height: 100dvh; }
#app.full { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
#bgdeco { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(520px 340px at 92% -60px, var(--blob1), transparent 72%), radial-gradient(460px 320px at -12% 60px, var(--blob2), transparent 70%), radial-gradient(520px 360px at 50% 108%, var(--blob3), transparent 72%); }

/* нижние вкладки — плавающая панель */
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 12px calc(10px + env(safe-area-inset-bottom)); pointer-events: none; }
#tabbar .in { pointer-events: auto; max-width: calc(var(--maxw) - 24px); margin: 0 auto; display: flex; height: var(--tab); padding: 6px 4px; gap: 0; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 26px; box-shadow: var(--shadow); }
#tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 10px; letter-spacing: -.02em; font-weight: 700; color: var(--muted); min-width: 0; border-radius: 20px; transition: background .2s, color .2s; }
#tabbar button span { max-width: 100%; overflow: hidden; white-space: nowrap; }
#tabbar button .ic { width: 24px; height: 24px; }
#tabbar button.on { color: var(--pri); background: var(--pri-soft); }
#tabbar button.on .ic { stroke-width: 2.3; }
#tabbar.hide { display: none; }

/* шапки */
.top { display: flex; align-items: center; gap: 12px; padding: 20px 0 12px; }
.top h1 { font-size: 1.7rem; font-weight: 800; line-height: 1.12; letter-spacing: -.03em; }
.top .sub { color: var(--muted); font-size: .9rem; font-weight: 600; margin-top: 3px; }
.top .grow { flex: 1; min-width: 0; }
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; margin: 0 -16px; padding: 10px 14px 10px 8px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bar .ttl { flex: 1; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); flex: none; transition: background .15s; }
.ibtn:active { background: var(--bg2); }
.ibtn.soft { background: var(--card); box-shadow: var(--shadow2); }
.prog { flex: 1; height: 8px; border-radius: 8px; background: var(--bg2); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 8px; background: var(--grad); transition: width .35s ease; }

/* карточки и кнопки */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow2); padding: 18px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.card.tap { display: block; width: 100%; text-align: left; transition: transform .12s ease; }
.card.tap:active { transform: scale(.985); }
.lbl { font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.lbl.pri { color: var(--pri); } .lbl.gold { color: color-mix(in srgb, var(--gold) 78%, var(--ink)); } .lbl.clay { color: var(--clay); } .lbl.sky { color: var(--sky); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 13px 24px; border-radius: 18px; font-weight: 800; font-size: 1rem; letter-spacing: -.01em; background: var(--grad); color: var(--pri-ink); box-shadow: 0 10px 22px color-mix(in srgb, var(--pri) 32%, transparent); transition: transform .1s, box-shadow .1s, opacity .15s; text-decoration: none; text-align: center; }
.btn:active { transform: scale(.975); box-shadow: 0 4px 10px color-mix(in srgb, var(--pri) 30%, transparent); }
.btn.wide { display: flex; width: 100%; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow2), inset 0 0 0 1.5px var(--line); }
.btn.soft { background: var(--pri-soft); color: var(--pri); box-shadow: none; }
.btn.small { min-height: 42px; padding: 8px 14px; font-size: .88rem; border-radius: 14px; }
.btn[disabled] { opacity: .4; pointer-events: none; box-shadow: none; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .center { text-align: center; } .mt { margin-top: 12px; } .mt2 { margin-top: 22px; } .mb { margin-bottom: 12px; }
.sec { margin: 28px 0 12px; font-size: 1.16rem; font-weight: 800; letter-spacing: -.02em; }
.medal { width: 50px; height: 50px; flex: none; border-radius: 17px; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; background: var(--pri-soft); }
.medal.pri { background: var(--vio-soft); } .medal.clay { background: var(--clay-soft); } .medal.sky { background: var(--sky-soft); } .medal.gold { background: var(--gold-soft); } .medal.big { width: 64px; height: 64px; font-size: 2rem; border-radius: 22px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 99px; background: var(--bg2); font-size: .76rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.gold { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 68%, var(--ink)); } .pill.blue { background: var(--pri-soft); color: var(--pri); white-space: normal; }
.pill.law { background: var(--vio-soft); color: var(--vio); } .pill.grace { background: var(--pri-soft); color: var(--pri); } .pill.promise { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 68%, var(--ink)); }

/* главная */
.hello { display: flex; gap: 10px; align-items: center; padding-top: 6px; }
.hello .hesi { flex: none; }
.bubble { position: relative; background: var(--card); border-radius: 22px 22px 22px 8px; padding: 13px 15px; box-shadow: var(--shadow2); flex: 1; }
.bubble b { display: block; font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.bubble span { color: var(--muted); font-size: .9rem; font-weight: 600; line-height: 1.4; display: block; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--card); border-radius: 20px; padding: 13px 8px; text-align: center; box-shadow: var(--shadow2); }
.stat b { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; } .stat span { font-size: .7rem; font-weight: 700; color: var(--muted); display: block; line-height: 1.2; margin-top: 4px; }
.card .stat { background: var(--bg); box-shadow: none; }
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 20px; color: #fff; background: linear-gradient(135deg, #5E9BFF, #2F5BF5); box-shadow: 0 16px 34px rgba(47, 91, 245, .28); display: block; width: 100%; text-align: left; }
.hero .lbl { color: rgba(255, 255, 255, .82); } .hero h3 { font-size: 1.36rem; font-weight: 800; line-height: 1.18; letter-spacing: -.02em; margin: 8px 0 4px; padding-right: 64px; } .hero p { opacity: .9; font-size: .92rem; font-weight: 600; }
.hero .go { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #1F3FB8; font-weight: 800; padding: 11px 18px; border-radius: 15px; box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.hero .em { position: absolute; right: 14px; top: 12px; font-size: 3.2rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
.cov-deco { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero > *:not(.cov-deco):not(.em) { position: relative; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--card); border-radius: var(--r); padding: 16px; text-align: left; box-shadow: var(--shadow2); display: flex; flex-direction: column; gap: 8px; min-height: 124px; transition: transform .12s; }
.tile:active { transform: scale(.975); }
.tile b { font-weight: 800; font-size: 1rem; line-height: 1.22; letter-spacing: -.01em; } .tile small { color: var(--muted); font-weight: 600; font-size: .8rem; line-height: 1.35; }
.tile .n { margin-top: auto; }

/* стих */
.verse { position: relative; background: var(--card); border-radius: var(--r2); padding: 16px 18px 13px 22px; cursor: pointer; display: block; width: 100%; text-align: left; box-shadow: var(--shadow2); overflow: hidden; }
.verse::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--grad); }
.verse .vt { font-family: var(--serif); font-size: 1.08rem; line-height: 1.62; }
.verse .vr { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; font-weight: 800; color: var(--muted); }
.verse .vr em { font-style: normal; font-weight: 800; color: var(--pri); background: var(--pri-soft); border-radius: 8px; padding: 2px 8px; font-size: .7rem; }
.verse.big .vt { font-size: 1.2rem; }
.verse.none .vt { color: var(--muted); font-family: var(--ui); font-size: .9rem; }

/* путь */
.cover { position: relative; overflow: hidden; border-radius: 28px; padding: 20px 20px 18px; color: #fff; margin-top: 24px; box-shadow: var(--shadow); }
.cover .lbl { color: rgba(255, 255, 255, .85); } .cover h2 { font-size: 1.4rem; font-weight: 800; line-height: 1.18; letter-spacing: -.02em; margin-top: 6px; padding-right: 70px; } .cover p { opacity: .92; font-weight: 600; font-size: .9rem; margin-top: 4px; padding-right: 70px; }
.cover .em { position: absolute; right: 18px; top: 16px; font-size: 3rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
.cover .prog { margin-top: 16px; background: rgba(255, 255, 255, .28); } .cover .prog i { background: #fff; }
.cover > *:not(.cov-deco):not(.em) { position: relative; }
.c1 { background: linear-gradient(135deg, #5E9BFF, #2F5BF5); } .c2 { background: linear-gradient(135deg, #2CC5B4, #1493C9); } .c3 { background: linear-gradient(135deg, #8B7CF8, #5746E0); }
.c4 { background: linear-gradient(135deg, #5C7CFA, #7E57E8); } .c5 { background: linear-gradient(135deg, #25B7D3, #2F7BF0); } .c6 { background: linear-gradient(135deg, #FF9A6C, #F2578C); }
.c7 { background: linear-gradient(135deg, #FFBE4D, #FF8A3D); } .c8 { background: linear-gradient(135deg, #34CF9A, #0E9F8E); } .c9 { background: linear-gradient(135deg, #7CC4FF, #4C6EF5); }
.llist { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.litem { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 20px; padding: 11px 13px; text-align: left; width: 100%; transition: transform .12s; box-shadow: var(--shadow2); }
.litem:active { transform: scale(.985); }
.litem .t { font-weight: 700; line-height: 1.25; letter-spacing: -.01em; } .litem .s { color: var(--muted); font-size: .76rem; font-weight: 700; }
.litem .chk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--line); color: transparent; }
.litem.done .chk { background: var(--ok); border-color: var(--ok); color: #fff; } .litem.done .chk .ic { width: 16px; height: 16px; stroke-width: 3; }
.litem.next { box-shadow: 0 0 0 2px var(--pri), var(--shadow2); }

/* урок */
.intro { text-align: center; padding: 30px 6px 10px; }
.intro .medal { margin: 0 auto 18px; width: 108px; height: 108px; font-size: 3.5rem; border-radius: 36px; box-shadow: var(--shadow); }
.intro h1 { font-size: 1.8rem; font-weight: 800; line-height: 1.14; letter-spacing: -.03em; margin: 10px 0 12px; }
.intro .hook { font-family: var(--serif); font-size: 1.12rem; line-height: 1.55; color: var(--muted); }
.article { padding-top: 6px; }
.article > p { font-size: 1.04rem; line-height: 1.7; margin: 14px 0; }
.article > h3 { font-size: 1.24rem; font-weight: 800; letter-spacing: -.02em; margin: 30px 0 4px; line-height: 1.22; }
.article .verse { margin: 18px 0; }
.note { border-radius: var(--r2); padding: 14px 16px; margin: 18px 0; font-size: .95rem; line-height: 1.58; }
.note .lbl { display: block; margin-bottom: 5px; }
.note.ctx { background: var(--sky-soft); } .note.see { background: var(--gold-soft); } .note.see .lbl { color: color-mix(in srgb, var(--gold) 70%, var(--ink)); }
.note.orig { background: var(--vio-soft); } .note.orig .lbl { color: var(--vio); } .note.orig b { font-weight: 800; }
.keyq { font-size: 1.36rem; line-height: 1.32; font-weight: 800; letter-spacing: -.02em; text-align: center; padding: 22px 14px; margin: 22px 0; border-radius: var(--r); background: var(--grad); color: var(--pri-ink); box-shadow: var(--shadow); }
.foot { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 68%, transparent); margin-top: 18px; }
.foot.flow { position: static; background: none; margin-top: 28px; }
.qbox h2 { font-size: 1.3rem; font-weight: 800; line-height: 1.28; letter-spacing: -.02em; margin: 18px 0 16px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { text-align: left; background: var(--card); border-radius: 18px; padding: 15px 17px; font-weight: 600; line-height: 1.38; box-shadow: var(--shadow2), inset 0 0 0 1.5px var(--line); transition: transform .08s; width: 100%; }
.opt:active { transform: scale(.985); }
.opt.ok { background: var(--ok-soft); box-shadow: inset 0 0 0 2px var(--ok); } .opt.bad { background: var(--bad-soft); box-shadow: inset 0 0 0 2px var(--bad); }
.opts.lock .opt { pointer-events: none; } .opts.lock .opt:not(.ok):not(.bad) { opacity: .5; }
.why { margin-top: 14px; border-radius: var(--r2); padding: 14px 16px; background: var(--ok-soft); font-size: .95rem; line-height: 1.5; animation: pop .25s ease; }
.why.bad { background: var(--bad-soft); } .why b { display: block; margin-bottom: 2px; }
.fin { text-align: center; padding-top: 18px; }
.fin h1 { font-size: 1.65rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 6px 0 10px; }
.fin .hesi { animation: hop .9s ease 2; }
textarea.note-in { width: 100%; min-height: 96px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); border-radius: var(--r2); background: var(--bg); padding: 12px 14px; resize: vertical; line-height: 1.5; margin-top: 10px; }
textarea:focus, input:focus { outline: 2px solid var(--pri); outline-offset: 1px; }
.idea { background: var(--gold-soft); border-radius: var(--r); padding: 18px; text-align: left; }
.idea p { font-size: 1.14rem; line-height: 1.42; font-weight: 800; letter-spacing: -.01em; margin-top: 6px; }

/* детям */
.kgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kcard { position: relative; border-radius: 26px; padding: 16px 12px 14px; text-align: center; background: var(--card); box-shadow: var(--shadow2); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .12s; }
.kcard:active { transform: scale(.96) rotate(-1deg); }
.kcard .em { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem; }
.kcard b { font-weight: 800; line-height: 1.2; font-size: .96rem; letter-spacing: -.01em; }
.kcard .star { position: absolute; top: 10px; right: 12px; font-size: 1.2rem; }
.k0 { background: #DCE9FF; } .k1 { background: #D6F4EE; } .k2 { background: #FFEBD4; } .k3 { background: #FFE0E6; } .k4 { background: #E9E4FF; } .k5 { background: #FFF4C7; }
[data-theme=night] .k0, [data-theme=night] .k1, [data-theme=night] .k2, [data-theme=night] .k3, [data-theme=night] .k4, [data-theme=night] .k5 { filter: brightness(.8) saturate(.9); }
.kpage { min-height: calc(100dvh - 190px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 4px; }
.kpage .em { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; font-size: 5rem; margin-bottom: 22px; animation: pop .35s ease; }
.kpage p { font-size: 1.3rem; line-height: 1.55; font-weight: 700; animation: rise .35s ease; }
.kpage h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 6px; }
.dots { display: flex; gap: 6px; justify-content: center; } .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .dots i.on { background: var(--pri); width: 20px; border-radius: 8px; }
.knav { display: flex; gap: 10px; }
.knav .btn { flex: 1; } .knav .btn.ghost { flex: 0 0 64px; padding: 0; }

/* игры */
.gcard, .card.tap.gcard { display: flex; gap: 14px; align-items: center; }
.gcard > .ic { color: var(--muted); width: 20px; height: 20px; }
.gcard .t { font-weight: 800; letter-spacing: -.01em; } .gcard .d { color: var(--muted); font-size: .84rem; font-weight: 600; line-height: 1.3; }
.swipe { position: relative; min-height: 210px; display: grid; place-items: center; text-align: center; background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 28px 22px; font-size: 1.34rem; line-height: 1.35; font-weight: 800; letter-spacing: -.02em; margin: 18px 0; transition: transform .28s ease, opacity .28s ease, background .2s; }
.swipe.l { transform: translateX(-120%) rotate(-12deg); opacity: 0; } .swipe.r { transform: translateX(120%) rotate(12deg); opacity: 0; }
.swipe.good { background: var(--ok-soft); } .swipe.oops { background: var(--bad-soft); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two .btn { flex-direction: column; gap: 0; min-height: 66px; line-height: 1.15; } .two .btn small { font-weight: 700; opacity: .85; font-size: .72rem; }
.btn.law { background: linear-gradient(135deg, #9A8CFA, var(--vio)); box-shadow: 0 10px 22px color-mix(in srgb, var(--vio) 32%, transparent); color: #fff; }
.btn.no { background: linear-gradient(135deg, #FF9A8C, var(--clay)); box-shadow: 0 10px 22px color-mix(in srgb, var(--clay) 32%, transparent); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 54px; }
.chip { background: var(--card); border-radius: 14px; padding: 10px 14px; font-weight: 600; box-shadow: var(--shadow2), inset 0 0 0 1.5px var(--line); font-family: var(--serif); font-size: 1.02rem; line-height: 1.3; text-align: left; animation: pop .2s ease; }
.chip.used { visibility: hidden; }
.slot { border: 2px dashed var(--line); border-radius: var(--r); padding: 14px; margin: 14px 0; background: var(--bg2); }
.slot.ok { border-color: var(--ok); border-style: solid; background: var(--ok-soft); } .slot.bad { border-color: var(--bad); border-style: solid; background: var(--bad-soft); }
.ev { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 18px; padding: 11px 13px; box-shadow: var(--shadow2), inset 0 0 0 1.5px var(--line); width: 100%; text-align: left; font-weight: 700; line-height: 1.25; }
.ev .num { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); font-weight: 800; color: var(--muted); }
.ev.sel { box-shadow: inset 0 0 0 2px var(--pri); } .ev.sel .num { background: var(--pri); color: var(--pri-ink); }
.ev.ok { box-shadow: inset 0 0 0 2px var(--ok); background: var(--ok-soft); } .ev.bad { box-shadow: inset 0 0 0 2px var(--bad); background: var(--bad-soft); }
.ev small { display: block; font-weight: 700; color: var(--muted); font-size: .76rem; }
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.mcard { aspect-ratio: 1 / 1.08; border-radius: 18px; background: var(--grad); color: var(--pri-ink); display: grid; place-items: center; text-align: center; padding: 6px; font-weight: 700; font-size: .78rem; line-height: 1.2; box-shadow: var(--shadow2); transition: transform .2s; overflow: hidden; word-break: break-word; }
.mcard .f { display: none; } .mcard.up, .mcard.gone { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); } .mcard.up .f, .mcard.gone .f { display: block; } .mcard.up .b, .mcard.gone .b { display: none; }
.mcard.gone { box-shadow: inset 0 0 0 2px var(--ok); background: var(--ok-soft); } .mcard .big { font-size: 1.05rem; font-weight: 800; } .mcard .emo { font-size: 2.1rem; } .mcard .b { font-size: 1.4rem; opacity: .9; }
.cluebox { background: var(--card); border-radius: var(--r); padding: 18px; margin: 14px 0; box-shadow: var(--shadow2); }
.cluebox p { font-size: 1.06rem; line-height: 1.5; font-weight: 600; padding: 7px 0; animation: rise .3s ease; } .cluebox p + p { border-top: 1px dashed var(--line); }
.score { font-size: 3.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 6px 0; color: var(--pri); }

/* библиотека */
.tl { position: relative; padding-left: 26px; margin-top: 8px; }
.tl::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--line); }
.tl .era { margin: 22px 0 10px -26px; display: inline-block; }
.tli { position: relative; margin-bottom: 10px; }
.tli::before { content: ''; position: absolute; left: -24px; top: 22px; width: 15px; height: 15px; border-radius: 50%; background: var(--card); border: 3px solid var(--muted); }
.tli.promise::before { border-color: var(--gold); } .tli.law::before { border-color: var(--vio); } .tli.grace::before { border-color: var(--pri); }
.tli .y { font-size: .74rem; font-weight: 800; color: var(--muted); }
.tli h3 { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; } .tli p { font-size: .93rem; line-height: 1.5; margin-top: 8px; }
details.acc { background: var(--card); border-radius: 20px; padding: 0 15px; box-shadow: var(--shadow2); }
details.acc + details.acc { margin-top: 8px; }
details.acc summary { list-style: none; cursor: pointer; padding: 13px 0; display: flex; gap: 12px; align-items: center; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary > .ic { margin-left: auto; color: var(--muted); transition: transform .2s; width: 20px; height: 20px; }
details.acc[open] summary > .ic { transform: rotate(90deg); }
details.acc .body { padding: 0 0 16px; font-size: .96rem; line-height: 1.58; }
details.acc .body p + p { margin-top: 10px; } details.acc .body .lbl { display: block; margin-top: 12px; }
.seg { display: flex; background: var(--bg2); border-radius: 16px; padding: 4px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow2); }
.memtxt { font-family: var(--serif); font-size: 1.24rem; line-height: 1.75; text-align: center; padding: 22px 8px; }
.memtxt .h { color: transparent; background: var(--bg2); border-radius: 6px; } .memtxt.peek .h { color: inherit; background: var(--gold-soft); }
.steps { display: flex; gap: 6px; justify-content: center; } .steps i { width: 26px; height: 6px; border-radius: 6px; background: var(--line); } .steps i.on { background: var(--pri); }
.tree { width: 100%; max-width: 300px; display: block; margin: 0 auto; }
.field { width: 100%; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 16px; background: var(--bg); padding: 13px 15px; min-height: 52px; font-weight: 600; }
.choice { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 20px; padding: 14px 15px; font-weight: 700; letter-spacing: -.01em; }
.choice small { display: block; font-weight: 600; color: var(--muted); line-height: 1.3; font-size: .82rem; letter-spacing: 0; }
.choice.on { box-shadow: inset 0 0 0 2px var(--pri); background: var(--pri-soft); }
.choice + .choice { margin-top: 10px; }
.sw { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--line); flex: none; } button.on > .sw { box-shadow: 0 0 0 3px var(--pri); }
.toggle { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; }
.toggle .tg { width: 52px; height: 32px; border-radius: 32px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.toggle .tg::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .2s; }
.toggle.on .tg { background: var(--pri); } .toggle.on .tg::after { transform: translateX(20px); }
.toggle b { font-weight: 700; display: block; } .toggle small { color: var(--muted); font-weight: 600; font-size: .82rem; line-height: 1.3; display: block; }
.small { font-size: .8rem; line-height: 1.45; }
.welcome { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 4px; }
.welcome h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin: 16px 0 8px; }
.welcome .lead { color: var(--muted); font-size: 1.04rem; line-height: 1.55; font-weight: 600; }
.logo { font-weight: 800; letter-spacing: -.03em; font-size: 1.4rem; display: inline-flex; align-items: center; gap: 9px; }
.logo i { font-style: normal; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 15px; background: var(--grad); box-shadow: 0 8px 18px color-mix(in srgb, var(--pri) 30%, transparent); }
.logo i svg { width: 34px; height: 34px; }

/* шторка и уведомления */
#sheet { position: fixed; inset: 0; z-index: 50; display: none; }
#sheet.on { display: block; }
.sheet-bg { position: absolute; inset: 0; background: rgba(10, 20, 45, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s ease; }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; max-width: var(--maxw); margin: 0 auto; max-height: 88dvh; overflow-y: auto; background: var(--bg); border-radius: 30px 30px 0 0; padding: 8px 16px calc(22px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2, .8, .2, 1); }
.sheet-grip { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 4px auto 14px; }
.sheet-card h2 { font-size: 1.24rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.trv { background: var(--card); border-radius: var(--r2); padding: 14px 16px; margin-bottom: 8px; box-shadow: var(--shadow2); }
.trv.cur { box-shadow: inset 0 0 0 2px var(--pri); } .trv p { font-family: var(--serif); font-size: 1.04rem; line-height: 1.58; margin-top: 6px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab) + 30px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-weight: 700; font-size: .9rem; animation: rise .25s ease; transition: opacity .4s; box-shadow: var(--shadow); } .toast.out { opacity: 0; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } } @keyframes rise { from { transform: translateY(10px); opacity: 0; } } @keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(100%); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } 60% { transform: translateY(0); } 75% { transform: translateY(-5px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes flap { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
.hesi .hs-eye { fill: #17223B; transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
.hesi .hs-line { fill: none; stroke: #17223B; stroke-width: 2.4; stroke-linecap: round; }
.hesi .hs-wave { transform-box: fill-box; transform-origin: 15% 85%; animation: flap 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 720px) { #app { padding-top: 12px; } .kgrid { grid-template-columns: repeat(3, 1fr); } }
