:root {
  --ink: #2a1433; --ink-2: #6a5472; --paper: #fff7f1; --card: #ffffff; --line: #f1dfe4;
  --rose: #db2463; --rose-d: #a81549; --rose-soft: #ffe3ec; --plum: #43195a; --plum-d: #2a1040;
  --butter: #ffd84d; --butter-d: #d9ad14; --mint: #0f9d78; --mint-d: #0a7559; --mint-soft: #dcf7ee;
  --red: #d7263d; --red-soft: #ffe4e6;
  --display: 'Fredoka', 'Jua', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --body: 'Nunito', 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --korean: 'Jua', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --r: 18px; color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 500 17px/1.45 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }
.ic { display: inline-block; vertical-align: -0.2em; flex: none; }
.ko { font-family: var(--korean); font-weight: 400; }
.rom { color: var(--ink-2); font-weight: 700; }
body.no-rom .rom:not(.keep) { display: none; }
.muted { color: var(--ink-2); }
.bd { display: block; width: 100%; height: 100%; }

/* Botões */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 12px 20px; border-radius: 16px; font: 600 18px var(--display); text-align: center; background: var(--rose); color: #fff; box-shadow: 0 5px 0 var(--rose-d); transition: transform .08s, box-shadow .08s; text-decoration: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--rose-d); }
.btn[disabled] { background: #e9dfe3; color: #85737c; box-shadow: 0 5px 0 #d3c6cc; cursor: default; }
.btn.plum { background: var(--plum); box-shadow: 0 5px 0 var(--plum-d); }
.btn.mint { background: var(--mint); box-shadow: 0 5px 0 var(--mint-d); }
.btn.red { background: var(--red); box-shadow: 0 5px 0 #98162a; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--line); border: 2px solid var(--line); }
.btn.butter { background: var(--butter); color: var(--ink); box-shadow: 0 5px 0 var(--butter-d); }
.link { color: var(--rose-d); font-weight: 800; text-decoration: underline; }

/* Estrutura com navegação */
.shell { padding-bottom: calc(84px + env(safe-area-inset-bottom)); min-height: 100%; }
.main { max-width: 680px; margin: 0 auto; padding: 0 16px 24px; }
.nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: #fff; border-top: 2px solid var(--line); display: flex; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; text-decoration: none; color: var(--ink-2); font-size: 13px; font-weight: 800; }
.nav a .glyph { width: 26px; height: 26px; display: grid; place-items: center; font: 24px/1 var(--korean); }
.nav a.on { color: var(--rose); background: var(--rose-soft); }
.nav .brand { display: none; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0 12px; }
.logo { font: 700 25px var(--display); color: var(--rose); letter-spacing: -.3px; }
.pills { display: flex; gap: 8px; }
.pill { display: flex; align-items: center; gap: 5px; padding: 5px 11px; background: #fff; border: 2px solid var(--line); border-radius: 99px; font: 600 15px var(--display); }
.pill.fire { color: #d9480f; } .pill.fire.off { color: #a2929a; } .pill.xp { color: var(--plum); }
.sec { font-size: 21px; margin: 26px 0 12px; }
@media (min-width: 900px) {
  .shell { padding: 0 0 0 220px; }
  .nav { top: 0; right: auto; width: 220px; flex-direction: column; gap: 4px; border-top: 0; border-right: 2px solid var(--line); padding: 18px 12px; }
  .nav .brand { display: block; font: 700 28px var(--display); color: var(--rose); padding: 2px 12px 16px; }
  .nav a { flex: none; flex-direction: row; gap: 12px; padding: 11px 12px; font-size: 16px; }
  .top .logo { visibility: hidden; }
}

/* Boas-vindas */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; background: var(--plum-d); color: #fff; }
.welcome .art { position: relative; flex: 1 1 42vh; min-height: 230px; overflow: hidden; }
.welcome .art .bd { position: absolute; inset: 0; }
.welcome .art .mascot { position: absolute; width: 138px; left: 50%; bottom: 6px; transform: translateX(-50%); }
.welcome .copy { max-width: 520px; width: 100%; margin: 0 auto; padding: 20px 20px calc(26px + env(safe-area-inset-bottom)); }
.welcome h1 { font-size: 34px; margin-bottom: 8px; }
.welcome h1 em { font-style: normal; color: var(--butter); }
.welcome p { color: #e9dcef; margin-bottom: 16px; }
.welcome label { display: block; font-weight: 800; margin-bottom: 6px; }
.welcome input { width: 100%; height: 54px; padding: 0 16px; border-radius: 14px; border: 2px solid transparent; margin-bottom: 14px; color: var(--ink); background: #fff; }
.welcome small { display: block; margin-top: 14px; color: #cfbdd8; font-size: 14px; text-align: center; }

/* Tutorial da tela de início */
.install { min-height: 100dvh; max-width: 520px; margin: 0 auto; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.install h1 { font-size: 27px; text-align: center; text-wrap: balance; }
.inst-lead { text-align: center; color: var(--ink-2); text-wrap: balance; }
.inst-phone { align-self: center; width: 124px; height: 112px; padding: 12px 10px; overflow: hidden; background: var(--plum-d); border: 5px solid var(--ink); border-bottom: 0; border-radius: 24px 24px 0 0; }
.inst-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.inst-grid i { aspect-ratio: 1; border-radius: 6px; background: rgba(255,255,255,.2); }
.inst-grid img { display: block; width: 100%; border-radius: 6px; animation: inst-drop 4s cubic-bezier(.2,1.4,.4,1) infinite; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.inst-steps:empty { display: none; }
.inst-steps li { display: flex; align-items: center; gap: 11px; padding: 11px 12px; background: #fff; border: 2px solid var(--line); border-radius: 15px; line-height: 1.32; animation: inst-in .45s ease-out both; }
.inst-steps li > span:last-child { text-wrap: balance; }
.inst-steps .ic { vertical-align: -0.3em; color: #0a6fe0; }
.inst-n { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--rose); color: #fff; font: 600 16px var(--display); }
.inst-later { min-height: 44px; text-align: center; color: var(--ink-2); font-weight: 800; text-decoration: underline; }
@keyframes inst-drop { 0% { transform: translateY(-90px) scale(.7); opacity: 0; } 22%, 100% { transform: none; opacity: 1; } }
@keyframes inst-in { from { transform: translateY(12px); opacity: 0; } }

/* Início */
.hero { position: relative; display: block; width: 100%; border-radius: 22px; overflow: hidden; background: var(--plum-d); color: #fff; }
.hero .thumb { aspect-ratio: 16/9; position: relative; }
.hero .thumb .bd { position: absolute; inset: 0; }
.hero .info { padding: 14px 16px 16px; }
.eyebrow { display: block; font: 600 13px var(--display); letter-spacing: .6px; text-transform: uppercase; color: var(--butter); margin-bottom: 3px; }
.hero h2 { font-size: 25px; margin-bottom: 4px; }
.hero p { color: #e0d3e8; font-size: 15px; margin-bottom: 14px; }
.tile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; margin-top: 12px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); text-decoration: none; color: inherit; }
.tile .tile-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; flex: none; }
.tile h3 { font-size: 17px; }
.tile p { font-size: 14.5px; color: var(--ink-2); }
.tile .grow { flex: 1; min-width: 0; }
.day { display: flex; align-items: center; gap: 12px; padding: 14px; margin-top: 12px; background: var(--butter); border-radius: var(--r); }
.day .ko { font-size: 25px; line-height: 1.2; display: block; }
.day .eyebrow { color: var(--ink); opacity: .75; }
.day .grow { flex: 1; min-width: 0; }
.day .rom { color: var(--ink); opacity: .8; font-size: 14px; display: block; }
.day p { font-size: 15px; font-weight: 700; }
.sbtn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--rose); border: 2px solid var(--line); }
.sbtn:active { transform: scale(.94); }
.ep { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px; border-radius: var(--r); background: #fff; border: 2px solid var(--line); margin-bottom: 10px; text-decoration: none; color: inherit; }
.ep .thumb { position: relative; width: 112px; aspect-ratio: 16/9; flex: none; border-radius: 12px; overflow: hidden; }
.ep .thumb .bd { position: absolute; inset: 0; }
.ep .num { position: absolute; left: 5px; bottom: 5px; padding: 0 7px; background: rgba(20,8,28,.82); color: #fff; border-radius: 7px; font: 600 12.5px/20px var(--display); }
.ep h3 { font-size: 16.5px; margin-bottom: 2px; }
.ep p { font-size: 13.5px; line-height: 1.3; color: var(--ink-2); }
.ep .grow { min-width: 0; flex: 1; }
.ep.locked { background: #f8f0f1; color: #75636c; border-color: transparent; }
.ep.locked .thumb { filter: grayscale(1) opacity(.55); }
.ep.locked p { color: #75636c; }
.ep .lockic { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.quizdone { display: inline-block; margin-top: 3px; font-size: 13px; font-weight: 800; color: var(--mint-d); }
.stars { display: flex; gap: 1px; margin-top: 3px; color: #e3d6db; }
.stars .on { color: #eda90c; }

/* Hangul */
.lesson-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); margin-bottom: 10px; text-decoration: none; color: inherit; }
.lesson-row .badge { width: 54px; height: 54px; flex: none; border-radius: 15px; background: var(--rose-soft); color: var(--rose); display: grid; place-items: center; font: 27px/1 var(--korean); }
.lesson-row.locked { background: #f8f0f1; border-color: transparent; color: #75636c; }
.lesson-row.locked .badge { background: #eee3e6; color: #85737c; }
.lesson-row h3 { font-size: 17px; }
.lesson-row p { font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.lesson-row.locked p { color: #75636c; }
.lesson-row .grow { flex: 1; min-width: 0; }
.chart { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.chart button { background: #fff; border: 2px solid var(--line); border-radius: 13px; padding: 6px 2px 5px; text-align: center; }
.chart button:active { background: var(--rose-soft); }
.chart .ko { display: block; font-size: 27px; line-height: 1.2; }
.chart small { font-weight: 800; font-size: 12.5px; color: var(--ink-2); }
.lab { background: var(--plum); color: #fff; border-radius: 22px; padding: 16px; }
.lab .out { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 4px 0 12px; }
.lab .big { font: 72px/1.1 var(--korean); color: var(--butter); }
.lab .sbtn { color: var(--plum); }
.lab .romout { display: block; font: 600 18px var(--display); text-align: center; }
.lab h4 { margin: 10px 0 6px; font: 600 14px var(--display); color: #dccbe6; }
.lab-row { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-row button { min-width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.14); text-align: center; font: 19px var(--korean); color: #fff; padding: 0 6px; }
.lab-row button.on { background: var(--butter); color: var(--ink); }

/* Frases */
.searchbox { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 50px; background: #fff; border: 2px solid var(--line); border-radius: 14px; color: var(--ink-2); }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); }
.chips { display: flex; gap: 7px; overflow-x: auto; margin: 12px -16px; padding: 2px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 13px; border-radius: 99px; background: #fff; border: 2px solid var(--line); font-weight: 800; font-size: 14.5px; }
.chip.on { background: var(--plum); color: #fff; border-color: var(--plum); }
.phrase { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); margin-bottom: 9px; }
.phrase .grow { flex: 1; min-width: 0; }
.phrase .ko { display: block; font-size: 22px; line-height: 1.25; }
.phrase .rom { display: block; font-size: 14px; }
.phrase .soa { font-size: 13.5px; color: var(--ink-2); }
.phrase .pt { display: block; font-weight: 800; margin-top: 2px; }
.phrase .tip { display: block; font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.phrase .col { display: flex; flex-direction: column; gap: 6px; }
.star-btn { width: 44px; height: 38px; display: grid; place-items: center; color: #d7c7cd; }
.star-btn.on { color: #eda90c; }
.empty { text-align: center; padding: 30px 12px; color: var(--ink-2); }

/* Perfil */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat { background: #fff; border: 2px solid var(--line); border-radius: var(--r); padding: 11px 8px; text-align: center; }
.stat b { display: block; font: 600 25px var(--display); }
.stat span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.week { display: flex; justify-content: space-between; gap: 5px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); padding: 12px 10px; margin-top: 10px; }
.week div { flex: 1; text-align: center; font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.week i { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 3px; border-radius: 50%; background: #f5eaed; color: #fff; }
.week .on i { background: #e8590c; }
.week .today { color: var(--ink); }
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 9px; }
.medal { display: flex; gap: 9px; align-items: center; padding: 10px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); }
.medal i { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--butter); color: var(--ink); }
.medal.off { background: #f8f0f1; border-color: transparent; color: #75636c; }
.medal.off i { background: #e7dade; color: #a2929a; }
.medal b { display: block; font: 600 14.5px/1.15 var(--display); }
.medal span { font-size: 12.5px; line-height: 1.2; display: block; color: var(--ink-2); margin-top: 2px; }
.medal.off span { color: #75636c; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #fff; border: 2px solid var(--line); margin-bottom: -2px; }
.set:first-of-type { border-radius: var(--r) var(--r) 0 0; }
.set:last-of-type { border-radius: 0 0 var(--r) var(--r); margin-bottom: 0; }
.set small { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.25; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 99px; background: #d9ccd2; flex: none; transition: background .15s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked=true] { background: var(--mint); }
.switch[aria-checked=true]::after { transform: translateX(20px); }
.foot { margin-top: 20px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }

/* Lição */
.lesson { min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); }
.l-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: 640px; width: 100%; margin: 0 auto; }
.l-x { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink-2); margin-left: -10px; flex: none; }
.bar { flex: 1; height: 14px; border-radius: 99px; background: #f0dfe4; overflow: hidden; }
.bar i { display: block; height: 100%; min-width: 14px; border-radius: 99px; background: var(--rose); transition: width .25s; }
.hearts { display: flex; align-items: center; gap: 3px; color: var(--rose); font: 600 17px var(--display); flex: none; }
.l-body { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 150px; display: flex; flex-direction: column; }
.q { font-size: 23px; margin-bottom: 18px; }
.intro-card { background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 22px 18px; text-align: center; }
.intro-card .eyebrow { color: var(--rose); }
.intro-card .ko { display: block; font-size: 42px; line-height: 1.2; margin: 6px 0 4px; word-break: keep-all; }
.intro-card .ko.letter { font-size: 92px; }
.intro-card .rom { font-size: 18px; display: block; }
.intro-card .soa { display: block; font-size: 15px; color: var(--ink-2); margin-top: 2px; }
.intro-card .pt { display: block; font: 600 21px var(--display); margin-top: 12px; }
.audio { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.audio button { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 15px; border-radius: 99px; background: var(--rose-soft); color: var(--rose-d); font-weight: 800; font-size: 15px; }
.tip { margin-top: 12px; padding: 12px 14px; background: #fff8d9; border-radius: 15px; font-size: 15.5px; text-align: left; }
.tip b { font: 600 13px var(--display); display: block; text-transform: uppercase; letter-spacing: .5px; color: #7d6300; }
.prompt { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.prompt .ko { font-size: 34px; line-height: 1.2; display: block; word-break: keep-all; }
.prompt .ko.letter { font-size: 76px; }
.prompt .pt-big { font: 600 24px var(--display); }
.prompt .rom { display: block; }
.play-big { width: 92px; height: 92px; border-radius: 26px; background: var(--rose); color: #fff; display: grid; place-items: center; margin: 4px auto 24px; box-shadow: 0 6px 0 var(--rose-d); }
.play-big:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--rose-d); }
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 16px; font-weight: 800; }
.opt:not([disabled]):active { transform: translateY(2px); border-bottom-width: 3px; }
.opt .k { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border: 2px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--ink-2); }
.opt .ko { font-size: 21px; display: block; line-height: 1.2; }
.opt .ko.letter { font-size: 34px; }
.opt .rom { display: block; font-size: 13.5px; }
.opt[disabled] { cursor: default; }
.opt.right { background: var(--mint-soft); border-color: var(--mint); }
.opt.wrong { background: var(--red-soft); border-color: var(--red); }
.opt.dim { opacity: .55; }
.helper { margin: -10px 0 8px; }
.blocks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 2px; }
.block { display: flex; flex-direction: column; align-items: center; min-width: 48px; padding: 6px 7px 5px; background: var(--rose-soft); border-radius: 12px; }
.intro-card .block .ko { font-size: 25px; margin: 0; line-height: 1.15; }
.block small { font-size: 12.5px; line-height: 1.2; }
.concept h2 { font-size: 25px; margin-bottom: 4px; }
.concept p { margin-top: 12px; font-size: 16.5px; }
.tip + .tip { margin-top: 8px; }
.hint-btn { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; width: 100%; min-height: 44px; margin-top: 14px; color: var(--plum); font-weight: 800; }
.hint-btn small { font-weight: 700; color: var(--ink-2); }
.hint-btn.dark { color: var(--butter); }
.hint-btn.dark small { color: #cdbad8; }
.hint-msg { margin-top: 14px; padding: 9px 12px; background: #fff8d9; border-radius: 12px; text-align: center; font-size: 15.5px; }
.hint-msg .ko { font-size: 21px; }
.pulse { border-color: #d99e00 !important; background: #fff4c2 !important; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.l-back[disabled] { visibility: hidden; }
.slots { min-height: 66px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 9px; margin-bottom: 18px; border-bottom: 3px dashed var(--line); }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tile-s { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 54px; min-height: 62px; padding: 4px 8px; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 13px; text-align: center; }
.tile-s .ko { font-size: 25px; line-height: 1.15; }
.tile-s small { font-size: 12px; line-height: 1.2; }
.tile-s.used { background: #f2e6ea; border-color: #f2e6ea; color: transparent; }
.tile-s.used small { color: transparent; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pair { min-height: 62px; padding: 8px 10px; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 14px; text-align: center; font-weight: 800; font-size: 14.5px; line-height: 1.2; }
.pair .ko { font-size: 21px; }
.pair.sel { border-color: var(--plum); background: #f3e8f9; }
.pair.ok { opacity: .35; background: var(--mint-soft); border-color: var(--mint); }
.pair.err { border-color: var(--red); background: var(--red-soft); animation: shake .3s; }

/* Barra de resultado */
.sheet { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); animation: up .18s ease-out; background: var(--paper); }
.sheet-in { max-width: 560px; margin: 0 auto; }
.sheet.ok { background: var(--mint-soft); }
.sheet.bad { background: var(--red-soft); }
.sheet h3 { font-size: 21px; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.sheet.ok h3 { color: var(--mint-d); } .sheet.bad h3 { color: #a8152a; }
.sheet p { font-size: 15.5px; margin-bottom: 10px; }
.sheet .ko { font-size: 19px; }
.sheet p.tight { margin-bottom: 12px; }

/* Cena */
.scene { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; background: #000; color: #fff; overflow: hidden; }
.scene-top { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #000; }
.scene-top .l-x { color: #fff; }
.scene-top .bar { background: rgba(255,255,255,.3); }
.scene-top .hearts { color: #fff; }
.stage { position: relative; flex: 1 1 0; min-height: 64px; overflow: hidden; }
.stage .bd { position: absolute; top: 0; left: 50%; height: 100%; width: auto; aspect-ratio: 16/9; transform: translateX(-50%); }
.stage .person { position: absolute; z-index: 1; left: 50%; bottom: -6px; height: 66%; max-height: 330px; transform: translateX(-50%); animation: rise .28s ease-out; }
.ng { position: absolute; z-index: 4; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); font: 700 74px var(--display); color: var(--butter); animation: fade .7s forwards; pointer-events: none; }
.subs { position: relative; z-index: 2; flex: 0 1 auto; min-height: 0; overflow-y: auto; background: #0b0510; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); }
.subs-in { max-width: 560px; margin: 0 auto; }
.who { font: 600 14px var(--display); color: #ff9dbb; margin-bottom: 2px; }
.line-ko { display: flex; align-items: center; gap: 10px; }
.line-ko .ko { font-size: 25px; line-height: 1.25; word-break: keep-all; flex: 1; min-width: 0; }
.line-ko .sbtn { width: 40px; height: 40px; background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.line-pt { color: var(--butter); font-weight: 800; font-size: 17px; margin: 5px 0 14px; text-shadow: 0 1px 2px #000; }
.narr { font-size: 18px; font-style: italic; color: #f3e9f7; margin-bottom: 14px; }
.ask { font: 600 19px var(--display); color: var(--butter); margin-bottom: 10px; }
.scene .opt { background: #1f1229; border-color: #4a3355; color: #fff; }
.scene .opt .rom { color: #cdbad8; }
.scene .opt.wrong { background: #52121f; border-color: #e5484d; }
.scene .opt.right { background: #0d4d3b; border-color: #2bd9a8; }

/* Telas finais */
.endcard { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 26px 20px calc(26px + env(safe-area-inset-bottom)); background: var(--plum-d); color: #fff; position: relative; overflow: hidden; }
.endcard > * { position: relative; z-index: 1; max-width: 460px; width: 100%; }
.endcard .mascot { width: 118px; margin-bottom: 8px; }
.endcard h1 { font-size: 34px; margin-bottom: 4px; }
.endcard > p { color: #e0d3e8; margin-bottom: 14px; }
.big-stars { display: flex; justify-content: center; gap: 6px; color: #5d3c6e; margin-bottom: 14px; }
.big-stars .on { color: var(--butter); }
.end-stats { display: flex; gap: 9px; margin-bottom: 14px; }
.end-stats div { flex: 1; background: rgba(255,255,255,.1); border-radius: 14px; padding: 9px 4px; }
.end-stats b { display: block; font: 600 23px var(--display); color: var(--butter); }
.end-stats span { font-size: 13px; font-weight: 700; color: #e0d3e8; }
.teaser { background: #000; border-radius: 16px; padding: 12px 14px; text-align: left; margin-bottom: 16px; }
.teaser .eyebrow { margin-bottom: 2px; }
.teaser p { color: #fff; font-size: 15.5px; }
.endcard .btn + .btn { margin-top: 14px; }
.new-badge { display: flex; align-items: center; gap: 9px; background: var(--butter); color: var(--ink); border-radius: 14px; padding: 8px 12px; margin-bottom: 12px; text-align: left; font-weight: 800; font-size: 15px; }
.petal { position: absolute; z-index: 0; top: -20px; width: 13px; height: 13px; background: #ffb3c8; border-radius: 80% 10% 80% 10%; animation: fall linear forwards; }

/* Diálogo */
.dialog-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(20,8,28,.6); display: flex; align-items: flex-end; justify-content: center; }
.dialog { background: #fff; color: var(--ink); width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .18s ease-out; }
.dialog h2 { font-size: 23px; margin-bottom: 6px; }
.dialog p { color: var(--ink-2); margin-bottom: 16px; }
.dialog .btn + .btn { margin-top: 13px; }
@media (min-width: 560px) { .dialog-wrap { align-items: center; } .dialog { border-radius: 22px; } }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: 90vw; width: max-content; background: var(--ink); color: #fff; padding: 9px 15px; border-radius: 12px; font-size: 14.5px; font-weight: 700; }

@keyframes up { from { transform: translateY(40%); opacity: 0; } }
@keyframes rise { from { transform: translate(-50%, 16px); } }
@keyframes fade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes fall { to { transform: translateY(105vh) rotate(420deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
