/* AP Binder: dark binder look with a yellow accent, same as the desktop version. */
:root {
  --bg: #1B1E24; --sidebar: #13151A; --surface: #252931; --surface-2: #323741; --line: #3A3F48;
  --text: #E8EAED; --muted: #9AA0A6; --accent: #FFC83D; --danger-bg: #3A2326; --danger: #FF9A93;
  --good: #3FB950; --bad: #E5534B; --locked: #262A31;
  --font: "Nunito Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Bricolage Grotesque", "Nunito Sans", "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.loading { padding: 40px; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.3px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn { border: 0; border-radius: 10px; padding: 9px 16px; background: var(--surface-2); font-weight: 700; color: var(--text); white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.primary { background: var(--accent); color: #111; }
.btn.danger { background: var(--danger-bg); color: var(--danger); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.big { padding: 13px 22px; font-size: 16px; }
input[type=text], input[type=password], input[type=search], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; min-height: 64px; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 0; border-radius: 99px; padding: 6px 13px; background: var(--surface); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; }
.chip.on { background: var(--text); color: var(--bg); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.error { color: var(--danger); font-weight: 700; min-height: 20px; margin-top: 8px; }
.ok-text { color: var(--good); font-weight: 700; }

/* ---------- sign in ---------- */
/* Fills the whole window (it used to stop ~560px down, cutting the cards off and leaving an empty band). */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; position: relative; overflow: hidden; }
.auth-col { width: 100%; max-width: 440px; position: relative; z-index: 1; }
.auth-panel { width: 100%; max-width: 440px; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 28px 32px; position: relative; z-index: 1; }
.auth-panel h1 { color: var(--accent); text-align: center; font-size: 34px; margin-bottom: 4px; }
.auth-panel .sub { text-align: center; color: var(--muted); margin-bottom: 18px; }
.tabs { display: flex; margin-bottom: 20px; }
.tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid var(--line); padding: 10px; color: var(--muted); font-weight: 700; }
.tabs button.on { color: var(--text); border-bottom: 3px solid var(--accent); }
.class-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.class-tag { border-radius: 99px; padding: 5px 8px 5px 12px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); }
.class-tag button { border: 0; background: rgba(0,0,0,.35); border-radius: 50%; width: 20px; height: 20px; font-size: 11px; line-height: 1; }
.auth-panel .error:empty { min-height: 0; margin: 0; }
.auth-foot { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
.deco { position: absolute; opacity: .35; pointer-events: none; }
@media (max-width: 1000px) { .deco { display: none; } }

/* ---------- app layout ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; height: 100vh; }
.sidebar { background: var(--sidebar); display: flex; flex-direction: column; min-height: 0; }
.sidebar .brand { padding: 18px 18px 10px; }
.sidebar .brand h1 { color: var(--accent); font-size: 23px; }
.sidebar .brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.side-list { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.side-dept { font-size: 11px; font-weight: 800; letter-spacing: .6px; color: #6E747E; margin: 14px 8px 6px; text-transform: uppercase; }
.side-item { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; border-radius: 8px; padding: 7px 10px; text-align: left; font-weight: 800; font-size: 13px; color: var(--muted); }
.side-item.has { color: var(--text); }
.side-item:hover { background: var(--surface); }
.side-item.on { background: var(--subj, var(--surface-2)); color: #fff; }
.side-item .count { margin-left: auto; font-size: 11px; opacity: .85; }
.side-foot { border-top: 1px solid var(--surface); padding: 14px 18px; }
.side-foot .who { font-weight: 800; font-size: 15px; }
.main { overflow-y: auto; min-width: 0; }
.main-head { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 18px 26px 12px; border-bottom: 1px solid var(--surface); }
.title-row { display: flex; align-items: flex-start; gap: 12px; }
.title-row h2 { font-size: 27px; }
.progress { height: 7px; background: var(--surface); border-radius: 4px; margin: 12px 0; overflow: hidden; }
.progress > div { height: 100%; border-radius: 4px; background: var(--accent); }
.content { padding: 14px 26px 40px; }
.unit-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 4px 10px; }
.unit-head h3 { font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, 150px); gap: 14px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- cards (sized in em so .big just scales them) ---------- */
.card { font-size: 10px; width: 15em; height: 21em; border-radius: 1.4em; position: relative; padding: .5em; background: var(--frame, #9AA0A6); user-select: none; flex: none; }
.card.clickable { cursor: pointer; transition: transform .12s; }
.card.clickable:hover { transform: translateY(-4px); }
.card .body { position: absolute; inset: .5em; border-radius: 1.1em; background: var(--base); display: flex; flex-direction: column; padding: .8em .7em .7em; }
.card .top { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.25em; color: #fff; }
.card .stars { color: var(--frame-light, #fff); letter-spacing: .5px; font-size: .95em; }
.card .panel { background: var(--panel); border-radius: .9em; height: 9.8em; margin-top: .55em; display: grid; place-items: center; padding: .6em; text-align: center; }
.card .name { color: #fff; font-weight: 800; font-size: 1.45em; line-height: 1.15; overflow-wrap: anywhere; }
.card .name.long { font-size: 1.2em; }
.card .unit { color: rgba(255,255,255,.82); font-size: 1.05em; text-align: center; margin-top: .55em; line-height: 1.2; max-height: 2.4em; overflow: hidden; }
.card .ribbon { position: absolute; left: 50%; bottom: .9em; transform: translateX(-50%); background: var(--frame); color: #fff; font-weight: 800; font-size: 1.05em; padding: .15em 1.2em; border-radius: 99px; letter-spacing: .4px; }
.card.r-Common .ribbon, .card.r-Legendary .ribbon { color: #111; }
.card .dup { position: absolute; right: .55em; bottom: .6em; background: var(--bad); color: #fff; font-weight: 800; font-size: 1.15em; width: 2.4em; height: 2.4em; border-radius: 50%; display: grid; place-items: center; }
.card.r-Common { --frame: #9AA0A6; --frame-light: #D5D8DC; }
.card.r-Uncommon { --frame: #3FB950; --frame-light: #7EE08E; }
.card.r-Rare { --frame: #4FA3FF; --frame-light: #9CCBFF; }
.card.r-Epic { --frame: #B57BFF; --frame-light: #D8B8FF; background: linear-gradient(160deg, #D3AFFF, #8A4FE0); }
.card.r-Legendary { --frame: #F5B700; --frame-light: #FFE27A; background: linear-gradient(160deg, #FFE27A, #C98A00); }
.card.locked { background: var(--locked); border: 2px dashed var(--line); padding: 0; }
.card.locked .q { position: absolute; inset: 0; display: grid; place-items: center; font-size: 5.6em; font-weight: 800; color: #4A505B; }
.card.locked .num { position: absolute; bottom: 1.4em; width: 100%; text-align: center; font-weight: 800; font-size: 1.5em; color: #4A505B; }
.card.preview-only { opacity: .6; }
.card.big { font-size: 14px; }
.card-back { width: 15em; height: 21em; font-size: 10px; border-radius: 1.4em; background: repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 6px, transparent 6px 14px), linear-gradient(160deg, var(--base), var(--panel)); border: 3px solid #fff; display: grid; place-items: center; color: #fff; text-align: center; }
.card-back b { display: block; font-family: var(--display); font-size: 2.8em; }
.card-back small { font-size: 1.1em; font-weight: 800; letter-spacing: 1px; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.72); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--bg); border: 2px solid var(--line); border-radius: 18px; padding: 24px 28px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow-y: auto; position: relative; }
.modal.wide { max-width: 980px; }
.modal h2 { font-size: 24px; margin-bottom: 6px; padding-right: 40px; }
.modal .close { position: absolute; right: 14px; top: 14px; }
.box { background: var(--surface); border-radius: 12px; padding: 16px 18px; margin-top: 14px; border-left: 5px solid var(--subj, var(--accent)); }
.box h3 { font-size: 17px; margin-bottom: 6px; }

/* pack */
.pack-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 22px 0 8px; }
.flip { width: 150px; height: 210px; perspective: 900px; cursor: pointer; position: relative; }
.flip-inner { position: absolute; inset: 0; transition: transform .55s; transform-style: preserve-3d; }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; }
.flip .face.front { transform: rotateY(180deg); }
.flip:not(.flipped):hover .flip-inner { transform: translateY(-6px); }
.flip.is-new.flipped .face.front .card { box-shadow: 0 0 0 4px #FFD33D, 0 0 22px 6px rgba(255,211,61,.55); }
.new-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #FFD33D; color: #111; font-weight: 800; font-size: 11px; padding: 2px 10px; border-radius: 99px; z-index: 2; }

/* lesson */
.lesson { display: grid; grid-template-columns: 250px 1fr; gap: 28px; }
.lesson .left { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--panel-dark, #111); border-radius: 14px; padding: 20px 10px; }
.lesson .meta { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--subj-light, var(--muted)); }
.lesson h2 { font-size: 28px; margin: 6px 0 14px; }
.lesson .sec { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; margin: 14px 0 5px; color: var(--subj-light, var(--muted)); }
.lesson .sec.tip { color: var(--accent); }
.lesson .key { background: var(--panel); border-left: 4px solid var(--base); border-radius: 10px; padding: 10px 14px; }
.lesson p { margin: 0; line-height: 1.5; }
.related { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.related > span { background: var(--surface); border-radius: 99px; padding: 4px 11px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.related > span.locked { color: #6E747E; background: var(--locked); }

/* quiz */
.q-head { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.q-prompt { font-family: var(--display); font-size: 21px; margin: 10px 0; }
.q-detail { background: var(--panel, #10213A); border-left: 4px solid var(--base, var(--accent)); border-radius: 10px; padding: 12px 16px; line-height: 1.5; }
.options { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.option { text-align: left; background: var(--surface); border: 2px solid transparent; border-radius: 10px; padding: 11px 14px; display: flex; gap: 12px; align-items: center; }
.option:hover:not(:disabled) { background: var(--surface-2); }
.option .n { background: var(--bg); border-radius: 7px; width: 26px; height: 26px; display: grid; place-items: center; font-weight: 800; color: var(--muted); flex: none; }
.option.right { border-color: var(--good); background: #1E462A; }
.option.wrong { border-color: var(--bad); background: #4E2224; }
.option:disabled { cursor: default; }
.feedback { margin-top: 12px; line-height: 1.45; }
.score-big { font-family: var(--display); font-size: 56px; text-align: center; margin: 8px 0; }

/* ---------- teacher ---------- */
.nav-item { width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 14px; font-weight: 700; color: var(--muted); }
.nav-item.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 var(--accent); }
.nav-item:hover { background: var(--surface); }
.panel-card { background: var(--surface); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.panel-card h3 { font-size: 16px; margin-bottom: 10px; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); padding: 8px 10px; }
table.list td { padding: 9px 10px; border-top: 1px solid var(--surface-2); vertical-align: middle; }
table.list tr:nth-child(even) td { background: rgba(255,255,255,.02); }

/* ---------- school admin dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.stat-label { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--display); font-size: 30px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 13px; color: var(--muted); }
.status { display: inline-block; font-weight: 800; font-size: 12px; border-radius: 99px; padding: 1px 8px; margin-left: 4px; }
.status.soon { background: #3A3220; color: var(--accent); }
.status.expired { background: var(--danger-bg); color: var(--danger); }
table.list th.num, table.list td.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table td:first-child { min-width: 180px; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .admin-table tr:first-child { display: none; }
  .admin-table tr { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--surface-2); padding: 8px 0; }
  .admin-table td { border: 0; padding: 3px 4px; background: none !important; }
  .admin-table td:first-child { grid-column: 1 / -1; min-width: 0; padding-bottom: 6px; }
  table.admin-table td.num { text-align: left; font-weight: 700; }
  .admin-table td.num::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
}
@media (max-width: 420px) { .stat-value { font-size: 24px; } .stat { padding: 12px; } }
.bar { height: 8px; width: 110px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.bar > div { height: 100%; }
.code-big { font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.unit-block { background: var(--surface); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.unit-block.closed { opacity: .72; }
.unit-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.unit-bar h3 { font-size: 16px; }
.switch { position: relative; width: 44px; height: 24px; border-radius: 12px; background: var(--line); border: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: #34A853; }
.switch.on::after { left: 23px; }
.q-list { border-top: 1px solid var(--surface-2); }
.q-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--surface-2); align-items: start; }
.q-item.off { opacity: .5; }
.q-item input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.q-item .qp { font-weight: 700; }
.q-item .qd { color: var(--muted); font-size: 13px; margin-top: 3px; }
.q-item .qo { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.q-item .qo span { font-size: 12px; background: var(--bg); border-radius: 6px; padding: 3px 8px; }
.q-item .qo span.right { background: #1E462A; color: #9BE7A9; font-weight: 700; }
.tag { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 7px; background: var(--surface-2); color: var(--muted); margin-left: 6px; }
.tag.mine { background: #4A3A10; color: var(--accent); }
.heat { display: grid; grid-template-columns: 230px 1fr; gap: 6px 14px; align-items: start; }
.heat .cells { display: flex; flex-wrap: wrap; gap: 5px; }
.heat .cell { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; position: relative; cursor: default; }
.legend { width: 140px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #5C282E, #C49628, #34A853); display: inline-block; vertical-align: middle; margin: 0 8px; }
.card-form { display: grid; grid-template-columns: 1fr 230px; gap: 24px; align-items: start; }
.card-preview { position: sticky; top: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
@media (max-width: 720px) { .card-form { grid-template-columns: 1fr; } .card-preview { position: static; order: -1; } .card-preview .card.big { font-size: 8px; } .card-preview p { display: none; } }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper b { min-width: 28px; text-align: center; color: var(--accent); font-size: 17px; }
.board { position: fixed; inset: 0; background: #0C0D10; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; cursor: pointer; text-align: center; padding: 20px; }
.board .code { font-family: var(--display); font-size: min(17vw, 190px); font-weight: 800; color: var(--accent); letter-spacing: .12em; }
.board .t { font-size: 26px; color: var(--muted); font-weight: 700; }
.board .s { font-size: 24px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(120px); background: #30353F; border: 1px solid var(--accent); padding: 11px 18px; border-radius: 12px; font-weight: 700; z-index: 80; transition: transform .25s; max-width: calc(100% - 30px); }
.toast:not(.show) { visibility: hidden; opacity: 0; transition: transform .25s, visibility 0s .25s, opacity .25s; }
.toast.show { transform: translateX(-50%) translateY(0); }
.tip-pop { position: fixed; z-index: 90; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; font-size: 13px; pointer-events: none; max-width: 280px; }

/* ---------- home page (signed-out visitors) ---------- */
html { scroll-behavior: smooth; }
.lp { --lp-alt: #20242B; min-height: 100vh; }
.lp-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.lp section[id] { scroll-margin-top: 70px; }
.lp-nav { position: sticky; top: 0; z-index: 20; background: rgba(27,30,36,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--surface); }
.lp-nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.lp-logo { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--accent); text-decoration: none; letter-spacing: -.3px; white-space: nowrap; }
.lp-links { display: flex; gap: 22px; flex: 1; }
.lp-links a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; opacity: .85; }
.lp-links a:hover { opacity: 1; color: var(--accent); }
.lp-nav-btns { display: flex; gap: 10px; margin-left: auto; }
.lp-link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 800; text-decoration: underline; }

.lp-hero { padding: 64px 0 56px; background: radial-gradient(900px 420px at 80% 30%, rgba(255,200,61,.10), transparent 70%); overflow: hidden; }
.lp-hero-in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.lp-eyebrow { color: var(--accent); font-weight: 800; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; margin: 0 0 12px; }
.lp-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -1px; }
.lp-hero h1 span { color: var(--accent); }
.lp-lead { font-size: 18px; line-height: 1.55; color: #C9CDD3; margin: 18px 0 26px; max-width: 560px; }
.lp-who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 600px; }
.lp-who-btn { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.lp-who-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.lp-who-btn b { font-family: var(--display); font-size: 18px; }
.lp-who-btn span { font-size: 13px; color: var(--muted); font-weight: 700; }
.lp-signin-line { color: var(--muted); margin-top: 18px; }
.lp-fan { position: relative; height: 340px; }
.lp-fan-card { position: absolute; top: 20px; left: 50%; }
.lp-fan-card .card { box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.lp-fan-card.f0 { transform: translateX(-120%) rotate(-12deg); top: 40px; }
.lp-fan-card.f1 { transform: translateX(-50%); z-index: 2; }
.lp-fan-card.f2 { transform: translateX(20%) rotate(12deg); top: 40px; }

.lp-stats { background: var(--sidebar); border-top: 1px solid var(--surface); border-bottom: 1px solid var(--surface); }
.lp-stats-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 26px; padding-bottom: 26px; text-align: center; }
.lp-stats b { display: block; font-family: var(--display); font-size: 36px; color: var(--accent); }
.lp-stats span { color: var(--muted); font-weight: 700; font-size: 14px; }

.lp-sec { padding: 72px 0; }
.lp-alt { background: var(--lp-alt); }
.lp-h2 { font-size: clamp(28px, 3.6vw, 40px); text-align: center; letter-spacing: -.6px; }
.lp-h2.left { text-align: left; }
.lp-sub { text-align: center; color: var(--muted); font-size: 17px; margin: 10px auto 36px; max-width: 620px; }
.lp-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp-tile { background: var(--surface); border-radius: 16px; padding: 24px 22px; border-top: 4px solid var(--accent); }
.lp-tile h3 { font-size: 19px; margin: 12px 0 8px; }
.lp-tile p, .lp-step p { margin: 0; line-height: 1.55; color: #C9CDD3; }
.lp-ico { font-size: 30px; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-step { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px; }
.lp-step h3 { font-size: 19px; margin: 12px 0 8px; }
.lp-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #111; font-weight: 800; font-family: var(--display); font-size: 18px; }
.lp-rarity { display: flex; justify-content: center; gap: 14px; margin-top: 44px; flex-wrap: wrap; }
.lp-rcard:nth-child(odd) { transform: translateY(10px); }
.lp-caption { text-align: center; color: var(--muted); margin: 22px 0 0; }

.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.lp-checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.lp-checks li { padding-left: 32px; position: relative; line-height: 1.5; color: #C9CDD3; }
.lp-checks li b { color: var(--text); }
.lp-checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: #1E462A; color: #9BE7A9; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.lp-mock { background: var(--sidebar); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.lp-mock-top { display: flex; gap: 6px; padding: 12px 14px; background: var(--surface); }
.lp-mock-top span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.lp-mock-body { padding: 18px; display: grid; gap: 12px; }
.lp-mock-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lp-mock-unit { display: grid; grid-template-columns: 1fr 110px 40px; gap: 10px; align-items: center; font-size: 13px; font-weight: 700; }
.lp-mock-unit em { font-style: normal; color: var(--muted); text-align: right; }
.lp-mock-heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin-top: 4px; }
.lp-mock-heat i { aspect-ratio: 1; border-radius: 4px; }

.lp-subjects { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 900px; margin: 0 auto; }
.lp-subj { background: var(--surface); border-left: 5px solid var(--c); border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 14px; color: var(--muted); }
.lp-subj.ready { background: var(--c); color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.lp-subj b { font-size: 11px; background: rgba(0,0,0,.3); border-radius: 99px; padding: 2px 8px; margin-left: 6px; color: var(--accent); }
.lp-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--surface); vertical-align: -1px; border: 1px solid var(--line); }
.lp-key.ready { background: var(--accent); border-color: var(--accent); }

.lp-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.lp-plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px; display: flex; flex-direction: column; position: relative; }
.lp-plan.best { border: 2px solid var(--accent); }
.lp-plan h3 { font-size: 18px; }
.lp-price { font-family: var(--display); font-size: 38px; font-weight: 800; margin: 10px 0 6px; }
.lp-price small { font-family: var(--font); font-size: 14px; color: var(--muted); font-weight: 700; }
.lp-plan ul { padding-left: 18px; margin: 8px 0 22px; line-height: 1.7; color: #C9CDD3; flex: 1; }
.lp-badge { position: absolute; top: -12px; left: 22px; background: var(--accent); color: #111; font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 99px; }

.lp-cta { padding: 72px 0; text-align: center; background: linear-gradient(160deg, #2A2412, #1B1E24 70%); border-top: 1px solid var(--surface); }
.lp-cta h2 { font-size: clamp(28px, 3.6vw, 40px); }
.lp-cta p { color: #C9CDD3; font-size: 17px; margin: 12px 0 24px; }
.lp-foot { background: var(--sidebar); padding: 32px 0; }
.lp-foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.lp-foot p { margin: 8px 0 0; line-height: 1.5; }
.lp-foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.lp-foot-links a { color: var(--muted); text-decoration: none; font-weight: 700; }
.lp-foot-links a:hover { color: var(--text); }

@media (max-width: 1000px) {
  .lp-links { display: none; }
  .lp-hero-in, .lp-split { grid-template-columns: 1fr; }
  .lp-fan { height: 300px; }
  .lp-grid4, .lp-plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .lp-wrap { padding: 0 16px; }
  .lp-hide-sm { display: none; }
  .lp-hero { padding: 40px 0; }
  .lp-who { grid-template-columns: 1fr; }
  .lp-fan .card.big { font-size: 11px; }
  .lp-fan { height: 260px; }
  .lp-fan-card.f0 { transform: translateX(-98%) rotate(-9deg); top: 30px; }
  .lp-fan-card.f2 { transform: translateX(-2%) rotate(9deg); top: 30px; }
  .lp-stats-in { grid-template-columns: repeat(2, 1fr); }
  .lp-grid4, .lp-steps, .lp-plans { grid-template-columns: 1fr; }
  .lp-sec, .lp-cta { padding: 52px 0; }
  .lp-rarity { gap: 8px; }
  .lp-rarity .card { font-size: 7px; }
  .lp-rcard:nth-child(odd) { transform: none; }
  .lp-mock-unit { grid-template-columns: 1fr 70px 36px; }
}

/* ---------- privacy & terms pages ---------- */
.auth-legal { text-align: center; margin: 14px 0 0; position: relative; z-index: 1; }
body.legal-page { height: auto; }
.legal-page .btn { text-decoration: none; display: inline-block; }
.legal-nav { display: flex; gap: 20px; flex: 1; }
.legal-nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; opacity: .8; }
.legal-nav a:hover, .legal-nav a[aria-current] { opacity: 1; color: var(--accent); }
.legal { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; line-height: 1.65; color: #D5D8DD; }
.legal h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -.8px; color: var(--text); }
.legal h2 { font-size: 22px; color: var(--text); margin: 0 0 10px; }
.legal section { padding-top: 30px; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal b { color: var(--text); }
.legal-date { color: var(--muted); margin-top: 10px !important; }
.legal-summary { background: var(--surface); border-radius: 16px; border-top: 4px solid var(--accent); padding: 22px 24px 12px; margin-top: 24px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 4px 0 14px; font-size: 14px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.legal-table td:first-child { font-weight: 800; color: var(--text); white-space: nowrap; }
.legal-foot { margin-top: 40px !important; padding-top: 18px; border-top: 1px solid var(--surface); }
/* Draft markers for the lawyer. Remove them (or hide with .legal-review, .legal-draft { display: none }) once reviewed. */
.legal-draft { border: 1px dashed var(--accent); border-radius: 12px; padding: 12px 16px; margin: 20px 0 0; font-size: 14px; }
.legal-review { background: #2A2412; border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px; margin: 12px 0; font-size: 14px; color: #E9DDBA; }
.legal-tag { display: inline-block; background: var(--accent); color: #111; font-weight: 800; font-size: 11px; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; margin-right: 6px; }
.legal-fill { background: var(--surface-2); color: var(--accent); border-radius: 5px; padding: 0 5px; font-weight: 700; }
@media (max-width: 640px) {
  .legal { padding: 32px 16px 48px; }
  .legal-nav { gap: 14px; }
  .legal-page .lp-nav-btns { display: none; }
  .legal-table td:first-child { white-space: normal; }
}

/* ---------- small screens ---------- */
.mobile-subject, .mobile-only { display: none !important; }
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; height: auto; }
  .sidebar { display: none; }
  .mobile-subject { display: block !important; margin-top: 10px; }
  .mobile-only { display: flex !important; }
  .title-row { flex-wrap: wrap; }
  .title-row h2 { font-size: 23px; }
  .main-head { position: static; padding: 16px; }
  .content { padding: 12px 16px 40px; }
  .main { overflow: visible; }
  .lesson { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, 150px); justify-content: center; }
  .heat { grid-template-columns: 1fr; }
}

/* ---------- "Try the demo" ---------- */
[hidden] { display: none !important; }
.demo-bar { --demo-h: 46px; background: #2A2410; border-bottom: 1px solid #5C4A12; position: relative; z-index: 30; }
.demo-bar-in { min-height: var(--demo-h); display: flex; align-items: center; gap: 12px; padding: 6px 16px; flex-wrap: wrap; font-size: 14px; }
.demo-tag { background: var(--accent); color: #111; font-weight: 800; font-size: 12px; letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; }
.demo-msg { flex: 1; min-width: 200px; color: #E9DDB8; }
.demo-msg b { color: var(--text); font-variant-numeric: tabular-nums; }
.demo-switch { display: inline-flex; background: rgba(0,0,0,.3); border-radius: 9px; padding: 3px; gap: 2px; }
.demo-switch button { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; padding: 5px 11px; border-radius: 7px; }
.demo-switch button:hover { color: var(--text); }
.demo-switch button.on { background: var(--accent); color: #111; }
.demo-switch button:focus-visible, .lp-who-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.demo-on .layout { height: calc(100vh - 46px); }
body.demo-on .auth { min-height: calc(100vh - 46px); }
.demo-short { display: none; }
.demo-roles { display: grid; gap: 10px; }
.demo-roles .lp-who-btn { width: 100%; cursor: pointer; font: inherit; }
.dev-key { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.dev-key summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.dev-key p { margin: 8px 0; }
.dev-key input[type=password] { width: 100%; box-sizing: border-box; }
.dev-fresh { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.lp-demo-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.lp-demo-line span { color: var(--muted); font-size: 14px; max-width: 300px; }
@media (max-width: 820px) {
  body.demo-on .layout { height: auto; }
  .demo-bar-in { gap: 6px 10px; padding: 6px 12px; }
  .demo-tag, .demo-long { display: none; }
  .demo-short { display: inline; }
  .demo-msg { flex-basis: 100%; order: 3; font-size: 13px; }
}

/* ---------- focus cards (card quests) ---------- */
.focus-pin { position: absolute; top: -.9em; left: 50%; transform: translateX(-50%); background: var(--accent); color: #111; font-weight: 800; font-size: 1.05em; padding: .1em .9em; border-radius: 99px; letter-spacing: .5px; z-index: 2; white-space: nowrap; }
.focus-pin.static { position: static; transform: none; font-size: 11px; }
.card .mastered { position: absolute; top: -.5em; right: -.5em; width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--good); color: #111; font-weight: 800; font-size: 1.2em; display: grid; place-items: center; border: 2px solid var(--bg); }
.card.quest-slot { background: var(--locked); border: 2px dashed var(--accent); padding: 0; }
.card.quest-slot .g { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .6em; text-align: center; padding: 1.2em; color: var(--muted); font-size: 1.15em; }
.card.quest-slot .g b { color: var(--text); font-size: 1.4em; line-height: 1.15; }
.card.quest-slot .g small { font-size: .95em; font-weight: 800; color: var(--accent); letter-spacing: .5px; }
.focus-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #2F2A18; border: 1px solid #5C4C1B; border-radius: 12px; padding: 10px 14px; margin: 14px 26px 0; }
.focus-box { border-left-color: var(--accent); }
.focus-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); }
.quest { display: grid; grid-template-columns: 190px 1fr; gap: 24px; align-items: start; }
.quest-side { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.quest-ghost { position: relative; width: 150px; height: 210px; border-radius: 14px; border: 2px dashed var(--accent); background: var(--locked); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; padding: 14px; color: var(--muted); font-size: 12px; }
.quest-ghost .focus-pin { font-size: 11px; top: -10px; }
.quest-ghost small { color: var(--accent); font-weight: 800; letter-spacing: .5px; }
.quest-ghost b { color: var(--text); font-size: 17px; line-height: 1.15; }
.quest-steps { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.quest-step { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); padding: 5px 8px; border-radius: 8px; }
.quest-step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--surface-2); flex: none; }
.quest-step.now { color: var(--text); background: var(--surface); }
.quest-step.now .n { background: var(--accent); color: #111; }
.quest-step.done .n { background: var(--good); color: #111; }
.quest-stage { min-width: 0; }
.quest-stage .q-prompt { margin-top: 14px; }
.quest-lesson .sec { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; margin: 14px 0 5px; color: var(--subj-light, var(--muted)); }
.quest-lesson .sec.tip { color: var(--accent); }
.quest-lesson .key { background: var(--panel); border-left: 4px solid var(--base); border-radius: 10px; padding: 10px 14px; }
.quest-lesson p { margin: 0; line-height: 1.5; }
.quest-reward { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.quest-reward p { max-width: 46ch; margin: 0; }
.hint-box { background: #2F2A18; border: 1px solid #5C4C1B; border-radius: 10px; padding: 10px 14px; display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; line-height: 1.45; }
.hint-box b { color: var(--accent); white-space: nowrap; }
.option.gone { opacity: .3; text-decoration: line-through; }
.substeps { display: flex; gap: 6px; margin: 12px 0; }
.substeps span { height: 6px; flex: 1; border-radius: 99px; background: var(--surface-2); }
.substeps span.on { background: var(--accent); }
.substeps span.ok { background: var(--good); }
.work { background: var(--surface); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.work .line { display: flex; gap: 10px; align-items: baseline; line-height: 1.4; }
.work .line i { font-style: normal; color: var(--muted); font-size: 11px; font-weight: 800; min-width: 58px; flex: none; }
.visual { background: var(--surface); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.visual canvas { width: 100%; height: auto; display: block; border-radius: 10px; }
.visual input[type=range] { width: 100%; accent-color: var(--accent); display: block; }
.visual .readout { font-variant-numeric: tabular-nums; }
.visual .ions { position: relative; height: 64px; }
.visual .ion { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; position: absolute; top: 9px; transition: left .2s; }
.visual .ion.a { background: #1F7FD1; } .visual .ion.b { background: #C2453D; }
.visual .forcebar { height: 14px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.visual .forcebar div { height: 100%; background: #2FBF95; border-radius: 99px; transition: width .2s; }
.visual .chip.on { background: var(--accent); color: #111; }
.visual .triad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.visual .triad div { background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; font-size: 13px; }
.visual .triad div b { display: block; font-family: var(--display); font-size: 16px; }
.visual .triad div.hit { border-color: var(--bad); background: #4E2224; }
.visual .choice-list { display: flex; flex-direction: column; gap: 6px; }
.visual .choice-list button { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.visual .choice-list button.pick { border-color: var(--accent); }
.visual .choice-list button.cost { border-color: var(--bad); border-style: dashed; }
.visual .passage { background: var(--bg); border-radius: 10px; padding: 12px 14px; line-height: 1.7; }
.visual .passage mark { background: transparent; color: inherit; border-bottom: 3px solid transparent; }
.visual .passage mark.lit { border-bottom-color: var(--accent); background: #3A3220; }
.table-wrap { overflow-x: auto; }
.focus-table { min-width: 560px; }
.focus-table tr.sel td { background: #2C2A1E; }
.focus-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.tag.focus { background: var(--accent); color: #111; }
.missbar { display: flex; align-items: center; gap: 8px; }
.missbar .track { width: 80px; height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; flex: none; }
.missbar .track div { height: 100%; background: var(--bad); }
.focus-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.opt-label { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
label.radio { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-bottom: 6px; cursor: pointer; }
label.radio input { margin-top: 3px; accent-color: var(--accent); width: auto; }
input[type=date] { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; color: inherit; font: inherit; color-scheme: dark; }
.focus-item { background: var(--bg); border-radius: 10px; padding: 12px 14px; margin-top: 8px; }
.focus-prog { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.focus-prog .bar { width: 100%; }
.focus-students { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--surface-2); }
.focus-students div { display: flex; gap: 8px; align-items: baseline; font-size: 14px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .quest { grid-template-columns: 1fr; }
  .quest-side { flex-direction: row; align-items: flex-start; }
  .quest-ghost { width: 110px; height: 154px; font-size: 11px; padding: 8px; }
  .quest-ghost b { font-size: 14px; }
  .quest-ghost span:last-child { display: none; }
  .focus-opts { grid-template-columns: 1fr; }
  .focus-banner { margin: 12px 16px 0; }
}
.row-actions { white-space: nowrap; display: flex; gap: 4px; align-items: flex-start; }
.guided-step { background: var(--surface); border-radius: 12px; padding: 14px 16px 2px; margin-bottom: 12px; }
.guided-step h3 { font-size: 15px; margin-bottom: 8px; }
.guided-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 640px) { .guided-answers { grid-template-columns: 1fr; } .row-actions { flex-wrap: wrap; white-space: normal; } }

/* ---------- Special DLC: holographic SPECIAL border ---------- */
:root { --holo: linear-gradient(135deg, #FF7AC6 0%, #FFD36E 24%, #7CF2C9 50%, #7AA8FF 74%, #C58BFF 100%); }
.card.special { background: var(--holo); --frame: #14161B; --frame-light: #FFFFFF; }
.card.special .body { inset: 1.55em .55em .55em; box-shadow: inset 0 0 0 .15em rgba(255,255,255,.4); }
.card.special .sp-tag { position: absolute; top: .3em; left: 0; right: 0; text-align: center; font-weight: 800; font-size: .95em; letter-spacing: .45em; color: #14161B; }
.card.special .panel { height: 9em; }
.card.special .ribbon { background: #14161B; color: #fff; border: .12em solid rgba(255,255,255,.7); }
.card.special.big { box-shadow: 0 0 22px rgba(197,139,255,.35); }
.card.dlc-slot { padding: 0; background: var(--locked); border: 2px dashed #C58BFF; }
.card.dlc-slot .g { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .6em; text-align: center; padding: 1.2em; color: var(--muted); font-size: 1.15em; }
.card.dlc-slot .g b { color: var(--text); font-size: 1.4em; line-height: 1.15; }
.card.dlc-slot .g small { font-size: .95em; font-weight: 800; color: #C58BFF; letter-spacing: .5px; }
.card.locked.dlc-locked { border-color: #5B4A78; }
.sp-pin { position: absolute; top: -.9em; left: 50%; transform: translateX(-50%); background: var(--holo); color: #14161B; font-weight: 800; font-size: 1.05em; padding: .1em .9em; border-radius: 99px; letter-spacing: .3em; z-index: 2; white-space: nowrap; }
.quest-side .card { font-size: 10px; }
.sp-badge { display: inline-block; background: var(--holo); color: #14161B; font-weight: 800; font-size: 10px; letter-spacing: .25em; padding: 3px 4px 3px 8px; border-radius: 99px; vertical-align: middle; font-family: var(--font); }
.card-back.special { border-color: transparent; background: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 6px, transparent 6px 14px), linear-gradient(160deg, #3A2A5C, #12233F); box-shadow: inset 0 0 0 3px #C58BFF; }
.card-back.special small { letter-spacing: .3em; color: #E3CCFF; }
.dlc-section { margin-top: 30px; padding-top: 18px; border-top: 2px solid transparent; border-image: var(--holo) 1; }
.dlc-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dlc-head h3 { font-size: 19px; }
.dlc-blurb { margin: 8px 0 0; color: var(--muted); max-width: 80ch; }
.dlc-note { margin: 6px 0 0; font-size: 11px; color: #7E848D; font-style: italic; }
.dlc-section .grid { margin-top: 14px; }
.dlc-lesson { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 4px; }
.dlc-box { border-left-color: #C58BFF; }
.dlc-box h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.rules { margin: 12px 0 0; padding-left: 18px; line-height: 1.5; }
.rules li { margin-bottom: 4px; }
.dlc-plan { border-left: 5px solid #C58BFF; }
.dlc-lock { border: 1px solid #5B4A78; background: linear-gradient(160deg, #2A2337, var(--surface)); }
.dlc-block { border-left: 5px solid transparent; border-image: var(--holo) 1; }
.dlc-block.closed { border-image: none; border-left-color: transparent; }
.dlc-block h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dlc-pad { padding: 0 16px; margin: 0 0 10px; }
.dlc-give { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding-top: 6px; padding-bottom: 12px; border-top: 1px solid var(--surface-2); }
.dlc-give select { width: auto; padding: 6px 10px; }
.dlc-give label.radio { margin: 0; }
.dlc-students { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; }
.dlc-preview { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 14px; }
.dlc-preview .qo { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.dlc-preview .qo span { font-size: 13px; background: var(--bg); border-radius: 6px; padding: 4px 9px; }
.dlc-preview .q-detail { margin-top: 6px; }
@media (max-width: 720px) {
  .dlc-preview > div:first-child { margin: 0 auto; }
  .dlc-section .dlc-head .btn { width: 100%; }
}
.dlc-block .unit-bar { flex-wrap: wrap; }
.dlc-block .unit-bar .grow { min-width: 220px; }
.dlc-plan .grow { min-width: 220px; }
