/* CoachSite demo. System fonts only; every illustration is drawn in CSS/SVG. */
:root {
  --b: #4338ca; --b-strong: #4338ca; --b-fill: #4338ca; --b-ink: #fff; --b-soft: #ecebfa; --b-softer: #f5f5fd; --b-line: #c7c3f0; --b-deep: #26206b;
  --f: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --f-head: var(--f);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ink: #161a2c; --ink-2: #384056; --muted: #596075; --line: #e2e5ee; --line-2: #eef0f6; --bg: #f5f6fa; --card: #fff;
  --ok: #0b6b45; --ok-bg: #e3f5ec; --warn: #8a4b00; --warn-bg: #fff3d6; --err: #b42318; --err-bg: #fdecea; --live: #d92d20;
  --r: 10px; --r-lg: 16px;
  --sh: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --sh-lg: 0 24px 48px -20px rgba(16, 24, 40, .28);
  --dbar-h: 52px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--dbar-h) + 72px); }
body { margin: 0; font-family: var(--f); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.2; letter-spacing: -.015em; margin: 0; color: var(--ink); }
p { margin: 0 0 12px; }
a { color: var(--b-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: var(--mono); font-size: .9em; background: var(--line-2); padding: 1px 6px; border-radius: 6px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--b-fill); outline-offset: 2px; border-radius: 6px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 10px; font-weight: 700; box-shadow: var(--sh-lg); }
.skip:focus { top: 8px; }
.ic { display: inline-block; vertical-align: -4px; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hide-xs { }
[hidden] { display: none !important; }

/* ---------- demo bar (outside the product) ---------- */
.dbar { position: sticky; top: 0; z-index: 60; height: var(--dbar-h); display: flex; align-items: center; gap: 14px; padding: 0 16px; background: #0d1020; color: #e9ebf5; border-bottom: 1px solid #22263d; }
.dbar-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dbar-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #5b5bf0, #3b2bb8); display: grid; place-items: center; flex: none; }
.dbar-mark svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.dbar-name { font-size: 14px; white-space: nowrap; color: #c9cde0; }
.dbar-name strong { color: #fff; }
.dbar-by { color: #9097b3; }
.dpill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid #5c4a14; background: #2a230d; color: #ffd978; font-size: 12px; font-weight: 700; white-space: nowrap; flex: none; }
.dpill:hover { background: #3a3012; }
.dpill-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffc53d; box-shadow: 0 0 0 3px rgba(255, 197, 61, .2); }
.dseg { display: flex; gap: 2px; padding: 3px; background: #1a1e33; border-radius: 11px; margin: 0 auto; }
.dseg-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 8px; color: #b8bdd4; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.dseg-btn:hover { color: #fff; text-decoration: none; background: #252a44; }
.dseg-btn[aria-current="page"] { background: #fff; color: #11142a; }
.dseg-btn .ic { width: 17px; height: 17px; }
.dseg-s { display: none; }
.dbar-actions { display: flex; gap: 6px; }
.dbtn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid #2c3150; background: transparent; color: #d7dbec; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dbtn:hover { background: #1d2139; color: #fff; }
.dbtn .ic { width: 17px; height: 17px; }
.dbar :focus-visible { outline-color: #ffd978; }
.urlbar { display: none; }
@media (min-width: 900px) {
  .urlbar { display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 16px; background: #e9ebf2; border-bottom: 1px solid #d9dce6; }
  .urlbar-dots { display: flex; gap: 6px; } .urlbar-dots i { width: 10px; height: 10px; border-radius: 50%; background: #c9ccd8; }
  .urlbar-field { display: flex; align-items: center; gap: 7px; flex: 0 1 520px; height: 24px; margin: 0 auto; padding: 0 12px; border-radius: 7px; background: #fff; font-size: 12.5px; color: #4b5266; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .urlbar-field .ic { width: 13px; height: 13px; color: #1b7a4d; }
}
@media (max-width: 1080px) { .dbar-by { display: none; } }
@media (max-width: 900px) { .dbar-id { display: none; } .dseg { margin: 0; flex: 1; justify-content: center; } .dbtn span { display: none; } .dbtn { padding: 0; width: 34px; justify-content: center; } }
@media (max-width: 600px) {
  .dbar { gap: 8px; padding: 0 10px; }
  .dseg-l { display: none; } .dseg-s { display: inline; }
  .dseg-btn { padding: 0 9px; gap: 0; font-size: 12.5px; }
  .dseg-btn .ic { display: none; }
  .dpill { padding: 0 9px; font-size: 11.5px; gap: 6px; }
}
/* Phones: a tighter bar keeps the icon-only Rebrand button. Below 390px it moves into the About dialog
   (tap "Demo · sample data"), and the bar tightens again so nothing runs off the screen. */
@media (max-width: 480px) { .dbar { gap: 6px; padding: 0 8px; } .dbar-actions { gap: 4px; } .dpill-dot { display: none; } .dseg-btn { padding: 0 7px; } .dbtn { width: 32px; } }
@media (max-width: 389px) { .dbtn-brand { display: none; } }
@media (max-width: 350px) { .dbar { gap: 5px; padding: 0 6px; } .dpill { padding: 0 7px; font-size: 11px; } .dseg { padding: 2px; } .dseg-btn { padding: 0 5px; font-size: 11.5px; } }

/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent; font-weight: 650; font-size: 15px; line-height: 1; white-space: nowrap; text-decoration: none !important; transition: background .15s, box-shadow .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--b-fill); color: var(--b-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.btn.primary:hover { background: var(--b-deep); }
.btn.ghost { background: #fff; color: var(--ink); border-color: #d5d9e4; }
.btn.ghost:hover { background: #f3f4f8; }
.btn.danger { background: var(--err); color: #fff; }
.btn.danger:hover { background: #8f1c13; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.xs { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; border-radius: 8px; }
.btn.xs .ic { width: 15px; height: 15px; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r); border: 0; background: transparent; color: var(--ink-2); flex: none; position: relative; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.brand { background: var(--b-fill); color: var(--b-ink); }
.icon-btn.brand:hover { background: var(--b-deep); }
.icon-btn[aria-pressed="true"] { background: var(--b-soft); color: var(--b-strong); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: #eef0f5; color: var(--ink-2); font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge .ic { width: 14px; height: 14px; }
.badge.ok, .badge.save { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.brand { background: var(--b-soft); color: var(--b-strong); }
.badge.live { background: #fde8e6; color: #a8190f; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 45, 32, .5); } 50% { box-shadow: 0 0 0 5px rgba(217, 45, 32, 0); } }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--b-strong); }
.eyebrow.pill { text-transform: none; letter-spacing: 0; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--b-line); }
.eyebrow .ic { width: 16px; height: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); }
.card.pad, .pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.card-head h3 .ic { color: var(--b-strong); }
.h-sec { font-size: 18px; margin: 4px 0 14px; display: flex; align-items: center; gap: 8px; }
.h-sec .ic { color: var(--b-strong); }
.h-card { font-size: 17px; }
.h-sm { font-size: 15px; margin: 18px 0 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid #d5d9e4; background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip:hover { border-color: var(--b-line); color: var(--b-strong); }
.chip[aria-pressed="true"] { background: var(--b-fill); border-color: var(--b-fill); color: var(--b-ink); }
.chip.static { cursor: default; height: 28px; font-size: 13px; padding: 0 10px; background: var(--line-2); border-color: transparent; }
.chip.static .ic { width: 15px; height: 15px; }
.chip.sm { height: 24px; font-size: 12px; padding: 0 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pbar { display: block; height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.pbar > span { display: block; height: 100%; background: var(--b-fill); border-radius: 999px; transition: width .4s ease; }
.ring text { font-family: var(--f); }
.av { display: inline-grid; place-items: center; border-radius: 50%; background: hsl(var(--av) 55% 88%); color: hsl(var(--av) 55% 26%); font-weight: 750; flex: none; letter-spacing: .01em; }
.face-coach { display: inline-block; border-radius: 50%; overflow: hidden; flex: none; }
.face-coach svg { width: 100%; height: 100%; }
.portrait { flex: none; }
.logo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--b-fill); color: var(--b-ink); font-family: var(--f-head); font-weight: 800; font-size: 18px; flex: none; letter-spacing: -.02em; }
.logo.sm { width: 30px; height: 30px; font-size: 15px; border-radius: 8px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.notice > .ic { margin-top: 1px; }
.notice.test { background: #fff8e8; border-color: #f1d79c; color: #4f3600; }
.notice.test .ic { color: #a26200; }
.notice.err { background: var(--err-bg); border-color: #f6c3bd; color: #6e150e; }
.notice.warn { background: var(--warn-bg); border-color: #f1d79c; color: #4f3600; }
.notice.in-page { margin: 0; border-radius: 0; border-width: 0 0 1px; justify-content: center; }
.inline-note { background: var(--b-softer); border-color: var(--b-line); color: var(--ink-2); margin: 10px 0 14px; }
.inline-note > .ic { color: var(--b-strong); }
.owned-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--b-softer); border: 1px solid var(--b-line); color: var(--ink-2); line-height: 1.45; }
.owned-note > .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--b-strong); }
.owned-note a { font-weight: 650; text-decoration: underline; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 40px 20px; color: var(--muted); }
.empty > .ic { width: 36px; height: 36px; color: var(--b-strong); }
.empty h1, .empty h2 { font-size: 22px; color: var(--ink); }
.ok-text { color: var(--ok); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.ok-text .ic { width: 16px; height: 16px; }
.err-text { color: var(--err); font-weight: 600; }
.ticks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ic { color: var(--b-strong); margin-top: 2px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.link-arrow .ic { width: 18px; height: 18px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); margin-bottom: 14px; font-size: 14px; }
.back .ic { width: 18px; height: 18px; }
.kv { display: grid; gap: 10px; margin: 0 0 16px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 650; text-align: right; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field > span:first-child, .field legend { font-size: 13.5px; font-weight: 650; color: var(--ink-2); padding: 0; margin-bottom: 2px; }
.field legend { margin-bottom: 8px; }
input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], input[type="password"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #cdd2df; border-radius: var(--r); background: #fff; font-size: 15px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23596075' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
input:focus, select:focus, textarea:focus { border-color: var(--b-fill); box-shadow: 0 0 0 3px var(--b-soft); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--b-fill); outline-offset: 1px; }
input[readonly] { background: #f6f7fa; color: var(--ink-2); }
input::placeholder, textarea::placeholder { color: #7a8094; }
.hint { font-size: 12.5px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; margin: 4px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--b-fill); margin: 0; flex: none; }
.check.sm { font-size: 13px; gap: 6px; }
.check.sm input { width: 16px; height: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grid-name { display: grid; grid-template-columns: 1fr 110px; gap: 0 14px; }
.initial-in { text-transform: uppercase; text-align: center; font-weight: 800; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.search { position: relative; display: flex; align-items: center; flex: 1 1 260px; max-width: 420px; }
.search .ic { position: absolute; left: 12px; color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search input { padding-left: 38px; }
.sel select { min-width: 170px; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--line-2); margin-bottom: 12px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.seg input:checked + span { background: #fff; color: var(--b-strong); box-shadow: var(--sh); }
.seg input:focus-visible + span { outline: 3px solid var(--b-fill); outline-offset: 1px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.switch input { width: 36px; height: 20px; appearance: none; -webkit-appearance: none; background: #cdd2df; border-radius: 999px; position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--b-fill); }
.switch input:checked::after { transform: translateX(16px); }
.input-pre { display: flex; align-items: stretch; border: 1px solid #cdd2df; border-radius: var(--r); overflow: hidden; background: #fff; }
.input-pre > span { display: flex; align-items: center; padding: 0 10px; background: var(--line-2); color: var(--muted); font-size: 14px; }
.input-pre input { border: 0; border-radius: 0; }
.input-pre:focus-within { border-color: var(--b-fill); box-shadow: 0 0 0 3px var(--b-soft); }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfd; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover { background: #fafbff; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl.compact th, .tbl.compact td { padding: 9px 10px; }
.tbl .actions { white-space: nowrap; }
.tbl .actions .btn + .btn { margin-left: 6px; }
.inv-no { font-size: 12.5px; background: none; padding: 0; color: var(--ink-2); white-space: nowrap; }
.tbl td[data-label="Date"] { white-space: nowrap; }
.who-btn { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; border-radius: 8px; }
.who-btn b { display: block; color: var(--b-strong); font-weight: 650; }
.who-btn:hover b { text-decoration: underline; }
.who-btn small { color: var(--muted); font-size: 12.5px; }
.prog-cell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.prog-cell .pbar { flex: 1; height: 6px; }
.prog-cell small { color: var(--muted); font-size: 12.5px; min-width: 32px; text-align: right; }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 4px; }
@media (max-width: 760px) {
  .tbl.rows-cards thead { display: none; }
  .tbl.rows-cards, .tbl.rows-cards tbody, .tbl.rows-cards tr, .tbl.rows-cards td { display: block; width: 100%; }
  .tbl.rows-cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.rows-cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .tbl.rows-cards td::before { content: attr(data-label); font-size: 12.5px; font-weight: 650; color: var(--muted); text-align: left; }
  .tbl.rows-cards td[data-label=""]::before, .tbl.rows-cards td[data-label="Student"]:has(.who-btn)::before { content: none; }
  .tbl.rows-cards td[data-label="Student"]:has(.who-btn) { padding-bottom: 8px; }
  .tbl.rows-cards td[data-label="Courses"] { flex-wrap: wrap; justify-content: flex-end; }
  .tbl.rows-cards td[data-label="Courses"]::before { margin-right: auto; }
  .tbl.rows-cards td[data-label="Course"] { flex-wrap: wrap; justify-content: flex-end; }
  .tbl.rows-cards td[data-label=""] { justify-content: flex-end; padding-top: 8px; }
  .tbl-wrap:has(.rows-cards) { overflow: visible; }
  .tbl.compact th { white-space: normal; }
  .tbl.compact th, .tbl.compact td { padding: 8px 6px; }
}

/* dialog */
#dlg { border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 24px)); max-height: min(90vh, 920px); box-shadow: 0 30px 80px -20px rgba(8, 10, 30, .45); color: var(--ink); background: #fff; overflow: hidden; }
#dlg[open] { display: flex; flex-direction: column; }
#dlg.dlg-sm { width: min(460px, calc(100vw - 24px)); }
#dlg.dlg-md { width: min(640px, calc(100vw - 24px)); }
#dlg.dlg-lg { width: min(880px, calc(100vw - 24px)); }
#dlg::backdrop { background: rgba(10, 12, 26, .55); backdrop-filter: blur(2px); }
#dlg > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 10px; }
.dlg-head h2 { font-size: 20px; }
.dlg-head p { margin: 4px 0 0; font-size: 14px; }
.dlg-body { padding: 6px 22px 18px; overflow: auto; flex: 1; min-height: 0; }
.dlg-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--line-2); background: #fbfbfd; }
@media (max-width: 520px) { .dlg-foot .btn { flex: 1 1 auto; } }
.about .tour { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tour a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.tour a:hover { background: var(--b-softer); border-color: var(--b-line); text-decoration: none; }
.tour a > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.tour small { color: var(--muted); font-size: 13px; }
.tour-s { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; min-width: 64px; text-align: center; }
.tour-site { background: #e8eefc; color: #1e40af; } .tour-learn { background: #e6f6ee; color: #0b6b45; } .tour-admin { background: #f3e8fd; color: #6b21a8; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: #161a2c; color: #fff; font-size: 14px; font-weight: 550; box-shadow: var(--sh-lg); animation: tin .25s ease; }
.toast .ic { color: #6ee7b7; width: 18px; height: 18px; }
.toast.warn .ic { color: #fcd34d; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .4s; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 959px) { .toasts { bottom: 86px; } }

/* ---------- public site ---------- */
.site { background: #fff; min-height: calc(100vh - var(--dbar-h)); display: flex; flex-direction: column; }
.s-main { flex: 1; }
.s-head { position: sticky; top: var(--dbar-h); z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.s-head-in { max-width: 1200px; margin: 0 auto; height: 66px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.s-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 750; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.s-brand:hover { text-decoration: none; }
.s-brand.light { color: #fff; }
.s-nav { display: flex; gap: 6px; flex: 1; }
.s-navlink { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.s-navlink:hover { background: var(--line-2); text-decoration: none; }
.s-navlink[aria-current="page"] { color: var(--b-strong); background: var(--b-softer); }
.s-head-cta { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.s-menu { display: none; }
@media (max-width: 860px) {
  .s-head-in { gap: 10px; padding: 0 16px; height: 60px; }
  .s-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: #fff; padding: 10px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px -16px rgba(16, 24, 40, .25); }
  .s-nav.open { display: flex; }
  .s-navlink { padding: 12px; font-size: 16px; }
  .s-menu { display: inline-grid; }
  .hide-xs { display: none !important; }
}
@media (max-width: 420px) { .s-brand span { font-size: 15.5px; } .s-head-cta .btn.sm { padding: 0 11px; } }
@media (max-width: 359px) { .s-head-in { padding: 0 12px; gap: 6px; } .s-head-cta { gap: 4px; } }
.hero { background: radial-gradient(1200px 500px at 85% -10%, var(--b-soft), transparent 60%), radial-gradient(800px 400px at -10% 110%, var(--b-softer), transparent 60%), #fff; border-bottom: 1px solid var(--line-2); }
.hero-in { max-width: 1200px; margin: 0 auto; padding: 64px 24px 76px; display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; letter-spacing: -.03em; margin: 18px 0 18px; }
.lede { font-size: 18px; color: var(--ink-2); line-height: 1.6; max-width: 40em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.cta-row.center { justify-content: center; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points .ic { color: var(--b-strong); }
.hero-art { position: relative; padding: 26px 18px 44px 30px; }
.ha-window { background: #fff; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(16, 24, 60, .45), 0 2px 6px rgba(16, 24, 60, .06); overflow: hidden; }
.ha-bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ha-bar i { width: 9px; height: 9px; border-radius: 50%; background: #e1e4ec; }
.ha-bar span { margin-left: 10px; }
.ha-stage { position: relative; height: 270px; background: linear-gradient(140deg, #171c38 0%, var(--b-deep) 100%); overflow: hidden; }
.ha-board { position: absolute; left: 22px; top: 24px; width: 46%; background: #fff; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); }
.ha-board b { font-size: 15px; font-family: var(--f-head); }
.ha-board span { font-size: 13px; color: var(--ink-2); padding-left: 18px; position: relative; }
.ha-board span::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 3px; background: var(--b-fill); }
.ha-coach { position: absolute; right: 16px; bottom: -14px; }
.ha-coach .portrait { width: 190px; height: 190px; }
.ha-live { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 6px; background: #d92d20; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px; }
.ha-live .dot { background: #fff; width: 6px; height: 6px; }
.ha-name { position: absolute; right: 22px; bottom: 14px; color: #fff; font-size: 12.5px; font-weight: 650; background: rgba(0, 0, 0, .35); padding: 4px 10px; border-radius: 8px; }
.ha-people { display: flex; gap: 8px; padding: 12px 16px; align-items: center; justify-content: flex-end; min-height: 58px; }
.ha-more { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.ha-float { position: absolute; background: #fff; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgba(16, 24, 60, .4); padding: 12px 14px; }
.ha-prog { left: 0; bottom: 0; width: 230px; display: flex; flex-direction: column; gap: 6px; }
.ha-prog strong { font-size: 14px; }
.ha-k { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.ha-cert { right: 0; top: 0; display: flex; gap: 10px; align-items: center; }
.ha-cert > .ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--b-soft); color: var(--b-strong); }
.ha-cert div { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.ha-cert strong { font-size: 13.5px; color: var(--ink); }
.ha-chat { left: 6px; bottom: 116px; display: flex; gap: 8px; align-items: center; max-width: 230px; font-size: 12.5px; font-weight: 550; }
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 24px; padding: 40px 20px 48px; }
  .hero-art { padding: 18px 6px 34px 10px; max-width: 560px; }
}
@media (max-width: 520px) {
  .ha-stage { height: 210px; }
  .ha-coach .portrait { width: 140px; height: 140px; }
  .ha-board { width: 56%; padding: 12px; } .ha-board span { font-size: 12px; }
  .ha-chat { display: none; }
  .ha-prog { width: 200px; }
  .ha-cert { top: -6px; }
  .lede { font-size: 16.5px; }
}
.sec { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }
.sec.narrow { max-width: 820px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 6px; letter-spacing: -.02em; }
@media (max-width: 640px) { .sec { padding: 40px 16px; } }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.ccard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--sh); transition: transform .2s, box-shadow .2s; }
.ccard:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -24px rgba(16, 24, 60, .35); }
.ccard:focus-within { outline: 3px solid var(--b-fill); outline-offset: 2px; }
.ccard-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.cover { width: 100%; height: 100%; }
.tag-live { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #a8190f; font-size: 12px; font-weight: 750; }
.tag-live .ic { width: 15px; height: 15px; }
.ccard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ccard h3 { font-size: 18.5px; }
.ccard h3 a { color: var(--ink); }
.ccard h3 a:hover { text-decoration: none; color: var(--b-strong); }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.stretch:focus-visible { outline: none; }
.ccard p { color: var(--muted); font-size: 14.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.meta-row span { display: inline-flex; align-items: center; gap: 5px; }
.meta-row .ic { width: 16px; height: 16px; }
.price-row { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; }
.price-row strong { font-size: 20px; letter-spacing: -.02em; }
.price-row s, .pc-price s, .sticky-buy s { color: var(--muted); font-size: 14px; }
.how { max-width: none; background: var(--bg); border-block: 1px solid var(--line-2); }
.how > * { max-width: 1152px; margin-left: auto; margin-right: auto; }
.steps { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.step-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--b-soft); color: var(--b-strong); margin-bottom: 14px; }
.steps h3 { font-size: 16px; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 14px; margin: 0; }
@media (max-width: 1080px) { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } .steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; } .step-ic { grid-row: span 2; margin: 0; } }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.lrows { list-style: none; padding: 0; margin: 0 0 16px; }
.lrows.pad { padding: 6px 18px; }
.lday { font-size: 12.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 0 6px; }
.lrow { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.lrow:last-child { border-bottom: 0; }
.lrow-time { display: flex; flex-direction: column; }
.lrow-time strong { font-size: 15px; }
.lrow-time span { font-size: 12.5px; color: var(--muted); }
.lrow-main { display: flex; flex-direction: column; min-width: 0; }
.lrow-title { font-weight: 650; }
.lrow-main .muted { font-size: 13.5px; }
.lrow-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lrow.cancelled .lrow-title { text-decoration: line-through; color: var(--muted); }
@media (max-width: 640px) {
  .lrow { grid-template-columns: 70px 1fr; }
  .lrow-side { grid-column: 1 / -1; justify-content: flex-start; padding-left: 84px; }
}
.coach-card { background: linear-gradient(180deg, var(--b-softer), #fff); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.coach-card .portrait { margin-bottom: 14px; }
.coach-card h2 { font-size: 24px; margin: 6px 0 2px; }
.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 4px; font-weight: 650; font-size: 16px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { padding: 0 4px 18px; color: var(--ink-2); margin: 0; }
.s-foot { background: #0f1222; color: #c8ccdc; margin-top: 40px; }
.s-foot-in { max-width: 1200px; margin: 0 auto; padding: 40px 24px 28px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.s-foot .s-brand { color: #fff; }
.s-foot p { color: #a5abc2; margin: 10px 0 0; font-size: 14px; }
.s-foot nav { display: flex; flex-direction: column; gap: 8px; }
.s-foot nav a { color: #dfe2ee; font-size: 14px; }
.s-foot-small { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid #262a40; padding-top: 18px; font-size: 13px; color: #9aa0b8; }
@media (max-width: 640px) { .s-foot-in { grid-template-columns: 1fr; padding: 32px 16px 96px; } }
.page-head { background: linear-gradient(180deg, var(--b-softer), #fff); border-bottom: 1px solid var(--line-2); }
.page-head-in { max-width: 1200px; margin: 0 auto; padding: 44px 24px 28px; }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); margin: 8px 0 10px; letter-spacing: -.025em; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 22px; }
@media (max-width: 640px) { .page-head-in { padding: 32px 16px 20px; } .filters .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; width: 100%; } .search { max-width: none; } }

/* course page */
.cp-hero { background: linear-gradient(135deg, #12162b 0%, var(--b-deep) 100%); color: #e9ebf5; }
.cp-hero-in { max-width: 1200px; margin: 0 auto; padding: 36px 24px 44px; display: grid; grid-template-columns: 1fr 370px; gap: 40px; align-items: start; }
.cp-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.025em; margin: 10px 0 12px; }
.cp-hero .eyebrow { color: #c9c6ff; }
.cp-hero .lede { color: #d4d7e6; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13.5px; color: #b3b8cf; margin-bottom: 18px; }
.crumbs a { color: #d9dcf0; }
.crumbs .ic { width: 15px; height: 15px; }
.cp-coach { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.cp-coach div { display: flex; flex-direction: column; font-size: 13.5px; color: #b3b8cf; }
.cp-coach strong { color: #fff; font-size: 15px; }
.cp-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; font-size: 14px; color: #d4d7e6; }
.cp-facts li { display: flex; align-items: center; gap: 7px; }
.cp-facts .ic { width: 17px; height: 17px; color: #a9a5ff; }
.price-card { position: relative; z-index: 2; margin-bottom: -320px; background: #fff; color: var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -28px rgba(10, 14, 40, .55); border: 1px solid var(--line); }
.pc-cover { aspect-ratio: 16 / 9; }
.pc-body { padding: 20px; }
.pc-price { display: flex; align-items: center; gap: 10px; }
.pc-price strong { font-size: 30px; letter-spacing: -.03em; }
.incl { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.incl li { display: flex; gap: 10px; align-items: flex-start; }
.incl .ic { color: var(--b-strong); width: 18px; height: 18px; margin-top: 1px; }
.cp-body { max-width: 1200px; margin: 0 auto; padding: 36px 24px 40px; padding-right: calc(24px + 370px + 40px); }
.cp-sec { margin-bottom: 40px; }
.cp-sec h2 { font-size: 24px; margin-bottom: 14px; letter-spacing: -.02em; }
.cp-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cp-sec-head h2 { margin: 0; }
.outcomes { list-style: none; padding: 20px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--b-softer); }
.outcomes li { display: flex; gap: 10px; font-size: 15px; }
.outcomes .ic { color: var(--b-strong); margin-top: 2px; }
.curric details { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.curric summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; background: #fafbfd; font-weight: 600; }
.curric summary::-webkit-details-marker { display: none; }
.curric summary > span:first-child { flex: 1; }
.curric summary b { color: var(--b-strong); margin-right: 6px; }
.curric summary .ic { transition: transform .2s; color: var(--muted); }
.curric details[open] summary .ic { transform: rotate(180deg); }
.curric ul { list-style: none; padding: 4px 16px 8px; margin: 0; }
.curric li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; }
.curric li:first-child { border-top: 0; }
.lt { color: var(--muted); display: flex; }
.lt .ic { width: 18px; height: 18px; }
.ln { flex: 1; min-width: 0; }
.lock { color: #8a90a3; display: flex; }
.lock .ic { width: 17px; height: 17px; }
.coach-inline { display: flex; gap: 18px; align-items: flex-start; }
.coach-inline div { display: flex; flex-direction: column; }
.coach-inline p { margin-top: 8px; color: var(--ink-2); }
.sticky-buy { display: none; }
@media (max-width: 1000px) {
  .cp-hero-in { grid-template-columns: 1fr; gap: 24px; padding: 28px 20px 32px; }
  .price-card { margin-bottom: 0; max-width: 460px; }
  .price-card .pc-cover { display: none; }
  .cp-body { padding: 28px 20px 110px; }
  .sticky-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(16, 24, 40, .2); }
  .sticky-buy > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .sticky-buy .badge { white-space: normal; line-height: 1.25; height: auto; min-height: 24px; padding: 3px 9px; }
  .sticky-buy strong { font-size: 20px; }
  .outcomes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .coach-inline { flex-direction: column; } }

/* checkout */
.co { background: var(--bg); }
.co-in { max-width: 1120px; margin: 0 auto; padding: 28px 24px 56px; display: grid; grid-template-columns: 1fr 390px; gap: 32px; align-items: start; }
.co-main h1 { font-size: 30px; margin: 0 0 16px; letter-spacing: -.02em; }
.co-step { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 6px; margin: 0 0 16px; background: #fff; box-shadow: var(--sh); min-width: 0; }
.co-step legend { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 16px; padding: 0 6px; margin-left: -6px; }
.co-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--b-fill); color: var(--b-ink); font-size: 13px; }
.co-step > p { margin-top: 4px; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.method { position: relative; }
.method input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.method-box { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1.5px solid #d5d9e4; border-radius: 12px; height: 100%; }
.method-box .ic { width: 24px; height: 24px; color: var(--ink-2); margin-bottom: 4px; }
.method-box small { color: var(--muted); font-size: 12.5px; }
.method input:checked + .method-box { border-color: var(--b-fill); background: var(--b-softer); box-shadow: 0 0 0 1px var(--b-fill) inset; }
.method input:checked + .method-box .ic { color: var(--b-strong); }
.method input:focus-visible + .method-box { outline: 3px solid var(--b-fill); outline-offset: 2px; }
.co-side { position: sticky; top: calc(var(--dbar-h) + 86px); }
.co-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--sh); margin-bottom: 12px; }
.co-item { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 14px; }
.co-item .cover { border-radius: 10px; aspect-ratio: 16 / 10; height: auto; }
.co-item div { display: flex; flex-direction: column; gap: 2px; }
.coupon { display: flex; gap: 8px; }
.coupon input { text-transform: uppercase; }
.coupon input::placeholder { text-transform: none; }
.coupon-msg { margin: 8px 0 12px; color: var(--muted); min-height: 20px; }
.sum { margin: 0; display: grid; gap: 8px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.sum dt { color: var(--ink-2); }
.sum dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-sub dt, .sum-sub dd { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.sum-disc dd { color: var(--ok); }
.sum-total { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.sum-total dt, .sum-total dd { font-size: 18px; font-weight: 800; color: var(--ink); }
.gw { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.gw-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.gw-head div { flex: 1; display: flex; flex-direction: column; }
.gw-amt { font-size: 20px; }
.gw-method { display: flex; align-items: center; gap: 8px; padding: 12px 0; font-weight: 600; }
.gw .notice { margin: 0; }
@media (max-width: 900px) { .co-in { grid-template-columns: 1fr; padding: 20px 16px 40px; } .co-side { position: static; grid-row: 1; } .co-main { grid-row: 2; } }
@media (max-width: 520px) { .methods { grid-template-columns: 1fr; } .method-box { flex-direction: row; align-items: center; gap: 10px; } .method-box .ic { margin: 0; } .method-box small { margin-left: auto; } }
.thanks { text-align: center; padding-top: 56px; }
.thanks-ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: var(--b-fill); color: var(--b-ink); box-shadow: 0 0 0 10px var(--b-soft); }
.thanks-ic .ic { width: 36px; height: 36px; stroke-width: 2.4; }
.thanks h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 10px; letter-spacing: -.02em; }
.thanks .notice { text-align: left; max-width: 560px; margin: 18px auto 0; }
.next-steps { text-align: left; max-width: 440px; margin: 28px auto 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }

/* sign in */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--dbar-h)); background: #fff; }
.auth-art { background: radial-gradient(600px 400px at 20% 10%, rgba(255, 255, 255, .14), transparent 60%), linear-gradient(150deg, var(--b-fill), var(--b-deep)); color: #fff; display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-art-in { max-width: 380px; }
.auth-art .logo { background: #fff; color: var(--b-strong); }
.auth-quote { font-family: var(--f-head); font-size: 34px; line-height: 1.15; font-weight: 750; letter-spacing: -.02em; margin: 40px 0 28px; }
.auth-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.ac { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-weight: 650; font-size: 14px; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 40px; max-width: 480px; width: 100%; margin: 0 auto; }
.auth-main h1 { font-size: 28px; margin-bottom: 18px; letter-spacing: -.02em; }
.auth-brand-sm { display: none; margin-bottom: 24px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--line-2); margin-bottom: 16px; }
.tab { flex: 1; text-align: center; padding: 9px; border-radius: 9px; font-weight: 650; color: var(--ink-2); }
.tab:hover { text-decoration: none; background: rgba(255, 255, 255, .6); }
.tab[aria-selected="true"] { background: #fff; color: var(--b-strong); box-shadow: var(--sh); }
.demo-cred { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: #fff8e8; border: 1px solid #f1d79c; color: #4f3600; font-size: 13.5px; margin-bottom: 18px; }
.demo-cred .ic { color: #a26200; flex: none; }
.demo-cred div { display: flex; flex-direction: column; gap: 4px; }
.demo-cred code { background: rgba(255, 255, 255, .7); }
.auth-form .btn { margin: 6px 0 14px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-brand-sm { display: inline-flex; } .auth-main { padding: 28px 16px 40px; justify-content: flex-start; } }

/* ---------- app shell (student + admin) ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - var(--dbar-h)); background: var(--bg); }
.side { position: sticky; top: var(--dbar-h); height: calc(100vh - var(--dbar-h)); display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; background: #fff; border-right: 1px solid var(--line); overflow-y: auto; z-index: 20; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-family: var(--f-head); font-weight: 750; font-size: 16px; color: var(--ink); }
.side-brand:hover { text-decoration: none; }
.side-sub { font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 10px 10px; margin-top: -10px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; position: relative; }
.nav-item:hover { background: var(--line-2); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--b-soft); color: var(--b-strong); }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-left: auto; animation: pulse 1.6s infinite; }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 750; display: grid; place-items: center; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.side-me { display: flex; align-items: center; gap: 10px; padding: 8px; }
.side-me div { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.side-me strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-me span { font-size: 12.5px; color: var(--muted); }
.shell-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: var(--dbar-h); z-index: 15; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 32px; background: rgba(245, 246, 250, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-title { font-size: 20px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-brand { display: none; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.bell-n { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--live); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.avatar-btn { border: 0; background: none; padding: 0; border-radius: 50%; }
.admin-menu { display: none; }
.content { padding: 26px 32px 56px; width: 100%; max-width: 1120px; }
.content.wide { max-width: 1320px; }
.page-intro { margin-bottom: 18px; }
.tabbar { display: none; }
.side-scrim { display: none; }
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hello h2 { font-size: 26px; letter-spacing: -.02em; }
.hello p { margin: 4px 0 0; }
@media (max-width: 959px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell > .side { display: none; }
  .topbar { padding: 0 12px 0 16px; height: 58px; }
  .top-brand { display: inline-flex; }
  .top-title { font-size: 18px; }
  .content { padding: 18px 16px 100px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 62px; color: var(--muted); font-size: 11px; font-weight: 650; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--b-strong); }
  .tabbar a[aria-current="page"] .ic { background: var(--b-soft); border-radius: 999px; width: 48px; padding: 3px 0; height: 26px; }
  .shell.admin > .side { display: flex; position: fixed; left: 0; top: var(--dbar-h); bottom: 0; width: min(290px, 84vw); transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 40px -20px rgba(0, 0, 0, .3); z-index: 45; height: auto; }
  .shell.admin.side-open > .side { transform: none; }
  .shell.admin.side-open .side-scrim { display: block; position: fixed; inset: var(--dbar-h) 0 0 0; background: rgba(10, 12, 26, .45); z-index: 44; }
  .admin-menu { display: inline-grid; }
  .shell.admin .content { padding-bottom: 48px; }
  .hello h2 { font-size: 22px; }
}

/* student home */
.home-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.home-grid > .resume { grid-column: span 7; }
.home-grid > .next-live { grid-column: span 5; }
.home-grid > .my-mini { grid-column: span 5; }
.home-grid > .anns { grid-column: span 7; }
.home-grid > .comm-mini { grid-column: span 7; }
.home-grid > .certs-mini { grid-column: span 5; }
.home-grid > .card { padding: 20px; }
.home-grid > .resume { padding: 0; display: grid; grid-template-columns: 42% 1fr; overflow: hidden; }
.resume-cover svg { height: 100%; min-height: 200px; }
.resume-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.resume-body h3 { font-size: 21px; letter-spacing: -.015em; }
.resume-prog { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.resume-next { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin: 0; color: var(--ink-2); }
.resume-next .ic { color: var(--b-strong); }
.next-live { display: flex; flex-direction: column; gap: 6px; background: linear-gradient(160deg, #fff 40%, var(--b-softer)); }
.next-live h3 { font-size: 19px; }
.next-live p { margin: 0; }
.nl-when { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 650; margin: 8px 0; font-size: 14.5px; }
.next-live .btn-row { margin-top: auto; padding-top: 8px; }
.ann-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ann-list li { display: flex; gap: 12px; padding: 10px 6px; border-radius: 10px; }
.ann-list li + li { border-top: 1px solid var(--line-2); }
.ann-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.ann-list li.unread .ann-dot { background: var(--b-fill); }
.ann-list strong { display: block; font-size: 14.5px; }
.ann-list p { margin: 2px 0 4px; font-size: 14px; color: var(--ink-2); }
.ann-list.big li { padding: 14px 6px; }
.mini-courses, .mini-posts, .mini-live, .mini-pay, .cert-chips { list-style: none; padding: 0; margin: 0; }
.mini-courses li a { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 12px; color: var(--ink); }
.mini-courses li a:hover { background: var(--line-2); text-decoration: none; }
.mini-courses li a > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mini-courses strong { font-size: 14.5px; }
.mini-courses .ic { color: var(--muted); }
.mini-posts li { display: flex; gap: 12px; padding: 10px 0; }
.mini-posts li + li { border-top: 1px solid var(--line-2); }
.mini-posts p { margin: 0 0 2px; font-size: 14px; }
.mini-posts .portrait { border-radius: 50%; }
.cert-chips { display: flex; flex-direction: column; gap: 8px; }
.cert-chips a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--b-softer); border: 1px solid var(--b-line); color: var(--ink); font-weight: 650; font-size: 14.5px; }
.cert-chips a:hover { text-decoration: none; background: var(--b-soft); }
.cert-chips .ic { color: var(--b-strong); }
@media (max-width: 1100px) { .home-grid > .card { grid-column: span 12 !important; } }
@media (max-width: 640px) { .home-grid > .resume { grid-template-columns: 1fr; } .resume-cover svg { min-height: 0; aspect-ratio: 16 / 7; height: auto; } .home-grid { gap: 14px; } }

/* my courses */
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.mc { overflow: hidden; display: flex; flex-direction: column; }
.mc-cover { position: relative; aspect-ratio: 16 / 8; }
.mc-cover .badge { position: absolute; top: 12px; left: 12px; }
.mc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mc-prog { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 10px; }
.mc .btn-row { margin-top: auto; }
.more-courses { margin-top: 40px; }

/* player */
.player { background: #fff; min-height: calc(100vh - var(--dbar-h)); }
.pl-top { position: sticky; top: var(--dbar-h); z-index: 25; height: 62px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); }
.pl-top-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 0 1 auto; }
.pl-top-t .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-top-bar { flex: 1; max-width: 280px; }
.pl-top .top-brand { display: inline-flex; margin-left: auto; }
.pl-toggle { display: none; }
.pl-body { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.pl-side { position: sticky; top: calc(var(--dbar-h) + 62px); height: calc(100vh - var(--dbar-h) - 62px); overflow-y: auto; background: var(--bg); border-right: 1px solid var(--line); }
.pl-curric-head { padding: 18px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); background: #fff; }
.pl-curric-head .btn { margin-top: 6px; }
.pl-mod h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 16px 18px 6px; }
.pl-mod ol { list-style: none; margin: 0; padding: 0 8px 6px; }
.pl-mod a { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-size: 14px; }
.pl-mod a:hover { background: #fff; text-decoration: none; }
.pl-mod a.cur { background: #fff; color: var(--ink); font-weight: 650; box-shadow: var(--sh); outline: 1.5px solid var(--b-line); }
.pl-check { display: flex; color: #a0a6b8; }
.pl-mod a.done .pl-check { color: var(--b-strong); }
.pl-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.pl-meta .ic { width: 14px; height: 14px; }
.pl-main { min-width: 0; display: flex; flex-direction: column; }
.pl-lesson { padding: 32px 48px 24px; max-width: 860px; width: 100%; }
.pl-lesson h1 { font-size: clamp(24px, 3vw, 32px); margin: 12px 0 4px; letter-spacing: -.02em; }
.prose p { font-size: 16.5px; line-height: 1.7; color: #262c40; margin-bottom: 16px; }
.ws { display: flex; align-items: center; gap: 14px; padding: 16px; margin: 6px 0 20px; }
.ws > .ic { width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--b-soft); color: var(--b-strong); }
.ws > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pl-nav { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 48px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); margin-top: auto; }
.done-btn { color: var(--ok) !important; border-color: #b7e2cb !important; background: var(--ok-bg) !important; }
.pl-scrim { display: none; }
@media (max-width: 959px) {
  .pl-body { grid-template-columns: minmax(0, 1fr); }
  .pl-toggle { display: inline-flex; margin-left: auto; }
  .pl-top .top-brand { display: none; }
  .pl-top-bar { display: none; }
  .pl-side { position: fixed; left: 0; top: var(--dbar-h); bottom: 0; height: auto; width: min(340px, 88vw); z-index: 46; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 40px -20px rgba(0, 0, 0, .3); }
  .player.drawer-open .pl-side { transform: none; }
  .player.drawer-open .pl-scrim { display: block; position: fixed; inset: var(--dbar-h) 0 0 0; background: rgba(10, 12, 26, .45); z-index: 45; }
  .pl-lesson { padding: 22px 16px 20px; }
  .pl-nav { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .pl-nav .btn.primary, .pl-nav .done-btn { flex: 1; }
}
@media (max-width: 420px) { .pl-toggle span { display: none; } .pl-toggle { width: 40px; padding: 0; } .pl-nav .btn.primary, .pl-nav .done-btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.2; height: auto; min-height: 42px; padding: 6px 12px; } }

/* community */
.feed { max-width: 760px; }
.feed-filters { margin-bottom: 14px; }
@media (max-width: 640px) {
  .feed-filters { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .composer > .av, .composer > .face-coach { display: none; }
}
.feed-unans { margin: 0 0 14px; }
.composer { display: flex; gap: 12px; padding: 16px; margin-bottom: 16px; }
.composer-main { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.composer textarea { min-height: 64px; }
.composer-row { display: flex; gap: 8px; flex-wrap: wrap; }
.composer-row select { width: auto; flex: 1 1 140px; min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.composer-row .btn { margin-left: auto; }
.posts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.post { padding: 16px 18px; }
.post.pinned { border-color: var(--b-line); background: linear-gradient(180deg, var(--b-softer), #fff 60%); }
.post.is-hidden { opacity: .65; border-style: dashed; }
.post-pin { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--b-strong); margin-bottom: 10px; }
.post-pin.warn { color: var(--warn); }
.post-pin .ic { width: 15px; height: 15px; }
.post-head { display: flex; gap: 12px; align-items: center; }
.post-who { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.post-who .muted { flex-basis: 100%; }
.post-tools { display: flex; gap: 2px; }
.post-text { margin: 12px 0 10px; white-space: pre-wrap; font-size: 15px; overflow-wrap: anywhere; }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.post-actions .pa { white-space: nowrap; }
.pa { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.pa:hover { background: var(--line-2); }
.pa .ic { width: 17px; height: 17px; }
.pa.on { color: #be123c; border-color: #fbc8d2; background: #fff1f3; }
.pa.on .ic { fill: currentColor; }
.thread { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.thread ul { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.cmt { display: flex; gap: 10px; }
.cmt > div { background: var(--bg); border-radius: 12px; padding: 8px 12px; flex: 1; min-width: 0; }
.cmt-who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.cmt p { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.reply { display: flex; gap: 8px; align-items: center; }
.reply input { min-height: 38px; border-radius: 999px; }

/* live list extras */
.lrows.past .lrow-time strong { font-size: 14px; }

/* certificates */
.certname { display: flex; align-items: flex-end; gap: 12px; padding: 16px 18px; margin-bottom: 20px; max-width: 640px; }
.certname .field { flex: 1; margin: 0; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.cert-card { overflow: hidden; display: flex; flex-direction: column; }
.cert-thumb { display: block; background: #f3f1ea; padding: 14px; }
.cert-thumb svg, .cert-big svg { width: 100%; height: auto; box-shadow: 0 8px 24px -12px rgba(30, 30, 60, .35); }
.cert-meta { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cert-meta .btn-row { margin-top: auto; }
.cert-card.locked .cert-lock { aspect-ratio: 1123 / 794; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: repeating-linear-gradient(45deg, #f6f7fa, #f6f7fa 10px, #f0f1f5 10px, #f0f1f5 20px); color: var(--muted); font-weight: 650; margin: 14px 14px 0; border-radius: 8px; }
.cert-card.locked .cert-lock .ic { width: 36px; height: 36px; color: #a0a6b8; }
.cert-view { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; overflow: hidden; }
.cert-big { background: #f3f1ea; padding: 28px; }
.cert-side { padding: 22px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 960px) { .cert-view { grid-template-columns: 1fr; } .cert-side { border-left: 0; border-top: 1px solid var(--line); } .cert-big { padding: 14px; } }
.celebrate { position: absolute; inset: 0 0 auto 0; height: 0; pointer-events: none; }
.celebrate i { position: absolute; top: -10px; left: calc(var(--i) * 5.5%); width: 8px; height: 14px; border-radius: 2px; background: hsl(calc(var(--i) * 40) 85% 55%); animation: fall 1.6s ease-in calc(var(--i) * 40ms) forwards; opacity: 0; }
@keyframes fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(320px) rotate(540deg); } }
#dlg .cert-thumb { border-radius: 12px; margin-bottom: 14px; }

/* ---------- live room ---------- */
.room { background: #0a0d1b; color: #e6e8f2; min-height: calc(100vh - var(--dbar-h)); display: flex; flex-direction: column; }
@media (min-width: 900px) { .room { height: calc(100vh - var(--dbar-h) - 36px); min-height: 560px; } }
.room :focus-visible { outline-color: #ffd978; }
.room-banner { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: #2a230d; color: #ffe39e; font-size: 13.5px; border-bottom: 1px solid #4a3c12; }
.room-banner .ic { color: #ffc53d; width: 18px; height: 18px; }
.room-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.room-back { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #1a1f36; color: #fff; }
.room-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.room-title h1 { color: #fff; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-title span { color: #a8aec6; font-size: 13px; }
.room .badge.live { background: #3a1412; color: #ffb4ab; font-variant-numeric: tabular-nums; }
.room-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.stage { padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.stage-main { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; border-radius: 16px; overflow: hidden; background: radial-gradient(500px 300px at 75% 30%, rgba(255, 255, 255, .08), transparent 60%), linear-gradient(140deg, #1b2142, var(--b-deep)); }
.stage-board { position: absolute; left: 4%; top: 7%; width: 50%; background: #fff; color: var(--ink); border-radius: 12px; padding: 4% 4.5%; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 18px 30px -14px rgba(0, 0, 0, .6); }
.stage-board b { font-family: var(--f-head); font-size: clamp(14px, 1.6vw, 22px); line-height: 1.2; }
.stage-board span { font-size: clamp(11px, 1.05vw, 15px); padding-left: 16px; position: relative; color: var(--ink-2); line-height: 1.35; }
.stage-board span::before { content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 8px; border-radius: 3px; background: var(--b-fill); }
.stage-coach { position: absolute; right: 5%; bottom: -4%; height: 86%; aspect-ratio: 1; }
.stage-coach svg { width: 100%; height: 100%; }
.stage-tag { position: absolute; left: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .5); color: #fff; padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.stage-tag .ic { width: 15px; height: 15px; color: #7ee2b0; }
.stage-self { position: absolute; right: 12px; top: 12px; width: 22%; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #262c4a; z-index: 2; display: grid; place-items: center; border: 2px solid #7ee2b0; }
.stage-self svg { width: 70%; height: auto; }
.stage-self .stage-tag { font-size: 10.5px; left: 6px; bottom: 6px; padding: 3px 6px; }
.tiles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; height: 88px; overflow: hidden; flex: none; }
.tile { position: relative; flex: 1 0 112px; height: 88px; border-radius: 12px; background: #161b31; display: grid; place-items: center; border: 1px solid #232947; }
.tile.you { border-color: #4d5a99; }
.tile.cam-on { border-color: #7ee2b0; box-shadow: 0 0 0 1px #7ee2b0 inset; }
.tile-n { position: absolute; left: 8px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #e6e8f2; }
.tile-n .ic { width: 13px; height: 13px; color: #7ee2b0; }
.tile-n .ic.off { color: #ff9e93; }
.tile-hand { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: #ffc53d; color: #3d2a00; display: grid; place-items: center; }
.tile-hand .ic { width: 16px; height: 16px; }
.tile-cam { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tile-cam em { position: absolute; top: 6px; left: 8px; font-size: 10.5px; color: #7ee2b0; font-style: normal; }
.tile.more .more-n { font-size: 18px; font-weight: 750; color: #c3c8de; }
.tile[hidden] { display: none !important; }
.rpanel { background: #10142a; border-left: 1px solid #1f2442; display: flex; flex-direction: column; min-height: 0; }
.rtabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid #1f2442; }
.rtab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: #a8aec6; font-weight: 650; font-size: 13.5px; }
.rtab[aria-selected="true"] { background: #1f2547; color: #fff; }
.rtab .ic { width: 17px; height: 17px; }
.rchat { list-style: none; margin: 0; padding: 12px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.rc-msg { display: flex; gap: 8px; }
.rc-msg > div { background: #181d38; border-radius: 12px; padding: 7px 11px; min-width: 0; }
.rc-msg.mine > div { background: #23305e; }
.rc-who { font-size: 12px; font-weight: 700; color: #b8bdd8; }
.rc-msg p { margin: 2px 0 0; font-size: 14px; color: #eef0f8; overflow-wrap: anywhere; }
.rc-host { font-size: 10.5px; font-weight: 800; background: #3b3170; color: #d8d0ff; padding: 1px 6px; border-radius: 5px; }
.rc-sys { align-self: center; font-size: 12px; color: #8a90ab; background: #151a33; padding: 3px 10px; border-radius: 999px; }
.rsend { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #1f2442; }
.rsend input { background: #181d38; border-color: #2a3058; color: #fff; border-radius: 999px; min-height: 40px; }
.rsend input::placeholder { color: #8a90ab; }
.rpeople { list-style: none; margin: 0; padding: 10px 14px; overflow-y: auto; display: grid; gap: 4px; }
.rpeople li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.rpeople li span:not(.av) { flex: 1; }
.rpeople .portrait { border-radius: 50%; }
.rpeople .ic { color: #ffc53d; }
.controls { position: sticky; bottom: 0; flex: none; display: flex; justify-content: center; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(10, 13, 27, .96); border-top: 1px solid #1a1f38; z-index: 5; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; padding: 8px 10px; border-radius: 14px; border: 1px solid #262c4c; background: #161b33; color: #e6e8f2; font-size: 12px; font-weight: 650; }
.ctl:hover { background: #1f2547; text-decoration: none; color: #fff; }
.ctl .ic { width: 22px; height: 22px; }
.ctl.off .ic { color: #ff9e93; }
.ctl.on { background: #1f2a55; border-color: #3d4c8f; }
.ctl.raised { background: #ffc53d; color: #3d2a00; border-color: #ffc53d; }
.ctl.raised .ic { color: #3d2a00; }
.ctl.leave { background: #c0261b; border-color: #c0261b; color: #fff; }
.ctl.leave:hover { background: #a11f16; }
.ctl.panel-toggle { display: none; }
.room-gone { padding: 60px 20px; text-align: center; color: #fff; display: flex; flex-direction: column; gap: 16px; align-items: center; }
@media (max-width: 899px) {
  .room-body { grid-template-columns: minmax(0, 1fr); }
  .stage { padding: 0 12px 12px; }
  .stage-main { flex: none; aspect-ratio: 16 / 9; }
  .stage-coach { height: 84%; }
  .tiles { height: auto; display: grid; grid-template-columns: repeat(4, 1fr); }
  .tile { height: auto; aspect-ratio: 4 / 3; }
  .rpanel { display: none; position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: 62vh; max-height: none; z-index: 50; border-left: 0; border-top: 1px solid #2a3058; border-radius: 18px 18px 0 0; box-shadow: 0 -20px 40px rgba(0, 0, 0, .5); padding-bottom: 104px; }
  .rpanel.open { display: flex; }
  .ctl.panel-toggle { display: flex; }
  .controls { z-index: 55; gap: 6px; padding-left: 8px; padding-right: 8px; }
  .ctl { min-width: 0; flex: 1; padding: 8px 4px; font-size: 11px; }
  .tiles { gap: 6px; }
  .tile-n { font-size: 10.5px; left: 5px; bottom: 3px; }
  .tile .av { width: 34px !important; height: 34px !important; font-size: 13px !important; }
  .room-banner { font-size: 12.5px; align-items: flex-start; }
  .stage-board { width: 56%; gap: 4px; padding: 10px 12px; }
  .stage-board span:nth-of-type(n+3) { display: none; }
  .stage-tag { font-size: 11.5px; left: 8px; bottom: 8px; padding: 3px 8px; }
}

/* ---------- admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l ic" "v ic" "s s"; gap: 2px 10px; }
.kpi-ic { grid-area: ic; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--b-soft); color: var(--b-strong); }
.kpi-l { grid-area: l; font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-v { grid-area: v; font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-s { grid-area: s; font-size: 12.5px; margin-top: 4px; }
.kpi-s .up { color: var(--ok); font-weight: 700; }
.kpi-s .down { color: var(--err); font-weight: 700; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpis { gap: 10px; } .kpi { padding: 12px; grid-template-columns: 1fr; grid-template-areas: "l" "v" "s"; } .kpi-ic { display: none; } .kpi-v { font-size: 21px; } }
.ov-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.ov-grid > .card { padding: 18px 20px; min-width: 0; }
.ov-chart { grid-column: span 8; }
.ov-live { grid-column: span 4; }
.ov-pay { grid-column: span 5; }
.ov-courses { grid-column: span 7; }
.ov-comm { grid-column: span 12; }
@media (max-width: 1100px) { .ov-grid > .card { grid-column: span 12; } }
.chart { margin: 0; }
.chart figcaption { display: flex; flex-direction: column; margin-bottom: 18px; }
.chart figcaption strong { font-size: 16px; }
.chart-plot { display: grid; grid-template-columns: 52px minmax(0, 1fr); height: 230px; padding-bottom: 26px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--muted); padding-right: 10px; text-align: right; transform: translateY(-8px); height: calc(100% + 16px); }
.chart-cols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; height: 100%; border-bottom: 1.5px solid #c9cedb; background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 50%; background-position: 0 0; position: relative; }
.ccol { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; border: 0; background: transparent; padding: 0; border-radius: 6px 6px 0 0; }
.cbar { position: relative; width: min(46px, 70%); background: var(--b-fill); opacity: .55; border-radius: 4px 4px 0 0; min-height: 2px; transition: opacity .15s; }
.ccol.cur .cbar { opacity: 1; }
.ccol:hover .cbar, .ccol:focus-visible .cbar { opacity: 1; }
.ctip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); background: #161a2c; color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 8px; white-space: nowrap; display: none; flex-direction: column; z-index: 3; box-shadow: var(--sh-lg); }
.ctip b { font-size: 14px; }
.ccol:hover .ctip, .ccol:focus-visible .ctip { display: flex; }
.ccol:first-child .ctip { left: 0; transform: none; }
.ccol:last-child .ctip { left: auto; right: 0; transform: none; }
.clab { position: absolute; bottom: -24px; left: 0; right: 0; text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ccol.cur .clab { color: var(--ink); }
.chart-table { margin-top: 12px; }
.chart-table summary { cursor: pointer; font-size: 13.5px; font-weight: 650; color: var(--b-strong); display: inline-block; }
.chart-table table { margin-top: 10px; }
.mini-live li { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.mini-live li:first-child { border-top: 0; }
.ml-t { display: flex; flex-direction: column; }
.ml-t strong { font-size: 14px; }
.ml-t span { font-size: 12px; color: var(--muted); }
.ml-m { display: flex; flex-direction: column; min-width: 0; }
.ml-m b, .ml-m .muted { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-m .muted { font-size: 13px; }
.mini-pay li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.mini-pay li:first-child { border-top: 0; }
.mini-pay li > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mini-pay b { font-size: 14px; }
.mini-pay .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-r { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.list-head { margin-bottom: 16px; }
.acourses { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
@media (max-width: 420px) { .acourses { grid-template-columns: 1fr; } }
.acourse { display: grid; grid-template-columns: 130px 1fr; overflow: hidden; }
.ac-cover svg { height: 100%; }
.ac-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ac-top { display: flex; align-items: center; gap: 8px; }
.acourse h2 a { color: var(--ink); }
.ac-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 18px; margin: 0; }
.ac-stats dt { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ac-stats dd { margin: 0; font-weight: 700; font-size: 14px; }
@media (max-width: 520px) { .acourse { grid-template-columns: 1fr; } .ac-cover { aspect-ratio: 16 / 6; } .ac-stats { grid-template-columns: repeat(2, auto); } }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
@media (max-width: 640px) { .toolbar .sel { flex: 1 1 140px; } .sel select { min-width: 0; } }

/* editor */
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ed-main, .ed-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ed-side { position: sticky; top: calc(var(--dbar-h) + 80px); }
.ed-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ed-mod { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 14px; background: #fbfbfd; }
.ed-mod-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ed-mod-n { font-size: 12px; font-weight: 750; color: var(--b-strong); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.ed-mod-head input { font-weight: 650; }
.ed-lessons { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.ed-lesson { display: grid; grid-template-columns: 26px minmax(0, 1fr) 130px 92px auto auto; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.ed-ltype { color: var(--muted); display: flex; justify-content: center; }
.ed-lesson input[type="text"], .ed-lesson select, .ed-lesson input[type="number"] { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.ed-mins { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ed-lbtns { display: flex; }
.ed-lbtns .icon-btn { width: 32px; height: 32px; }
.ed-lbtns .ic { width: 17px; height: 17px; }
.ed-cover { border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; margin-bottom: 12px; }
.hue { padding: 0; min-height: 0; accent-color: var(--b-fill); }
.ed-bar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; padding: 12px 16px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -10px 30px -18px rgba(16, 24, 40, .3); }
.ed-bar > span { margin-right: auto; }
@media (max-width: 1100px) { .ed-grid { grid-template-columns: 1fr; } .ed-side { position: static; } }
@media (max-width: 760px) {
  .ed-lesson { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .ed-lesson select, .ed-lesson .ed-mins, .ed-lesson .check { grid-column: 2 / -1; }
  .ed-lesson .ed-lbtns { grid-column: 3; grid-row: 1; }
  .ed-lesson .ed-ltitle { grid-column: 2; grid-row: 1; }
  .ed-bar .muted { display: none; }
}

/* student dialog */
.st-courses, .st-pays { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.st-courses li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.st-courses li > div { display: flex; flex-direction: column; }
.st-pays li { display: grid; grid-template-columns: 100px 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.st-pays .badge { justify-self: end; }
@media (max-width: 520px) { .st-pays li { grid-template-columns: 1fr auto; } }
.enrol-form { margin-top: 18px; background: #fbfbfd; }
.enrol-form .h-sm { margin-top: 0; }

/* payments */
.coupons { margin-top: 24px; }
.coupon-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.coupon-list li { display: grid; grid-template-columns: 120px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.coupon-list code { font-weight: 700; justify-self: start; }
.coupon-add { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.coupon-add .field { flex: 1 1 140px; }
.coupon-add .btn { margin-bottom: 14px; }
@media (max-width: 520px) { .coupon-list li { grid-template-columns: 1fr auto; } }

/* announcements */
.an-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.an-side { display: flex; flex-direction: column; gap: 20px; }
.an-preview { border: 1px dashed var(--b-line); border-radius: 12px; padding: 6px 10px; background: var(--b-softer); }
.an-preview .ann-list { list-style: none; }
.sent-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sent-list li { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.sent-list li:first-child { border-top: 0; }
.sent-list li > div:first-child { display: flex; flex-direction: column; }
.chan-chips { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 960px) { .an-grid { grid-template-columns: 1fr; } }

/* brand */
.brand-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; align-items: start; }
.brand-preview { position: sticky; top: calc(var(--dbar-h) + 80px); padding: 16px; background: var(--bg); }
.bp-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.bp-label .ic { width: 16px; height: 16px; }
.bp-site { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--sh); margin-bottom: 14px; }
.bp-url { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #eceef4; font-size: 12px; color: #4b5266; }
.bp-url .ic { width: 13px; height: 13px; color: #1b7a4d; }
.bp-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-family: var(--f-head); }
.bp-btn { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-family: var(--f); }
.bp-hero { padding: 22px 18px; background: radial-gradient(400px 200px at 90% 0, var(--b-soft), transparent 70%); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.bp-tag { font-size: 11.5px; font-weight: 700; color: var(--b-strong); background: #fff; border: 1px solid var(--b-line); padding: 3px 9px; border-radius: 999px; }
.bp-hero h3 { font-size: 22px; letter-spacing: -.02em; }
.bp-hero p { font-size: 13px; color: var(--ink-2); margin: 0 0 4px; }
.bp-cert svg { width: 100%; height: auto; border-radius: 8px; box-shadow: var(--sh); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.preset { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 650; font-size: 14px; }
.preset .logo { color: #fff; }
.preset:hover { border-color: var(--b-line); }
.preset[aria-pressed="true"] { border-color: var(--b-fill); background: var(--b-softer); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { position: relative; }
.sw input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; width: 100%; height: 100%; }
.sw > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.sw input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.sw input:focus-visible + span { outline: 3px solid var(--b-fill); outline-offset: 3px; }
.sw.custom > span { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444); color: #fff; }
.sw.custom .ic { width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.sw.custom input { cursor: pointer; }
.fonts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.font-opt { position: relative; }
.font-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.font-opt > span { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--ink-2); height: 100%; }
.font-opt b { font-size: 26px; color: var(--ink); line-height: 1.1; }
.font-opt input:checked + span { border-color: var(--b-fill); background: var(--b-softer); }
.font-opt input:focus-visible + span { outline: 3px solid var(--b-fill); outline-offset: 2px; }
@media (max-width: 1000px) { .brand-grid { grid-template-columns: 1fr; } .brand-preview { position: static; } }
@media (max-width: 420px) { .fonts { grid-template-columns: 1fr; } .font-opt > span { flex-direction: row; align-items: center; gap: 10px; } }

/* settings */
.settings { display: flex; flex-direction: column; gap: 20px; max-width: 980px; }
.settings .h-sec .ic { width: 20px; height: 20px; }
.cert-set { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.cert-set .cert-thumb { border-radius: 12px; }
@media (max-width: 860px) { .cert-set { grid-template-columns: 1fr; } }

/* invoice */
.inv-wrap { background: var(--bg); }
.invoice { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; overflow: hidden; font-size: 13.5px; }
.inv-stamp { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) rotate(-18deg); font-weight: 800; letter-spacing: .3em; color: rgba(190, 18, 60, .07); font-size: 88px; pointer-events: none; }
.inv-top { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--inv); padding-bottom: 14px; flex-wrap: wrap; }
.inv-brand { display: flex; gap: 12px; }
.inv-brand div, .inv-meta, .inv-parties div { display: flex; flex-direction: column; gap: 2px; color: var(--ink-2); }
.inv-brand strong, .inv-parties strong { color: var(--ink); font-size: 15px; }
.inv-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--inv); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.inv-meta { text-align: right; }
.inv-meta h3 { font-size: 19px; margin-bottom: 2px; }
.inv-ref { color: var(--err); }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.inv-k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.invoice table { width: 100%; border-collapse: collapse; }
.invoice th, .invoice td { padding: 8px 6px; border-bottom: 1px solid var(--line-2); text-align: left; }
.invoice th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.invoice .r { text-align: right; }
.invoice td small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.inv-sum { margin-left: auto; max-width: 330px; margin-top: 8px; }
.inv-total td { font-weight: 800; font-size: 15px; border-top: 2px solid var(--ink); }
.inv-words { font-size: 12.5px; color: var(--ink-2); text-align: right; margin-top: 6px; }
.inv-foot { margin-top: 18px; padding-top: 10px; border-top: 1px dashed #cfd5e3; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .inv-meta { text-align: left; } .inv-parties { grid-template-columns: 1fr; } .invoice { padding: 16px; } }

/* print: only the certificate or the invoice */
@media print {
  body.printing-cert > *:not(#app), body.printing-dialog > *:not(#dlg) { display: none !important; }
  body.printing-cert #app * { visibility: hidden; }
  body.printing-cert #app .cert-big, body.printing-cert #app .cert-big * { visibility: visible; }
  body.printing-cert #app .cert-big { position: fixed; inset: 0; padding: 0; background: #fff; display: flex; align-items: center; justify-content: center; }
  body.printing-cert #app .cert-big svg { box-shadow: none; max-height: 100%; }
  body.printing-dialog #dlg::backdrop { background: none; }
  body.printing-dialog #dlg { position: static; box-shadow: none; width: 100%; max-height: none; }
  body.printing-dialog .dlg-head, body.printing-dialog .dlg-foot { display: none; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
