/* ARGUE YO! — styles. Self-contained (does not touch the global ENGLISH YO! styles).
   Identity: BLUE + YELLOW + WHITE, sticker-style rounded cards with strong outlines. */
:root {
  --ink: #0c2a6b; --ink2: #274a99; --blue: #1f6fe0; --blue2: #4aa0ff; --sky: #d9efff; --yellow: #ffd23a; --yellow2: #ffb800;
  --green: #1b8a4b; --purple: #7b4cd6; --orange: #d95f00; --red: #e0415f; --pink: #ff5d8f; --paper: #fffdf4;
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif; --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 6px 0 rgba(12, 42, 107, .9); --r: 20px;
}
.t-thesis { --tc: #7b4cd6; --tb: #f1eaff; }
.t-argument { --tc: #d95f00; --tb: #fff1e0; }
.t-recommendation { --tc: #1b8a4b; --tb: #e4f8ec; }
.t-evidence { --tc: #2b7de0; --tb: #e6f1ff; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
html.big { font-size: 20px; }
@media (min-width: 1500px) { html { font-size: 18px; } html.big { font-size: 22px; } }
@media (min-width: 1900px) { html { font-size: 22px; } html.big { font-size: 26px; } }
@media (min-width: 2500px) { html { font-size: 30px; } html.big { font-size: 34px; } }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh; color: var(--ink); font-family: var(--body); font-weight: 700; line-height: 1.45; -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at 8% 12%, rgba(255,255,255,.9) 0 7%, transparent 7.4%), radial-gradient(circle at 92% 6%, rgba(255,255,255,.8) 0 9%, transparent 9.4%),
    radial-gradient(circle at 1px 1px, rgba(31,111,224,.10) 1.5px, transparent 2px) 0 0 / 28px 28px,
    linear-gradient(180deg, #bfe4ff 0%, #e4f4ff 45%, #fff4cc 100%);
  background-attachment: fixed; overflow-x: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; margin: 0; line-height: 1.1; letter-spacing: .005em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
:focus-visible { outline: 4px solid var(--pink); outline-offset: 3px; border-radius: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 12px 12px; }
.skip-link:focus { top: 0; }
.noscript { padding: 24px; text-align: center; }
#app { outline: none; min-height: 70vh; }
.muted { opacity: .75; }
.tiny { font-size: .82rem; opacity: .75; margin-top: 10px; text-align: center; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px max(14px, env(safe-area-inset-left)) 6px; max-width: 78rem; margin: 0 auto; }
.tb-spacer { flex: 1; }
.tb-back, .tb-home { display: inline-flex; align-items: center; gap: .3em; white-space: pre; min-height: 44px; padding: 6px 16px; border-radius: 999px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-family: var(--display); font-weight: 800; font-size: .9rem; color: var(--ink); }
.tb-back:hover, .tb-home:hover { background: var(--yellow); }
.ibtn { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-size: 1.2rem; display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: var(--ink); }
.ibtn:hover { background: var(--yellow); }
.ibtn.is-off { opacity: .6; }
.ibtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- layout ---------- */
.screen { max-width: 78rem; margin: 0 auto; padding: 8px max(14px, env(safe-area-inset-left)) 40px; animation: screenIn .28s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-h { text-align: center; margin: 10px 0 18px; }
.page-h h1 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); color: var(--ink); text-shadow: 0 3px 0 #fff; }
.page-h p { margin-top: 6px; color: var(--ink2); font-weight: 700; }
.panel { background: #fff; border: 3px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.sec-h { font-size: 1.3rem; margin: 26px 0 12px; text-align: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; min-height: 30px; border-radius: 999px; background: var(--yellow); border: 3px solid var(--ink); font-family: var(--display); font-weight: 800; font-size: .9rem; color: var(--ink); }
.chip-i { width: 18px; height: 18px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 11px; border-radius: 999px; background: var(--tc, var(--blue)); color: #fff; font-family: var(--display); font-weight: 800; font-size: .78rem; letter-spacing: .05em; white-space: nowrap; }
.credit { margin-top: 14px; text-align: center; font-size: .86rem; color: var(--ink2); }
.hint-line { margin-top: 18px; text-align: center; font-size: .85rem; opacity: .75; }

/* ---------- buttons ---------- */
.btn { --bg: linear-gradient(#5a9bff, #1f6fe0); --sh: #0f3f94; display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 50px; padding: 10px 24px; border: 3px solid var(--ink); border-radius: 999px; background: var(--bg); color: #fff; box-shadow: 0 5px 0 var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; text-shadow: 0 2px 0 rgba(0,0,0,.28); text-align: center; line-height: 1.1; transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn[disabled] { opacity: .45; filter: grayscale(.4); transform: none; box-shadow: 0 3px 0 var(--ink); }
.btn-lg { min-height: 64px; font-size: 1.35rem; padding: 12px 28px; }
.btn-sm { min-height: 42px; padding: 6px 16px; font-size: .92rem; box-shadow: 0 4px 0 var(--ink); }
.b-green { --bg: linear-gradient(#4bd277, #1b9a50); }
.b-blue { --bg: linear-gradient(#5aa4ff, #1f6fe0); }
.b-purple { --bg: linear-gradient(#a577f0, #7b4cd6); }
.b-orange { --bg: linear-gradient(#ffb04d, #ee8208); }
.b-slate { --bg: linear-gradient(#7f90b0, #55658a); }
.b-red { --bg: linear-gradient(#ff7a8e, #e0415f); }
.b-yellow { --bg: linear-gradient(#ffe56f, #ffc21a); color: var(--ink); text-shadow: none; }
.b-white { --bg: #fff; color: var(--ink); text-shadow: none; }
.b-white:hover { --bg: #fff8d6; }
.ico { font-size: 1.2em; }
.ico-i { width: 1.35em; height: 1.35em; object-fit: contain; }

/* ---------- welcome ---------- */
.welcome { display: grid; justify-items: center; gap: 18px; padding-top: 10px; }
.wel-logo { width: min(760px, 94%); filter: drop-shadow(0 8px 10px rgba(12,42,107,.25)); }
.wel-card { width: min(520px, 100%); padding: 24px 22px 22px; display: grid; justify-items: center; gap: 12px; text-align: center; position: relative; }
.wel-h { font-size: clamp(1.5rem, 4vw, 2rem); color: var(--blue); }
.wel-face { width: 120px; margin-top: -4px; }
.wel-q { font-size: 1.15rem; font-weight: 900; }
.input { width: 100%; min-height: 54px; padding: 10px 16px; border: 3px solid var(--ink); border-radius: 16px; font: inherit; font-size: 1.15rem; font-weight: 800; color: var(--ink); background: #f5faff; text-align: center; }
.input::placeholder { color: #7186b3; }
.input:focus { outline: 4px solid var(--yellow); outline-offset: 2px; }
.wel-note { font-size: .82rem; opacity: .7; }

/* ---------- menu ---------- */
.menu-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 500px) minmax(0, 1fr); gap: 10px 20px; align-items: end; padding-top: 4px; }
.menu-mid { display: grid; justify-items: center; gap: 12px; }
.menu-logo { width: min(100%, 540px); filter: drop-shadow(0 8px 10px rgba(12,42,107,.25)); }
.menu-tag { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--blue); text-align: center; letter-spacing: .02em; }
.menu-hello { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.menu-btns { display: grid; gap: 13px; width: 100%; margin: 4px 0 6px; }
.menu-btns .btn { width: 100%; justify-content: flex-start; padding-left: 22px; }
.menu-cont small { display: block; font-family: var(--body); font-size: .72rem; font-weight: 800; opacity: .8; margin-left: 4px; }
.menu-side { display: flex; align-items: flex-end; justify-content: center; gap: 0; }
.mc { width: 52%; height: auto; max-height: min(52vh, 380px); object-fit: contain; object-position: bottom; filter: drop-shadow(0 8px 6px rgba(12,42,107,.25)); animation: bob 3.4s ease-in-out infinite; }
.menu-left .mc:nth-child(2), .menu-right .mc:nth-child(2) { margin-left: -10%; animation-delay: -1.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (max-width: 960px) {
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .menu-mid { grid-column: 1 / -1; order: -1; }
  .mc { width: auto; height: min(24vh, 190px); max-width: 48%; }
  .menu-left { justify-content: flex-end; } .menu-right { justify-content: flex-start; }
}

/* ---------- case select ---------- */
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 22px 18px; }
.case-card { display: flex; flex-direction: column; text-align: left; background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; color: var(--ink); transition: transform .15s; }
button.case-card:hover { transform: translateY(-4px) rotate(-.4deg); }
.case-card.is-done { border-color: var(--green); box-shadow: 0 6px 0 var(--green); }
.cc-img { height: 128px; background-size: cover; background-position: center; position: relative; border-bottom: 3px solid var(--ink); }
.cc-emblem { position: absolute; left: 14px; bottom: -26px; width: 66px; height: 66px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); display: grid; place-items: center; box-shadow: 0 3px 0 var(--ink); }
.cc-emblem img { width: 42px; height: 42px; object-fit: contain; }
.cc-emblem .emo { font-size: 2rem; line-height: 1; }
.cc-lock { position: absolute; right: 12px; top: 10px; font-size: 1.6rem; }
.cc-body { display: flex; flex-direction: column; gap: 5px; padding: 32px 16px 16px; flex: 1; }
.cc-no { font-family: var(--display); font-weight: 800; font-size: .8rem; letter-spacing: .12em; color: var(--blue); }
.cc-title { font-family: var(--display); font-weight: 800; font-size: 1.45rem; line-height: 1.05; }
.cc-q { font-size: .95rem; color: var(--ink2); min-height: 2.7em; }
.cc-prog { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.cc-prog b { font-family: var(--display); min-width: 3em; text-align: right; }
.bar { flex: 1; height: 16px; border-radius: 999px; background: #dfe9fb; border: 3px solid var(--ink); overflow: hidden; display: block; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4bd277, #ffd23a); border-radius: 999px; transition: width .5s cubic-bezier(.3, .7, .2, 1); }
.cc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.cc-stars { color: #f5a800; font-size: 1.25rem; letter-spacing: 2px; text-shadow: 0 1px 0 rgba(12,42,107,.4); }
.cc-state { font-family: var(--display); font-weight: 800; font-size: .85rem; padding: 3px 12px; border-radius: 999px; border: 3px solid var(--ink); background: var(--yellow); }
.cc-state.s-complete { background: #c8f2d6; border-color: var(--green); color: #0f5c30; }
.cc-state.s-locked { background: #e3e8f2; color: #4a5a7d; border-color: #7d8db0; }
.case-card.is-locked { opacity: .78; box-shadow: 0 6px 0 #7d8db0; border-color: #7d8db0; }
.case-card.is-locked .cc-img { filter: grayscale(1) brightness(.9); }

/* ---------- case file ---------- */
.cf { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 22px; align-items: start; }
.cf-folder { position: relative; padding: 0 0 18px; overflow: visible; background: #fff6c9; border-radius: 6px 22px 22px 22px; margin-top: 18px; }
.cf-tab { position: absolute; top: -18px; left: 16px; background: var(--yellow2); border: 3px solid var(--ink); border-bottom: 0; border-radius: 12px 12px 0 0; padding: 3px 18px 0; font-family: var(--display); font-weight: 800; letter-spacing: .08em; font-size: .9rem; height: 21px; line-height: 17px; }
.cf-bg { height: 150px; background-size: cover; background-position: center; border-bottom: 3px solid var(--ink); border-radius: 4px 19px 0 0; }
.cf-title { font-size: clamp(1.7rem, 4vw, 2.4rem); padding: 14px 18px 0; }
.cf-q { padding: 4px 18px 0; font-size: 1.1rem; color: var(--ink2); }
.cf-guide { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: end; padding: 12px 16px 0; }
.cf-guide img { width: 92px; }
.speech { position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 10px 14px; font-weight: 700; font-size: .98rem; }
.speech::before { content: ""; position: absolute; left: -12px; bottom: 18px; width: 18px; height: 18px; background: #fff; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); }
.cf-power { display: flex; align-items: center; gap: 10px; padding: 14px 18px 8px; font-family: var(--display); font-weight: 800; font-size: .85rem; letter-spacing: .06em; }
.cf-folder > .btn { margin: 4px 18px 0; }
.cf-folder.opening { animation: openFile .55s cubic-bezier(.2, .9, .3, 1.2) both; transform-origin: 20% 100%; }
@keyframes openFile { from { opacity: 0; transform: perspective(900px) rotateX(-35deg) scale(.92); } to { opacity: 1; transform: none; } }
.cf-levels h2 { font-size: 1.4rem; margin: 18px 0 12px; }
.lvl-list { display: grid; gap: 12px; }
.lvl { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 14px 10px 12px; background: #fff; border: 3px solid var(--ink); border-left: 12px solid var(--lc); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); color: var(--ink); transition: transform .12s; }
button.lvl:hover { transform: translateX(4px); }
.lvl-badge { width: 58px; height: 74px; object-fit: contain; }
.lvl-t small { display: block; font-size: .72rem; letter-spacing: .08em; color: var(--ink2); text-transform: uppercase; font-weight: 900; }
.lvl-t b { font-family: var(--display); font-size: 1.18rem; line-height: 1.1; display: block; }
.lvl-t em { display: block; font-style: normal; font-size: .84rem; color: var(--ink2); font-weight: 700; margin-top: 2px; }
.lvl-s { display: grid; justify-items: end; gap: 2px; }
.lvl-s i { font-style: normal; font-family: var(--display); font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 999px; border: 3px solid var(--ink); background: var(--yellow); }
.lvl.is-done .lvl-s i { background: #fff; }
.lvl.is-locked { filter: grayscale(.9); opacity: .65; border-color: #7d8db0; box-shadow: 0 5px 0 #7d8db0; }
.lvl.is-next { box-shadow: 0 5px 0 var(--ink), 0 0 0 5px var(--yellow); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
.cf-closed, .cf-back { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
@media (max-width: 900px) { .cf { grid-template-columns: 1fr; } }

/* ---------- learn ---------- */
.learn { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; }
.lcard { background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.lcard > header { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--lc); color: #fff; border-bottom: 3px solid var(--ink); }
.lcard h2 { font-size: 1.35rem; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.lc-ico { font-size: 1.8rem; }
.lc-body { padding: 16px 18px 18px; display: grid; gap: 10px; align-content: start; flex: 1; }
.lc-big { font-size: 1.25rem; font-weight: 800; line-height: 1.4; }
.lc-sf { background: #eaf3ff; border-radius: 14px; padding: 10px 14px; font-size: .98rem; }
.lb { background: var(--tb); border: 3px solid var(--tc); border-radius: 14px; padding: 8px 12px 10px; display: grid; gap: 4px; justify-items: start; }
.lb p { font-size: .98rem; }
.lc-step { display: grid; gap: 2px; }
.lc-arrow { text-align: center; color: var(--ink2); font-weight: 900; font-size: 1.2rem; line-height: 1; }
.lg { display: grid; gap: 4px; }
.lg b { font-family: var(--display); font-size: .95rem; color: var(--orange); letter-spacing: .03em; }
.words { display: flex; flex-wrap: wrap; gap: 6px; }
.word { padding: 3px 12px; border-radius: 999px; background: #fff1e0; border: 2px solid var(--orange); font-weight: 900; }
#learn-listen { justify-self: start; }

/* ---------- CP & TP ---------- */
.cptp { max-width: 62rem; margin: 0 auto; display: grid; gap: 18px; }
.cp-card { background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); padding: 18px 22px 20px; border-left: 14px solid var(--blue); }
.cp-card h2 { font-size: 1.3rem; color: var(--blue); margin-bottom: 8px; }
.cp-card p { font-size: 1.08rem; line-height: 1.55; }
.cp2 { border-left-color: var(--yellow2); } .cp2 h2 { color: #a86d00; }
.cp3 { border-left-color: var(--purple); } .cp3 h2 { color: var(--purple); }
.tp-intro { font-weight: 800; margin-bottom: 10px; }
.tp-list { display: grid; gap: 10px; }
.tp-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 8px 10px; border-radius: 14px; background: #f3edff; }
.tp-n { width: 36px; height: 36px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.1rem; border: 3px solid var(--ink); }
.tp-t { font-size: 1.03rem; }
.tp-t small { display: block; font-size: .78rem; color: var(--purple); font-weight: 900; margin-top: 2px; letter-spacing: .04em; }

/* ---------- scores ---------- */
.sc-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.sc-box { padding: 12px 16px; text-align: center; display: grid; }
.sc-box small { font-family: var(--display); font-weight: 800; letter-spacing: .1em; font-size: .78rem; color: var(--blue); }
.sc-box b { font-family: var(--display); font-size: 1.4rem; line-height: 1.1; }
.badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.badge { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 12px 8px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); }
.badge img { height: 110px; object-fit: contain; }
.badge span { font-family: var(--display); font-weight: 800; }
.badge em { font-style: normal; font-size: .76rem; font-weight: 900; color: var(--green); }
.badge.is-locked { filter: grayscale(1); opacity: .6; }
.badge.is-locked em { color: #55658a; }
.sc-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.sc-case { padding: 14px 16px; display: grid; gap: 8px; }
.sc-case.is-done { border-color: var(--green); box-shadow: 0 6px 0 var(--green); }
.sc-case-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-case-h b { font-family: var(--display); font-size: 1.15rem; flex: 1; }
.sc-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.sc-cat { background: #eef5ff; border-radius: 10px; padding: 4px 2px; display: grid; }
.sc-cat em { font-style: normal; font-size: .64rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); }
.sc-cat b { font-family: var(--display); }
.sc-rank { font-size: .92rem; }
.sc-rank b { color: var(--blue); }

/* ---------- settings / about / modal ---------- */
.set-card { max-width: 52rem; margin: 0 auto; padding: 8px 20px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 2px dashed #cdd9f2; flex-wrap: wrap; }
.set-row:last-child { border-bottom: 0; }
.set-row b { font-family: var(--display); font-size: 1.1rem; display: block; }
.set-row small { display: block; font-size: .85rem; color: var(--ink2); font-weight: 700; }
.name-edit { display: flex; gap: 8px; align-items: center; } .name-edit .input { width: 200px; text-align: left; min-height: 46px; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 16px 4px 4px; border-radius: 999px; border: 3px solid var(--ink); background: #dfe6f3; font-family: var(--display); font-weight: 800; color: var(--ink); }
.switch .knob { order: 0; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); }
.switch .sw-lab { order: 1; font-size: .8rem; letter-spacing: .04em; }
.switch .sw-t { order: 2; min-width: 2.2em; }
.switch[aria-checked="true"], .switch[aria-pressed="true"] { background: #bff0cf; padding: 4px 4px 4px 16px; }
.switch[aria-checked="true"] .knob, .switch[aria-pressed="true"] .knob { order: 3; background: var(--yellow); }
.about { max-width: 52rem; margin: 0 auto; padding: 22px; display: grid; gap: 16px; justify-items: center; text-align: center; }
.about-logo { width: min(420px, 90%); }
.about-lead { font-size: 1.1rem; max-width: 60ch; }
.help { display: grid; gap: 10px; text-align: left; width: 100%; }
.help li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; padding: 8px 10px; background: #eef5ff; border-radius: 14px; }
.help-i { font-size: 1.6rem; text-align: center; }
.help p { font-size: .95rem; font-weight: 700; color: var(--ink2); }
.dev { display: flex; align-items: center; gap: 16px; background: #fff7d1; border: 3px solid var(--ink); border-radius: 18px; padding: 10px 18px; text-align: left; }
.dev img { height: 96px; }
.modal { position: fixed; inset: 0; z-index: 500; background: rgba(12, 42, 107, .55); display: grid; place-items: center; padding: 16px; animation: screenIn .2s both; }
.modal-card { background: #fff; border: 3px solid var(--ink); border-radius: 24px; box-shadow: var(--shadow); padding: 20px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.m-h { font-size: 1.6rem; text-align: center; margin-bottom: 12px; color: var(--blue); }
.m-act { display: flex; justify-content: center; margin-top: 14px; }
.m-p { font-size: 1.05rem; margin: 6px 0; }

/* ======================== LEVEL FRAME ======================== */
.lv-help { width: 42px; height: 42px; }
.lv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 6px 0 14px; }
.lv-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px; }
.lv-title img { width: 40px; height: 52px; object-fit: contain; }
.lv-title small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); font-weight: 900; }
.lv-title b { font-family: var(--display); font-size: 1.25rem; line-height: 1.05; color: var(--lc, var(--ink)); filter: brightness(.85); }
.power { display: flex; align-items: center; gap: 10px; min-width: 250px; padding: 6px 14px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink); }
.power-l { font-family: var(--display); font-weight: 800; font-size: .74rem; letter-spacing: .08em; white-space: nowrap; }
.power .bar { height: 14px; min-width: 70px; border-width: 2px; }
.power-n { font-family: var(--display); min-width: 3em; text-align: right; }
.power.big { display: inline-flex; font-size: 1.2rem; padding: 6px 20px; background: var(--yellow); }
.lv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem); gap: 20px; align-items: start; }
.lv-main { min-width: 0; }
.goal { font-size: .92rem; color: var(--ink2); margin-bottom: 10px; }
.goal b { font-family: var(--display); background: var(--lc, var(--blue)); color: #fff; padding: 1px 9px; border-radius: 999px; font-size: .78rem; letter-spacing: .08em; margin-right: 6px; }
.builder { padding: 12px 14px 6px; position: sticky; top: 10px; max-height: calc(100vh - 20px); overflow: auto; background: #fbfdff; }
.b-h { font-size: 1.1rem; margin-bottom: 10px; color: var(--blue); }
@media (max-width: 600px) {
  .tb-long { display: none; }
  .lv-head { gap: 8px 10px; margin-bottom: 10px; }
  .lv-head > .btn { min-height: 38px; padding: 4px 14px; }
  .lv-title { min-width: 0; flex: 1 1 0; }
  .lv-title b { font-size: 1.05rem; }
  .lv-title img { width: 34px; height: 44px; }
  .power { min-width: 0; padding: 4px 12px; }
}
@media (max-width: 900px) {
  .is-reading .builder { order: -1; }
  .lv-grid { grid-template-columns: 1fr; }
  .builder { position: static; max-height: none; }
  .power { width: 100%; }
}

.step-chip { display: inline-block; font-family: var(--display); font-weight: 800; font-size: .8rem; letter-spacing: .08em; background: var(--lc, var(--blue)); color: #fff; padding: 3px 14px; border-radius: 999px; margin-bottom: 8px; }
.instr { font-size: 1.12rem; font-weight: 800; margin-bottom: 12px; }
.count { display: inline-block; margin-left: 6px; padding: 0 12px; border: 3px solid var(--ink); border-radius: 999px; background: var(--yellow); font-family: var(--display); }
.q-t { font-size: clamp(1.25rem, 2.6vw, 1.7rem); margin: 4px 0 14px; line-height: 1.2; }

/* builder slots */
.bslot { display: block; border: 3px solid var(--tc); border-left-width: 10px; border-radius: 14px; background: var(--tb); padding: 8px 12px 8px; margin-bottom: 10px; text-align: left; width: 100%; }
.bslot-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bmark { min-width: 28px; height: 28px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: #fff; border: 2px solid var(--tc); font-family: var(--display); font-weight: 800; font-size: .85rem; color: var(--tc); }
.bslot.is-full .bmark { background: var(--tc); color: #fff; }
.bslot-t { font-size: .88rem; line-height: 1.4; font-weight: 700; margin-top: 6px; color: #1d2f5e; overflow-wrap: anywhere; }
.bslot-t.is-empty { opacity: .55; font-style: italic; }
.bslot-t.issue { opacity: .78; font-weight: 600; }
.bslot-t.mine { color: var(--green); }
.bslot.drop { border-style: dashed; cursor: pointer; }
.drop.is-over { background: #fff3a8; transform: scale(1.02); box-shadow: 0 0 0 4px var(--yellow); }
.bslot.pulse { animation: pulse .6s; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--tc); } 70% { box-shadow: 0 0 0 12px transparent; } }
.evslot { margin-top: 8px; padding: 6px 10px; border: 3px dashed #2b7de0; border-radius: 12px; background: #fff; font-size: .85rem; cursor: pointer; }
.evslot em { opacity: .6; margin-left: 6px; }
.evtxt { background: #e6f1ff; border-radius: 6px; padding: 0 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.gap { text-decoration: none; border-bottom: 3px solid var(--ink); padding: 0 4px; min-width: 2.2em; display: inline-block; text-align: center; color: transparent; }
.gap.on { background: var(--yellow); border-radius: 6px 6px 0 0; animation: blink 1.1s infinite; color: var(--ink); }
@keyframes blink { 50% { background: #fff0a0; } }
.gapfill { background: #d4f5df; border-radius: 6px; padding: 0 5px; color: #0f5c30; }

/* level 1 */
.evidence { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 20px 22px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-weight: 800; line-height: 1.4; color: var(--ink); cursor: grab; position: relative; transform: rotate(-.5deg); user-select: none; -webkit-user-select: none; }
.evidence::before { content: ""; position: absolute; right: 22px; top: -14px; width: 38px; height: 22px; border: 4px solid #7d8db0; border-radius: 12px; background: transparent; }
.grip { color: #9aaad0; font-size: 1.3rem; line-height: 1; padding: 2px 4px; touch-action: none; cursor: grab; flex: none; }
.clue { margin-top: 12px; padding: 8px 14px; border-radius: 14px; background: #fff7c8; border: 3px dashed var(--yellow2); font-size: .95rem; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.clue-h { font-family: var(--display); }
.pos { display: inline-flex; gap: 4px; margin-left: 6px; }
.pos i { width: 30px; height: 10px; border-radius: 6px; background: #e7dca0; display: block; }
.pos i.on { background: var(--orange); }
.buckets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.bucket { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px 12px; border: 3px solid var(--tc); border-radius: 18px; background: var(--tb); box-shadow: 0 5px 0 var(--tc); color: var(--ink); transition: transform .12s; min-height: 108px; justify-content: center; }
.bucket:hover:not(:disabled) { transform: translateY(-3px); }
.bucket .b-ico { font-size: 1.8rem; line-height: 1; }
.bucket b { font-family: var(--display); font-size: 1.1rem; color: var(--tc); letter-spacing: .02em; }
.bucket small { font-size: .78rem; font-weight: 800; color: var(--ink2); }
.bucket.is-right { background: #c8f2d6; border-color: var(--green); box-shadow: 0 5px 0 var(--green); }
.bucket.is-wrong, .bucket:disabled:not(.is-right) { opacity: .5; }
.bucket.is-wrong b::after { content: " ✖"; color: var(--red); }
@media (max-width: 600px) {
  .buckets { grid-template-columns: 1fr; gap: 10px; }
  .bucket { flex-direction: row; justify-content: flex-start; padding: 10px 16px; min-height: 64px; gap: 12px; text-align: left; }
  .bucket b { font-size: 1.15rem; } .bucket small { margin-left: auto; }
}

/* level 2 */
.thesis-box { border: 3px solid var(--tc); background: var(--tb); border-radius: 18px; padding: 10px 16px 14px; margin-bottom: 14px; box-shadow: 0 5px 0 var(--tc); }
.thesis-box p { margin-top: 6px; font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 2.8vw, 1.6rem); line-height: 1.2; color: var(--ink); }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.acard .grip { display: none; }

/* options (cards) */
.opts { display: grid; gap: 12px; max-width: 56rem; }
.opt { position: relative; display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 13px 16px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); font-weight: 800; font-size: 1.02rem; line-height: 1.38; color: var(--ink); transition: transform .12s, background .15s; }
.opt:hover:not(:disabled) { transform: translateY(-2px); background: #fffbe5; }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.opt .lbl { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); border: 3px solid var(--ink); font-family: var(--display); font-weight: 800; }
.opt-t { padding-top: 2px; }
.opt-mark { position: absolute; right: 10px; bottom: -13px; font-family: var(--display); font-size: .72rem; letter-spacing: .05em; padding: 1px 10px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; }
.opt-mark.ok { background: #c8f2d6; color: #0f5c30; border-color: var(--green); }
.opt-mark.no { background: #ffe1e4; color: #a01c37; border-color: var(--red); }
.opt-mark.no:empty { display: none; }
.opt.is-right, .opt.is-got { background: #d4f5df; border-color: var(--green); box-shadow: 0 5px 0 var(--green); }
.opt.is-wrong, .opt.is-weak { background: #ffeff1; border-color: var(--red); box-shadow: 0 5px 0 #b02b45; opacity: .75; }
.opt.is-wrong .opt-t, .opt.is-weak .opt-t { text-decoration: line-through; text-decoration-color: rgba(224,65,95,.7); }
.opt.is-reveal { opacity: .6; background: #f1f4fa; border-style: dashed; }
.opt.is-reveal .opt-t { text-decoration: none; }
.cardgrid .opt { margin-bottom: 10px; }

/* level 3 */
.pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.blk { display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 12px 14px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); font-weight: 800; font-size: .95rem; line-height: 1.38; color: var(--ink); user-select: none; -webkit-user-select: none; cursor: grab; transition: transform .12s; }
.blk:hover { transform: translateY(-2px); }
.blk.is-sel { background: #fff3a8; box-shadow: 0 5px 0 var(--ink), 0 0 0 5px var(--yellow); transform: translateY(-3px); }
.is-dragging { opacity: .35; }
.drag-ghost { position: fixed; z-index: 9999; margin: 0; pointer-events: none; opacity: .95; box-shadow: 0 14px 26px rgba(0,0,0,.3); }
body.is-dragging-now { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.placebar { padding: 10px 12px; border: 3px solid var(--ink); border-radius: 16px; background: #fffbe0; box-shadow: var(--shadow); display: grid; gap: 8px; animation: popin .2s both; }
.how { text-align: left; margin: -6px 0 10px; }
.pb-h { font-family: var(--display); font-weight: 800; }
.pb-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pb { text-align: left; }
.gapbox { background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.gap-ctx { font-size: .92rem; color: var(--ink2); margin-bottom: 8px; font-weight: 600; }
.gap-s { font-size: clamp(1.1rem, 2.4vw, 1.4rem); font-weight: 800; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chipopt { min-height: 54px; padding: 8px 26px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 0 5px 0 var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.chipopt:hover:not(:disabled) { background: var(--yellow); transform: translateY(-2px); }
.chipopt.is-wrong { background: #ffeff1; border-color: var(--red); box-shadow: 0 5px 0 #b02b45; text-decoration: line-through; opacity: .7; }
.complete-banner { text-align: center; padding: 26px 18px; background: #fff7c8; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); display: grid; gap: 12px; justify-items: center; }
.complete-banner h2 { font-size: 2.2rem; color: var(--green); animation: popin .5s both; }

/* level 4 */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 16px 16px 12rem; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); background-color: #6a3b2a; background-size: cover; background-position: center; overflow: hidden; margin-bottom: 14px; isolation: isolate; }
.stage::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,25,70,.35), rgba(10,25,70,.7)); z-index: -1; }
.support { align-self: flex-start; display: flex; gap: 4px; font-size: 1.6rem; color: rgba(255,255,255,.35); text-shadow: 0 2px 0 rgba(0,0,0,.3); margin-bottom: 8px; }
.support .on { color: var(--yellow); animation: popin .4s both; }
.bubble { position: relative; max-width: min(560px, 92%); background: #fff; border: 3px solid var(--ink); border-radius: 24px; padding: 14px 20px; font-weight: 800; font-size: clamp(1.05rem, 2.3vw, 1.3rem); line-height: 1.4; box-shadow: 0 5px 0 var(--ink); z-index: 2; margin-left: auto; margin-right: 12%; }
.bubble::after { content: ""; position: absolute; right: 36px; bottom: -14px; width: 24px; height: 24px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); }
.actor { position: absolute; bottom: 0; display: grid; justify-items: center; }
.actor img { height: 10.6rem; width: auto; filter: drop-shadow(0 6px 6px rgba(0,0,0,.35)); }
.actor span { margin-top: -4px; padding: 1px 14px; border-radius: 999px; background: var(--yellow); border: 3px solid var(--ink); font-family: var(--display); font-weight: 800; font-size: .85rem; position: relative; }
.ally { left: 3%; } .opp { right: 3%; }
@media (max-width: 600px) {
  .stage { padding-bottom: 130px; } .actor img { height: 118px; } .bubble { margin-right: 0; margin-left: 0; max-width: 100%; }
  .bubble::after { right: 30%; }
}

/* feedback */
.dock { position: sticky; bottom: 10px; z-index: 6; margin-top: 16px; display: grid; gap: 10px; }
.dock:empty { display: none; }
.fb { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow); background: #fff; flex-wrap: wrap; }
.fb-ok { background: #e4f8ec; border-color: var(--green); box-shadow: 0 6px 0 var(--green); }
.fb-bad { background: #fff0f2; border-color: var(--red); box-shadow: 0 6px 0 #b02b45; }
.fb-info { background: #e8f2ff; border-color: var(--blue); box-shadow: 0 6px 0 #1a56ad; }
.fb-face { width: 62px; height: 62px; object-fit: contain; object-position: top; flex: none; }
.fb-body { flex: 1; min-width: 180px; }
.fb-title { font-family: var(--display); font-size: 1.15rem; letter-spacing: .02em; display: block; }
.fb-ok .fb-title { color: #0f6a37; } .fb-bad .fb-title { color: #b02b45; } .fb-info .fb-title { color: #1a56ad; }
.fb-body p { font-size: .98rem; margin-top: 2px; }
.fb-xp { font-family: var(--display); font-weight: 800; padding: 2px 12px; border-radius: 999px; background: var(--yellow); border: 3px solid var(--ink); animation: popin .4s both; }
.fb-xp.pw { background: #cfe6ff; }
.fb-next { margin-left: auto; }
.pop { animation: popin .28s both; }
@keyframes popin { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.shake { animation: shake .42s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
@media (max-width: 600px) { .fb-face { width: 46px; height: 46px; } .fb-next { width: 100%; margin-left: 0; } }

/* level 5 + reading */
.issue-banner { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 16px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; margin-bottom: 12px; font-size: 1.1rem; }
.issue-banner .tag { --tc: #7b4cd6; }

/* complete text */
.final { max-width: 54rem; margin: 0 auto; }
.final-h { text-align: center; margin: 8px 0 14px; display: grid; gap: 8px; justify-items: center; }
.final-h h1 { font-size: clamp(2rem, 6vw, 3rem); color: var(--green); text-shadow: 0 3px 0 #fff; animation: popin .5s both; }
.doc-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 10px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.doc { background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow); padding: 20px 22px; display: grid; gap: 12px; }
.doc-title { font-size: clamp(1.4rem, 3.2vw, 1.9rem); text-align: center; padding-bottom: 8px; border-bottom: 3px dashed #c9bd80; }
.para { position: relative; border: 3px solid var(--tc); border-left-width: 10px; border-radius: 14px; background: var(--tb); padding: 10px 14px 12px; transition: background .25s, border-color .25s; }
.para-label { display: inline-block; font-family: var(--display); font-weight: 800; font-size: .74rem; letter-spacing: .06em; background: var(--tc); color: #fff; border-radius: 999px; padding: 1px 10px; margin-bottom: 4px; }
.para p { font-size: 1.04rem; line-height: 1.6; font-weight: 700; }
.doc.hints-off .para { background: transparent; border-color: transparent; padding-left: 4px; padding-right: 4px; }
.doc.hints-off .para-label { display: none; }
.doc .para { animation: popin .4s both; }
.doc .para:nth-child(3) { animation-delay: .1s; } .doc .para:nth-child(4) { animation-delay: .2s; } .doc .para:nth-child(5) { animation-delay: .3s; } .doc .para:nth-child(6) { animation-delay: .4s; }
.builder .doc { padding: 10px; box-shadow: none; }
.builder .doc-tools { margin: 0 0 8px; }
.builder .para p { font-size: .9rem; }
.builder .doc-title { font-size: 1.1rem; }

/* results */
.res-card, .closed-card { max-width: 40rem; margin: 14px auto 0; padding: 22px 20px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.res-h { font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--lc, var(--blue)); filter: brightness(.9); animation: popin .5s both; }
.res-badge { width: 150px; filter: drop-shadow(0 8px 6px rgba(12,42,107,.3)); animation: badgePop .8s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes badgePop { 0% { transform: scale(0) rotate(-30deg); } 70% { transform: scale(1.15) rotate(6deg); } 100% { transform: none; } }
.res-badge.is-new { animation: badgePop .8s cubic-bezier(.2, 1.4, .4, 1) both, glow 1.6s .8s ease-in-out 3; }
@keyframes glow { 50% { filter: drop-shadow(0 0 22px #ffd23a); } }
.res-name { font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.res-new { font-family: var(--display); font-weight: 800; padding: 4px 16px; border-radius: 999px; background: var(--yellow); border: 3px solid var(--ink); }
.res-stars { font-size: 2.6rem; color: #f5a800; letter-spacing: 6px; text-shadow: 0 2px 0 rgba(12,42,107,.5); line-height: 1; }
.res-stats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.res-stats span { padding: 6px 14px; background: #eef5ff; border-radius: 14px; font-size: .9rem; display: grid; }
.res-stats b { font-family: var(--display); font-size: 1.4rem; }
.res-note { font-size: 1.05rem; }
.closed-card { position: relative; }
.stamp { display: inline-block; transform: rotate(-7deg); border: 7px solid var(--red); color: var(--red); font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: .95; padding: 8px 24px 6px; border-radius: 16px; letter-spacing: .05em; background: rgba(255,255,255,.7); }
.stamp-in { animation: stampIn .6s cubic-bezier(.2, .9, .3, 1.1) both; }
@keyframes stampIn { 0% { opacity: 0; transform: rotate(-7deg) scale(3.2); } 70% { opacity: 1; transform: rotate(-7deg) scale(.95); } 100% { opacity: 1; transform: rotate(-7deg) scale(1); } }
.closed-case { margin-top: 10px; font-family: var(--display); font-weight: 800; letter-spacing: .06em; color: var(--ink2); }
.score-rows { width: 100%; max-width: 440px; display: grid; }
.score-row { display: grid; grid-template-columns: 1fr auto 52px; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 2px dashed #cdd9f2; text-align: left; font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.score-row .stars5 { color: #f5a800; letter-spacing: 3px; font-size: 1.25rem; }
.score-row b { text-align: right; color: var(--ink2); }
.power-big { display: grid; line-height: 1; }
.power-big small { font-family: var(--display); font-weight: 800; letter-spacing: .12em; color: var(--blue); }
.power-big b { font-family: var(--display); font-size: clamp(3rem, 10vw, 4.6rem); color: var(--green); text-shadow: 0 3px 0 #fff; animation: popin .6s .3s both; }
.rank-pill { font-family: var(--display); font-weight: 800; font-size: 1.3rem; background: var(--blue); color: #fff; padding: 4px 22px; border-radius: 999px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.saved { font-size: .85rem; color: var(--green); }

/* effects */
.fly { position: fixed; z-index: 9998; pointer-events: none; padding: 8px 12px; border-radius: 12px; background: #fff; border: 3px solid var(--tc, var(--blue)); font-weight: 800; font-size: .85rem; box-shadow: 0 6px 14px rgba(0,0,0,.25); transition: transform .6s cubic-bezier(.5, 0, .2, 1), opacity .6s; transform-origin: top left; color: var(--ink); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti i { position: absolute; top: -24px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(110vh) rotate(600deg); opacity: .9; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .mc { animation: none; }
}
@media print {
  .topbar, .actions, .skip-link, #modal-root { display: none !important; }
  body { background: #fff; }
  .cp-card, .panel { box-shadow: none; }
}

/* ======================== v2: opening, reflection, certificate ======================== */
.menu-btns .btn small { display: block; font-family: var(--body); font-size: .72rem; font-weight: 800; opacity: .85; margin-left: 4px; text-shadow: none; }
.btn.is-locked { filter: grayscale(.35); }
.m-list { list-style: disc; padding-left: 1.4em; margin: 6px 0 10px; font-weight: 800; }
.m-act { gap: 10px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1200; background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; font-family: var(--display); font-weight: 800; box-shadow: 0 6px 18px rgba(0,0,0,.3); animation: popin .25s both; max-width: 92vw; text-align: center; }
.toast.out { opacity: 0; transition: opacity .4s; }

/* opening */
.opening { min-height: 72vh; display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 18px; text-align: center; padding-top: 4vh; }
.op-stage { display: grid; justify-items: center; align-content: center; gap: 16px; }
.op-ey { width: min(620px, 88vw); animation: opIn .9s cubic-bezier(.2, .9, .3, 1.2) both; filter: drop-shadow(0 8px 12px rgba(12,42,107,.25)); }
.op-logo { width: min(760px, 94vw); animation: logoReveal 1.1s cubic-bezier(.2, 1, .3, 1.15) both; filter: drop-shadow(0 8px 12px rgba(12,42,107,.25)); }
@keyframes opIn { from { opacity: 0; transform: scale(.7) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes logoReveal { 0% { opacity: 0; transform: scale(.4) rotate(-6deg); filter: blur(8px); } 60% { opacity: 1; transform: scale(1.06) rotate(1deg); filter: blur(0); } 100% { opacity: 1; transform: none; } }
.op-line { font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 4.6vw, 2.4rem); color: var(--ink); animation: opIn .8s .3s both; }
.op-sub { font-size: clamp(1.05rem, 2.6vw, 1.4rem); color: var(--ink2); max-width: 30em; animation: opIn .8s .6s both; }
.op-ready { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--blue); animation: opIn .8s 1.1s both; }
.op-wave { display: flex; gap: 6px; align-items: flex-end; height: 44px; }
.op-wave i { width: 8px; height: 10px; border-radius: 6px; background: var(--blue); opacity: .35; }
.op-wave.is-on i { opacity: 1; animation: wv .8s ease-in-out infinite; }
.op-wave.is-on i:nth-child(2n) { animation-delay: -.3s; background: var(--yellow2); } .op-wave.is-on i:nth-child(3n) { animation-delay: -.55s; background: var(--pink); }
@keyframes wv { 0%, 100% { height: 10px; } 50% { height: 42px; } }
.op-ctl { display: grid; justify-items: center; gap: 10px; min-height: 120px; }
.op-status { min-height: 1.4em; font-weight: 800; color: var(--ink2); }
.op-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#op-start { animation: nudgeY 1.4s ease-in-out infinite; }
@keyframes nudgeY { 50% { transform: translateY(-4px); } }

/* reflection */
.rf { max-width: 52rem; margin: 0 auto; padding: 18px 20px 22px; display: grid; gap: 22px; }
.rq { border: 0; margin: 0; padding: 0; min-width: 0; }
.rq legend { font-family: var(--display); font-weight: 800; font-size: clamp(1.05rem, 2.4vw, 1.3rem); line-height: 1.2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 10px; padding: 0; }
.rq legend small { font-family: var(--body); font-size: .85rem; color: var(--ink2); font-weight: 800; width: 100%; padding-left: 42px; margin-top: -4px; }
.qn { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; border: 3px solid var(--ink); font-size: 1rem; flex: none; }
.rchips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.rchip, .rface { position: relative; display: block; cursor: pointer; }
.rchip input, .rface input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rc-b { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); font-weight: 800; line-height: 1.25; transition: transform .1s, background .15s; }
.rc-b i { font-style: normal; font-size: 1.4rem; }
.rc-b .tick { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e6ecf8; color: transparent; border: 2px solid #9fb0d4; font-size: .85rem; flex: none; }
.rchip input:checked + .rc-b { background: #d4f5df; border-color: var(--green); box-shadow: 0 4px 0 var(--green); }
.rchip input:checked + .rc-b .tick { background: var(--green); color: #fff; border-color: var(--green); }
.rchip input:focus-visible + .rc-b, .rface input:focus-visible + .rf-b { outline: 4px solid var(--pink); outline-offset: 3px; }
.rchip:hover .rc-b, .rface:hover .rf-b { transform: translateY(-2px); }
.rfaces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rf-b { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); text-align: center; height: 100%; transition: transform .1s; }
.rf-b img { height: 70px; width: auto; object-fit: contain; }
.rf-b b { font-family: var(--display); font-size: .98rem; line-height: 1.1; }
.dots { display: flex; gap: 4px; } .dots i { width: 12px; height: 12px; border-radius: 50%; background: #dfe6f3; border: 2px solid var(--ink); display: block; }
.dots i.on { background: var(--yellow); }
.rface input:checked + .rf-b { background: #fff3a8; border-color: var(--ink); box-shadow: 0 4px 0 var(--ink), 0 0 0 5px var(--green); }
.stem { display: block; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--blue); margin-bottom: 8px; }
.ta { text-align: left; font-size: 1.05rem; resize: vertical; min-height: 96px; line-height: 1.4; }
.rcount { text-align: right; font-size: .82rem; font-weight: 800; color: var(--ink2); }
.rerr { margin-top: 8px; padding: 6px 12px; border-radius: 12px; background: #ffeff1; border: 2px solid var(--red); color: #a01c37; font-weight: 800; }
@media (max-width: 640px) { .rfaces { grid-template-columns: repeat(2, 1fr); } .rq legend small { padding-left: 0; } }

/* unlocked */
.un-card { max-width: 40rem; margin: 20px auto 0; padding: 26px 20px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.un-1 { font-size: clamp(1.6rem, 5vw, 2.4rem); color: var(--green); animation: popin .5s both; }
.un-badge { width: 130px; animation: badgePop .9s .5s cubic-bezier(.2, 1.4, .4, 1) both; filter: drop-shadow(0 8px 6px rgba(12,42,107,.3)); }
.un-2 { font-size: clamp(1.8rem, 6vw, 2.8rem); color: var(--blue); animation: unlockIn .7s 1s cubic-bezier(.2, 1.3, .3, 1) both; }
@keyframes unlockIn { from { opacity: 0; transform: scale(2.4); } to { opacity: 1; transform: none; } }
.un-3 { font-size: 1.08rem; animation: popin .5s 1.5s both; }
.un-card .actions { animation: popin .5s 1.7s both; }

/* locked + certificate */
.locked { max-width: 40rem; margin: 0 auto; padding: 24px 20px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.lk-ico { font-size: 3rem; }
.locked h2 { font-size: 1.8rem; color: var(--ink2); }
.lk-lead { max-width: 30em; }
.lk-prog { width: 100%; max-width: 24rem; }
.lk-h { font-family: var(--display); font-weight: 800; letter-spacing: .1em; color: var(--blue); margin-top: 6px; }
.lk-list { display: grid; gap: 6px; text-align: left; } .lk-list li { padding: 8px 14px; background: #fff7d1; border: 3px solid var(--ink); border-radius: 14px; list-style: none; }
.cert-upd { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; margin: 0 auto 14px; max-width: 64rem; background: #fff7d1; }
.cert-upd > div { display: grid; gap: 2px; flex: 1; min-width: 220px; } .cert-upd span { font-size: .95rem; }
.cert-wrap { position: relative; max-width: 64rem; margin: 0 auto; border: 3px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); background: #fffdf4; overflow: hidden; aspect-ratio: 1600 / 1100; }
.cert-canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .5s; }
.cert-canvas.is-ready { opacity: 1; }
.cert-loading { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--ink2); }
.cert-actions .btn { min-width: 12rem; }
.cert-note { max-width: 40rem; margin: 10px auto 0; }
.listen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.listen-msg { font-size: .85rem; font-weight: 800; color: #a01c37; flex-basis: 100%; }
.listen-msg:empty { display: none; }

#cert-print { display: none; }
@page certp { size: A4 landscape; margin: 0; }
@media print {
  body.printing-cert { background: #fff !important; }
  body.printing-cert > *:not(#cert-print) { display: none !important; }
  body.printing-cert #cert-print { display: grid !important; place-items: center; width: 100vw; height: 100vh; page: certp; }
  body.printing-cert #cert-print img { width: 100%; height: 100%; object-fit: contain; display: block; }
}

.lq { flex: 1; min-width: 0; }

.modal-card.modal-wide { width: min(1100px, 100%); }
.cert-zoom { overflow: auto; max-height: 70vh; border: 3px solid var(--ink); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.cert-zoom img { display: block; width: max(100%, 900px); max-width: none; height: auto; }
