:root {
  --ink: #111;
  --ink-2: #333;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --paper: #fff;
  --bg: #f3f3f3;
  --soft: #f3f4f6;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --kbd-h: 0px;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body {
  margin: 0; min-height: 100vh; font-family: 'Kanit', system-ui, sans-serif; color: var(--ink);
  background: var(--bg); font-weight: 400; line-height: 1.45;
}
body.no-scroll { overflow: hidden }
button { font-family: inherit; color: inherit }
svg { width: 20px; height: 20px; flex: none }
.muted { color: var(--muted) }
.small { font-size: 13.5px }
h1, h2, h3 { margin: 0 }
code { background: rgba(0, 0, 0, .06); padding: 1px 5px; border-radius: 5px; font-size: .92em }

/* ---------- login ---------- */
body.login {
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .08), transparent 40%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 14px),
    #0b0b0b;
}
.login-card {
  width: 100%; max-width: 400px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-radius: 16px; box-shadow: 0 12px 48px rgba(0, 0, 0, .45); padding: 34px 30px;
}
.brand { text-align: center; margin-bottom: 20px }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px;
  background: var(--ink); color: #fff; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 32px; margin-bottom: 12px;
}
.brand-logo { display: block; width: 64px; height: 64px; margin: 0 auto 12px }
.brand-logo.sm { width: 38px; height: 38px; margin: 0; flex: none }
.brand-mark.sm { width: 38px; height: 38px; font-size: 22px; border-radius: 10px; margin: 0 }
.brand .name { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 28px; letter-spacing: .02em; line-height: 1.15 }
.brand .tag { font-size: 13px; color: #555; margin-top: 4px; letter-spacing: .04em }
.login-copy { font-size: 14.5px; color: var(--ink-2); text-align: center; margin: 0 0 22px }
.gbtn { display: flex; justify-content: center; min-height: 44px }
.login-note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 12px }
.err { background: var(--bad-bg); color: var(--bad); font-size: 13.5px; padding: 10px 12px; border-radius: 9px; margin-bottom: 14px }
.foot { text-align: center; margin-top: 22px; font-size: 11.5px; color: #777; letter-spacing: .06em }

/* ---------- membership page ---------- */
.login-card.wide { max-width: 720px }
.membership .login-copy { margin-bottom: 18px }
.mem-title { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 24px; text-transform: uppercase; letter-spacing: .02em; text-align: center; margin: 0 0 6px }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 6px }
.plan-card { position: relative; border: 1.5px solid var(--line); border-radius: 14px; padding: 18px 16px 16px; background: #fff; display: flex; flex-direction: column; gap: 4px; text-align: center }
.plan-card.featured { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset }
.plan-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 2px 10px; border-radius: 999px; white-space: nowrap }
.plan-name { font-weight: 600; font-size: 15px }
.plan-price { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 34px; line-height: 1.1 }
.plan-days { font-size: 12.5px; color: var(--muted) }
.plan-desc { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; flex: 1 }
.plan-card .submit { margin-top: 12px; width: 100% }
.mem-pending { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1.5px dashed var(--ink); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px }
.mem-pending small { display: block; color: var(--muted); font-size: 12px }
.mem-pending-act { display: flex; gap: 8px }
.mem-fine { font-size: 12px; color: var(--muted); text-align: center; margin: 14px 0 0 }
.mem-history { margin-top: 14px; font-size: 13px }
.mem-history summary { cursor: pointer; font-weight: 500 }
.mem-history ul { list-style: none; padding: 0; margin: 8px 0 0 }
.mem-history li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid var(--line) }
.mem-history li small { width: 100%; color: var(--muted) }
.mem-foot { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: var(--muted) }
.mem-foot a { color: var(--ink); font-weight: 500 }
.mem-foot .link-btn { margin: 0; color: var(--ink) }
.member-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 10px; text-decoration: none; color: var(--ink); white-space: nowrap }
.member-chip.soon { background: var(--ink); color: #fff }

.trial-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 14px; padding: 16px 18px }
.trial-card b { display: block; font-family: 'Oswald', sans-serif; font-size: 20px; letter-spacing: .02em }
.trial-card small { color: #cfcfcf; font-size: 13px }
.trial-card .submit { background: #fff; color: var(--ink); border-color: #fff }
.trial-card .submit:hover { background: #e9e9e9 }
.mem-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted); font-size: 12.5px }
.mem-or::before, .mem-or::after { content: ''; flex: 1; border-top: 1px solid var(--line) }

/* ---------- buttons ---------- */
.submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; background: var(--ink); color: #fff; border: 1.5px solid var(--ink); border-radius: 10px;
  font-size: 15px; font-weight: 500; cursor: pointer; transition: background .15s, transform .08s; text-decoration: none;
}
.submit:hover { background: var(--ink-2) }
.submit:active { transform: scale(.98) }
.submit:focus-visible, .chip:focus-visible, .drill:focus-visible, .icon-btn:focus-visible, .key:focus-visible, .bank-row:focus-visible { outline: 3px solid rgba(0, 0, 0, .25); outline-offset: 2px }
.submit.ghost { background: transparent; color: var(--ink) }
.submit.ghost:hover { background: var(--soft) }
.submit.big { padding: 15px 22px; font-size: 16px; min-width: 180px }
.submit svg { width: 18px; height: 18px }
.login .submit.ghost { width: 100%; margin-top: 16px }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  background: transparent; border: 1.5px solid transparent; cursor: pointer; color: var(--ink); flex: none;
}
.icon-btn:hover { background: var(--soft) }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px max(16px, calc((100vw - 1100px) / 2)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand-sm { display: flex; align-items: center; gap: 10px; min-width: 0 }
.brand-sm .name { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: .02em; line-height: 1.1 }
.brand-sm .tag { font-size: 11px; color: var(--muted); letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.me { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0 }
.me-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--ink); color: #fff; flex: none }
.avatar.initials { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px }
.avatar.sm { width: 26px; height: 26px; font-size: 12px }

/* ---------- home ---------- */
.shell { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px }
.stat { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow) }
.stat-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; flex: none }
.stat-num { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 26px; line-height: 1 }
.stat-num small { font-size: 14px; color: var(--muted); font-weight: 500 }
.stat-lbl { font-size: 12.5px; color: var(--muted); margin-top: 3px }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start }
.col-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 84px }
.block { background: var(--paper); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow) }
.col-main .block + .block { margin-top: 20px }
.block-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px }
.block-head h2 { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 20px; letter-spacing: .03em; text-transform: uppercase }
.block-head .muted { font-size: 13px }
.block-head svg { margin-left: auto; align-self: center }

.plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px }
.day { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column }
.day.done { border-color: var(--ink) }
.day-top { display: flex; align-items: center; justify-content: space-between }
.day-no { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .12em; background: var(--ink); color: #fff; padding: 2px 8px; border-radius: 6px }
.day-ok { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center }
.day-ok svg { width: 15px; height: 15px; stroke-width: 3 }
.day h3 { font-size: 17px; font-weight: 600; margin-top: 10px }
.day p { font-size: 13px; color: var(--muted); margin: 4px 0 12px; flex: 1 }
.day-drills { display: flex; flex-direction: column; gap: 8px }
.drill {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--soft); border: 1.5px solid transparent;
  border-radius: 10px; padding: 9px 10px; cursor: pointer; transition: border-color .15s, background .15s;
}
.drill:hover { border-color: var(--ink); background: #fff }
.drill-ico { width: 30px; height: 30px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; flex: none }
.drill-ico svg { width: 17px; height: 17px }
.drill-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0 }
.drill-txt b { font-weight: 500; font-size: 14px }
.drill-txt small { font-size: 12px; color: var(--muted) }
.drill-ok { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; flex: none }
.drill-ok svg { width: 13px; height: 13px; stroke-width: 3 }
.drill.cleared { background: #fff; border-color: var(--line) }

.custom { display: flex; flex-direction: column; gap: 14px }
.opt label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink-2) }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 14px;
  transition: all .12s;
}
.chip:hover { border-color: var(--ink) }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff }
.custom-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 14px }
.custom-foot .muted { font-size: 13.5px }

.weak { list-style: none; margin: 0 0 14px; padding: 0 }
.weak li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.weak li:last-child { border-bottom: 0 }
.weak b { font-weight: 500 }
.weak small { color: var(--muted); font-size: 12px }
.weak .miss { font-size: 12px; color: var(--bad); white-space: nowrap }
.col-side .submit { width: 100% }

.board ol { list-style: none; margin: 0; padding: 0 }
.board li { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--line) }
.board li:last-child { border-bottom: 0 }
.board li.me { font-weight: 600 }
.board .rank { width: 22px; font-family: 'Oswald', sans-serif; font-weight: 600; text-align: center; color: var(--muted) }
.board li:nth-child(-n+3) .rank { color: var(--ink) }
.board .bn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.board .bs { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--muted) }
.board .bs svg { width: 14px; height: 14px }
.board .bx { font-family: 'Oswald', sans-serif; font-weight: 600 }

.wide-link {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; border-radius: var(--radius); background: var(--ink); color: #fff;
  border: 0; cursor: pointer; font-size: 14.5px; text-align: left;
}
.wide-link:hover { background: var(--ink-2) }

/* ---------- profile & what's new ---------- */
.badge { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--ink); color: #fff; border: 1.5px solid var(--ink); white-space: nowrap; vertical-align: middle }
.badge.ghost { background: transparent; color: var(--ink) }
.me-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 8px 4px 4px; border-radius: 999px; cursor: pointer; font: inherit; color: inherit; min-width: 0 }
.me-btn:hover { background: var(--soft) }
button.member-chip { background: transparent; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer }
button.member-chip.soon { background: var(--ink); color: #fff }
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px }
.profile-head h1 { font-family: 'Oswald', sans-serif; font-size: 28px; font-weight: 700; line-height: 1.1 }
.profile-head p { margin: 2px 0 8px }
.avatar.lg { width: 72px; height: 72px; font-size: 30px }
.stats.five { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px }
.shell.narrow .block + .block, .shell.narrow .stats + .block { margin-top: 16px }
.prog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px }
.prog-list li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 70px; align-items: center; gap: 12px; font-size: 14px }
.prog-list small { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums }
.prog-bar { height: 8px; background: #e6e6e6; border-radius: 99px; overflow: hidden }
.prog-bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px }
.sub-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin: 18px 0 10px }
.pay-list { list-style: none; margin: 0; padding: 0 }
.pay-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.pay-list li:last-child { border-bottom: 0 }
.pay-list small { display: block; color: var(--muted); font-size: 12px }
.pay-list .r { text-align: right; white-space: nowrap }
.pf-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px }
.danger-text { color: var(--bad) !important; border-color: var(--bad) !important }
.news-list { display: grid; gap: 12px; text-align: left }
.news-item { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px }
.news-top { display: flex; align-items: center; gap: 8px }
.news-top small { color: var(--muted); font-size: 12px; margin-left: auto }
.news-tag { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 1px 7px; border-radius: 5px }
.news-item h3 { font-size: 16px; font-weight: 600; margin-top: 6px }
.news-body { font-size: 13.5px; color: var(--ink-2) }
.news-body p { margin: 6px 0 0 }
.news-body ul { margin: 6px 0 0; padding-left: 18px }
.news-body li { margin: 2px 0 }
.news-pop { text-align: center }
.news-pop .news-list { margin-top: 14px; max-height: 55vh; overflow: auto }
.news-pop .modal-actions { justify-content: center }
@media (max-width: 520px) {
  .stats.five { grid-template-columns: repeat(2, 1fr) }
  .prog-list li { grid-template-columns: 96px minmax(0, 1fr) 58px; gap: 8px }
  .profile-head { gap: 12px }
  .avatar.lg { width: 56px; height: 56px; font-size: 24px }
}

/* ---------- practice by topic ---------- */
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 10px }
.topic { display: flex; flex-direction: column; gap: 3px; text-align: left; background: var(--soft); border: 1.5px solid transparent; border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; transition: border-color .12s, background .12s }
.topic:hover, .topic:focus-visible { border-color: var(--ink); background: #fff; outline: none }
.topic-top { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.topic-top b { font-size: 15px; font-weight: 600 }
.topic-pts { font-family: 'Oswald', sans-serif; font-size: 12px; font-weight: 600; background: var(--ink); color: #fff; border-radius: 5px; padding: 0 6px }
.topic small { font-size: 12px; color: var(--muted) }
.topic-bar { display: block; height: 5px; background: #e2e2e2; border-radius: 99px; overflow: hidden; margin-top: 6px }
.topic-bar i { display: block; height: 100%; background: var(--ink) }
.topic-pct { font-size: 11px !important }

/* grammar cards: long prompts sit above the input */
.qverb.sm { font-size: clamp(24px, 5vw, 32px) }
.qprompt.big { font-size: 19px; line-height: 1.45; margin-top: 16px }
.qprompt u { text-decoration-thickness: 2px; text-underline-offset: 3px }
.is-stacked .row { grid-template-columns: minmax(0, 1fr) }
.is-stacked .subj { display: none }
.is-stacked .fix { grid-column: 1 }
.is-table .subj u { text-decoration-thickness: 2px }
.say-wrap { display: inline-flex; gap: 8px; flex-wrap: wrap }
.say { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer }
.say.slow { background: transparent; color: var(--ink) }
.say svg { width: 18px; height: 18px }
.is-table .say { padding: 5px 10px; font-size: 12px }
.is-table .say span { display: none }

/* ---------- check-up & study plan ---------- */
.col-main .ck-home + .block { margin-top: 20px }
.ck-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between }
.ck-hero h2 { font-family: 'Oswald', sans-serif; font-size: 26px; font-weight: 700; text-transform: uppercase; margin: 8px 0 4px }
.ck-hero p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 460px }
.ck-home:has(.ck-hero) { background: var(--ink); color: #fff }
.ck-home:has(.ck-hero) p { color: #d4d4d4 }
.ck-home:has(.ck-hero) .pill { background: #fff; color: var(--ink); border-color: #fff }
.ck-home:has(.ck-hero) .submit { background: #fff; color: var(--ink); border-color: #fff }
.ck-sum { display: flex; gap: 20px; align-items: center; flex-wrap: wrap }
.ck-score { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; width: 130px }
.ck-score b { font-family: 'Oswald', sans-serif; font-size: 46px; line-height: 1 }
.ck-score span { color: var(--muted); font-size: 16px }
.ck-score small { width: 100%; color: var(--muted); font-size: 12px }
.ck-tasks { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 220px; display: grid; gap: 8px }
.ck-tasks li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; padding: 8px 12px; background: var(--soft); border-radius: 10px }
.ck-tasks li.done span:first-child { text-decoration: line-through; color: var(--muted) }
.ck-dots { display: inline-flex; gap: 4px; align-items: center }
.ck-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink) }
.ck-dots i.on { background: var(--ink) }
.ck-dots small { margin-left: 6px; color: var(--muted); font-size: 12px }
.ck-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px }
.ck-count { font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: 600; min-width: 48px; text-align: right }
.ck-report { display: flex; align-items: center; gap: 22px; flex-wrap: wrap }
.ck-big { display: flex; align-items: baseline; gap: 6px }
.ck-big b { font-family: 'Oswald', sans-serif; font-size: 72px; font-weight: 700; line-height: .9 }
.ck-big span { font-size: 22px; color: var(--muted) }
.ck-report h2 { font-family: 'Oswald', sans-serif; font-size: 20px; text-transform: uppercase }
.ck-report p { margin: 4px 0 0 }
.ck-secs, .ck-skills, .ck-errs, .plan-tasks, .hist-ck { list-style: none; margin: 0; padding: 0 }
.ck-secs li { display: grid; grid-template-columns: 170px minmax(0, 1fr) 64px 92px; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px }
.ck-sec-name small { display: block; color: var(--muted); font-size: 11.5px }
.ck-sec-pct { font-family: 'Oswald', sans-serif; font-weight: 600; text-align: right }
.ck-sec-pct small { display: block; font-size: 11px }
.ck-sec-pct .up { color: var(--ink) } .ck-sec-pct .down { color: var(--bad) }
.ck-st { font-size: 11.5px; font-weight: 600; text-align: center; border-radius: 999px; padding: 2px 8px; border: 1.5px solid var(--ink) }
.ck-st.good { background: var(--ink); color: #fff }
.ck-st.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-bg) }
.plan-tasks { display: grid; gap: 10px }
.plan-tasks li { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; flex-wrap: wrap }
.plan-tasks li.done { opacity: .6 }
.pt-no { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-weight: 600; flex: none }
.pt-no svg { width: 16px; height: 16px; stroke-width: 3 }
.pt-body { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px }
.pt-body b { font-weight: 600 }
.pt-body > small { color: var(--muted); font-size: 12.5px }
.pt-act { display: flex; gap: 8px }
.ck-skills li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.ck-skills li > span:first-child { flex: 1 }
.ck-skills small { display: block; color: var(--muted); font-size: 11.5px }
.ck-frac { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px }
.ck-errs li { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; font-size: 14px }
.ck-errs b { font-family: 'Oswald', sans-serif; font-size: 18px; width: 38px }
.ck-review summary { cursor: pointer; list-style: none }
.ck-review summary h2 { display: inline; font-family: 'Oswald', sans-serif; font-size: 20px; text-transform: uppercase }
.ck-review summary::after { content: ' +'; font-family: 'Oswald', sans-serif; font-size: 20px }
.ck-review[open] summary::after { content: ' –' }
.ck-review .review { max-height: none }
.review li.ok { opacity: .75 }
.ok-mark { display: inline-flex; align-items: center; gap: 4px }
.ok-mark svg { width: 15px; height: 15px; stroke-width: 3 }
.pf-links { display: grid; gap: 10px; grid-template-columns: 1fr 1fr }
.pf-links .wide-link { margin: 0 }
.hist-ck li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.hist-ck li span:first-child { flex: 1 }
.hist-day { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin: 14px 0 6px }
.hist-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 96px; gap: 12px; align-items: center; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; font: inherit; color: inherit }
.hist-row:hover { border-color: var(--ink) }
.hist-t { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px }
.hist-main b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hist-main small, .hist-n small { color: var(--muted); font-size: 12px; display: block }
.hist-n { text-align: right; font-family: 'Oswald', sans-serif; font-weight: 600 }
.hist-n small { font-family: 'Kanit', sans-serif; font-weight: 400 }
@media (max-width: 620px) {
  .ck-secs li { grid-template-columns: 1fr 60px 84px; }
  .ck-secs .prog-bar { grid-column: 1 / -1; grid-row: 2 }
  .pf-links { grid-template-columns: 1fr }
  .hist-row { grid-template-columns: 40px minmax(0, 1fr) 80px }
  .hist-row > span:nth-child(3) { display: none }
  .ck-big b { font-size: 56px }
}

/* shared form fields (app) */
.form { display: flex; flex-direction: column; gap: 6px }
.form label { font-size: 13px; font-weight: 500; margin-top: 8px }
.form input[type=text], .form textarea { width: 100%; font: inherit; font-size: 14.5px; padding: 10px 12px; background: var(--soft); border: 1px solid #d1d5db; border-radius: 10px; outline: none; color: var(--ink); resize: vertical }
.form input:focus, .form textarea:focus { border-color: var(--ink); background: #fff }
.form > .submit { align-self: flex-start; margin-top: 10px }
.form .chips { margin-bottom: 4px }

/* ---------- mock exams ---------- */
.topic-exam { background: var(--ink); color: #fff }
.topic-exam small { color: #cfcfcf !important }
.topic-exam .topic-pts { background: #fff; color: var(--ink) }
.topic-exam:hover, .topic-exam:focus-visible { background: var(--ink-2); border-color: var(--ink) }
.topic-exam .topic-pct { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px }
.topic-exam .topic-pct svg { width: 14px; height: 14px }
.mock-card + .mock-card { margin-top: 16px }
.mock-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start }
.mock-head h2 { font-family: 'Oswald', sans-serif; font-size: 22px; text-transform: uppercase }
.mock-head p { margin: 4px 0 0; font-size: 14px }
.mock-best { display: flex; align-items: baseline; gap: 3px; flex-wrap: wrap; width: 90px; justify-content: flex-end; text-align: right }
.mock-best b { font-family: 'Oswald', sans-serif; font-size: 32px; line-height: 1 }
.mock-best span { color: var(--muted) }
.mock-best small { width: 100%; font-size: 11px; color: var(--muted) }
.mock-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 10px; font-size: 13.5px }
.mock-meta span { display: inline-flex; align-items: center; gap: 6px }
.mock-meta svg { width: 16px; height: 16px }
.mock-parts { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line) }
.mock-parts li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px }
.mock-parts small { color: var(--muted); white-space: nowrap }
.mock-card .submit.big { width: 100% }
.mock-hist { list-style: none; margin: 0; padding: 0 }
.mock-hist li { display: grid; grid-template-columns: 1fr auto 70px auto; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px }
.mock-hist b { font-family: 'Oswald', sans-serif }
.mock-hist small { color: var(--muted); text-align: right }
.mock-hist .link-btn { margin: 0 }
.resume-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; border: 2px solid var(--ink) }
.resume-box small { display: block; color: var(--muted) }
.mock-clock { font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 600; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums }
.mock-clock.low { color: var(--bad); animation: hit 1s ease infinite }
.mock-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px }
.mock-nav button { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; color: var(--ink) }
.mock-nav button.done { background: var(--soft); border-color: #bdbdbd }
.mock-nav button.cur { border-color: var(--ink); background: var(--ink); color: #fff }
.mock-play .play-foot-in .feedback { text-align: center }

/* ---------- ideas & requests ---------- */
.wide-link.ghost-link { background: #fff; color: var(--ink); border: 1.5px solid var(--ink) }
.wide-link.ghost-link:hover { background: var(--soft) }
.col-side .wide-link + .wide-link { margin-top: -8px }
.req-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px }
.req-bar .seg { margin: 0 }
.sm-select { width: auto; padding: 8px 12px; font: inherit; font-size: 13px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px }
.req { display: flex; gap: 14px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px }
.req.mine { border-color: var(--ink) }
.vote { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 52px; flex: none; border: 1.5px solid var(--ink); background: #fff; border-radius: 10px; padding: 6px 0; cursor: pointer; font: inherit; color: var(--ink) }
.vote svg { width: 18px; height: 18px; stroke-width: 2.5 }
.vote b { font-family: 'Oswald', sans-serif; font-size: 18px; line-height: 1 }
.vote.on { background: var(--ink); color: #fff }
.req-body { flex: 1; min-width: 0 }
.req-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px }
.req-top small { color: var(--muted); margin-left: auto }
.req-type { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; color: var(--muted) }
.req-you { font-size: 11px; font-weight: 600; border-bottom: 1.5px solid var(--ink) }
.req h3 { font-size: 16px; font-weight: 600; margin-top: 4px }
.req p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); white-space: pre-line }
.req-reply { margin-top: 10px; padding: 8px 12px; background: var(--soft); border-left: 3px solid var(--ink); border-radius: 0 8px 8px 0; font-size: 13.5px }
.req-reply b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em }
.req-del { margin: 8px 0 0; color: var(--bad) }

/* ---------- lessons ---------- */
.lesson .page-head .pill { display: inline-block; margin-bottom: 8px }
.ls-intro { font-size: 15.5px; color: var(--ink-2); margin: 6px 0 16px }
.ls-sec + .ls-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line) }
.ls-sec h2 { font-family: 'Oswald', sans-serif; font-size: 19px; font-weight: 600; letter-spacing: .02em; margin-bottom: 10px }
.ls-sec p { margin: 0; font-size: 14.5px; line-height: 1.6 }
.ls-list { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.6 }
.ls-list li + li { margin-top: 4px }
.tbl-scroll { overflow-x: auto }
.ls-table { border-collapse: collapse; width: 100%; font-size: 14px }
.ls-table th, .ls-table td { border: 1.5px solid var(--ink); padding: 8px 10px; text-align: left }
.ls-table thead th { background: var(--ink); color: #fff; font-weight: 500; font-size: 12.5px; letter-spacing: .03em }
.ls-table tbody th { background: var(--soft); font-weight: 500 }
.ls-table td { font-weight: 500 }
.ls-ex { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.ls-ex li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px }
.ls-ex b { display: block; font-weight: 500; font-size: 15px }
.ls-ex small { color: var(--muted); font-size: 12.5px }
.say.mini { padding: 7px; border-radius: 50%; flex: none }
.say.mini svg { width: 16px; height: 16px }
.ls-tip, .ls-trap { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.55 }
.ls-tip { background: var(--soft); border-left: 3px solid var(--ink) }
.ls-trap { background: var(--bad-bg); color: #7f1d1d; border-left: 3px solid var(--bad) }
.ls-tip b, .ls-trap b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px }
.ls-actions { position: sticky; bottom: 0; display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 0 18px; background: linear-gradient(transparent, var(--bg) 30%) }
.ls-actions .submit.big { flex: 1 1 260px }

/* fill in the blanks */
.qprompt.cloze { font-size: 21px; line-height: 1.7 }
.blank { display: inline-block; min-width: 64px; border-bottom: 2.5px solid var(--ink); margin: 0 3px; vertical-align: baseline; height: 1em; position: relative }
.blank sup { position: absolute; top: -.9em; left: 0; font-size: 11px; font-weight: 600; font-family: 'Oswald', sans-serif }
.is-cloze.is-quick .row { grid-template-columns: minmax(0, 1fr) }
.is-cloze.is-table .row { grid-template-columns: 34px minmax(0, 1fr) }
.is-cloze.is-table .subj { font-family: 'Oswald', sans-serif; font-weight: 600; text-align: center }

/* ---------- verb bank ---------- */
.search { display: flex; align-items: center; gap: 8px; background: var(--soft); border: 1px solid #d1d5db; border-radius: 10px; padding: 0 12px; margin-bottom: 12px }
.search:focus-within { border-color: var(--ink); background: #fff }
.search svg { color: var(--muted) }
.search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 15px; padding: 11px 0; outline: none; min-width: 0 }
.bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px }
.bank-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; text-align: left; font-size: 14px; min-width: 0;
}
.bank-row:hover { border-color: var(--ink) }
.bank-row b { font-weight: 500 }
.bank-row .en { color: var(--muted); font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.lvl { font-family: 'Oswald', sans-serif; font-size: 11.5px; font-weight: 600; border: 1.5px solid var(--ink); border-radius: 5px; padding: 0 5px; flex: none }
.aux { font-size: 11.5px; color: var(--muted); flex: none }
.aux.etre { color: #fff; background: var(--ink); border-radius: 5px; padding: 0 6px }

.conj { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 14px 0 }
.conj h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500 }
.conj ul { list-style: none; margin: 0; padding: 0; font-size: 14.5px }
.conj li { padding: 3px 0; border-bottom: 1px dashed var(--line) }

/* ---------- play ---------- */
body.playing { background: #fff }
.play { min-height: 100vh; display: flex; flex-direction: column }
.play-top {
  position: sticky; top: 0; z-index: 10; background: #fff; display: flex; align-items: center; gap: 14px;
  padding: 12px max(16px, calc((100vw - 760px) / 2));
}
.progress { flex: 1; height: 12px; background: #ececec; border-radius: 999px; overflow: hidden }
.progress-bar { height: 100%; background: var(--ink); border-radius: 999px; transition: width .35s ease }
.hearts { display: flex; gap: 4px; color: var(--ink) }
.hearts .heart { width: 26px; height: 26px }
.hearts.hit { animation: hit .45s ease }
.hearts.hit .heart { animation: hitc 1.2s ease }
@keyframes hitc { 0%, 50% { color: var(--bad) } 100% { color: var(--ink) } }
@keyframes hit { 0%, 100% { transform: none } 20% { transform: scale(1.18) } 40% { transform: translateX(-4px) } 60% { transform: translateX(4px) } }

.play-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 18px 16px calc(170px + var(--kbd-h)) }
.qcard { animation: enter .25s ease }
@keyframes enter { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.qmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.pill { font-size: 12px; font-weight: 500; letter-spacing: .04em; background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 10px; border: 1.5px solid var(--ink) }
.pill.ghost { background: transparent; color: var(--ink) }
.qcount { margin-left: auto; font-size: 13px; color: var(--muted); font-family: 'Oswald', sans-serif; letter-spacing: .05em }
.qverb { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: clamp(34px, 8vw, 48px); line-height: 1.05; margin-top: 14px; letter-spacing: .01em }
.qverb.sm { font-size: 32px; margin: 0 }
.qen { color: var(--muted); font-size: 15px; margin-top: 2px }
.qprompt { margin-top: 18px; font-size: 16px }
.cue { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; border: 1.5px solid var(--ink); border-radius: 5px; padding: 0 5px; vertical-align: 2px; text-transform: uppercase }

.rows { margin-top: 18px; display: flex; flex-direction: column; gap: 10px }
.row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; column-gap: 12px }
.is-quick .row { grid-template-columns: minmax(0, 1fr) }
.is-quick .subj { display: none }
.subj { font-size: 15px; font-weight: 500; text-align: right; color: var(--ink-2); white-space: nowrap }
.field { position: relative }
.field input {
  width: 100%; padding: 13px 44px 13px 14px; font-family: inherit; font-size: 18px; background: var(--soft); border: 1.5px solid #d1d5db;
  border-radius: 12px; outline: none; transition: border-color .15s, background .15s; color: var(--ink);
}
.is-quick .field input { font-size: 22px; padding: 16px 48px 16px 16px }
.field input:focus { border-color: var(--ink); background: #fff }
.field input::placeholder { color: #a3a3a3 }
.mark { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; display: none }
.row.s-ok .field input, .row.s-fixed .field input { background: #fff; border-color: var(--ink) }
.row.s-ok .mark, .row.s-fixed .mark { display: block; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/15px no-repeat }
.row.s-wrong .field input, .row.s-accent .field input { border-color: var(--bad); background: #fff }
.row.s-accent .field input { border-style: dashed }
.fix { grid-column: 2; font-size: 14px; margin-top: 4px }
.is-quick .fix { grid-column: 1 }
.fix:empty { display: none }
.fix-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px }
.ans { font-weight: 500; font-size: 15.5px }
.ans mark { background: var(--ink); color: #fff; border-radius: 3px; padding: 0 1px }
.row.shake { animation: shake .35s ease }
@keyframes shake { 20%, 60% { transform: translateX(-5px) } 40%, 80% { transform: translateX(5px) } }

.hints { margin-top: 18px }
.hints p { margin: 0 0 8px; padding: 10px 12px; border-left: 3px solid var(--ink); background: var(--soft); border-radius: 0 8px 8px 0; font-size: 14px }

/* footer sits on top of the accent keyboard strip; --kbd-h is measured in JS */
.play-foot { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); z-index: 15; padding-bottom: var(--kbd-h) }
.play-foot-in { max-width: 760px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 14px }
.feedback { flex: 1; min-width: 0; font-size: 14.5px; display: flex; align-items: center; gap: 8px }
.feedback.good { font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 600; letter-spacing: .03em }
.feedback.good svg { width: 26px; height: 26px; background: var(--ink); color: #fff; border-radius: 50%; padding: 4px; stroke-width: 3 }
.feedback.bad, .feedback.warn { color: var(--bad) }

/* on-screen accent keyboard */
.kbd { position: fixed; left: 0; right: 0; bottom: 0; z-index: 16; background: #111; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)) }
.kbd-in { max-width: 760px; margin: 0 auto; padding: 0 12px; display: flex; gap: 6px; align-items: center }
.kbd-keys { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0 }
.kbd-keys::-webkit-scrollbar { display: none }
.key {
  flex: none; min-width: 38px; height: 38px; border-radius: 8px; border: 0; background: #2a2a2a; color: #fff;
  font-size: 18px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.key:active { background: #fff; color: #111 }
.key-help { display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid #444 }
.key-help svg { width: 20px; height: 20px }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s ease }
@keyframes fade { from { opacity: 0 } }
.modal-card { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4) }
.modal-card h2 { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 24px; letter-spacing: .02em; text-transform: uppercase }
.modal-card > p { margin: 8px 0 0 }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; flex-wrap: wrap }
.combo { border-collapse: collapse; margin-top: 12px; width: 100% }
.combo td { padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 16px }
kbd { font-family: ui-monospace, Consolas, monospace; background: var(--soft); border: 1px solid #d1d5db; border-bottom-width: 2px; border-radius: 5px; padding: 1px 7px; font-size: 14px }

.over { text-align: center }
.over-hearts { display: flex; justify-content: center; gap: 6px; color: var(--bad); margin-bottom: 10px }
.over-hearts .heart { width: 30px; height: 30px }
.over .submit { width: 100%; margin-top: 10px }
.over .submit.big { margin-top: 18px }
.review { list-style: none; padding: 0; margin: 14px 0 0; text-align: left; max-height: 40vh; overflow: auto }
.review li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.review li:last-child { border-bottom: 0 }
.review small { color: var(--muted) }
.rv { margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline }
.rv s { color: var(--bad) }

/* ---------- result ---------- */
.result { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px 16px; background: var(--bg) }
.result-card { width: 100%; max-width: 520px; background: #fff; border-radius: 18px; padding: 30px 24px; box-shadow: var(--shadow); text-align: center; animation: enter .3s ease }
.result-mark { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center }
.result-mark svg { width: 34px; height: 34px; stroke-width: 3 }
.result-card h1 { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 34px; text-transform: uppercase; letter-spacing: .03em }
.result-card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin-top: 22px; text-align: left }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px }
.result-stats > div { background: var(--soft); border-radius: 12px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px }
.result-stats b { font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 600; line-height: 1.1 }
.result-stats span { font-size: 12px; color: var(--muted) }
.hearts-inline { display: flex; gap: 2px }
.hearts-inline .heart { width: 20px; height: 20px }
.perfect { font-family: 'Oswald', sans-serif; font-size: 18px; margin-top: 20px; letter-spacing: .03em }
.result-actions { display: flex; gap: 10px; margin-top: 22px }
.result-actions .submit { flex: 1 }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; transition: all .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) }

/* ---------- rewards ---------- */
.rw-list { display: flex; flex-direction: column; gap: 10px }
.rw { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px }
.rw.ready { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset }
.rw-top { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.rw-brand { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 1px 8px; border-radius: 5px }
.rw-left { font-size: 12px; color: var(--muted); margin-left: auto }
.rw h3 { font-size: 16px; font-weight: 600; margin-top: 8px }
.rw-cond { margin: 2px 0 0; font-size: 13.5px }
.rw-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted) }
.rw-prog { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12.5px; white-space: nowrap }
.rw-prog .progress { height: 8px }
.rw-rank { margin: 8px 0 0; font-size: 13.5px }
.rw-act { margin-top: 10px }
.rw-act .submit { width: 100% }
.rw-state { display: block; font-size: 13px; padding: 8px 10px; background: var(--soft); border-radius: 8px; text-align: center }
.rw-note { margin: 8px 0 0; font-size: 12px; color: var(--muted) }
.lb-prize { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font: inherit; font-size: 13px; line-height: 1.35; cursor: pointer }
.lb-prize:hover { background: var(--ink-2) }
.lb-prize svg { width: 18px; height: 18px; flex: none; margin-top: 1px }
.lb-prize small { display: block; color: #bdbdbd; font-size: 11.5px; margin-top: 1px }
.promo { text-align: center }
.promo-ico { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center }
.promo-ico svg { width: 30px; height: 30px }
.promo-list { list-style: none; margin: 16px 0 0; padding: 0; text-align: left; display: grid; gap: 8px }
.promo-list li { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start }
.promo-list b { font-size: 15px; font-weight: 600; margin-top: 4px }
.promo-list span:last-child { font-size: 13px; color: var(--muted) }
.promo .modal-actions { justify-content: center }
.gift-btn { position: relative }
.gift-btn .dot { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; line-height: 17px; text-align: center; border: 2px solid #fff; box-sizing: content-box }
.rw-flag { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: 5px; padding: 0 6px }
.submit.full { width: 100%; margin-top: 10px }
.shell.narrow { max-width: 860px }
.page-head h1 { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 32px; letter-spacing: .02em; text-transform: uppercase }
.page-head p { margin: 4px 0 18px; font-size: 14px }
.seg { display: inline-flex; background: #e6e6e6; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 18px }
.seg-btn { border: 0; background: transparent; padding: 9px 18px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink-2) }
.seg-btn.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12) }
.rw-grid-play { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px }
.rw-grid-play .rw { background: var(--paper); box-shadow: var(--shadow); border-color: transparent; padding: 16px }
.rw-grid-play .rw.ready { border-color: var(--ink) }
.code-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px }
.code-list h3 { font-size: 17px; font-weight: 600; margin-top: 8px }
.empty-state { text-align: center; padding: 36px 20px }
.empty-state > svg { width: 38px; height: 38px; color: var(--muted) }
.empty-state p { margin: 10px 0 14px }
.link-btn { margin-left: auto; background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 500; text-decoration: underline; cursor: pointer }
.code-box { display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 12px 14px; border: 2px dashed var(--ink); border-radius: 12px }
.code-box code { flex: 1; background: none; padding: 0; font-family: ui-monospace, Consolas, monospace; font-size: 22px; font-weight: 600; letter-spacing: .06em; word-break: break-all; user-select: all }
.code-box.sm { padding: 8px 10px; margin: 6px 0 }
.code-box.sm code { font-size: 16px }
.rw-info { font-size: 13.5px; background: var(--soft); padding: 10px 12px; border-radius: 8px; margin: 8px 0 }
.my-codes { list-style: none; margin: 12px 0 0; padding: 0 }
.my-codes li { padding: 12px 0; border-bottom: 1px solid var(--line) }
.my-codes li:last-child { border-bottom: 0 }
.my-codes small { color: var(--muted) }

/* ---------- reward tickets ---------- */
.rw-list { --notch: var(--paper) }
.rw-grid-play { --notch: var(--bg) }
.tk { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; outline: none }
.rw-grid-play .tk { border-color: transparent; box-shadow: var(--shadow) }
.tk:hover, .tk:focus-visible { transform: translateY(-2px); border-color: var(--ink) }
.tk.ready { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset, var(--shadow) }
.tk.ready::after { content: ''; position: absolute; inset: -4px; border-radius: 18px; border: 2px solid var(--ink); opacity: 0; animation: tkPulse 2.2s ease-out infinite; pointer-events: none }
@keyframes tkPulse { 0% { opacity: .5; transform: scale(.98) } 100% { opacity: 0; transform: scale(1.04) } }
.tk-main { padding: 14px 16px 12px }
.tk-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.tk-badge { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: 5px; padding: 0 6px; margin-left: auto }
.tk.ready .tk-badge, .tk-badge.ready { background: var(--ink); color: #fff }
.tk-title { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: .01em; line-height: 1.1; margin-top: 10px }
.tk-cond { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2) }
.tk-stand { display: flex; align-items: center; gap: 12px; margin-top: 12px }
.tk-stand > div:last-child { display: flex; flex-direction: column; line-height: 1.3; min-width: 0 }
.tk-stand b { font-size: 14.5px; font-weight: 600 }
.tk-stand span { font-size: 12.5px; color: var(--muted) }
.tk-rank { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 18px }
.tk-rank.win { background: var(--ink); color: #fff }
.tk-rank.muted { border-color: var(--line); color: var(--muted) }
.tk-rank svg { width: 20px; height: 20px }
.ring { width: 48px; height: 48px; flex: none }
.ring circle { fill: none; stroke-width: 5 }
.ring-bg { stroke: #e6e6e6 }
.ring-fg { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset .6s ease }
.ring text { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 12px; fill: var(--ink) }
.tk-stub { position: relative; border-top: 2px dashed #d6d6d6; padding: 12px 16px 14px }
.tk-stub::before, .tk-stub::after { content: ''; position: absolute; top: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--notch, var(--bg)) }
.tk-stub::before { left: -10px; box-shadow: inset -1.5px 0 0 var(--line) }
.tk-stub::after { right: -10px; box-shadow: inset 1.5px 0 0 var(--line) }
.tk-meta { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; font-size: 12.5px }
.tk-time { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; font-variant-numeric: tabular-nums }
.tk-time svg { width: 15px; height: 15px }
.tk-stock { display: flex; align-items: center; gap: 8px; color: var(--muted) }
.tk-stock-bar { width: 56px; height: 6px; background: #e6e6e6; border-radius: 99px; overflow: hidden }
.tk-stock-bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px }
.tk-stock-txt { color: var(--muted) }
.tk-act { margin-top: 10px }
.tk-act .submit { width: 100% }
.claim-btn { animation: tkNudge 3s ease-in-out infinite }
@keyframes tkNudge { 0%, 88%, 100% { transform: none } 92% { transform: rotate(-2deg) scale(1.02) } 96% { transform: rotate(2deg) scale(1.02) } }

/* details sheet */
.tk-detail h4 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500 }
.tk-detail .modal-head { align-items: center }
.tk-detail .tk-badge { margin-left: 0 }
.tk-hero { font-family: 'Oswald', sans-serif; font-size: 30px !important; line-height: 1.05; margin-top: 10px !important; text-transform: none !important }
.tk-desc { margin: 6px 0 0; color: var(--ink-2) }
.tk-clock { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px }
.tk-clock > div { border: 1.5px solid var(--ink); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column }
.tk-clock span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted) }
.tk-clock b { font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2 }
.tk-clock b small { font-size: 14px; color: var(--muted) }
.tk-clock small { font-size: 12px; color: var(--muted) }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: st }
.steps li { counter-increment: st; position: relative; padding: 4px 0 10px 38px; font-size: 14px }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 12.5px; top: 28px; bottom: 0; width: 1.5px; background: var(--line) }
.fine { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2) }
.fine li { margin: 3px 0 }
.tk-cta .submit { flex: 1 }

/* scratch-to-reveal */
.scratch { position: relative; margin: 10px 0 }
.scratch .code-box { margin: 0 }
.scratch-cover { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 12px; cursor: grab; touch-action: none; transition: opacity .45s ease }
.scratch.done .scratch-cover { opacity: 0; pointer-events: none }
.scratch-hint { text-align: center; margin: 4px 0 0 }
.scratch-hint .link-btn { margin: 0 }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none }
.burst i { position: absolute; width: 7px; height: 11px; border-radius: 1px; animation: burst 1.2s cubic-bezier(.15, .7, .3, 1) forwards }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1 } 100% { transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)); opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .tk.ready::after, .claim-btn { animation: none } .tk { transition: none } }

/* ---------- admin ---------- */
.admin .cols { grid-template-columns: 360px minmax(0, 1fr) }
.admin > .err, .ok-box { margin-bottom: 16px }
.ok-box { background: var(--ink); color: #fff; font-size: 13.5px; padding: 10px 12px; border-radius: 9px }
.admin-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px }
.admin-form label { font-size: 13px; font-weight: 500; margin-top: 6px }
.admin-form textarea, .admin-form input[type=text] {
  width: 100%; font: inherit; font-size: 14.5px; padding: 10px 12px; background: var(--soft); border: 1px solid #d1d5db; border-radius: 10px; outline: none; resize: vertical;
}
.admin-form textarea:focus, .admin-form input:focus { border-color: var(--ink); background: #fff }
.admin-form .submit { margin-top: 10px }
.invite { list-style: none; margin: 0; padding: 0 }
.invite li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line) }
.invite li:last-child { border-bottom: 0 }
.inv-main { flex: 1; min-width: 0; display: flex; flex-direction: column }
.inv-main b { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis }
.inv-main small { color: var(--muted); font-size: 12.5px }
.submit.sm { padding: 6px 12px; font-size: 13px }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cols, .admin .cols { grid-template-columns: minmax(0, 1fr) }
  .col-side { position: static }
  .stats { grid-template-columns: repeat(2, 1fr) }
}
@media (max-width: 520px) {
  .me-name, .brand-sm .tag { display: none }
  .stat { padding: 12px; gap: 10px }
  .stat-ico { width: 36px; height: 36px; border-radius: 10px }
  .stat-num { font-size: 22px }
  .block { padding: 16px }
  .row { grid-template-columns: 58px minmax(0, 1fr); column-gap: 8px }
  .subj { font-size: 14px }
  .field input { font-size: 17px; padding: 12px 40px 12px 12px }
  .submit.big { min-width: 0; padding: 14px 18px }
  .play-foot-in { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 16px }
  .feedback:empty { display: none }
  .kbd-keys { flex-wrap: wrap; justify-content: center; overflow: visible }
  .key { min-width: 0; width: calc((100% - 42px) / 8); height: 40px }
  .conj { grid-template-columns: 1fr }
  .bank { grid-template-columns: 1fr }
}

/* ================= app shell: sidebar (desktop) / tab bar (phone) ================= */
.nav { position: fixed; z-index: 30; background: #fff; display: flex }
.nav-i { position: relative; display: flex; align-items: center; gap: 12px; font: inherit; color: var(--muted); background: transparent; border: 0; cursor: pointer; text-decoration: none; border-radius: 12px }
.nav-i svg { width: 22px; height: 22px; flex: none }
.nav-i:hover { color: var(--ink) }
.nav-i.on { color: var(--ink) }
.nav-dot { position: absolute; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 2px solid #fff }
.nav-dot[hidden] { display: none }
body.playing .nav { display: none }

@media (min-width: 901px) {
  body.with-nav:not(.playing) { padding-left: 232px }
  body.with-nav:not(.playing) .topbar { padding: 12px max(16px, calc((100vw - 232px - 1100px) / 2)) }
  body.with-nav:not(.playing) .topbar .brand-sm { visibility: hidden }
  .nav { top: 0; bottom: 0; left: 0; width: 232px; flex-direction: column; gap: 4px; padding: 18px 14px; border-right: 1px solid var(--line); overflow-y: auto }
  .nav-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px }
  .nav-brand img { width: 38px; height: 38px }
  .nav-brand b { display: block; font-family: 'Oswald', sans-serif; font-size: 20px; letter-spacing: .02em; line-height: 1.1 }
  .nav-brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .04em }
  .nav-i { padding: 11px 12px; font-size: 15px; font-weight: 500 }
  .nav-i:hover { background: var(--soft) }
  .nav-i.on { background: var(--ink); color: #fff }
  .nav-i.on .nav-dot { background: #fff; color: var(--ink); border-color: var(--ink) }
  .nav-dot { right: 10px; top: 50%; transform: translateY(-50%) }
  .nav-extra { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px }
  .nav-extra .nav-i { padding: 8px 12px; font-size: 13.5px; font-weight: 400 }
  .nav-extra .nav-i svg { width: 18px; height: 18px }
}
@media (max-width: 900px) {
  body.with-nav:not(.playing) { padding-bottom: calc(66px + env(safe-area-inset-bottom)) }
  .nav { left: 0; right: 0; bottom: 0; height: calc(62px + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); border-top: 1px solid var(--line); justify-content: space-around; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px) }
  .nav-brand, .nav-extra { display: none }
  .nav-i { flex: 1; flex-direction: column; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; max-width: 96px }
  .nav-i.on svg { stroke-width: 2.6 }
  .nav-i.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--ink) }
  .nav-dot { top: 6px; left: calc(50% + 6px) }
  body.with-nav:not(.playing) .toast { bottom: calc(80px + env(safe-area-inset-bottom)) }
}

/* ================= home ================= */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--paper); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 14px }
.hello-kick { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500 }
.hello h1 { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 34px; line-height: 1.1; margin: 2px 0 4px; text-transform: uppercase; letter-spacing: .01em; word-break: break-word }
.hello p { margin: 0 0 14px; font-size: 14px }
.hello-stats { display: flex; flex-wrap: wrap; gap: 8px }
.hs { display: flex; flex-direction: column; background: var(--soft); border-radius: 12px; padding: 8px 12px; min-width: 96px }
.hs b { display: flex; align-items: center; gap: 5px; font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 600; line-height: 1.1 }
.hs b svg { width: 17px; height: 17px }
.hs small { font-size: 11.5px; color: var(--muted) }
.hs.hs-lvl { min-width: 150px }
.lvl-bar { display: block; height: 5px; background: #e0e0e0; border-radius: 9px; overflow: hidden; margin: 5px 0 3px }
.lvl-bar i { display: block; height: 100%; background: var(--ink) }
.goal { position: relative; flex: none; width: 132px; display: flex; flex-direction: column; align-items: center; background: transparent; border: 0; cursor: pointer; font: inherit; color: inherit; padding: 0 }
.goal-ring { width: 112px; height: 112px; transform: rotate(-90deg) }
.gr-bg { fill: none; stroke: #ececec; stroke-width: 8 }
.gr-fg { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease }
.goal-num { position: absolute; top: 0; width: 112px; height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center }
.goal-num b { font-family: 'Oswald', sans-serif; font-size: 28px; line-height: 1 }
.goal-num small { font-size: 11.5px; color: var(--muted) }
.goal-lbl { font-size: 12px; font-weight: 500; margin-top: 4px; border-bottom: 1px dashed var(--muted) }
.goal:hover .goal-lbl { border-bottom-color: var(--ink) }
.goal-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px }
.goal-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; font: inherit; color: inherit; background: var(--soft); border: 1.5px solid transparent; border-radius: 12px; padding: 12px 14px; cursor: pointer }
.goal-opt:hover { border-color: var(--ink) }
.goal-opt.on { background: var(--ink); color: #fff }
.goal-opt span { font-size: 13.5px }
.goal-opt small { font-size: 12px; opacity: .7 }

.cont { display: flex; align-items: center; gap: 18px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow); min-height: 104px }
.cont-ico { width: 54px; height: 54px; flex: none; border-radius: 15px; background: rgba(255, 255, 255, .12); display: flex; align-items: center; justify-content: center }
.cont-ico svg { width: 28px; height: 28px }
.cont-txt { flex: 1; min-width: 0 }
.cont-txt small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .7 }
.cont-txt h2 { font-family: 'Oswald', sans-serif; font-size: 23px; font-weight: 600; margin: 2px 0 3px; line-height: 1.2 }
.cont-txt p { margin: 0; font-size: 13.5px; opacity: .8 }
.submit.inv { background: #fff; color: var(--ink); border-color: #fff; flex: none }
.submit.inv:hover { background: #e9e9e9 }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px }
.qa { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; font: inherit; color: inherit; background: var(--paper); border: 1.5px solid transparent; border-radius: var(--radius); padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow); transition: border-color .12s, transform .12s }
.qa:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-1px) }
.qa:disabled { cursor: default; opacity: .6 }
.qa b { font-size: 15px; font-weight: 600 }
.qa small { font-size: 12.5px; color: var(--muted) }
.qa-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 8px }
.qa-ico svg { width: 20px; height: 20px }
.qa.locked .qa-ico { background: var(--soft); color: var(--ink); border: 1.5px dashed var(--ink) }

.parts { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px }
.part { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px 22px; align-items: center; gap: 12px; text-align: left; font: inherit; color: inherit; background: var(--soft); border: 1.5px solid transparent; border-radius: 12px; padding: 10px 12px; cursor: pointer }
.part:hover { border-color: var(--ink); background: #fff }
.part-pts { width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: #fff; font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 17px; display: flex; align-items: center; justify-content: center }
.part-txt b { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.part-txt .prog-bar { height: 6px }
.part-pct { font-family: 'Oswald', sans-serif; font-weight: 600; text-align: right }
.part-go { color: var(--muted) }
.part-go svg { width: 18px; height: 18px }
.part:hover .part-go { color: var(--ink) }

/* ================= learn ================= */
.jump { position: sticky; top: 57px; z-index: 10; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; margin: -6px 0 10px; background: var(--bg) }
.jump::-webkit-scrollbar { display: none }
.jump a { flex: none; font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; background: #fff; border: 1.5px solid var(--line); border-radius: 99px; padding: 5px 13px }
.jump a:hover { border-color: var(--ink) }
.shell > .block + .block, .shell > .block + .wide-link { margin-top: 16px }
.shell > .block[id] { scroll-margin-top: 120px }
.tenses { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px }
.tense { display: flex; flex-direction: column; gap: 4px; background: var(--soft); border-radius: 12px; padding: 12px 14px }
.tense .topic-top b { font-size: 15px; font-weight: 600 }
.tense-btns { display: flex; gap: 6px; margin-top: 8px }
.tense-btns .submit { flex: 1; justify-content: center }
.topic-pts.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink) }

/* ================= exams ================= */
.sec-h { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; margin: 26px 0 2px }
.sec-sub { margin: 0 0 12px }
.lock-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border: 2px dashed var(--ink) }
.lock-card > div { flex: 1; min-width: 220px }
.lock-card h2 { font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 600; text-transform: uppercase; margin: 0 0 4px }
.lock-card p { margin: 0; font-size: 14px }
.lock-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; flex: none }

@media (max-width: 900px) {
  .quick { grid-template-columns: repeat(2, 1fr) }
}
@media (max-width: 620px) {
  .hello { flex-direction: column; align-items: stretch; padding: 18px }
  .goal { flex-direction: row; width: auto; gap: 12px; background: var(--soft); border-radius: 14px; padding: 8px 12px; align-items: center }
  .goal-ring { width: 64px; height: 64px }
  .goal-num { position: absolute; left: 12px; top: 8px; width: 64px; height: 64px }
  .goal-num b { font-size: 18px }
  .goal-num small { display: none }
  .goal-lbl { margin: 0; font-size: 14px; border: 0 }
  .goal-lbl::after { content: ' · tap to change'; color: var(--muted); font-weight: 400; font-size: 12px }
  .hello h1 { font-size: 28px }
  .hs { min-width: 0; flex: 1 }
  .hs.hs-lvl { flex-basis: 100% }
  .cont { flex-wrap: wrap; padding: 18px }
  .cont-ico { display: none }
  .cont .submit { width: 100%; justify-content: center }
  .quick { gap: 10px }
  .qa { padding: 12px 14px }
  .part { grid-template-columns: 34px minmax(0, 1fr) 40px; gap: 10px }
  .part-pts { width: 34px; height: 34px; font-size: 15px }
  .part-go { display: none }
  .goal-opts { grid-template-columns: 1fr }
}

/* ================= verb tense lessons ================= */
.vl-cheat { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px }
.vl-cheat b { font-family: 'Oswald', sans-serif; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; opacity: .75 }
.vl-cheat ul { margin: 8px 0 0; padding-left: 18px }
.vl-cheat li { margin: 4px 0; font-size: 14.5px }
.modal .vl-cheat { margin: 4px 0 12px }
.lesson > .block + .block, .lesson > .vl-cheat + .block { margin-top: 16px }
.vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px }
.vt { background: var(--soft); border-radius: 12px; padding: 12px 12px 8px }
.vt-h { margin-bottom: 6px }
.vt-h b { font-size: 16px; font-weight: 600 }
.vt-h small { display: block; font-size: 12px; color: var(--muted) }
.vt ul { list-style: none; margin: 0; padding: 0 }
.vt li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 14px; flex-wrap: wrap }
.vt li small { font-size: 11.5px; color: var(--muted) }
.vl-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line) }
.vl-go:first-of-type { border-top: 0 }
.vl-go > b { font-size: 16px; font-weight: 600 }
.vl-go-btns { display: flex; gap: 6px; flex-wrap: wrap }
.tense-btns { flex-wrap: wrap }
.step-tip { display: flex; gap: 8px; align-items: baseline; background: var(--soft); border-left: 3px solid var(--ink); border-radius: 8px; padding: 8px 12px; margin: 6px 0 12px; font-size: 13.5px; text-align: left }
.step-tip b { font-family: 'Oswald', sans-serif; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; flex: none }
.is-steps .row { grid-template-columns: minmax(0, 1fr); row-gap: 4px; margin-bottom: 4px }
.is-steps .row .subj { font-size: 13px; font-weight: 600; text-align: left; white-space: normal; color: var(--ink-2) }
.is-steps .row:last-child .subj { color: var(--ink) }
.is-steps .fix { grid-column: 1 }
@media (max-width: 620px) {
  .vl-go-btns { width: 100% }
  .vl-go-btns .submit { flex: 1; justify-content: center; padding: 10px 8px; font-size: 13px }
}

/* ================= checkout ================= */
.mem-pending-act { align-items: center; flex-wrap: wrap }
a.submit { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px }
body.checkout { align-items: flex-start }
.co { text-align: left; max-width: 620px }
.co-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px }
.co-back { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--ink); flex: none }
.co-back:hover { background: var(--soft) }
.co-back svg { width: 22px; height: 22px }
.co-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 18px; padding: 0; counter-reset: s }
.co-steps li { flex: 1; counter-increment: s; font-size: 12px; font-weight: 500; color: var(--muted); border-top: 3px solid var(--line); padding-top: 6px }
.co-steps li::before { content: counter(s) '. ' }
.co-steps li.on { color: var(--ink); border-top-color: var(--ink) }
.co-note { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px }
.co-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px }
.co-h { display: flex; align-items: center; gap: 10px; font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin: 20px 0 10px }
.co-h span { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center }
.co-sub { font-size: 13px; color: var(--muted); margin: -6px 0 10px }
.co-plans { display: flex; flex-direction: column; gap: 8px }
.co label.co-plan { margin: 0; font-size: inherit; font-weight: inherit }
.co-plan { position: relative; display: flex !important; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff }
.co-plan:hover { border-color: var(--ink-2) }
.co-plan input { position: absolute; opacity: 0; pointer-events: none }
.co-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); flex: none; transition: border-width .12s }
.co-plan:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset }
.co-plan input:checked + .co-radio { border: 6px solid var(--ink) }
.co-plan input:focus-visible + .co-radio { outline: 2px solid var(--ink); outline-offset: 2px }
.co-plan-txt { flex: 1; min-width: 0 }
.co-plan-txt b { display: block; font-size: 15px; font-weight: 600 }
.co-plan-txt small { font-size: 12.5px; color: var(--muted) }
.co-badge { position: static; transform: none; flex: none }
.co-price { font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 600; flex: none }
.co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px }
.co-grid .full { grid-column: 1 / -1 }
.co-grid[hidden] { display: none }
.co label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px }
.co input[type=text], .co input[type=tel], .co textarea { width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; background: var(--soft); border: 1px solid #d1d5db; border-radius: 10px; outline: none; color: var(--ink); resize: vertical }
.co input:focus, .co textarea:focus { border-color: var(--ink); background: #fff }
.co input:disabled { color: var(--muted) }
.co input.bad, .co textarea.bad { border-color: var(--bad); background: var(--bad-bg) }
.co-check { display: flex !important; align-items: center; gap: 8px; margin: 12px 0 10px !important; font-weight: 400 !important; font-size: 14px !important; cursor: pointer }
.co-check input { width: 18px; height: 18px; accent-color: var(--ink) }
.co-sum { border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 14px }
.co-sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--line) }
.co-sum > div:last-child { border-bottom: 0 }
.co-sum span { color: var(--muted) }
.co-total b { font-family: 'Oswald', sans-serif; font-size: 22px }
.co-pay { width: 100%; margin-top: 14px; justify-content: center }
.co-pay svg { width: 20px; height: 20px }
.co-fine { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 0 }

/* result page */
.done { text-align: center }
.done-ico { width: 76px; height: 76px; border-radius: 50%; margin: 4px auto 14px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff }
.done-ico svg { width: 40px; height: 40px; stroke-width: 2.4 }
.done-pending .done-ico { background: var(--soft); color: var(--ink); animation: donePulse 1.6s ease-in-out infinite }
.done-cancelled .done-ico, .done-unknown .done-ico { background: var(--soft); color: var(--ink) }
.done-paid .done-ico { animation: donePop .45s cubic-bezier(.2, 1.4, .4, 1) both }
@keyframes donePulse { 50% { transform: scale(.92); opacity: .7 } }
@keyframes donePop { from { transform: scale(.3); opacity: 0 } }
.done-rows { margin: 16px 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 2px 14px; text-align: left }
.done-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.done-rows > div:last-child { border-bottom: 0 }
.done-rows dt { color: var(--muted) }
.done-rows dd { margin: 0; text-align: right; word-break: break-all }
.done-actions { display: flex; flex-direction: column; align-items: center; gap: 10px }
.done-actions .submit { width: 100% }
.done-actions .link-btn { color: var(--ink); margin: 0; align-self: center }
@media (prefers-reduced-motion: reduce) { .done-ico { animation: none !important } }
@media (max-width: 520px) {
  .co-grid { grid-template-columns: 1fr }
  .co-plan { flex-wrap: wrap }
  .co-badge { order: -1; width: 100% ; text-align: center }
}
.done-wait { font-size: 12.5px; color: var(--muted); margin: 0 }
.rc-link { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink) }

/* sentence skills */
.fix-ctx { display: block; font-size: .8em; color: var(--muted); margin-bottom: 4px }
.mock-task { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px }
.setup-opt { margin: 10px 0 }
.setup-opt label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px }

/* extension slots */
.ext-slot:empty { display: none }
.ext-slot > div + div { margin-top: 14px }
#extHome { margin-bottom: 14px }
#extLearn { margin: 16px 0 }

.maint-pill { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500; padding: 6px 14px; border-radius: 99px; text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,.25); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis }

/* ================= landing page (signed-out visitors) ================= */
body.landing { background: #fff; color: var(--ink) }
.ld-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px max(16px, calc((100vw - 1100px) / 2)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) }
.ld-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: .02em }
.ld-brand img { width: 34px; height: 34px }
.ld-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px }
.ld-links a { color: var(--ink-2); text-decoration: none }
.ld-links a:hover { color: var(--ink); text-decoration: underline }
.ld-nav .submit { text-decoration: none }

.ld-hero { max-width: 1100px; margin: 0 auto; padding: 56px 16px 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center }
.ld-kick { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: 99px; padding: 3px 12px }
.ld-hero h1 { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; text-transform: uppercase; letter-spacing: .01em; margin: 16px 0 14px }
.ld-lead { font-size: 17px; line-height: 1.6; color: var(--ink-2); margin: 0 0 22px; max-width: 520px }
.ld-signin { max-width: 380px; scroll-margin-top: 90px }
.ld-signin .gbtn { min-height: 44px }
.ld-signin .login-note { text-align: left; margin: 10px 0 0; font-size: 13px; color: var(--muted) }
.ld-signin .submit { margin-top: 10px }

.ld-demo { position: relative; min-height: 430px }
.ld-card { background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 18px 50px rgba(0, 0, 0, .12); border: 1px solid var(--line); max-width: 380px }
.ld-card-2 { position: absolute; right: 0; top: 255px; width: 78%; transform: rotate(2deg) }
.ld-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px }
.ld-hearts { display: flex; gap: 3px; color: var(--ink) }
.ld-hearts svg { width: 18px; height: 18px }
.ld-q { font-size: 20px; line-height: 1.5; margin: 0 0 12px }
.ld-q.sm { font-size: 16px }
.ld-blank { display: inline-block; min-width: 34px; border-bottom: 2.5px solid var(--ink); text-align: center; font-weight: 600 }
.ld-ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; margin-bottom: 12px }
.ld-ok svg { width: 18px; height: 18px; background: var(--ink); color: #fff; border-radius: 50%; padding: 3px }
.ld-card-rule { font-size: 13px; background: var(--soft); border-left: 3px solid var(--ink); border-radius: 8px; padding: 8px 10px }
.ld-card-rule b { font-family: 'Oswald', sans-serif; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-right: 6px }
.ld-steps { list-style: none; margin: 0; padding: 0; counter-reset: s }
.ld-steps li { counter-increment: s; display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px }
.ld-steps li span::before { content: counter(s) '. '; color: var(--muted) }

.ld-strip { background: var(--ink); color: #fff; display: grid; grid-template-columns: repeat(4, 1fr); padding: 26px max(16px, calc((100vw - 1100px) / 2)); gap: 12px; text-align: center }
.ld-strip b { display: block; font-family: 'Oswald', sans-serif; font-size: 34px; line-height: 1 }
.ld-strip span { font-size: 13px; opacity: .7 }

.ld-sec { max-width: 1100px; margin: 0 auto; padding: 64px 16px 8px; scroll-margin-top: 70px }
.ld-sec > h2, .ld-cta h2 { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: clamp(26px, 3.4vw, 36px); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 22px }
.ld-sub { margin: -12px 0 20px; color: var(--muted) }
.ld-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px }
.ld-feat { border: 1.5px solid var(--line); border-radius: 16px; padding: 20px }
.ld-feat:hover { border-color: var(--ink) }
.ld-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 12px }
.ld-ico svg { width: 22px; height: 22px }
.ld-feat h3 { font-size: 17px; font-weight: 600; margin: 0 0 6px }
.ld-feat p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2) }

.ld-how { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: h }
.ld-how li { counter-increment: h; background: var(--soft); border-radius: 16px; padding: 20px 20px 18px }
.ld-how li::before { content: counter(h); display: flex; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-family: 'Oswald', sans-serif; font-weight: 600; align-items: center; justify-content: center; margin-bottom: 10px }
.ld-how b { display: block; font-size: 17px; margin-bottom: 4px }
.ld-how span { font-size: 14.5px; color: var(--ink-2); line-height: 1.55 }
.ld-parts h3 { font-size: 15px; font-weight: 600; margin: 0 0 10px }
.ld-parts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px }
.ld-parts li { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 99px; padding: 4px 12px 4px 4px; font-size: 14px }
.ld-pts { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-family: 'Oswald', sans-serif; font-size: 13px; display: flex; align-items: center; justify-content: center }
#pricing .plans { max-width: 760px }
#pricing a.submit { text-decoration: none }

.ld-faq { max-width: 760px }
.ld-faq details { border-bottom: 1px solid var(--line); padding: 14px 0 }
.ld-faq summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px }
.ld-faq summary::-webkit-details-marker { display: none }
.ld-faq summary::after { content: '+'; font-family: 'Oswald', sans-serif; font-size: 22px; line-height: 1 }
.ld-faq details[open] summary::after { content: '−' }
.ld-faq p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.6 }

.ld-cta { margin: 64px auto 0; max-width: 1100px; padding: 0 16px }
.ld-cta { background: var(--ink); color: #fff; border-radius: 22px; padding: 44px 24px; text-align: center; width: calc(100% - 32px) }
.ld-cta h2 { margin-bottom: 18px }
.ld-cta .submit { display: inline-flex; text-decoration: none }
.ld-foot { max-width: 1100px; margin: 0 auto; padding: 28px 16px 36px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted) }
.ld-foot a { color: var(--ink) }

@media (max-width: 900px) {
  .ld-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 36px }
  .ld-demo { min-height: 420px; max-width: 440px }
  .ld-grid, .ld-how { grid-template-columns: minmax(0, 1fr) }
  .ld-links { display: none }
  .ld-nav .submit { margin-left: auto }
}
@media (max-width: 520px) {
  .ld-strip { grid-template-columns: repeat(2, 1fr); row-gap: 18px }
  .ld-card-2 { width: 88% }
  .ld-sec { padding-top: 48px }
}
