:root {
  --ink: #16224A; --ink2: #213470; --ink3: #2E4A9A;
  --paper: #FFF9EE; --cream: #FCEFD6; --line: #EBDDBF;
  --pom: #FF4D5E; --pom-d: #C92F40; --gold: #FFC43D; --gold-d: #D99A0B;
  --leaf: #22C38E; --leaf-d: #13936A; --leaf-l: #D8F8EC; --sky: #5CC8FF; --sky-d: #2E9BD6;
  --text: #1B2350; --muted: #6E7597;
  --shadow: 0 8px 0 rgba(8, 14, 40, .22), 0 20px 36px rgba(8, 14, 40, .22);
  --ka: "Noto Serif Georgian", serif; --glyph: "Noto Sans Georgian", "Noto Serif Georgian", sans-serif; --disp: "Unbounded", "Manrope", sans-serif; --body: "Manrope", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--body); color: #fff; overflow-x: hidden;
  background: radial-gradient(110% 60% at 50% -5%, var(--ink3) 0%, var(--ink2) 40%, var(--ink) 80%) fixed;
  -webkit-user-select: none; user-select: none;
}
.bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.bg span { position: absolute; font-family: var(--ka); font-weight: 800; color: #fff; opacity: .05; line-height: 1; }
.bg span:nth-child(1) { font-size: 42vmin; left: -6vmin; top: 8vh; transform: rotate(-12deg); }
.bg span:nth-child(2) { font-size: 30vmin; right: -4vmin; top: 26vh; transform: rotate(10deg); }
.bg span:nth-child(3) { font-size: 26vmin; left: 18vw; bottom: -6vmin; }
.bg span:nth-child(4) { font-size: 18vmin; right: 20vw; bottom: 16vh; transform: rotate(-8deg); }
.bg span:nth-child(5) { font-size: 14vmin; left: 55vw; top: 3vh; }
.bg span:nth-child(6) { font-size: 22vmin; right: -2vmin; bottom: -4vmin; color: var(--gold); opacity: .08; }

main { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; min-height: 100vh;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
button, input { font: inherit; color: inherit; border: 0; background: none; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
.screen { display: flex; flex-direction: column; flex: 1; gap: 16px; animation: rise .45s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }

/* ---------- header & tabs */
.top { display: flex; align-items: center; gap: 8px; }
.me { display: flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); font-size: 26px; }
.me b { font-family: var(--disp); font-size: 16px; max-width: 42vw; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 9px 12px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, .1); font-family: var(--disp); font-weight: 700; font-size: 15px; }
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5;
  width: min(420px, calc(100% - 24px)); display: flex; gap: 6px; padding: 7px; border-radius: 24px;
  background: rgba(22, 34, 74, .92); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); border: 1px solid rgba(255,255,255,.08); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 18px;
  font-weight: 800; font-size: 12px; opacity: .7; }
.tabs button span { font-size: 24px; line-height: 1.1; }
.tabs button.on { background: rgba(255, 255, 255, .14); opacity: 1; }

/* ---------- mascot */
.mascot { display: flex; align-items: flex-end; gap: 10px; }
.mascot .cat { width: 92px; flex: none; animation: bob 2.6s ease-in-out infinite; }
.mascot .cat svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 0 rgba(0,0,0,.18)); }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
.mascot .eyes-happy, .mascot .mouth-open { display: none; }
.mascot.mood-happy .eyes { display: none; } .mascot.mood-happy .eyes-happy, .mascot.mood-happy .mouth-open { display: inline; }
.mascot.mood-happy .mouth { display: none; }
.mascot.mood-sad .cat { animation: tilt .6s; }
@keyframes tilt { 30% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } }
.bubble { position: relative; background: #fff; color: var(--text); padding: 14px 16px; border-radius: 20px 20px 20px 6px;
  font-weight: 800; font-size: 17px; line-height: 1.3; box-shadow: 0 6px 0 rgba(0,0,0,.15); margin-bottom: 18px; animation: rise .35s both; }
.bubble b { color: var(--pom-d); }
.screen > .mascot:last-child:not(:first-child) { margin-top: auto; }
.mascot:not(.show) .bubble:empty { display: none; }

/* ---------- onboarding */
.onboard { justify-content: center; gap: clamp(10px, 2.2vh, 20px); }
.onboard .mascot { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.onboard .mascot .cat { width: clamp(80px, 17vh, 150px); }
.onboard .bubble { border-radius: 22px; margin: 0; font-size: clamp(16px, 2.6vh, 20px); padding: 12px 16px; }
/* short phones (iPhone SE/12 with the browser bar): name, animal and «Дальше» must fit on the first screen */
@media (max-height: 760px) {
  .onboard .name-input { padding: 14px; font-size: 22px; }
  .onboard .av { aspect-ratio: auto; height: clamp(44px, 7.4vh, 56px); font-size: 28px; }
  .onboard .avatars { gap: 8px; }
  .onboard .play { margin-top: 0; padding: 16px; }
}
.name-input { width: 100%; padding: 20px; border-radius: 22px; background: #fff; color: var(--text); text-align: center;
  font-family: var(--disp); font-weight: 700; font-size: 26px; box-shadow: 0 6px 0 var(--line); outline: none; -webkit-user-select: text; user-select: text; }
.name-input::placeholder { color: #B9BCCF; }
.avatars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.av { aspect-ratio: 1; padding: 0; border-radius: 20px; background: rgba(255, 255, 255, .1); font-size: clamp(30px, 9vw, 42px); transition: transform .15s; }
.av.on { background: var(--gold); transform: scale(1.08); box-shadow: 0 5px 0 var(--gold-d); }

/* ---------- home */
.hero { background: var(--paper); color: var(--text); border-radius: 28px; padding: 20px; box-shadow: var(--shadow); }
.big-num { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.big-num b { font-family: var(--disp); font-weight: 800; font-size: 54px; line-height: 1; color: var(--leaf-d); }
.big-num span { font-weight: 800; color: var(--muted); line-height: 1.25; }
.bar { height: 16px; border-radius: 99px; background: var(--cream); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--leaf), #53E0AE); transition: width .6s; }
.week { display: flex; justify-content: space-between; margin: 14px 2px 0; }
.week span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--muted); }
.week span i { width: 34px; height: 34px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; font-style: normal; font-size: 18px; }
.week span.hit i { background: #FFE7B3; } .week span.today { color: var(--pom-d); } .week span.today i { outline: 3px solid var(--pom); }
.play { margin-top: 16px; width: 100%; padding: 20px; border-radius: 22px; background: var(--pom); color: #fff;
  font-family: var(--disp); font-weight: 800; font-size: clamp(17px, 5.6vw, 24px); letter-spacing: .3px; box-shadow: 0 7px 0 var(--pom-d);
  transition: transform .08s, box-shadow .08s; animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { filter: brightness(1.08); } }
.play:active, .btn:active, .next:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.path { display: flex; flex-direction: column; align-items: stretch; padding: 4px 0; }
.dots { display: block; width: 6px; height: 26px; margin: 2px auto; border-radius: 3px;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.35) 0 6px, transparent 6px 12px); }
.node { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 24px; width: 82%; text-align: left; }
.node.l { align-self: flex-start; } .node.r { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.ring { width: 78px; height: 78px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--tc) calc(var(--p) * 1%), rgba(255,255,255,.14) 0); padding: 6px; }
.ico { width: 100%; height: 100%; border-radius: 50%; background: var(--ink2); display: grid; place-items: center; font-size: 32px; }
.node.now .ring { animation: pulse 1.6s infinite; } .node.now .ico { background: var(--tc); }
.node.done .ico { background: var(--gold); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 196, 61, .55); } 50% { box-shadow: 0 0 0 12px rgba(255, 196, 61, 0); } }
.lbl b { display: block; font-family: var(--disp); font-weight: 700; font-size: 16px; }
.lbl small { font-weight: 800; opacity: .7; }
.node.now .lbl b::after { content: " ▶"; color: var(--gold); }

/* ---------- lesson */
.lesson-top { display: flex; align-items: center; gap: 14px; }
.x { width: 48px; height: 48px; border-radius: 16px; background: rgba(255, 255, 255, .14); font-size: 26px; flex: none; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.x:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.track { position: relative; flex: 1; height: 16px; border-radius: 99px; background: rgba(255, 255, 255, .15); margin-right: 16px; }
.track i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #FFD978); transition: width .4s; }
.runner { position: absolute; top: 50%; transform: translate(-50%, -55%); font-size: 30px; transition: left .4s; filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); }
.card { background: var(--paper); color: var(--text); border-radius: 30px; padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ask { font-family: var(--disp); font-weight: 700; font-size: clamp(18px, 4.8vw, 22px); text-align: center; margin: 2px 0 0; }
.speak { width: 116px; height: 116px; border-radius: 50%; background: var(--sky); color: var(--ink); font-size: 48px;
  box-shadow: 0 7px 0 var(--sky-d); display: grid; place-items: center; position: relative; transition: transform .08s; }
.speak:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--sky-d); }
.speak.on::before, .speak.on::after, .snd.on::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 4px solid var(--sky); animation: ring 1.1s infinite; }
.speak.on::after { animation-delay: .4s; }
.snd.on::before { border-radius: 26px; inset: -6px; }
@keyframes ring { from { opacity: .8; transform: scale(.92); } to { opacity: 0; transform: scale(1.3); } }
.opts { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.opt { aspect-ratio: 1; border-radius: 24px; background: #fff; border: 3px solid var(--line); box-shadow: 0 6px 0 var(--line);
  display: grid; place-items: center; transition: transform .08s, border-color .2s, background .2s; position: relative; }
.opt:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--line); }
.opt.ok { border-color: var(--leaf); background: var(--leaf-l); box-shadow: 0 6px 0 var(--leaf); animation: pop .4s; }
.opt.bad { animation: shake .4s; border-color: var(--pom); background: #FFE8EA; }
.opt.dim { opacity: .35; }
@keyframes pop { 50% { transform: scale(1.1) rotate(-3deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pic-wrap { width: min(62vw, 230px); aspect-ratio: 1; border-radius: 34px; background: color-mix(in srgb, var(--tc, #FFC43D) 28%, #fff);
  display: grid; place-items: center; }
.pic.emoji { font-size: clamp(48px, 13vw, 78px); line-height: 1; }
.pic.svg { width: 76%; height: 76%; }
.opt .pic.svg { width: 92%; height: 92%; }  /* drawings fill less of their box than emoji do */
.pic.swatch { width: 66%; aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 -8px 0 rgba(0,0,0,.14), 0 0 0 5px #fff, 0 0 0 7px var(--line); }
.pic-wrap .pic.emoji { font-size: clamp(96px, 28vw, 140px); }
.pic-wrap .pic.svg { width: 80%; height: 80%; }
.pic-wrap .pic.swatch { width: 70%; }
.badge-new { display: inline-block; padding: 6px 12px; border-radius: 10px; background: var(--gold); color: var(--ink); font-weight: 800; font-size: 14px; }
.word { font-family: var(--ka); font-weight: 800; font-size: clamp(36px, 10.5vw, 56px); line-height: 1.15; text-align: center; }
.tr { font-weight: 700; color: var(--muted); font-size: 18px; margin-top: -8px; }
.ru { font-family: var(--disp); font-weight: 700; font-size: 22px; padding: 8px 18px; border-radius: 14px; background: var(--cream); }
.pair { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn { padding: 15px 20px; border-radius: 18px; background: var(--ink); color: #fff; font-weight: 800; font-size: 17px; box-shadow: 0 5px 0 #0A1230; white-space: nowrap; }
.btn.alt { background: var(--cream); color: var(--ink); box-shadow: 0 5px 0 var(--line); }
.btn.wide { width: 100%; }
.next { width: 100%; padding: 20px; border-radius: 22px; background: var(--leaf); color: #fff; font-family: var(--disp); font-weight: 800;
  font-size: 21px; box-shadow: 0 7px 0 var(--leaf-d); margin-top: auto; }
.snd { aspect-ratio: auto; padding: 14px 6px 10px; gap: 10px; }
.snd .wave { font-size: 32px; width: 58px; height: 58px; border-radius: 50%; background: #E6F6FF; }
.snd .pick { width: 100%; padding: 10px 4px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; line-height: 1.15; }
.hint { font-weight: 700; color: var(--muted); text-align: center; font-size: 14px; }
.lesson-top ~ .card { margin: auto 0 0; }

/* ---------- result */
.result { text-align: center; align-items: center; }
.cheer video { width: min(220px, 58vw); border-radius: 28px; box-shadow: var(--shadow); background: #000; display: block; }
.result h2 { font-family: var(--disp); font-weight: 800; font-size: clamp(24px, 6.5vw, 32px); margin: 4px 0 0; }
.stars { display: flex; gap: 10px; font-size: 48px; }
.stars span { filter: grayscale(1) opacity(.35); }
.stars span.got { filter: none; animation: star .6s both; }
@keyframes star { from { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3) rotate(10deg); } }
.stats { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats div { background: rgba(255, 255, 255, .1); border-radius: 18px; padding: 12px 4px; }
.stats b { display: block; font-family: var(--disp); font-size: 20px; }
.stats span { font-size: 12px; font-weight: 800; opacity: .75; }
.sticker-new { width: 130px; height: 130px; border-radius: 28px; background: var(--paper); display: grid; place-items: center;
  font-size: 76px; box-shadow: var(--shadow); animation: flip .9s .9s both; }
@keyframes flip { from { transform: rotateY(90deg) scale(.6); } 60% { transform: rotateY(-10deg) scale(1.1); } }
.got-sticker { margin: -4px 0 0; font-weight: 800; color: var(--gold); }

/* ---------- album / profile */
.panel-dark { background: rgba(255, 255, 255, .08); border-radius: 22px; padding: 16px 18px; }
.panel-dark h3 { margin: 0; font-family: var(--disp); font-size: 18px; } .panel-dark p { margin: 6px 0 0; opacity: .75; font-weight: 700; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 12px; }
.slot { aspect-ratio: 1; border-radius: 22px; background: var(--paper); display: grid; place-items: center; font-size: 44px; box-shadow: 0 6px 0 rgba(0,0,0,.2); }
.slot.locked { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 2px rgba(255,255,255,.1); font-family: var(--disp); font-size: 24px; opacity: .45; }
.panel { background: var(--paper); color: var(--text); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 12px; font-family: var(--disp); font-size: 17px; }
.muted { color: var(--muted); font-weight: 700; margin: 0; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head h3 { margin: 0 0 4px; font-size: 22px; } .profile-head p { margin: 0; color: var(--muted); font-weight: 700; font-size: 13px; }
.profile-head { flex-wrap: wrap; }
.profile-head .btn { margin-left: auto; padding: 10px 12px; font-size: 14px; }
.big-av { font-size: 54px; }
.seg { display: flex; background: var(--cream); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; padding: 12px; border-radius: 11px; font-weight: 800; }
.seg button.on { background: var(--ink); color: #fff; }
.wl { display: grid; gap: 6px; }
.wl > div { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 14px; background: #fff; font-weight: 700; }
.wl .say { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #E6F6FF; font-size: 20px; position: relative; }
.wl .say.on { background: var(--sky); }
.wl .wk { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.wl .wk b { font-family: var(--ka); font-weight: 800; font-size: 17px; }
.wl .wk small { color: var(--muted); font-size: 13px; }
.wl .s { margin-left: auto; font-size: 12px; padding: 4px 8px; border-radius: 8px; background: var(--cream); white-space: nowrap; }
.wl .s.known { background: var(--leaf-l); color: #0E6B4E; } .wl .s.new { opacity: .6; }
.danger { color: var(--pom-d); font-weight: 800; padding: 12px 0 0; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9; overflow: hidden; }
.confetti i { position: absolute; font-style: normal; font-size: 26px; animation: burst 1s ease-out forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
@media (max-width: 360px) { .chip { padding: 8px 9px; font-size: 14px; } .top { gap: 6px; } }
@media (min-width: 700px) { .opts { gap: 18px; } .card { padding: 30px; } .mascot .cat { width: 110px; } }

/* ---------- modes & letters */
.modes { display: flex; gap: 6px; padding: 5px; border-radius: 18px; background: rgba(255, 255, 255, .08); }
.modes button { flex: 1; padding: 12px; border-radius: 14px; font-family: var(--disp); font-weight: 700; font-size: 16px; opacity: .7; }
.modes button.on { background: var(--paper); color: var(--ink); opacity: 1; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.lt { aspect-ratio: 1; border-radius: 18px; background: rgba(255, 255, 255, .08); font-family: var(--glyph); font-weight: 700; font-size: 34px; color: rgba(255,255,255,.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.lt small { font-family: var(--body); font-size: 12px; font-weight: 800; opacity: .8; }
.lt.seen { background: #2F4B9A; color: #fff; } .lt.known { background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--gold-d); }
.lt.next { background: var(--pom); color: #fff; box-shadow: 0 5px 0 var(--pom-d); animation: pulse 1.6s infinite; }
.pic.glyph { font-family: var(--glyph); font-weight: 700; font-size: clamp(52px, 14vw, 80px); line-height: 1; color: var(--ink); }
.letter-wrap { background: color-mix(in srgb, var(--pom) 18%, #fff); }
.pic-wrap .pic.glyph { font-size: clamp(120px, 34vw, 170px); color: var(--pom-d); }
.lname { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lname b { font-family: var(--ka); font-size: 30px; } .lname span { font-weight: 800; color: var(--muted); }
.example { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 18px; background: var(--cream); }
.ex-pic .pic.emoji { font-size: 44px; } .ex-pic .pic.svg { width: 52px; height: 52px; }
.example b { display: block; font-family: var(--ka); font-size: 24px; } .example u { color: var(--pom-d); text-decoration: none; border-bottom: 4px solid var(--pom); }
.example small { font-weight: 700; color: var(--muted); }
.ex-big { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 26px; border-radius: 28px; background: #E6F6FF; box-shadow: 0 6px 0 #BFE3F7; position: relative; }
.ex-big .pic.emoji { font-size: 84px; } .ex-big .pic.svg { width: 110px; height: 110px; }
.ex-big span { font-weight: 800; color: var(--ink); }
.ex-big.on::before { content: ""; position: absolute; inset: -8px; border-radius: 34px; border: 4px solid var(--sky); animation: ring 1.1s infinite; }
.glyph-opt .pic.glyph { font-size: clamp(56px, 15vw, 84px); }
.trace { position: relative; width: min(78vw, 340px); aspect-ratio: 1; border-radius: 28px; background: #fff; border: 3px dashed var(--line); overflow: hidden; }
.trace canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.meter { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 10px; border-radius: 99px; background: var(--cream); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--leaf), #53E0AE); transition: width .3s; }
.trace.ok { border-color: var(--leaf); border-style: solid; }

/* ---------- account bits */
.link { padding: 10px; font-weight: 800; color: #fff; opacity: .8; text-decoration: underline; text-underline-offset: 4px; }
.note { margin: -6px 8px 0; text-align: center; font-weight: 700; opacity: .65; font-size: 14px; }
.foot { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.about {  padding: 16px 18px; border-radius: 20px; background: rgba(255, 255, 255, .06); font-size: 14px; line-height: 1.45; opacity: .85; }
.about p { margin: 0 0 8px; } .about p:last-child { margin: 0; }
.legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; margin: 0; font-size: 13px; font-weight: 700; }
.legal a { color: #fff; opacity: .6; text-underline-offset: 3px; }
.onboard > :first-child, .onboard > .foot { margin-top: auto; }
.mail-state { margin: 0; font-weight: 700; color: var(--text); line-height: 1.4; } .mail-state b { word-break: break-all; }
.link.dark { color: var(--ink); padding: 10px 0 0; }
.toast { position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 20; width: min(440px, calc(100% - 32px));
  background: #fff; color: var(--text); padding: 14px 16px; border-radius: 18px; font-weight: 700; box-shadow: 0 12px 30px rgba(0,0,0,.35);
  text-align: center; animation: rise .3s both; transition: opacity .5s; }
.toast.out { opacity: 0; }
.row-in { display: flex; gap: 8px; margin-top: 10px; }
.small-input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; background: #fff; border: 2px solid var(--line); color: var(--text); font-weight: 700; -webkit-user-select: text; user-select: text; }
/* ---------- policy pages */
.doc { display: block; background: var(--paper); color: var(--text); border-radius: 28px; margin: 16px auto 32px; padding: 26px 22px;
  min-height: 0; line-height: 1.55; font-size: 16px; -webkit-user-select: text; user-select: text; }
.doc h1 { font-family: var(--disp); font-size: clamp(22px, 6vw, 30px); margin: 14px 0 4px; }
.doc h2 { font-family: var(--disp); font-size: 18px; margin: 24px 0 6px; }
.doc .date { color: var(--muted); font-weight: 700; margin: 0 0 16px; }
.doc a { color: var(--pom-d); font-weight: 800; } .doc ul { padding-left: 20px; } .doc li { margin: 4px 0; }
.doc code { background: var(--cream); padding: 1px 6px; border-radius: 6px; font-size: 14px; }
.doc .back { display: inline-block; padding: 10px 14px; border-radius: 14px; background: var(--cream); color: var(--ink); text-decoration: none; }
.ranks { display: grid; gap: 8px; }
.rk { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .08); font-weight: 800; }
.rk.me-row { background: var(--paper); color: var(--text); }
.rk .pos { width: 30px; text-align: center; font-family: var(--disp); } .rk .av-s { font-size: 26px; }
.rk b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rk .w { font-size: 13px; opacity: .75; } .rk .s { font-family: var(--disp); }

/* ---------- «Дальше →» while the praise is playing; overscroll off (Telegram's in-app browser) */
html, body { overscroll-behavior: none; }
.next-fab { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 8; padding: 16px 22px; border-radius: 20px;
  background: var(--leaf); color: #fff; font-family: var(--disp); font-weight: 800; font-size: 18px; box-shadow: 0 6px 0 var(--leaf-d), 0 12px 24px rgba(0,0,0,.3);
  animation: rise .3s .25s both; }
.next-fab:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--leaf-d); }
button.chip { cursor: pointer; }
