:root {
  --bg: #FFF7F2; --card: #fff; --ink: #3A2A3F; --ink2: #8C7C90; --line: #F4E7E2; --shade: #EBDAD5;
  --pink: #F25C87; --pink-d: #D9426F; --pink-s: #FFE3EB; --pink-ss: #FFF0F4;
  --sun: #FFC857; --sun-s: #FFF3D6; --sun-d: #9A6A0B;
  --mint: #2FB67C; --mint-s: #DFF5EA; --mint-d: #1C7A52;
  --amber: #F2994A; --amber-s: #FFEEDC; --amber-d: #9A5310;
  --shadow: 0 1px 0 rgba(58, 42, 63, .03), 0 10px 28px rgba(58, 42, 63, .06);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --spring: cubic-bezier(.3, 1.5, .5, 1); --out: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); overscroll-behavior: none; }
body { font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
#app { max-width: 480px; margin: 0 auto; height: 100dvh; position: relative; overflow: hidden; background: var(--bg); }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
button:focus-visible { outline: 3px solid rgba(242, 92, 135, .35); outline-offset: 2px; }
input { outline: none; }
.field:focus { background: #FFFBFC; }
img { display: block; user-select: none; -webkit-user-drag: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 900; letter-spacing: -.4px; line-height: 1.15; }
h2 { font-size: 22px; font-weight: 900; letter-spacing: -.3px; line-height: 1.2; }
h3 { font-size: 22px; font-weight: 900; letter-spacing: -.3px; }
.muted { color: var(--ink2); } .small { font-size: 13.5px; } .center { text-align: center; }
.eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--ink2); }
.eyebrow.section { margin: 18px 4px 8px; }
.boot { height: 100%; display: grid; place-items: center; } .boot img { width: 96px; }

/* ---------- кнопки и поля ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 8px 20px; border-radius: 20px; font-weight: 800; font-size: 17px; transition: transform .12s var(--out), background .15s, box-shadow .15s, opacity .15s; }
.btn.primary { background: var(--pink); color: #fff; box-shadow: 0 8px 20px rgba(242, 92, 135, .3); }
.btn.ghost { background: var(--card); box-shadow: var(--shadow); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { background: #F1E6E2; color: #BBAEB2; box-shadow: none; cursor: default; }
.btn span { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.btn small { font-size: 12.5px; font-weight: 700; opacity: .85; }
.btn.big { min-height: 64px; font-size: 18px; }
.btn.mini { width: auto; min-height: 40px; padding: 4px 14px; border-radius: 14px; font-size: 14.5px; background: #fff; color: var(--mint-d); }
.btn.small { min-height: 46px; font-size: 15px; border-radius: 16px; }
.link { display: block; margin: 0 auto; padding: 10px 12px; font-weight: 800; font-size: 15px; color: var(--ink2); }
.link.small { display: inline-block; margin: 0; padding: 6px 8px; font-size: 13.5px; }
.link.danger { color: var(--amber-d); margin-top: 8px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--ink2); }
.field { width: 100%; height: 56px; padding: 0 18px; border: 0; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font: inherit; font-weight: 700; font-size: 18px; color: var(--ink); outline: none; }
.field::placeholder { color: #C3B6BA; } .field.center { text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 14.5px; z-index: 60; animation: rise .25s var(--out); max-width: 88vw; text-align: center; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }
.burst { position: fixed; width: 24px; height: 24px; pointer-events: none; z-index: 70; animation: burst .9s var(--out) both; }
@keyframes burst { from { opacity: 0; transform: translate(0, 10px) scale(.4); } 25% { opacity: 1; } to { opacity: 0; transform: translate(var(--dx), -90px) scale(1.1); } }

/* ---------- Персик ---------- */
.pig { flex: none; } .pig img { width: 100%; height: 100%; }
.pig.yay img { animation: yay .7s var(--spring); } .pig.hop img { animation: hop .5s ease 2; }
.pig.oops img { animation: oops .7s ease; } .pig.nod img { animation: nod .5s ease; }
@keyframes yay { 30% { transform: translateY(-16%) rotate(-8deg) scale(1.08); } 60% { transform: translateY(0) rotate(6deg); } }
@keyframes hop { 50% { transform: translateY(-18%); } }
@keyframes oops { 25% { transform: rotate(-9deg); } 60% { transform: rotate(7deg) translateY(3%); } }
@keyframes nod { 40% { transform: translateY(6%) scale(.97); } }

/* ---------- каркас и вкладки ---------- */
.shell { height: 100%; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tabbar { display: flex; padding: 6px 8px calc(6px + var(--safe-b)); background: rgba(255, 255, 255, .92); box-shadow: 0 -1px 0 var(--line); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border-radius: 16px; font-size: 11.5px; font-weight: 800; color: var(--ink2); }
.tab img { width: 30px; height: 30px; padding: 3px; border-radius: 12px; filter: grayscale(.85); opacity: .6; transition: transform .25s var(--spring); }
.tab.on { color: var(--pink-d); } .tab.on img { filter: none; opacity: 1; transform: scale(1.18); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + var(--safe-t)) 12px 6px 20px; min-height: 58px; }
.date { font-weight: 800; font-size: 15px; color: var(--ink2); }
.screen-title { font-size: 26px; } .top-note { font-size: 13.5px; font-weight: 800; color: var(--ink2); padding-right: 8px; }
.stats { display: flex; align-items: center; gap: 6px; }
.stat { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 11px; border-radius: 14px; background: var(--card); font-weight: 800; font-size: 16px; box-shadow: var(--shadow); }
.stat img { width: 22px; height: 22px; } .stat img.dim { filter: grayscale(1); opacity: .5; }

/* ---------- сегодня ---------- */
.today { flex: 1; overflow-y: auto; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.hero { display: flex; align-items: center; gap: 6px; padding: 2px 4px 0; }
.hero-pig { width: 104px; height: 104px; cursor: pointer; }
.hero-bubble { position: relative; padding: 12px 16px; border-radius: 22px; border-bottom-left-radius: 6px; background: var(--card); box-shadow: var(--shadow); text-align: left; line-height: 1.2; animation: bubble .45s .15s var(--spring) both; }
.hero-bubble b { display: block; font-size: 18px; font-weight: 900; } .hero-bubble small { font-size: 13px; font-weight: 700; color: var(--ink2); }
@keyframes bubble { from { opacity: 0; transform: scale(.8) translateX(-10px); } }
.day-card { background: var(--card); border-radius: 26px; padding: 16px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.day-card h2 { margin-top: 2px; } .day-card p { font-size: 14.5px; }
.goal { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 12px; }
.goal i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--sun), var(--pink)); transition: width .8s var(--out); }
.goal.wide { width: 100%; }
.goal-label { font-size: 13px; font-weight: 700; color: var(--ink2); margin-top: 6px; } .goal-label b { color: var(--ink); font-weight: 900; }
.blocks { display: flex; flex-direction: column; gap: 8px; }
.block { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); text-align: left; transition: transform .12s var(--out); }
.block:active { transform: scale(.98); }
.block img { width: 42px; height: 42px; flex: none; } .block span { flex: 1; min-width: 0; }
.block b { display: block; font-weight: 900; font-size: 16.5px; } .block small { display: block; font-size: 13px; font-weight: 700; color: var(--ink2); }
.block em { font-style: normal; font-size: 13px; font-weight: 800; color: var(--ink2); white-space: nowrap; }
.block.next { background: var(--pink-s); box-shadow: none; } .block.next em { color: var(--pink-d); }
.block.done img { filter: grayscale(.5); opacity: .6; } .block.done b { color: var(--ink2); }
.block.empty { opacity: .55; box-shadow: none; }
.tick { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #fff; }
.cta { position: sticky; bottom: -16px; margin: auto -16px -16px; padding: 18px 16px 16px; background: linear-gradient(rgba(255, 247, 242, 0), var(--bg) 34%); }
.extras { display: flex; flex-direction: column; gap: 10px; }
.extra, .talk-card, .vault-row, .scene { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); text-align: left; transition: transform .12s var(--out); }
.extra:active, .talk-card:active, .vault-row:active, .scene:active { transform: scale(.98); }
.extra img, .talk-card img, .vault-row img { width: 40px; height: 40px; flex: none; }
.extra span, .talk-card span, .vault-row span, .scene > span:nth-child(2) { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--ink2); }
.extra b, .talk-card b, .vault-row b, .scene b { display: block; font-size: 16.5px; font-weight: 900; color: var(--ink); }
.talk-card svg, .vault-row svg { color: var(--shade); flex: none; }

/* ---------- путь ---------- */
.map { flex: 1; overflow-y: auto; padding: 0 16px 28px; -webkit-overflow-scrolling: touch; }
.stage-card { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 26px; padding: 16px 18px 16px 14px; margin: 12px 0 6px; box-shadow: var(--shadow); }
.stage-card.locked { opacity: .55; box-shadow: none; }
.stage-art { width: 76px; height: 76px; flex: none; }
.stage-info { flex: 1; min-width: 0; } .stage-info p { font-size: 13.5px; color: var(--ink2); margin: 2px 0 0; }
.stage-info .goal { height: 8px; margin-top: 10px; }
.trail { position: relative; margin: 0 auto; }
.road { position: absolute; inset: 0; overflow: visible; }
.road path { fill: none; stroke-linecap: round; stroke-width: 7; }
.road-base { stroke: #EEDFD9; stroke-dasharray: .1 15; }
.road-done { stroke: #F9A8BF; stroke-width: 8; }
.road-done.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s .3s var(--out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.unit-head { position: absolute; left: 0; right: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 4px 6px; text-align: left; }
.unit-head.locked { opacity: .45; }
.unit-emoji { font-size: 26px; line-height: 1; width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.unit-head b { display: block; font-weight: 900; font-size: 16px; } .unit-head small { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.stone { position: absolute; z-index: 2; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 22px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); font-size: 19px; transition: transform .12s var(--out); }
.stone b { font-weight: 900; } .stone:active { transform: scale(.94); }
.stone.done { background: var(--pink-s); color: var(--pink-d); box-shadow: none; }
.stone.current { width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 26px; background: var(--pink); color: #fff; font-size: 24px; box-shadow: 0 10px 24px rgba(242, 92, 135, .38); }
.stone.locked { background: #F7EDE9; color: #C6B8BC; box-shadow: none; }
.stone.pop { animation: pop .6s 1s var(--spring) both; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }
.pips { position: absolute; bottom: 8px; display: flex; gap: 3px; } .pips i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .45); } .pips i.on { background: #fff; }
.stone.current b { margin-top: -8px; }
.badge { position: absolute; right: -3px; bottom: -3px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #fff; box-shadow: 0 0 0 3px var(--bg); }
.pig-marker { position: absolute; z-index: 3; width: 78px; height: 78px; }
.pig-marker img { width: 100%; height: 100%; } .pig-marker.flip img { transform: scaleX(-1); }
.pig-marker.walk { transition: left .9s var(--out), top .9s var(--out); }
.pig-marker.hop { animation: mhop .46s ease 2; }
@keyframes mhop { 50% { translate: 0 -18px; } }
.gift { position: absolute; z-index: 2; width: 92px; height: 92px; margin: -46px 0 0 -46px; display: grid; place-items: center; }
.gift img { width: 84px; height: 84px; } .gift.locked img { filter: grayscale(.85); opacity: .45; }
.gift.ready img, .wiggle { animation: wiggle 2.6s ease-in-out infinite; }
@keyframes wiggle { 0%, 70%, 100% { rotate: 0deg; } 76% { rotate: -9deg; } 82% { rotate: 8deg; } 88% { rotate: -6deg; } 94% { rotate: 4deg; } }
.map-end { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 30px 10px; text-align: center; color: var(--ink2); font-size: 14px; font-weight: 700; }
.map-end img { width: 64px; }

/* ---------- разговор и копилка ---------- */
.hub, .vault { flex: 1; overflow-y: auto; padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.hub-hero { display: flex; align-items: center; gap: 12px; padding: 4px 4px 8px; } .hub-pig { width: 96px; height: 96px; } .hub-hero p { font-size: 14.5px; margin-top: 4px; }
.note-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: var(--sun-s); font-size: 13.5px; font-weight: 700; color: var(--sun-d); } .note-card img { width: 28px; flex: none; }
.talk-card.main { background: var(--pink); box-shadow: 0 10px 24px rgba(242, 92, 135, .3); } .talk-card.main b, .talk-card.main span { color: #fff; } .talk-card.main svg { color: rgba(255, 255, 255, .7); }
.scenes { display: flex; flex-direction: column; gap: 8px; }
.scene { padding: 10px 14px; box-shadow: none; } .scene small { display: block; }
.vault-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 10px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); text-align: center; font-size: 13px; font-weight: 700; color: var(--ink2); }
.vault-stats b { display: block; font-size: 26px; font-weight: 900; color: var(--ink); line-height: 1.1; }
.vault-row em { font-style: normal; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; display: grid; place-items: center; background: var(--pink-s); color: var(--pink-d); font-size: 13.5px; font-weight: 900; }
.wordlist { display: flex; flex-direction: column; gap: 6px; }
.wordrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); text-align: left; }
.wordrow > span:not(.unit-emoji) { flex: 1; min-width: 0; } .wordrow b { display: block; font-weight: 900; } .wordrow small { display: block; font-size: 13px; color: var(--ink2); } .wordrow s { display: block; font-size: 13px; color: var(--amber-d); }
.wordrow svg { color: var(--pink); flex: none; } .wordrow .unit-emoji { width: 36px; height: 36px; font-size: 22px; box-shadow: none; background: var(--bg); }

/* ---------- шторка ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(58, 42, 63, 0); transition: background .24s; }
.sheet-back.in { background: rgba(58, 42, 63, .36); }
.sheet { position: absolute; left: 50%; bottom: 0; width: min(480px, 100%); max-height: 90dvh; overflow-y: auto; transform: translate(-50%, 100%); transition: transform .32s var(--out); background: var(--bg); border-radius: 30px 30px 0 0; padding: 10px 20px calc(22px + var(--safe-b)); }
.sheet-back.in .sheet { transform: translate(-50%, 0); }
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--shade); margin: 0 auto 14px; }
.sheet-body { display: flex; flex-direction: column; gap: 10px; } .sheet-body.center { align-items: center; text-align: center; } .sheet-body.tall { min-height: 60dvh; }
.sheet-body .btn { margin-top: 8px; }
.sheet-art { width: 84px; height: 84px; } .sheet-art.big { width: 120px; height: 120px; } .sheet-art.dim { filter: grayscale(.85); opacity: .5; }
.sheet-pig { width: 104px; height: 104px; }
.locked-note { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 12px 16px; border-radius: 16px; background: var(--card); font-weight: 800; font-size: 14.5px; color: var(--ink2); } .locked-note img { width: 22px; }
.rows { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); font-weight: 800; text-align: left; }
.row img { width: 30px; height: 30px; } .row span { flex: 1; } .row svg { color: var(--mint); } .row em { font-style: normal; font-size: 13px; color: var(--ink2); }
.again { display: flex; flex-direction: column; gap: 8px; }
.gift-text { font-size: 18px; font-weight: 800; line-height: 1.35; padding: 14px 16px; border-radius: 18px; background: var(--card); }
.week { display: flex; justify-content: space-between; align-items: flex-start; margin: 6px 0 4px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; line-height: 16px; color: var(--ink2); width: 40px; }
.day i { width: 26px; height: 74px; border-radius: 13px; background: var(--line); display: flex; align-items: flex-end; overflow: hidden; }
.day u { display: block; width: 100%; text-decoration: none; border-radius: 13px; background: linear-gradient(var(--pink), var(--sun)); } .day.today { color: var(--ink); } .day small { height: 14px; font-size: 11.5px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.facts div { background: var(--card); border-radius: 18px; padding: 12px 14px; font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.facts img { width: 26px; margin-bottom: 4px; } .facts b { display: block; font-size: 24px; font-weight: 900; color: var(--ink); line-height: 1.1; }
.set-label { font-size: 13.5px; font-weight: 800; color: var(--ink2); margin-top: 4px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--card); font-weight: 800; }
.toggle { width: 52px; height: 32px; flex: none; border-radius: 16px; background: var(--shade); position: relative; transition: background .18s; }
.toggle i { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .22s var(--spring); }
.toggle.on { background: var(--pink); } .toggle.on i { transform: translateX(20px); }
.set-info { font-size: 13.5px; color: var(--ink2); padding: 6px 4px; display: grid; gap: 4px; } .set-info b { color: var(--ink); }

/* ---------- блок заданий ---------- */
.lesson { height: 100%; display: flex; flex-direction: column; position: relative; background: var(--bg); }
.lesson-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 24px 6px 8px; }
.prog { flex: 1; height: 12px; border-radius: 8px; background: var(--line); position: relative; }
.prog i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--sun), var(--pink)); transition: width .5s var(--out); }
.prog-nose { position: absolute; top: 50%; left: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; transition: left .5s var(--out); }
.step { flex: 1; overflow-y: auto; padding: 10px 20px 18px; display: flex; flex-direction: column; gap: 16px; }
.step.enter > * { animation: stepin .28s var(--out) both; }
@keyframes stepin { from { opacity: 0; transform: translateY(10px); } }
.step.locked > * { pointer-events: none; }
.tag { align-self: flex-start; padding: 4px 10px; border-radius: 10px; background: var(--sun-s); color: var(--sun-d); font-size: 12.5px; font-weight: 800; }
.action { padding: 8px 20px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 2px; }
.newcard { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding-bottom: 24px; }
.newcard .pig { width: 120px; height: 120px; }
.emoji { font-size: 84px; line-height: 1.1; }
.en-big { display: inline-flex; align-items: center; gap: 10px; font-size: 34px; font-weight: 900; letter-spacing: -.4px; line-height: 1.15; text-align: center; color: var(--ink); }
.en-big svg { color: var(--pink); flex: none; }
.ru-big { font-size: 20px; font-weight: 700; color: var(--ink2); }
.ru-prompt { font-size: 25px; font-weight: 800; line-height: 1.25; letter-spacing: -.2px; }
.zone { flex: 1; min-height: 110px; display: grid; place-items: center; } .zone.small { flex: 0 0 auto; min-height: 96px; }
.tipcard { background: var(--card); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.tipcard p { font-size: 16px; line-height: 1.5; }
.examples { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.example { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--bg); text-align: left; width: 100%; }
.example svg { color: var(--pink); flex: none; } .ex-en { font-weight: 800; font-size: 16.5px; } .ex-ru { font-size: 13.5px; color: var(--ink2); }
.sound-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sound-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--bg); font-weight: 800; font-size: 17px; transition: background .15s; }
.sound-chip svg { color: var(--pink); } .sound-chip.playing { background: var(--pink-s); }
.listen-row { display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 14px 0 6px; }
.listen-big { width: 112px; height: 112px; border-radius: 36px; background: var(--pink); color: #fff; box-shadow: 0 12px 28px rgba(242, 92, 135, .32); display: grid; place-items: center; transition: transform .12s var(--out); }
.listen-big:active { transform: scale(.94); }
.listen-slow, .slow-pill { height: 44px; padding: 0 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--ink2); font-weight: 800; font-size: 14px; }
.slow-pill { background: var(--bg); box-shadow: none; }
.opts { margin-top: auto; display: flex; flex-direction: column; gap: 10px; } .opts.fixed { margin-top: 0; }
.opts.wrap { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.opt { min-height: 58px; padding: 12px 18px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); font-weight: 800; font-size: 17px; text-align: left; transition: background .15s, transform .12s var(--out); }
.opts.en .opt { font-size: 18px; } .opt:active { transform: scale(.98); }
.opt.chip-opt { min-width: 96px; text-align: center; font-size: 19px; }
.opt.right, .tile.right, .pair.done { background: var(--mint-s); color: var(--mint-d); box-shadow: none; }
.opt.wrong, .tile.wrong { background: var(--amber-s); color: var(--amber-d); box-shadow: none; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.tile { aspect-ratio: 1.15; border-radius: 26px; background: var(--card); box-shadow: var(--shadow); font-size: 64px; line-height: 1; display: grid; place-items: center; transition: transform .12s var(--out), background .15s; }
.tile:active { transform: scale(.96); } .tile.word-tile { font-size: 28px; font-weight: 900; aspect-ratio: 1.5; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; } .col { display: flex; flex-direction: column; gap: 10px; }
.pair { min-height: 60px; padding: 10px 12px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-weight: 800; font-size: 16px; line-height: 1.2; transition: background .15s, opacity .25s; }
.pair.en { font-size: 17.5px; } .pair.sel { background: var(--pink-s); box-shadow: none; } .pair.done { opacity: .5; } .pair.miss { background: var(--amber-s); }
.badcard { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 22px; background: var(--amber-s); font-size: 22px; font-weight: 800; line-height: 1.3; color: var(--amber-d); text-decoration: underline wavy rgba(242, 153, 74, .7); text-underline-offset: 6px; }
.badcard img { width: 34px; flex: none; }
.answer { min-height: 116px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; padding: 12px; border-radius: 22px; background: repeating-linear-gradient(var(--bg), var(--bg) 51px, var(--line) 51px, var(--line) 53px); }
.answer.right .word { background: var(--mint-s); color: var(--mint-d); box-shadow: none; } .answer.wrong .word { background: var(--amber-s); color: var(--amber-d); box-shadow: none; }
.bank { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-bottom: 4px; }
.word { height: 44px; padding: 0 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-weight: 800; font-size: 17.5px; transition: transform .1s var(--out); }
.word:active { transform: scale(.94); } .word.used { background: var(--line); box-shadow: none; color: transparent; }
.gap-sent { font-size: 28px; font-weight: 900; line-height: 1.5; letter-spacing: -.3px; } .gap-sent.cloze { font-size: 25px; }
.blank { display: inline-block; min-width: 84px; padding: 0 10px; margin: 0 2px; border-radius: 12px; background: var(--line); text-align: center; }
.blank.right, .cloze-in.right { background: var(--mint-s); color: var(--mint-d); } .blank.wrong, .cloze-in.wrong { background: var(--amber-s); color: var(--amber-d); }
.gap-ru { font-size: 17px; color: var(--ink2); font-weight: 700; }
.cloze-in { font: inherit; color: var(--pink-d); border: 0; outline: none; border-radius: 12px; background: var(--pink-s); text-align: center; padding: 0 6px; height: 1.5em; }
.flash { flex: 1; min-height: 240px; max-height: 380px; perspective: 1200px; touch-action: pan-y; transition: transform .28s var(--out); cursor: grab; }
.flash.drag { transition: none; } .flash.gone { transition: transform .22s ease-in; }
.flash-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s var(--out); }
.flash.flipped .flash-in { transform: rotateY(180deg); }
.flash-side { position: absolute; inset: 0; border-radius: 30px; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: background .15s; }
.flash-side.back { transform: rotateY(180deg); }
.flash[data-side='yes'] .flash-side { background: var(--mint-s); } .flash[data-side='no'] .flash-side { background: var(--amber-s); }
.flash-hint { font-size: 13.5px; font-weight: 700; color: var(--ink2); } .flash-en { font-size: 18px; font-weight: 800; color: var(--ink2); }
.flash-btns { display: flex; gap: 10px; }
.speed-top { display: flex; align-items: center; gap: 12px; }
.speed-time { flex: 1; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; } .speed-time i { display: block; height: 100%; background: var(--sun); border-radius: 6px; animation: drain linear forwards; }
@keyframes drain { from { width: 100%; } to { width: 0; } }
.speed-count { min-width: 40px; height: 40px; border-radius: 14px; background: var(--sun-s); color: var(--sun-d); font-weight: 900; font-size: 19px; display: grid; place-items: center; }
.speed-card { flex: 1; min-height: 200px; max-height: 320px; margin: auto 0; border-radius: 30px; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; transition: background .15s; }
.speed-card[data-flash='ok'] { background: var(--mint-s); } .speed-card[data-flash='no'] { background: var(--amber-s); }
.speed-en { font-size: 34px; font-weight: 900; } .speed-eq { font-size: 14px; font-weight: 800; color: var(--ink2); } .speed-ru { font-size: 26px; font-weight: 800; }
.speed-btns { display: flex; gap: 14px; margin-top: auto; } .speed-btn { flex: 1; height: 84px; border-radius: 28px; display: grid; place-items: center; transition: transform .1s var(--out); }
.speed-btn:active { transform: scale(.94); } .speed-btn.no { background: var(--amber-s); color: var(--amber-d); } .speed-btn.yes { background: var(--mint-s); color: var(--mint-d); }
.dialogue { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 84%; padding: 12px 15px; border-radius: 22px; font-weight: 700; font-size: 17px; line-height: 1.35; text-align: left; animation: bin .3s var(--spring) both; }
@keyframes bin { from { opacity: 0; transform: scale(.9) translateY(8px); } }
.bubble.them { align-self: flex-start; background: var(--card); border-bottom-left-radius: 7px; box-shadow: var(--shadow); }
.bubble.me { align-self: flex-end; background: var(--pink-s); border-bottom-right-radius: 7px; }
.bubble.line { max-width: 100%; align-self: stretch; background: var(--card); box-shadow: var(--shadow); }
.bubble.wait { color: var(--ink2); font-size: 14.5px; box-shadow: none; } .bubble.ru { font-size: 15.5px; font-weight: 600; }
.bubble-ru { margin-top: 5px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.bubble-tools { display: flex; align-items: center; gap: 6px; margin-top: 8px; } .bubble-tools .say-btn { width: 36px; height: 36px; border-radius: 12px; }
.story-head { display: flex; align-items: center; gap: 12px; } .story-pig { width: 64px; height: 64px; }
.speak-card { background: var(--card); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.speak-en { font-size: 27px; font-weight: 900; line-height: 1.3; letter-spacing: -.3px; }
.speak-en span { border-radius: 8px; transition: color .25s, background .25s; }
.speak-en .hit { color: var(--mint-d); } .speak-en .miss { color: var(--amber-d); background: var(--amber-s); padding: 0 3px; }
.speak-en .soso { color: var(--sun-d); background: var(--sun-s); padding: 0 3px; }
.pron { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13.5px; font-weight: 800; color: var(--ink2); }
.pron i { flex: 1; height: 8px; border-radius: 5px; background: var(--line); overflow: hidden; } .pron u { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--sun), var(--mint)); transition: width .6s var(--out); }
.pron b { color: var(--ink); font-size: 15px; min-width: 40px; text-align: right; }
.pron-tip { padding: 12px 14px; border-radius: 16px; background: var(--sun-s); color: var(--sun-d); font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.speak-ru { font-size: 16px; color: var(--ink2); } .speak-tools { display: flex; gap: 8px; margin-top: 4px; }
.say-btn { width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--pink-s); color: var(--pink-d); display: grid; place-items: center; transition: transform .1s var(--out); }
.say-btn:active { transform: scale(.9); }
.heard { min-height: 22px; text-align: center; font-size: 14.5px; font-weight: 700; color: var(--ink2); }
.mic-wrap { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 4px; }
.mic { position: relative; width: 104px; height: 104px; border-radius: 50%; background: var(--pink); color: #fff; box-shadow: 0 12px 28px rgba(242, 92, 135, .36); display: grid; place-items: center; transition: background .2s, box-shadow .2s, transform .12s var(--out); }
.mic:active { transform: scale(.94); }
.mic-bars { display: none; align-items: center; gap: 6px; height: 52px; }
.mic-bars i { width: 7px; height: 52px; border-radius: 4px; background: #fff; transform: scaleY(.18); transition: transform .09s linear; }
.mic[data-state='rec'] { background: var(--ink); box-shadow: 0 0 0 10px rgba(58, 42, 63, .08), 0 12px 28px rgba(58, 42, 63, .3); }
.mic[data-state='rec'] .mic-ico { display: none; } .mic[data-state='rec'] .mic-bars { display: flex; }
.mic[data-state='busy'] { background: #F1E6E2; color: #B3A6AA; box-shadow: none; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.05); } }
.mic-status { font-size: 14.5px; font-weight: 800; color: var(--ink2); text-align: center; min-height: 20px; }
.ask-head { display: flex; align-items: flex-end; gap: 8px; } .ask-pig { width: 72px; height: 72px; } .ask-head .bubble { max-width: none; flex: 1; font-size: 20px; font-weight: 800; }

/* ---------- итог задания ---------- */
.feedback { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; padding: 16px 20px calc(16px + var(--safe-b)); border-radius: 30px 30px 0 0; display: flex; flex-direction: column; gap: 12px; transform: translateY(105%); transition: transform .34s var(--out); max-height: 78%; overflow-y: auto; }
.feedback.open { transform: none; } .feedback.ok { background: var(--mint-s); } .feedback.no { background: var(--amber-s); }
.fb-head { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 900; }
.feedback.ok .fb-head { color: var(--mint-d); } .feedback.no .fb-head { color: var(--amber-d); }
.fb-pig { width: 48px; height: 48px; }
.fb-body { display: flex; flex-direction: column; gap: 8px; } .fb-body:empty { display: none; }
.fb-said { font-size: 15px; font-weight: 700; } .fb-said span { color: var(--ink2); }
.fb-right, .fix-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .72); }
.fb-right.self { background: var(--card); box-shadow: var(--shadow); } .fb-right.self .fb-label { margin-top: 6px; } .fb-right.self .fb-label:first-child { margin-top: 0; }
.fb-label { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink2); }
.fb-en, .fix-en { font-size: 18px; font-weight: 900; line-height: 1.25; } .fb-ru { font-size: 14px; color: var(--ink2); }
.fb-right .say-btn, .fix .say-btn { background: #fff; }
.fb-note, .fix-note { font-size: 15px; line-height: 1.45; font-weight: 700; }
.link.why { margin: -4px 0; padding: 6px 0; align-self: flex-start; color: var(--amber-d); }
.feedback.ok .btn.primary { background: var(--mint); box-shadow: 0 8px 20px rgba(47, 182, 124, .3); }
.feedback.no .btn.primary { background: var(--amber); box-shadow: 0 8px 20px rgba(242, 153, 74, .3); }

/* ---------- финиш ---------- */
.finish { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 24px calc(24px + var(--safe-b)); text-align: center; }
.finish > * { animation: stepin .4s var(--out) both; } .finish > :nth-child(2) { animation-delay: .08s; } .finish > :nth-child(3) { animation-delay: .14s; } .finish > :nth-child(4) { animation-delay: .2s; } .finish > :nth-child(5) { animation-delay: .28s; }
.finish-pig { width: 190px; height: 190px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); font-size: 14.5px; font-weight: 700; color: var(--ink2); }
.chip b { color: var(--ink); font-weight: 900; font-size: 16px; } .chip img { width: 22px; } .chip.hot { background: var(--sun-s); box-shadow: none; }

/* ---------- разговор ---------- */
.step.chat { padding: 0; gap: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 4px 20px 12px; box-shadow: 0 1px 0 var(--line); }
.chat-pig { width: 60px; height: 60px; }
.chat-name { font-weight: 900; font-size: 16.5px; } .chat-scene { font-size: 13.5px; color: var(--ink2); line-height: 1.3; }
.turns { display: flex; gap: 5px; margin-top: 7px; } .turns i { width: 22px; height: 6px; border-radius: 3px; background: var(--line); transition: background .3s; } .turns i.on { background: var(--pink); }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-dock { padding: 8px 16px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chat-dock .mic-wrap { margin-top: 0; padding: 4px 0 0; gap: 8px; } .chat-dock .mic { width: 84px; height: 84px; }
.chat-tools { display: flex; gap: 14px; } .chat-wait { height: 96px; }
.chat-note, .chat-done { align-self: center; text-align: center; font-size: 14px; font-weight: 700; color: var(--ink2); padding: 8px 14px; }
.fix { align-self: flex-end; max-width: 90%; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 20px; background: var(--sun-s); animation: bin .3s var(--spring) both; transition: background .3s; }
.fix.done { background: var(--mint-s); }
.fix-again { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .fix-state { font-size: 13.5px; font-weight: 800; color: var(--ink2); }
.fix .btn.mini { color: var(--sun-d); } .fix.done .btn.mini { display: none; }
.hints, .report { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); animation: bin .3s var(--spring) both; }
.report-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .report-facts div { background: var(--bg); border-radius: 16px; padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--ink2); } .report-facts b { display: block; font-size: 24px; font-weight: 900; color: var(--ink); }
.report-praise { font-size: 15.5px; font-weight: 700; line-height: 1.45; } .report-tip { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; font-weight: 700; color: var(--sun-d); background: var(--sun-s); padding: 10px 12px; border-radius: 14px; } .report-tip img { width: 22px; flex: none; }
.preview { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.preview-text { font-size: 19px; font-weight: 800; line-height: 1.3; }
.preview-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; } .preview-bar i { display: block; height: 100%; background: var(--pink); animation: drain 2.4s linear forwards; }
.preview-btns { display: flex; gap: 10px; } .preview-btns .btn { min-height: 50px; } .preview-btns .btn.ghost { flex: 0 0 42%; box-shadow: none; background: var(--bg); }
.chat-keys { width: 100%; display: flex; gap: 8px; }
.send { width: 56px; height: 56px; flex: none; border-radius: 18px; background: var(--pink); color: #fff; display: grid; place-items: center; }
.ideas { display: flex; gap: 8px; overflow-x: auto; width: 100%; padding-bottom: 6px; scrollbar-width: none; } .ideas::-webkit-scrollbar { display: none; }
.idea { flex: none; padding: 9px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 800; white-space: nowrap; }

/* ---------- знакомство ---------- */
.onboard { height: 100%; display: flex; flex-direction: column; padding: calc(18px + var(--safe-t)) 26px calc(26px + var(--safe-b)); }
.ob-dots { display: flex; justify-content: center; gap: 6px; } .ob-dots i { width: 22px; height: 6px; border-radius: 3px; background: var(--line); } .ob-dots i.on { background: var(--pink); }
.ob-page { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.ob-page > * { animation: stepin .4s var(--out) both; } .ob-page > :nth-child(2) { animation-delay: .06s; } .ob-page > :nth-child(3) { animation-delay: .12s; } .ob-page > :nth-child(4) { animation-delay: .18s; }
.ob-page .btn { margin-top: 12px; } .ob-page p { font-size: 17px; line-height: 1.5; max-width: 340px; } .ob-page p.small { font-size: 14px; }
.ob-pig { width: 190px; height: 190px; } .ob-pig.small { width: 120px; height: 120px; }
.ob-rows { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 6px 0; }
.ob-rows div { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); text-align: left; }
.ob-rows img { width: 40px; height: 40px; flex: none; } .ob-rows span { font-size: 13.5px; color: var(--ink2); line-height: 1.35; } .ob-rows b { display: block; font-size: 16.5px; font-weight: 900; color: var(--ink); }

/* ---------- переходы между экранами ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .26s; animation-timing-function: var(--out); }
html[data-vt='up']::view-transition-new(root) { animation-name: vt-up; } html[data-vt='up']::view-transition-old(root) { animation-name: vt-dim; }
html[data-vt='down']::view-transition-old(root) { animation-name: vt-down; z-index: 2; } html[data-vt='down']::view-transition-new(root) { animation-name: none; }
@keyframes vt-up { from { transform: translateY(40px); opacity: 0; } } @keyframes vt-dim { to { opacity: 0; } } @keyframes vt-down { to { transform: translateY(40px); opacity: 0; } }

@media (min-width: 520px) { body { background: #F6EAE4; } #app { box-shadow: 0 0 0 1px var(--line); } }
@media (max-height: 680px) { .emoji { font-size: 60px; } .listen-big { width: 92px; height: 92px; } .mic { width: 88px; height: 88px; } .ob-pig { width: 130px; height: 130px; } .hero-pig { width: 92px; height: 92px; } .tile { font-size: 50px; } }
@media (prefers-reduced-motion: reduce) { *, ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- помощник «Спроси Персика» ---------- */
.ask-btn { width: 40px; height: 40px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); transition: transform .12s var(--out); }
.ask-btn img { width: 26px; height: 26px; } .ask-btn:active { transform: scale(.92); }
.ask-btn.fab { position: absolute; right: 14px; bottom: calc(82px + var(--safe-b)); width: 52px; height: 52px; border-radius: 18px; z-index: 5; }
.ask-btn.fab img { width: 32px; height: 32px; }
.view-today ~ .ask-btn.fab { bottom: calc(170px + var(--safe-b)); }
.lesson-top { padding-right: 12px; } .lesson-top .prog { margin-right: 10px; }
.sheet-body.ask { min-height: 62dvh; } .ask-top { display: flex; align-items: center; gap: 12px; } .ask-face { width: 60px; height: 60px; }
.ask-list { flex: 1; min-height: 80px; max-height: 44dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.ideas.wrap { flex-wrap: wrap; overflow: visible; } .ideas.wrap .idea { white-space: normal; text-align: left; }
.cando { width: 100%; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 14px; border-radius: 18px; background: var(--mint-s); }
.cando > div:not(.fb-label) { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 700; color: var(--mint-d); } .cando svg { flex: none; margin-top: 2px; }
