/* =====================================================================================================
   QuizyBit — styled after DupeScanner and Lifeboat. Every colour is a variable; data-theme on <html>: dark · light · overcast · comfortable · paper · forest · dusk
   ===================================================================================================== */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #15181d; --panel: #1d2128; --panel2: #252a33; --line: #323844; --text: #dfe3ea; --muted: #8b93a1;
  --accent: #4c9ffe; --accent-ink: #fff; --red: #e5484d; --green: #3dd68c; --yellow: #ffd400; --orange: #f08c2e;
  --row-odd: rgba(255,255,255,.015); --row-hover: #222a36; --row-sel: #1d3557;
  --code: #0d0f13; --tip: rgba(10,12,16,.94); --ok-box: #15241b; --ok-line: #23452f; --warn-box: #3a2a10; --warn-line: #6b4b12;
  --bad-box: #2a1719; --bad-line: #5c2a2e; --info-box: #182230; --info-line: #24406a; --opt-on: #182230; --shadow: rgba(0,0,0,.5);
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --font: 14px; --pad-row: 4px; --pad: 14px;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7; --panel: #ffffff; --panel2: #eef0f3; --line: #d9dde3; --text: #1b1f24; --muted: #646b76;
  --accent: #1f6fd1; --accent-ink: #fff; --red: #d13438; --green: #0f8a4f; --yellow: #a56a00; --orange: #b85c00;
  --row-odd: rgba(0,0,0,.018); --row-hover: #eef4fc; --row-sel: #d6e6fb;
  --code: #f6f7f9; --tip: rgba(255,255,255,.97); --ok-box: #eaf7ef; --ok-line: #b7e1c6; --warn-box: #fff4dc; --warn-line: #f0cd80;
  --bad-box: #fde8e8; --bad-line: #f2b8b8; --info-box: #e8f0fb; --info-line: #b8cff0; --opt-on: #e8f0fb; --shadow: rgba(20,30,50,.18);
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
}
/* Overcast: between light and dim — light grey surfaces, less glare (VibeCoding/add-overcast.py) */
[data-theme="overcast"] {
  color-scheme: light;
  --bg: #d5dae0; --panel: #e2e6eb; --panel2: #ccd2d9; --line: #b2bbc5; --text: #1b2129; --muted: #4c5763;
  --accent: #1b5fbd; --accent-ink: #fff; --red: #d13438; --green: #0f8a4f; --yellow: #a56a00; --orange: #b85c00;
  --row-odd: rgba(0,0,0,.025); --row-hover: #cfd8e3; --row-sel: #bdd0ea;
  --code: #dce1e6; --tip: rgba(236,239,243,.97); --ok-box: #d6eadc; --ok-line: #b7e1c6; --warn-box: #f1e5c6; --warn-line: #f0cd80;
  --bad-box: #f0d9d9; --bad-line: #f2b8b8; --info-box: #d6e2f2; --info-line: #b8cff0; --opt-on: #d0dcec; --shadow: rgba(20,30,50,.22);
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
}
[data-theme="comfortable"] {
  color-scheme: dark;
  --bg: #221f1b; --panel: #2b2823; --panel2: #35312b; --line: #48423a; --text: #e9e2d4; --muted: #a79d8c;
  --accent: #e0a458; --accent-ink: #221f1b; --red: #e07a6b; --green: #9cc98a; --yellow: #f0c674; --orange: #e0a458;
  --row-odd: rgba(255,240,220,.025); --row-hover: #3a352e; --row-sel: #4a3f2f;
  --code: #1c1a17; --tip: rgba(34,31,27,.96); --ok-box: #283023; --ok-line: #3f4f35; --warn-box: #3d3220; --warn-line: #6b5530;
  --bad-box: #3a2622; --bad-line: #6a3a32; --info-box: #33302a; --info-line: #5a5040; --opt-on: #3a342b; --shadow: rgba(0,0,0,.45);
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --font: 15px; --pad-row: 7px; --pad: 18px;
}
/* Three more in the spirit of Comfortable: softer contrast, roomier rows (2026.11.23.9) */
[data-theme="paper"] {
  color-scheme: light;
  --bg: #f3ecdf; --panel: #fbf6ec; --panel2: #ece3d3; --line: #d9ccb6; --text: #3b3226; --muted: #7a6c58;
  --accent: #a8612a; --accent-ink: #fffaf2; --red: #b94a3c; --green: #4f7d3a; --yellow: #946b10; --orange: #a8612a;
  --row-odd: rgba(90,60,20,.025); --row-hover: #efe5d2; --row-sel: #e6d6b8;
  --code: #efe7d8; --tip: rgba(251,246,236,.97); --ok-box: #e6eed9; --ok-line: #c2d3a8; --warn-box: #f6e8c8; --warn-line: #dfc488;
  --bad-box: #f5ddd6; --bad-line: #e2b3a8; --info-box: #ece4d4; --info-line: #d0c0a2; --opt-on: #ece2cf; --shadow: rgba(80,55,20,.16);
  --series-1: #2a78d6; --series-2: #c8571f; --series-3: #2f8f62; --series-4: #b98300;
  --font: 15px; --pad-row: 7px; --pad: 18px;
}
[data-theme="forest"] {
  color-scheme: dark;
  --bg: #1a201c; --panel: #222a25; --panel2: #2b342e; --line: #3b463f; --text: #dfe6dc; --muted: #97a597;
  --accent: #8cc084; --accent-ink: #1a201c; --red: #e0857a; --green: #8cc084; --yellow: #e3c46c; --orange: #e0a458;
  --row-odd: rgba(220,255,220,.02); --row-hover: #2d3830; --row-sel: #33473a;
  --code: #151a17; --tip: rgba(26,32,28,.96); --ok-box: #22301f; --ok-line: #3b5434; --warn-box: #393320; --warn-line: #6b5d30;
  --bad-box: #382624; --bad-line: #66403a; --info-box: #24302b; --info-line: #3f5a4c; --opt-on: #2c3a31; --shadow: rgba(0,0,0,.45);
  --series-1: #6fa8dc; --series-2: #e08a4f; --series-3: #8cc084; --series-4: #e3c46c;
  --font: 15px; --pad-row: 7px; --pad: 18px;
}
[data-theme="dusk"] {
  color-scheme: dark;
  --bg: #1f1c26; --panel: #28242f; --panel2: #322d3a; --line: #443d4f; --text: #e6e0ee; --muted: #a39bb2;
  --accent: #c3a6e8; --accent-ink: #1f1c26; --red: #e8879a; --green: #93cba4; --yellow: #ecc77a; --orange: #e8a27a;
  --row-odd: rgba(240,220,255,.022); --row-hover: #332d3d; --row-sel: #3f3352;
  --code: #19171f; --tip: rgba(31,28,38,.96); --ok-box: #24302a; --ok-line: #3c5446; --warn-box: #3a3122; --warn-line: #6b5733;
  --bad-box: #3a2430; --bad-line: #6a3d52; --info-box: #2b2738; --info-line: #4d4366; --opt-on: #352e42; --shadow: rgba(0,0,0,.5);
  --series-1: #8fa8ec; --series-2: #e8a27a; --series-3: #93cba4; --series-4: #ecc77a;
  --font: 15px; --pad-row: 7px; --pad: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: var(--font)/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { height: 100%; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; border-color: var(--accent); }
button { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button:hover:not(:disabled) { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.danger { background: var(--red); border-color: var(--red); color: #fff; }
button.ghost-danger { color: var(--red); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--accent); padding: 2px 4px; }
button.small { font-size: 12px; padding: 2px 8px; }
button.icon { padding: 3px 7px; }
a { color: var(--accent); cursor: pointer; text-decoration: none; } a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
code { background: var(--panel2); padding: 0 4px; border-radius: 3px; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 6px; padding: 8px; overflow: auto; font-size: 12px; }
h2 { font-size: 16px; margin: 4px 0 10px; } h3 { font-size: 14px; margin: 14px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .spacer { flex: 1; } .nowrap { white-space: nowrap; } .r { text-align: right; }
.ok { color: var(--green); } .bad { color: var(--red); } .warnc { color: var(--orange); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
label.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.box { padding: 8px 12px; border-radius: 6px; font-size: 13px; margin: 8px 0; }
.box.warn { background: var(--warn-box); border: 1px solid var(--warn-line); }
.box.bad { background: var(--bad-box); border: 1px solid var(--bad-line); }
.box.ok { background: var(--ok-box); border: 1px solid var(--ok-line); color: inherit; }
.box.info { background: var(--info-box); border: 1px solid var(--info-line); }

/* ===================================================================================================== header */
header.top { display: flex; align-items: center; gap: 14px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
header.top h1 { margin: 0; font-size: 18px; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
header.top h1 img { width: 22px; height: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; white-space: nowrap; font-size: 13px; cursor: default; }
a.chip { color: var(--text); cursor: pointer; } a.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.bad b { color: var(--red); } .chip.warn b { color: var(--orange); } .chip.good b { color: var(--green); }
.hbtn { background: none; border: 1px solid transparent; padding: 4px 8px; font-size: 16px; line-height: 1; }
.hbtn:hover { background: var(--panel2); }
.theme-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.theme-seg button { border: 0; border-radius: 0; background: none; padding: 4px 9px; font-size: 13px; }
.theme-seg button.on { background: var(--accent); color: var(--accent-ink); }
.hsearch { flex: 0 1 300px; min-width: 160px; position: relative; } .hsearch input { width: 100%; }
.who { font-size: 13px; }
.banner { background: var(--info-box); border-bottom: 1px solid var(--info-line); padding: 5px 16px; font-size: 12.5px; display: flex; gap: 10px; align-items: center; }
.banner.bad { background: var(--bad-box); border-color: var(--bad-line); }

/* ===================================================================================================== tabs */
nav#tabs { display: flex; align-items: stretch; padding: 0 8px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; }
nav#tabs a { display: inline-flex; align-items: center; gap: 6px; border-bottom: 2px solid transparent; padding: 9px 12px; color: var(--muted); font-weight: 500; white-space: nowrap; text-decoration: none; }
nav#tabs a:hover { color: var(--text); }
nav#tabs a.active { color: var(--text); background: var(--bg); border-bottom-color: var(--accent); }
nav#tabs .tgroup { display: flex; align-items: center; padding: 0 6px 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-left: 1px solid var(--line); margin-left: 6px; white-space: nowrap; }
.tcount:not(:empty) { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--panel2); color: var(--muted); }
.tcount.hot:not(:empty) { background: var(--red); color: #fff; }
nav#tabs .push { margin-left: auto; }

main { flex: 1; min-height: 0; position: relative; overflow: auto; }
.page { padding: var(--pad) 16px 40px; }
.page.full { padding: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.page-head h2 { margin: 0; }
#statusbar { display: flex; align-items: center; gap: 14px; padding: 5px 16px; background: var(--panel); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
#statusbar b { color: var(--text); font-weight: 600; }

/* ===================================================================================================== explanations (collapsed by default) */
details.explain { background: var(--info-box); border: 1px solid var(--info-line); border-radius: 8px; margin: 0 0 12px; font-size: 13px; }
details.explain > summary { cursor: pointer; padding: 6px 12px; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--muted); }
details.explain > summary::-webkit-details-marker { display: none; }
details.explain > summary::before { content: "ⓘ"; color: var(--accent); font-size: 14px; }
details.explain > summary::after { content: "▸"; margin-left: auto; transition: transform .15s; }
details.explain[open] > summary::after { transform: rotate(90deg); }
details.explain[open] > summary { color: var(--text); border-bottom: 1px solid var(--info-line); }
details.explain .ex-body { padding: 8px 14px 10px; }
details.explain .ex-body p { margin: 4px 0 8px; }
details.explain .ex-body ul { margin: 4px 0 8px; padding-left: 20px; }
details.explain .ex-body li { margin: 2px 0; }
.ex-more { font-size: 12.5px; }

/* ===================================================================================================== grids */
.gridbox { overflow: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid thead th { position: sticky; top: 0; z-index: 1; background: var(--panel2); text-align: left; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid thead th.sortable { cursor: pointer; } table.grid thead th.sorted::after { content: " ▾"; color: var(--accent); } table.grid thead th.sorted.asc::after { content: " ▴"; }
table.grid td { padding: var(--pad-row) 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: middle; }
table.grid tbody tr:nth-child(odd) td { background: var(--row-odd); }
table.grid tbody tr.click { cursor: pointer; }
table.grid tbody tr:hover td { background: var(--row-hover); }
table.grid tbody tr.selected td { background: var(--row-sel) !important; }
table.grid tbody tr.inactive td { opacity: .55; }
table.grid td.c-name { font-weight: 500; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listpane table.grid td, .listpane table.grid th { white-space: nowrap; }
table.grid td.c-dim { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.plain { width: 100%; border-collapse: collapse; font-size: 13px; }
table.plain td, table.plain th { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { color: var(--muted); font-weight: 500; }
.empty-note { padding: 30px; text-align: center; color: var(--muted); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; line-height: 1.5; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; color: var(--text); background: var(--panel2); }
.badge.good { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.badge.bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, var(--line)); }
.badge.warn { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 50%, var(--line)); }
.badge.info { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.badge.solid-bad { background: var(--red); border-color: var(--red); color: #fff; }
.tag { font-size: 11px; padding: 0 6px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 16%, var(--panel2)); color: var(--text); margin-right: 3px; }
.sicon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 13px; margin-right: 6px; vertical-align: middle; flex: none; }

/* ===================================================================================================== panes: tree | list | detail */
.panes { display: flex; height: 100%; min-height: 0; }
.tree { width: 270px; flex: none; border-right: 1px solid var(--line); background: var(--panel); overflow: auto; display: flex; flex-direction: column; }
.tree-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.tree-head b { flex: 1; }
.quick { padding: 6px 4px; border-bottom: 1px solid var(--line); }
ul.ft, ul.ft ul { list-style: none; margin: 0; padding: 0; }
ul.ft ul { margin-left: 14px; border-left: 1px dotted var(--line); }
.ft-row { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 4px; font-size: 13px; cursor: pointer; user-select: none; }
.ft-row:hover { background: var(--row-hover); }
.ft-row.on { background: var(--row-sel); }
.ft-row.dim .ft-name { color: var(--muted); font-style: italic; }
.ft-tog { width: 16px; flex: none; color: var(--muted); font-size: 11px; text-align: center; }
.ft-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ft-num { color: var(--muted); font-size: 11.5px; }
.ft-pol { font-size: 10px; color: var(--accent); }
.listpane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--panel); }
.rbar input[type=search] { width: 220px; }
.crumbs { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs b { color: var(--text); }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { font-size: 12px; padding: 1px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; }
.fchip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, var(--panel2)); }
.listpane .gridbox { flex: 1; }
.side { width: 430px; flex: none; border-left: 1px solid var(--line); background: var(--panel); overflow: auto; display: flex; flex-direction: column; }
.side.empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; padding: 20px; text-align: center; }
.side-head { padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
.side-head h2 { margin: 0 0 4px; font-size: 17px; display: flex; align-items: center; gap: 4px; word-break: break-word; }
.side-body { padding: 8px 14px 24px; display: flex; flex-direction: column; gap: 6px; }
.gatebox { border-radius: 8px; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.gatebox.ok { background: var(--ok-box); border: 1px solid var(--ok-line); color: inherit; }
.gatebox.warn { background: var(--warn-box); border: 1px solid var(--warn-line); }
.gatebox.bad { background: var(--bad-box); border: 1px solid var(--bad-line); }
.gatebox .row { margin: 0; }
dl.fields { display: grid; grid-template-columns: 120px 1fr; gap: 0; margin: 4px 0; font-size: 13px; }
dl.fields dt { color: var(--muted); padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
dl.fields dd { margin: 0; padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); display: flex; align-items: center; gap: 4px; min-width: 0; }
dl.fields dd .val { flex: 1; min-width: 0; overflow-wrap: anywhere; }
dl.fields dd .val.secret { font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
dl.fields dd .val.multi { white-space: pre-wrap; font-family: inherit; letter-spacing: 0; }
dl.fields dd button { padding: 1px 7px; font-size: 12px; }
.dots { color: var(--muted); letter-spacing: .15em; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 3px 10px; font-size: 13px; margin: 4px 0; }
.kv > :nth-child(odd) { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.countdown { font-variant-numeric: tabular-nums; }

/* ===================================================================================================== dashboard */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--accent); text-decoration: none; }
.stat .n { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12.5px; }
.stat.bad .n { color: var(--red); } .stat.warn .n { color: var(--orange); } .stat.good .n { color: var(--green); }
.viz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 14px; }
.viz { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.viz h3 { margin: 0 0 2px; font-size: 14px; }
.viz .sub { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.viz.wide { grid-column: 1 / -1; }
.viz-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 0 0 6px; flex-wrap: wrap; }
.viz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.vbars { display: flex; align-items: flex-end; gap: 4px; height: 160px; border-bottom: 1px solid var(--line); padding-top: 8px; }
.vbars .col { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; min-width: 6px; height: 100%; justify-content: flex-start; }
.vbars .col > i { display: block; }
.vbars .col > i:last-child { border-radius: 4px 4px 0 0; }
.vbars .col:hover { outline: 2px solid var(--line); outline-offset: 2px; border-radius: 4px; }
.vlabels { display: flex; gap: 4px; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.vlabels span { flex: 1; text-align: left; min-width: 6px; overflow: visible; white-space: nowrap; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 5px 10px; align-items: center; font-size: 12.5px; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 14px; background: var(--panel2); border-radius: 4px; overflow: hidden; display: flex; }
.hbar .track i { display: block; height: 100%; }
.hbar .val { color: var(--muted); font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut { width: 120px; height: 120px; flex: none; }
.donut-legend { display: grid; grid-template-columns: 12px 1fr auto; gap: 4px 8px; font-size: 12.5px; align-items: center; }
.donut-legend i { width: 10px; height: 10px; border-radius: 2px; }
.viz-tip { position: fixed; pointer-events: none; z-index: 120; background: var(--tip); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 12px; box-shadow: 0 4px 16px var(--shadow); }

/* ===================================================================================================== features page */
.feat-area { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.feat { display: grid; grid-template-columns: 18px 230px 1fr 240px; gap: 10px; align-items: start; padding: 7px 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: 13px; }
.feat:hover { background: var(--row-hover); }
.feat .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 5px; }
.feat .dot.on { background: var(--green); }
.feat .fname { font-weight: 600; } .feat .fwhat { color: var(--text); } .feat .fctl { color: var(--muted); font-size: 12px; }
.feat .fstat { font-size: 12px; }
.notinc { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; margin-top: 14px; }
.notinc li { margin: 4px 0; }

/* ===================================================================================================== forms */
.form { display: grid; grid-template-columns: 170px 1fr; gap: 8px 12px; align-items: center; max-width: 760px; }
.form > label { color: var(--muted); font-size: 13px; }
.form > .full { grid-column: 1 / -1; }
.form .hint { grid-column: 2; font-size: 12px; color: var(--muted); margin-top: -4px; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea { width: 100%; }
.sect { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.sect > h3:first-child { margin-top: 0; }
.adminnav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.adminnav a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 13px; text-decoration: none; }
.adminnav a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); display: inline-flex; gap: 4px; align-items: center; }
.pill button { border: 0; background: none; padding: 0 2px; color: var(--muted); }

/* ===================================================================================================== flyouts (DupeScanner) */
.flyout-scrim { position: fixed; inset: 0; background: color-mix(in srgb, #000 35%, transparent); z-index: 80; opacity: 0; transition: opacity .2s; }
.flyout-scrim.open { opacity: 1; }
.flyout { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 96vw); background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: -8px 0 30px var(--shadow); z-index: 90; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s ease; }
.flyout.wide { width: min(820px, 96vw); } .flyout.narrow { width: min(420px, 96vw); }
.flyout.open { transform: none; }
.flyout > .fhead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.flyout > .fhead h2 { margin: 0; font-size: 16px; flex: 1; }
.flyout .fbody { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 16px 24px; }
.fsec { border-bottom: 1px solid var(--line); }
.fsec > summary { cursor: pointer; padding: 10px 0; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.fsec > summary::-webkit-details-marker { display: none; }
.fsec > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.fsec[open] > summary::before { transform: rotate(90deg); }
.fsec > summary small { font-weight: 400; color: var(--muted); }
.fsec .fcontent { padding: 0 0 14px 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.fsec .fcontent p { margin: 0; }
.fsec .fcontent ul { margin: 0; padding-left: 18px; }

/* ===================================================================================================== modal */
.overlay { position: fixed; inset: 0; z-index: 100; background: color-mix(in srgb, #000 45%, transparent); display: grid; place-items: start center; padding: 6vh 12px; overflow: auto; }
.window { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 20px 60px var(--shadow); width: min(620px, 100%); }
.window.wide { width: min(900px, 100%); }
.window .whead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.window .whead h2 { margin: 0; flex: 1; font-size: 16px; }
.window .wbody { padding: 14px 16px 16px; }

/* toasts */
#toasts { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 200; align-items: center; }
.toast { background: var(--tip); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; box-shadow: 0 6px 20px var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: center; max-width: 80vw; }
.toast.error { border-color: var(--red); color: var(--red); }
.toast button { padding: 0 6px; background: none; border: 0; color: var(--muted); }

/* ===================================================================================================== sign-in */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 20px; }
.login { width: min(380px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.login h1 { margin: 0 0 4px; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.login h1 img { width: 26px; height: 26px; }
.login input { width: 100%; }
.login .banner { font-size: 12px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 8px; white-space: pre-wrap; }
/* ===================================================================================================== phone / tablet */
@media (max-width: 1100px) { .side { width: 360px; } .feat { grid-template-columns: 18px 180px 1fr; } .feat .fstat { grid-column: 3; } }
@media (max-width: 900px) {
  .panes { flex-direction: column; height: auto; }
  .tree, .side { width: auto; border: 0; border-bottom: 1px solid var(--line); max-height: none; }
  .tree { max-height: 40vh; }
  .hsearch, .chips { display: none; }
  nav#tabs .tgroup { display: none; }
  .form { grid-template-columns: 1fr; } .form .hint { grid-column: 1; }
  .viz-grid { grid-template-columns: 1fr; }
  .flyout { width: 100vw !important; }
  }

.ext-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--panel); }
.ext-card h3 { margin: 0 0 4px; }

/* ===================================================================================================== Lifeboat */
header.top h1 .tagline { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.job { padding: 3px 12px; border-radius: 999px; background: var(--panel2); max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; border: 1px solid var(--line); cursor: pointer; color: var(--muted); }
.job.busy { background: var(--info-box); border-color: var(--info-line); color: var(--text); }
.job.busy::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 7px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.hbtn.dot { position: relative; } .hbtn.dot::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* progress strip (DupeScanner) */
#progress { padding: 7px 16px 9px; background: var(--info-box); border-bottom: 1px solid var(--line); }
#progress .ptop { display: flex; gap: 12px; align-items: baseline; margin-bottom: 5px; font-size: 13px; }
#progress .ptop button { padding: 1px 10px; font-size: 12px; }
.pbar { height: 7px; border-radius: 4px; background: var(--code); overflow: hidden; position: relative; }
.pbar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; border-radius: 4px; }
.pbar.indeterminate > i { width: 30% !important; animation: slide 1.2s linear infinite; transition: none; }
.pbar.bad > i { background: var(--red); } .pbar.warn > i { background: var(--orange); } .pbar.good > i { background: var(--green); }
@keyframes slide { from { margin-left: -30%; } to { margin-left: 100%; } }
#p-current { font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* state dots */
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; margin-right: 6px; }
.sdot.running, .sdot.online { background: var(--green); } .sdot.exited, .sdot.dead, .sdot.offline { background: var(--red); } .sdot.paused { background: var(--yellow); }
.sdot.created, .sdot.restarting { background: var(--orange); } .sdot.unhealthy { background: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 35%, transparent); }
.sdot.unknown, .sdot.disabled { background: var(--line); }
.hostname { display: inline-flex; align-items: center; gap: 6px; } .hicon { font-size: 13px; }

/* host tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 14px; }
.htile { align-items: stretch; white-space: normal; font: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; border-top: 3px solid var(--hc, var(--line)); text-align: left; }
.htile:hover { border-color: var(--accent); border-top-color: var(--hc, var(--accent)); }
.htile .ht-head { display: flex; align-items: center; gap: 8px; }
.htile .ht-head b { font-size: 15px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htile .ht-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htile .ht-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; }
.htile .ht-nums div { background: var(--panel2); border-radius: 6px; padding: 4px 2px; }
.htile .ht-nums b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.htile .ht-nums span { font-size: 11px; color: var(--muted); }
.usage { display: grid; grid-template-columns: 54px 1fr auto; gap: 4px 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.usage .pbar { height: 6px; }
.htile .err { font-size: 12px; color: var(--red); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* fields */
label.field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
label.field .flabel { color: var(--muted); font-size: 12.5px; }
label.field .hint { color: var(--muted); font-size: 11.5px; }
label.field input:not([type=checkbox]):not([type=radio]), label.field select, label.field textarea { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; }
.full { grid-column: 1 / -1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; border-radius: 0; background: none; padding: 5px 12px; font-size: 13px; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.choice button { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; white-space: normal; padding: 9px 11px; border-radius: 8px; background: var(--panel); }
.choice button b { font-size: 13.5px; } .choice button span { font-size: 12px; color: var(--muted); }
.choice button.on { border-color: var(--accent); background: var(--opt-on); box-shadow: inset 0 0 0 1px var(--accent); }
textarea.mono, input.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.maprow { display: grid; grid-template-columns: 1fr 18px 1fr 30px; gap: 6px; align-items: center; margin: 3px 0; }

/* checks (preflight) */
ul.checks { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
ul.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 5px 9px; border-radius: 6px; background: var(--panel2); }
ul.checks li::before { flex: none; width: 16px; text-align: center; font-weight: 700; }
ul.checks li.ok::before { content: "\2714"; color: var(--green); } ul.checks li.info::before { content: "i"; color: var(--accent); }
ul.checks li.warn { background: var(--warn-box); } ul.checks li.warn::before { content: "!"; color: var(--orange); }
ul.checks li.bad { background: var(--bad-box); } ul.checks li.bad::before { content: "\2716"; color: var(--red); }

/* wizard */
.steps { display: flex; margin: 0 0 14px; counter-reset: st; flex-wrap: wrap; }
.steps span { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; color: var(--muted); font-size: 13px; }
.steps span::before { counter-increment: st; content: counter(st); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); font-size: 11px; background: var(--panel2); }
.steps span.on { color: var(--text); font-weight: 600; } .steps span.on::before { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.steps span.done::before { content: "\2713"; background: var(--ok-box); color: var(--green); border-color: var(--ok-line); }
.route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.route .arrow { display: grid; place-items: center; font-size: 26px; color: var(--accent); }
.route .end { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.route .end h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.what { display: flex; flex-direction: column; gap: 1px; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: var(--bg); }
.what button { justify-content: flex-start; border: 0; background: none; padding: 4px 8px; border-radius: 4px; font-size: 13px; }
.what button:hover { background: var(--row-hover); } .what button.on { background: var(--row-sel); }
.what .wg { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px 2px; }

/* jobs */
pre.joblog { max-height: 55vh; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.5; margin: 6px 0; }
.jobrow-prog { width: 120px; }
.kindtag { font-size: 10.5px; padding: 0 7px; border-radius: 4px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* library */
.lib-kinds { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mini { font-size: 11.5px; color: var(--muted); }
.mono-list { font-family: ui-monospace, Consolas, monospace; font-size: 12px; display: flex; flex-direction: column; gap: 2px; word-break: break-all; }
.protect { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; white-space: nowrap; }
.protect.none { color: var(--orange); } .protect.ok { color: var(--green); } .protect.old { color: var(--yellow); }
pre.yaml { max-height: 60vh; font-size: 12px; white-space: pre; }

/* overview */
.unprot { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; }
.unprot .u { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 6px; background: var(--panel2); font-size: 13px; }
.empty-hero { text-align: center; padding: 34px 20px; background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 14px; }
.empty-hero h2 { font-size: 20px; margin-bottom: 6px; }
.empty-hero p { color: var(--muted); max-width: 640px; margin: 6px auto 14px; }
.whatsnew section { border-bottom: 1px solid var(--line); padding: 8px 0; } .whatsnew section:last-child { border: 0; }
.whatsnew ul { margin: 4px 0 0; padding-left: 20px; font-size: 13px; } .whatsnew li { margin: 3px 0; }
.snippet { position: relative; } .snippet pre { margin: 4px 0; white-space: pre; padding-right: 70px; } .snippet button { position: absolute; top: 6px; right: 6px; }

@media (max-width: 900px) {
  .route { grid-template-columns: 1fr; } .route .arrow { transform: rotate(90deg); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .job { max-width: 40vw; }
}
.page.full > .panes { flex: 1; min-height: 0; height: auto; }
.page.full .listpane .gridbox { flex: 1; }

/* ===================================================================================================== Personalize (after Cork) */
.pz-preview { position: sticky; top: -8px; z-index: 2; margin: 0 -16px 4px; padding: 10px 16px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.pz-preview > * { pointer-events: none; }
.pz-top { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px 8px 0 0; font-size: 11px; }
.pz-top img { width: 14px; height: 14px; } .pz-chip { border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; background: var(--panel); }
.pz-pill { border-radius: 999px; padding: 0 8px; background: var(--info-box); border: 1px solid var(--info-line); }
.pz-tabs { display: flex; gap: 2px; padding: 0 6px; background: var(--panel); border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 11px; }
.pz-tabs span { padding: 4px 8px; color: var(--muted); border-bottom: 2px solid transparent; } .pz-tabs span.on { color: var(--text); border-bottom-color: var(--accent); background: var(--bg); }
.pz-body2 { display: grid; grid-template-columns: 120px 1fr; gap: 8px; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 0 0 8px 8px; font-size: 11px; }
.pz-tile { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.pz-nums { display: flex; gap: 4px; } .pz-nums span { flex: 1; background: var(--panel2); border-radius: 4px; text-align: center; color: var(--muted); font-size: 9px; } .pz-nums b { display: block; color: var(--text); font-size: 12px; }
.pz-tile .pbar { height: 4px; }
.pz-table { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.pz-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 7px; border-bottom: 1px solid var(--line); }
.pz-row.head { background: var(--panel2); font-weight: 600; } .pz-row.sel { background: var(--row-sel); } .pz-row .sdot { width: 7px; height: 7px; margin-right: 4px; }
.pz-btns { display: flex; gap: 5px; padding: 5px 7px; align-items: center; }
.pz-primary { background: var(--accent); color: var(--accent-ink); border-radius: 4px; padding: 1px 7px; font-weight: 600; } .pz-btn2 { border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; background: var(--panel2); }
.pz-sec { padding: 10px 0; border-bottom: 1px solid var(--line); } .pz-sec h4 { margin: 0 0 8px; font-size: 13px; } .pz-sec p { margin: 6px 0 0; }
.pz-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pz-theme { flex-direction: column; gap: 4px; padding: 6px 4px; background: none; border-radius: 8px; font-size: 12px; }
.pz-theme.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); background: var(--opt-on); }
.pz-sw { width: 100%; height: 28px; border-radius: 5px; box-shadow: inset 0 0 0 1px #8888; position: relative; }
.pz-sw i { position: absolute; right: 5px; bottom: 5px; width: 9px; height: 9px; border-radius: 50%; }
.scheme-row { display: flex; flex-wrap: wrap; gap: 8px; }
.scheme-sw { width: 28px; height: 28px; padding: 0; border-radius: 50%; background: var(--sw) !important; box-shadow: inset 0 0 0 2px #ffffff40; justify-content: center; border: 0; }
.scheme-sw.default { background: conic-gradient(#4c9ffe 0 25%, #e0a458 0 50%, #1f6fd1 0 75%, #8b93a1 0) !important; }
.scheme-sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--sw, var(--accent)); } .scheme-sw.on::after { content: "\2713"; color: #fff; font-weight: 700; text-shadow: 0 0 3px #0008; }
.pz-opt { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: start; padding: 6px 0; cursor: pointer; } .pz-opt input { margin-top: 3px; }
.pz-opt b { display: block; font-weight: 500; } .pz-opt small { display: block; }
.pz-foot { margin: 12px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.settings-appearance { max-width: 520px; } .settings-appearance .pz-preview { position: static; margin: 0 0 6px; padding: 0; border: 0; }

/* colour schemes: selections, option highlights and info boxes follow the accent */
[data-scheme] { --row-sel: color-mix(in srgb, var(--accent) 24%, var(--panel)); --opt-on: color-mix(in srgb, var(--accent) 14%, var(--panel)); --info-box: color-mix(in srgb, var(--accent) 9%, var(--panel)); --info-line: color-mix(in srgb, var(--accent) 32%, var(--line)); --series-1: var(--accent); }

/* looks */
[data-look=refined] .viz, [data-look=refined] .stat, [data-look=refined] .htile, [data-look=refined] .sect, [data-look=refined] .admin-card, [data-look=refined] .route .end,
[data-look=refined] .window, [data-look=refined] .diagram, [data-look=refined] .empty-hero, [data-look=refined] details.explain {
  border-radius: 14px; border-color: color-mix(in srgb, var(--line) 55%, transparent); box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow) 50%, transparent), 0 8px 24px color-mix(in srgb, var(--shadow) 25%, transparent); }
[data-look=refined] button, [data-look=refined] input, [data-look=refined] select, [data-look=refined] textarea { border-radius: 8px; }
[data-look=refined] .chip, [data-look=refined] .job { box-shadow: 0 1px 3px color-mix(in srgb, var(--shadow) 40%, transparent); }
[data-look=refined] header.top { background: color-mix(in srgb, var(--panel) 88%, var(--accent)); }
[data-look=refined] table.grid thead th { background: color-mix(in srgb, var(--panel2) 85%, var(--accent)); }
[data-look=studio] .viz, [data-look=studio] .stat, [data-look=studio] .sect, [data-look=studio] .admin-card, [data-look=studio] .route .end, [data-look=studio] .diagram {
  border-color: transparent; background: color-mix(in srgb, var(--panel) 72%, var(--bg)); border-radius: 12px; }
[data-look=studio] .htile { border-color: transparent; border-top-width: 0; border-left: 4px solid var(--hc, var(--accent)); background: color-mix(in srgb, var(--panel) 72%, var(--bg)); border-radius: 12px; }
[data-look=studio] .stat { border-left: 3px solid var(--accent); }
[data-look=studio] header.top, [data-look=studio] nav#tabs { border-bottom-color: transparent; }
[data-look=studio] nav#tabs { background: var(--bg); }

/* density and accessibility */
[data-density=compact] { --font: 13px; --pad-row: 2px; --pad: 10px; }
[data-density=compact] .htile { padding: 8px 10px; gap: 5px; } [data-density=compact] .stat .n { font-size: 21px; }
[data-contrast=high] { --line: color-mix(in srgb, var(--text) 38%, var(--panel)); --muted: color-mix(in srgb, var(--text) 80%, var(--panel)); }
[data-contrast=high] .pbar { outline: 1px solid var(--line); }
[data-motion=reduce] *, [data-motion=reduce] *::before, [data-motion=reduce] *::after { transition: none !important; animation: none !important; }
.a11y-underline a { text-decoration: underline; }
.a11y-focus :focus { outline: 3px solid var(--accent) !important; outline-offset: 2px; }
.a11y-cb { --green: #3987e5; --red: #e8780c; }
.no-diagrams .dg-wrap, .no-diagrams .diagram { display: none !important; }

/* ===================================================================================================== settings (Cork admin layout) */
.page.admin-page { padding: 18px 16px 48px; }
.admin-layout { display: flex; gap: 26px; align-items: flex-start; max-width: 1480px; margin: 0 auto; }
.admin-nav { width: 240px; flex: none; position: sticky; top: 0; max-height: calc(100vh - 160px); overflow-y: auto; padding: 2px 4px 12px 0; }
.admin-nav-title { font-size: 18px; font-weight: 700; margin: 2px 0 6px 10px; }
.admin-nav-group { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 4px 10px; }
.admin-nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--text); font-weight: 500; line-height: 1.3; }
.admin-nav-link:hover { background: var(--row-hover); text-decoration: none; }
.admin-nav-link.on { background: var(--opt-on); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.admin-nav-icon { width: 20px; text-align: center; flex: none; }
.admin-main { flex: 1; min-width: 0; }
.admin-head { padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.admin-head h2 { margin: 0 0 4px; font-size: 21px; display: flex; gap: 8px; align-items: center; }
.admin-head p { margin: 0; max-width: 90ch; }
.admin-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 2px 18px 16px; margin-bottom: 14px; overflow-x: auto; }
.admin-card > h3.sec:first-child { margin: 14px 0 10px; font-size: 15px; }
.admin-card .grid2, .admin-card .grid3 { max-width: 900px; }
.admin-nav-select { display: none; width: 100%; margin-bottom: 14px; }
@media (max-width: 900px) { .admin-layout { display: block; } .admin-nav { display: none; } .admin-nav-select { display: block; } }

/* ===================================================================================================== workflow diagrams */
.dg-wrap { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 6px; }
figure.diagram { margin: 0; padding: 12px 14px; background: color-mix(in srgb, var(--panel2) 60%, var(--panel)); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.dg-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 10px; }
figure.diagram figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.pl { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 2px; }
.pl-col { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 130px; }
.pl > .pl-node, .pl-col > .pl-node { flex: 1 1 0; min-width: 130px; }
.pl-col > .pl-node { width: 100%; }
.pl-node { position: relative; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow) 40%, transparent); }
.pl-node::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tone); }
.pl-node.t-host { --tone: var(--series-1); } .pl-node.t-app { --tone: var(--accent); } .pl-node.t-store { --tone: var(--series-3); }
.pl-node.t-helper { --tone: var(--muted); } .pl-node.t-ok { --tone: var(--green); } .pl-node.t-warn { --tone: var(--orange); } .pl-node.t-bad { --tone: var(--red); }
.pl-node.off { opacity: .45; filter: grayscale(.6); }
.pl-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: color-mix(in srgb, var(--tone) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 45%, transparent); }
.pl-tx { display: flex; flex-direction: column; min-width: 0; } .pl-tx b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tx span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tag { position: absolute; top: -9px; right: 8px; font-size: 10.5px; padding: 0 7px; border-radius: 999px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--tone) 55%, var(--line)); color: var(--text); white-space: nowrap; }
.pl-link { flex: 0 1 120px; min-width: 70px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 2px; }
.pl-lab, .pl-lab2 { font-size: 10.5px; color: var(--muted); white-space: nowrap; min-height: 14px; } .pl-lab { color: var(--text); font-weight: 600; }
.pl-line { position: relative; width: 100%; height: 3px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 10px, color-mix(in srgb, var(--accent) 35%, transparent) 10px 16px); background-size: 32px 3px; animation: dgflow 1.1s linear infinite; }
.pl-line::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5.5px solid transparent; border-left: 8px solid var(--accent); border-right: 0; }
.pl-link.both .pl-line::before { content: ""; position: absolute; left: -2px; top: -4px; border: 5.5px solid transparent; border-right: 8px solid var(--accent); border-left: 0; }
.pl-link.both .pl-line { animation: none; background: var(--accent); }
.pl-link.dashed .pl-line { animation: none; background: repeating-linear-gradient(90deg, var(--muted) 0 6px, transparent 6px 11px); } .pl-link.dashed .pl-line::after { border-left-color: var(--muted); }
.pl-link.off { opacity: .35; } .pl-link.off .pl-line { animation: none; }
@keyframes dgflow { from { background-position: 0 0; } to { background-position: 32px 0; } }
.pl-vlink { display: flex; flex-direction: column; align-items: center; height: 34px; justify-content: center; position: relative; }
.pl-vlink::before { content: ""; width: 0; height: 100%; border-left: 2px dashed var(--muted); }
.pl-vlink span { position: absolute; left: calc(50% + 8px); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.pl-col > .pl-node:last-child { transform: scale(.92); }
ol.proc { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); gap: 0; overflow-x: auto; counter-reset: none; }
.proc-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 0 6px 2px; }
.proc-step::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: color-mix(in srgb, var(--accent) 40%, var(--line)); z-index: 0; }
.proc-step:first-child::before { display: none; }
.proc-n { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--panel2) 60%, var(--panel)); }
.proc-ic { font-size: 15px; line-height: 1.2; }
.proc-step b { font-size: 12px; } .proc-t { font-size: 11px; color: var(--muted); line-height: 1.3; }
.proc-step.key .proc-n { background: var(--green); color: #fff; } .proc-step.warn .proc-n { background: var(--orange); color: #fff; }
.proc-step.skip { opacity: .45; } .proc-step.skip .proc-n { background: var(--panel2); color: var(--muted); border: 1px dashed var(--muted); } .proc-step.skip b { text-decoration: line-through; }
.dg-changes { display: flex; flex-wrap: wrap; gap: 6px; }
.dg-change { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--opt-on); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); font-size: 12px; }
.dg-change small { color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: .05em; } .dg-arrow { color: var(--accent); font-weight: 700; }
.runs { display: flex; gap: 6px; overflow-x: auto; }
.run { flex: 1 1 0; min-width: 92px; padding: 6px 8px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; font-size: 12px; position: relative; }
.run.first { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); } .run span { color: var(--muted); font-size: 11px; }
.ret { display: flex; gap: 5px; align-items: stretch; flex-wrap: wrap; }
.ret-box { width: 54px; height: 40px; border-radius: 7px; display: grid; place-items: center; font-size: 10.5px; border: 1px solid var(--line); }
.ret-box.kept { background: color-mix(in srgb, var(--series-3) 22%, var(--panel)); border-color: color-mix(in srgb, var(--series-3) 55%, var(--line)); }
.ret-box.gone { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--red) 14%, transparent) 5px 8px); color: var(--muted); text-decoration: line-through; }
.ret-more { align-self: center; color: var(--muted); }
@media (max-width: 700px) { .pl { flex-direction: column; align-items: stretch; } .pl-link { flex: none; flex-direction: row; justify-content: center; } .pl-line { width: 3px; height: 26px; background: var(--accent); animation: none; } .pl-line::after { right: -4px; top: auto; bottom: -6px; border: 5.5px solid transparent; border-top: 8px solid var(--accent); border-bottom: 0; } }

/* Cork two-way */
.pl-link.back .pl-line { background: repeating-linear-gradient(90deg, var(--series-3) 0 10px, color-mix(in srgb, var(--series-3) 35%, transparent) 10px 16px); background-size: 32px 3px; }
.pl-link.back .pl-line::after { border-left-color: var(--series-3); }
.cork-rules { display: flex; flex-direction: column; gap: 6px; }
.cork-rule { display: grid; grid-template-columns: 30px 1fr 24px 1fr; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.cork-rule.off { opacity: .45; } .cork-rule.off b { text-decoration: line-through; }
.cr-ic { font-size: 18px; text-align: center; }
.cr-card, .cr-act { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; } .cr-card span, .cr-act small { color: var(--muted); font-size: 11.5px; }
.cr-act b { color: var(--green); } .cr-arrow { color: var(--accent); font-weight: 700; text-align: center; }
@media (max-width: 700px) { .cork-rule { grid-template-columns: 30px 1fr; } .cr-arrow { display: none; } .cr-act { grid-column: 2; } }

/* trusted certificates */
.cert-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); }
.cert-ic { font-size: 20px; text-align: center; } .cert-tx { display: flex; flex-direction: column; min-width: 0; gap: 1px; } .cert-tx b { overflow-wrap: anywhere; }
.admin-card .row > input.mono { flex: 1; min-width: 220px; }

/* ===================================================================================================== QuizyBit: shell */
header.ov-top { position: sticky; top: 0; z-index: 30; gap: 10px; }
header.ov-top .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; white-space: nowrap; }
header.ov-top .brand img { width: 24px; height: 24px; }
nav.ptabs { display: flex; align-items: center; gap: 2px; overflow-x: auto; min-width: 0; }
nav.ptabs a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; text-decoration: none; }
nav.ptabs a:hover { color: var(--text); background: var(--row-hover); }
nav.ptabs a.on { color: var(--text); background: var(--opt-on); box-shadow: inset 0 -2px 0 var(--accent); }
nav.ptabs a.dragging { opacity: .4; } nav.ptabs .pi { font-size: 15px; } nav.ptabs .pub { font-size: 11px; opacity: .7; }
.ptab-add { font-size: 12px; padding: 3px 9px; margin-left: 4px; border-style: dashed; }
.hbtn.on-edit { background: var(--accent); color: var(--accent-ink); border-radius: 6px; font-size: 13px; font-weight: 600; }
.hbtn { font-size: 14px; white-space: nowrap; }
.chip.bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
main#main { overflow-y: auto; }

/* ===================================================================================================== board */
.board { padding: 16px 16px 60px; max-width: 1640px; margin: 0 auto; }
.board.w-slim { max-width: 980px; } .board.w-wide { max-width: none; }
.board.center { min-height: calc(100vh - 60px); display: flex; flex-direction: column; justify-content: center; }
.cols { display: flex; gap: 16px; align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col.c-small { flex: 0 0 300px; } .col.c-medium { flex: 1 1 0; } .col.c-full { flex: 2 1 0; }
.editing .col { min-height: 120px; border: 1px dashed transparent; border-radius: 12px; padding: 4px; margin: -5px; }
.editing .col.drop { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.add-widget { border: 1px dashed var(--line); background: none; color: var(--muted); justify-content: center; padding: 10px; border-radius: 10px; }
.add-widget:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 1100px) { .col.c-small { flex-basis: 260px; } }
@media (max-width: 860px) { .cols { flex-direction: column; } .col { width: 100%; } .col.c-small { flex: none; } }

/* ===================================================================================================== widget card */
.wcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-width: 0; overflow: hidden; }
.wcard.dragging { opacity: .45; outline: 2px dashed var(--accent); }
.editing .wcard { cursor: grab; } .editing .wcard.private { box-shadow: inset 3px 0 0 var(--orange); }
.w-head { display: flex; align-items: center; gap: 6px; padding: 9px 12px 0; }
.w-head h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.w-grip { color: var(--muted); cursor: grab; }
.w-stamp { color: var(--muted); font-size: 12px; cursor: pointer; opacity: 0; transition: opacity .15s; } .wcard:hover .w-stamp { opacity: .8; }
.w-body { padding: 10px 12px 12px; }
.w-empty, .w-error { color: var(--muted); font-size: 13px; padding: 4px 0; } .w-error { color: var(--orange); } .w-error .link { margin-left: 6px; }
.w-note { font-size: 12px; color: var(--orange); margin-top: 6px; }
.w-loading { display: flex; gap: 5px; padding: 8px 0; } .w-loading i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.w-loading i:nth-child(2) { animation-delay: .15s; } .w-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: .9; } }
.more { font-size: 12.5px; margin-top: 6px; }
.mini { font-size: 11.5px; color: var(--muted); }
.g-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -4px -12px 0; padding: 0 8px; overflow-x: auto; }
.g-tab { border: 0; background: none; border-radius: 0; padding: 6px 10px; color: var(--muted); font-size: 13px; border-bottom: 2px solid transparent; }
.g-tab.on { color: var(--text); border-bottom-color: var(--accent); } .g-tab-gear { cursor: pointer; }

/* bookmarks */
.bm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 18px; }
.bm-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 2px 0 6px; }
.bm-links { display: flex; flex-direction: column; gap: 1px; }
.bm-link { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 7px; color: var(--text); text-decoration: none; min-width: 0; }
.bm-link:hover { background: var(--row-hover); text-decoration: none; }
.bm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-icon { flex: none; object-fit: contain; border-radius: 4px; } .bm-icon.mono { filter: invert(.85); } [data-theme=light] .bm-icon.mono , [data-theme="overcast"] .bm-icon.mono, [data-theme="paper"] .bm-icon.mono { filter: none; }
.bm-emoji { flex: none; width: 20px; text-align: center; line-height: 1; }
.bm-letter { flex: none; display: inline-grid; place-items: center; border-radius: 5px; background: var(--opt-on); color: var(--accent); font-weight: 700; font-size: 11px; }
.bm-groups.grid .bm-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.bm-groups.grid .bm-link { flex-direction: column; text-align: center; padding: 10px 4px 8px; gap: 6px; position: relative; background: var(--panel2); }
.bm-groups.grid .bm-name { font-size: 12px; white-space: normal; line-height: 1.25; } .bm-groups.grid .updot { position: absolute; top: 6px; right: 6px; }
.updot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.updot.up { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); } .updot.down { background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 22%, transparent); animation: blink 1.6s infinite; }

/* search, clock, calendar, notes */
.search-row { display: flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; }
.search-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-input { flex: 1; border: 0 !important; background: none !important; outline: none !important; box-shadow: none !important; font-size: 16px; padding: 7px 2px; }
.search-hint { font-size: 12px; color: var(--accent); white-space: nowrap; }
.wcard.t-search { background: none; border: 0; overflow: visible; } .wcard.t-search .w-body { padding: 0; }
.clock-big { font-size: 38px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.clock-date { color: var(--muted); margin-top: 2px; }
.clock-zones { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; } .clock-zone { display: flex; justify-content: space-between; font-size: 13px; } .clock-zone span { color: var(--muted); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.cal-dn { color: var(--muted); font-size: 11px; padding: 2px 0; } .cal-d { padding: 4px 0; border-radius: 6px; font-variant-numeric: tabular-nums; }
.cal-d.today { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.note p { margin: 0 0 8px; } .note ul { margin: 0 0 8px; padding-left: 18px; } .note h4 { margin: 4px 0 6px; } .note p:last-child { margin-bottom: 0; }

/* weather */
.wx-now { display: flex; align-items: center; gap: 12px; }
.wx-ic { font-size: 40px; line-height: 1; } .wx-temp { font-size: 34px; font-weight: 700; line-height: 1; } .wx-temp small { font-size: 16px; color: var(--muted); font-weight: 500; }
.wx-meta { margin-left: auto; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); text-align: right; }
.wx-chart { margin: 10px 0 6px; } .wx-svg { width: 100%; height: 64px; overflow: visible; }
.wx-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; } .wx-rain { fill: color-mix(in srgb, var(--series-1) 45%, transparent); }
.wx-lbl { font-size: 9px; fill: var(--text); text-anchor: middle; } .wx-hr { font-size: 8px; fill: var(--muted); text-anchor: middle; }
.wx-days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 8px 0 6px; text-align: center; font-size: 12px; }
.wx-day { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; border-radius: 6px; background: var(--panel2); } .wx-day b { font-size: 17px; font-weight: 400; } .wx-day small { color: var(--muted); }

/* feeds & posts */
ul.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.feed-title { color: var(--text); font-weight: 500; line-height: 1.35; display: block; } .feed-title:hover { color: var(--accent); text-decoration: none; }
.post { display: flex; gap: 10px; align-items: flex-start; } .post-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; background: var(--panel2); }
.cards-x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.card-x { display: flex; flex-direction: column; gap: 5px; color: var(--text); text-decoration: none; background: var(--panel2); border-radius: 10px; overflow: hidden; }
.card-x img, .card-x-ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: grid; place-items: center; background: var(--panel2); font-size: 26px; }
.card-x b { padding: 0 9px; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .card-x .mini { padding: 0 9px 9px; }
.card-x:hover b { color: var(--accent); }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.vid { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; }
.vid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--panel2); }
.vid b { font-size: 13px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .vid:hover b { color: var(--accent); }
.tw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.tw { display: flex; align-items: center; gap: 9px; } .tw img { width: 32px; height: 32px; border-radius: 50%; } .tw:not(.live) { opacity: .55; }
.tw.live img { box-shadow: 0 0 0 2px var(--red); } .tw > div { flex: 1; min-width: 0; } .tw .mini { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-name { color: var(--text); font-weight: 600; } .tw-badge { font-size: 11.5px; color: var(--red); font-weight: 600; white-space: nowrap; }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.tg { position: relative; display: flex; flex-direction: column; gap: 3px; color: var(--text); text-decoration: none; font-size: 12px; }
.tg img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: var(--panel2); } .tg b { font-weight: 500; line-height: 1.2; }
.tg-rank { position: absolute; top: 4px; left: 4px; background: #000a; color: #fff; font-size: 10px; border-radius: 4px; padding: 0 5px; }

/* markets, releases, uptime */
.mk-list { display: flex; flex-direction: column; gap: 2px; }
.mk { display: grid; grid-template-columns: 1fr 80px auto; gap: 10px; align-items: center; padding: 5px 4px; border-radius: 7px; color: var(--text); text-decoration: none; }
.mk:hover { background: var(--row-hover); text-decoration: none; }
.mk-spark { width: 80px; height: 26px; } .mk-spark polyline { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.mk-spark.up polyline { stroke: var(--green); } .mk-spark.down polyline { stroke: var(--red); }
.mk-num { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mk-chg { font-size: 11.5px; } .mk-chg.up { color: var(--green); } .mk-chg.down { color: var(--red); }
.rel .tag { font-family: ui-monospace, Consolas, monospace; }
.up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.up { display: grid; grid-template-columns: 20px 1fr auto; gap: 4px 10px; align-items: center; }
.up-name { color: var(--text); font-weight: 500; } .up-state { display: flex; align-items: center; gap: 6px; } .up-err { grid-column: 2 / -1; }
.up-hist { display: flex; gap: 1px; margin-top: 3px; } .up-hist i { width: 4px; height: 10px; border-radius: 1px; background: var(--line); }
.up-hist i.ok { background: var(--green); } .up-hist i.bad { background: var(--red); }

/* to-do, server, docker, lifeboat, cork */
.todo { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.todo li { display: flex; align-items: center; gap: 8px; padding: 4px 2px; border-radius: 6px; } .todo li:hover { background: var(--row-hover); }
.todo li span { flex: 1; } .todo li.done span { text-decoration: line-through; color: var(--muted); }
.todo-x { opacity: 0; } .todo li:hover .todo-x { opacity: 1; }
.t-todo .w-body > input { width: 100%; }
.sv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.sv-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; margin: 5px 0; }
.dk-head { margin-bottom: 6px; } .dk-groups { display: flex; flex-direction: column; gap: 8px; }
.dk { display: grid; grid-template-columns: 12px auto 1fr; gap: 6px; align-items: center; font-size: 13px; padding: 2px 0; }
.dk:has(img, .bm-emoji) { grid-template-columns: 12px 16px auto 1fr; } .dk .mini { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk a { color: var(--text); }
.lb-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; }
.lb-tile { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 9px; background: var(--panel2); color: var(--text); text-decoration: none; border-left: 3px solid var(--line); }
.lb-tile b { font-size: 20px; font-variant-numeric: tabular-nums; } .lb-tile span { font-size: 11.5px; color: var(--muted); }
.lb-tile.good { border-left-color: var(--green); } .lb-tile.warn { border-left-color: var(--orange); } .lb-tile.bad { border-left-color: var(--red); } .lb-tile.bad b { color: var(--red); }
.lb-jobs { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; } .lb-job .pbar { height: 5px; }
.cork-card { display: flex; gap: 8px; align-items: flex-start; } .cork-card > div { flex: 1; min-width: 0; }
.cork-due { font-size: 11px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; background: var(--panel2); }
.cork-due.late { background: var(--red); color: #fff; } .cork-due.today { background: var(--orange); color: #fff; } .cork-due.soon { color: var(--orange); border: 1px solid var(--orange); }

/* ===================================================================================================== editors */
.rows { display: flex; flex-direction: column; gap: 4px; }
.rows-row { display: grid; gap: 4px; align-items: center; } .rows-row input { width: 100%; padding: 3px 7px; }
.rows-prev { display: grid; place-items: center; } .rows-act { display: flex; gap: 2px; justify-content: flex-end; }
.bm-edit { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--panel2); }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 4px; }
.cat-item { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; white-space: normal; padding: 10px 12px; border-radius: 10px; background: var(--panel); }
.cat-item:hover { border-color: var(--accent); background: var(--opt-on); } .cat-ic { font-size: 20px; } .cat-item span:last-child { font-size: 12px; color: var(--muted); }
.layouts { display: flex; gap: 6px; flex-wrap: wrap; }
.layout { flex-direction: column; gap: 4px; padding: 6px; background: none; border-radius: 8px; }
.layout.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--opt-on); }
.lay { display: flex; gap: 3px; width: 70px; height: 34px; } .lay i { background: color-mix(in srgb, var(--accent) 30%, var(--panel2)); border-radius: 3px; }
.lay i.small { flex: 1; } .lay i.medium { flex: 1.6; } .lay i.full { flex: 2.4; }
.layout small { font-size: 10px; color: var(--muted); }

/* narrow screens: page tabs get their own row, nothing scrolls sideways */
@media (max-width: 760px) {
  header.ov-top { flex-wrap: wrap; row-gap: 4px; padding-bottom: 4px; }
  header.ov-top nav.ptabs { order: 10; flex: 1 0 100%; }
  header.ov-top .hbtn { padding-left: 6px; padding-right: 6px; }
  header.ov-top .hbtn .lbl, header.ov-top .user-name { display: none; }
  .board { padding: 12px 10px 48px; }
  .board.center { min-height: 0; }
  body { overflow-x: hidden; }
}
.row:has(> button.primary:only-child) { margin: 6px 0 14px; }

/* ===================================================================================================== status board */
:root { --st-up: var(--green); --st-down: var(--red); --st-slow: var(--orange); --st-paused: #8a94a6; --st-na: color-mix(in srgb, var(--line) 80%, transparent); }
a.button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); color: var(--text); text-decoration: none; white-space: nowrap; }
a.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.sb { max-width: 1480px; margin: 0 auto; padding: 18px 18px 64px; display: flex; flex-direction: column; gap: 22px; }

/* summary */
.sb-summary { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 8px 26px; align-items: center; padding: 20px 24px; border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--sb-tint, var(--accent)) 13%, var(--panel)) 0%, var(--panel) 55%); overflow: hidden; }
.sb-summary:has(.sb-ring.good) { --sb-tint: var(--st-up); } .sb-summary:has(.sb-ring.bad) { --sb-tint: var(--st-down); }
.sb-ring { position: relative; width: 132px; height: 132px; }
.sb-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sb-ring circle { fill: none; stroke-width: 11; }
.sb-ring .track { stroke: color-mix(in srgb, var(--line) 70%, transparent); }
.sb-ring .arc { transition: stroke-dasharray .7s ease, stroke-dashoffset .7s ease; }
.sb-ring .arc.up { stroke: var(--st-up); } .sb-ring .arc.slow { stroke: var(--st-slow); } .sb-ring .arc.down { stroke: var(--st-down); }
.sb-ring .arc.paused { stroke: var(--st-paused); } .sb-ring .arc.unknown { stroke: color-mix(in srgb, var(--muted) 45%, transparent); }
.sb-ring-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.sb-ring-mid b { font-size: 38px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.sb-ring.bad .sb-ring-mid b { color: var(--st-down); } .sb-ring.good .sb-ring-mid b { color: var(--st-up); font-size: 44px; }
.sb-ring-mid span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 5px; }
.sb-head h1 { margin: 0; font-size: 27px; font-weight: 720; letter-spacing: -.02em; line-height: 1.15; }
.sb-sub { color: var(--muted); margin-top: 6px; font-size: 13.5px; }
.sb-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.sb-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--panel2) 80%, transparent); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sb-chip b { color: var(--text); font-variant-numeric: tabular-nums; font-size: 14px; }
.sb-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--st-na); }
.sb-chip.up i { background: var(--st-up); } .sb-chip.down i { background: var(--st-down); } .sb-chip.slow i { background: var(--st-slow); } .sb-chip.paused i { background: var(--st-paused); }
.sb-chip:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.sb-chip.on { border-color: var(--accent); background: var(--opt-on); color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.sb-chip.down:not(.on) b { color: var(--st-down); }
.sb-tools { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 250px; }
.sb-search { width: 100%; padding: 8px 12px; border-radius: 10px; }
.sb-view { align-self: stretch; } .sb-view button { flex: 1; } .sb-view button.on { background: var(--opt-on); color: var(--text); font-weight: 600; }
.sb-checknow { justify-content: center; }
.sb-checknow.spin .ic { display: inline-block; animation: sbspin 1s linear infinite; }
@keyframes sbspin { to { transform: rotate(360deg); } }

/* needs attention */
.sb-attention { border-radius: 16px; border: 1px solid color-mix(in srgb, var(--st-down) 40%, var(--line)); background: color-mix(in srgb, var(--st-down) 6%, var(--panel)); padding: 14px 16px 16px; }
.sb-att-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sb-att-head h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 9px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--st-down); box-shadow: 0 0 0 0 color-mix(in srgb, var(--st-down) 60%, transparent); animation: sbpulse 1.8s infinite; }
@keyframes sbpulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.sb-reasons { display: flex; gap: 6px; flex-wrap: wrap; }
.sb-reason { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--st-down) 14%, transparent); color: var(--text); }
.sb-reason b { color: var(--st-down); }
.sb-att-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 8px; }
.sb-att { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; text-align: left; white-space: normal; padding: 10px 12px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--st-down); transition: transform .15s; }
.sb-att:hover { border-color: color-mix(in srgb, var(--st-down) 55%, var(--line)); border-left-color: var(--st-down); transform: translateY(-1px); }
.sb-att .sb-ic { grid-row: span 2; }
.sb-att-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sb-att-txt b { font-size: 14px; }
.sb-att-why { color: var(--st-down); font-size: 12.5px; font-weight: 600; }
.sb-att-detail { color: var(--muted); font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-att-host { grid-column: 2; font-size: 11px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* groups */
.sb-groups { display: flex; flex-direction: column; gap: 26px; }
.sb-ghead { display: flex; align-items: center; gap: 12px; margin: 0 2px 10px; }
.sb-ghead h2 { margin: 0; font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.sb-gmeter { display: flex; width: 90px; height: 5px; border-radius: 99px; background: var(--st-na); overflow: hidden; }
.sb-gmeter i { background: var(--st-up); } .sb-gmeter i.bad { background: var(--st-down); }
.sb-gcount { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; } .sb-gcount.bad { color: var(--st-down); font-weight: 600; }

/* tiles */
.sb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; border-radius: 14px; }
.sb-tile { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px 13px 10px; border-radius: 13px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; overflow: hidden; }
.sb-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 22px -12px color-mix(in srgb, #000 55%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.sb-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.sb-tile.down { border-color: color-mix(in srgb, var(--st-down) 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--st-down) 9%, var(--panel)), var(--panel) 70%); }
.sb-tile.down::before { background: var(--st-down); } .sb-tile.slow::before { background: var(--st-slow); }
.sb-tile.paused { opacity: .72; } .sb-tile.paused::before { background: var(--st-paused); }
.sb-tile.link { border-style: dashed; background: color-mix(in srgb, var(--panel) 60%, transparent); }
.sb-t-top { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; }
.sb-ic { display: inline-grid; place-items: center; flex: none; }
.sb-ic .bm-icon { border-radius: 7px; } .sb-ic .bm-letter { border-radius: 8px; font-size: 13px; }
.sb-t-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sb-t-name b { font-size: 14.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-t-name span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; white-space: nowrap; color: var(--muted); transition: opacity .15s; }
.sb-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-na); flex: none; }
.sb-state.up { color: var(--st-up); } .sb-state.up i { background: var(--st-up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-up) 20%, transparent); }
.sb-state.down { color: var(--st-down); } .sb-state.down i { background: var(--st-down); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-down) 25%, transparent); animation: blink 1.6s infinite; }
.sb-state.slow { color: var(--st-slow); } .sb-state.slow i { background: var(--st-slow); }
.sb-state.paused { color: var(--st-paused); } .sb-state.paused i { background: var(--st-paused); }
.sb-state.link i { background: transparent; border: 1.5px dashed var(--muted); }
.sb-t-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-t-foot .lat { opacity: .8; }
.sb-t-link { font-size: 12px; color: var(--muted); padding: 6px 0 2px; }
.sb-more { position: absolute; top: 9px; right: 9px; width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 50%; font-size: 14px; opacity: 0; background: var(--panel2); }
@media (hover: hover) { .sb-tile:hover .sb-more { opacity: 1; } .sb-tile:hover .sb-t-top .sb-state { opacity: 0; } }
@media (hover: none) { .sb-tile .sb-more { opacity: .9; top: auto; bottom: 6px; } .sb-tile .sb-t-foot span:last-child { margin-right: 30px; } }

/* the day as bars */
.sb-bars { display: grid; grid-template-columns: repeat(48, 1fr); gap: 1.5px; height: 20px; align-items: end; }
.sb-bars i { height: 100%; border-radius: 2px; background: var(--st-na); }
.sb-bars i.ok { background: color-mix(in srgb, var(--st-up) 82%, transparent); }
.sb-bars i.warn { background: color-mix(in srgb, var(--st-slow) 85%, transparent); }
.sb-bars i.bad { background: color-mix(in srgb, var(--st-down) 70%, var(--st-slow)); }
.sb-bars i.dead { background: var(--st-down); }
.sb-bars i.na { height: 40%; opacity: .7; }
.sb-bars i:hover { filter: brightness(1.25); }
.sb-bars.big { height: 46px; gap: 3px; } .sb-bars.big i { border-radius: 3px; }

/* list view */
.sb-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); overflow: hidden; }
.sb-row { position: relative; display: grid; grid-template-columns: 14px 22px minmax(140px, 1fr) minmax(120px, 260px) 64px 64px 52px 28px; gap: 12px; align-items: center; padding: 8px 12px; color: var(--text); text-decoration: none; border-top: 1px solid var(--line); }
.sb-row:first-child { border-top: 0; }
.sb-row:hover { background: var(--row-hover); text-decoration: none; }
.sb-row.down { background: color-mix(in srgb, var(--st-down) 7%, transparent); }
.sb-row.paused { opacity: .7; }
.sb-r-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; } .sb-r-name b { font-weight: 600; white-space: nowrap; }
.sb-r-name span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sb-row.down .sb-r-name span { color: var(--st-down); font-weight: 600; }
.sb-r-bars .sb-bars { height: 14px; gap: 1px; }
.sb-r-num, .sb-r-since { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.sb-row .sb-more { position: static; opacity: 0; } .sb-row:hover .sb-more { opacity: 1; }
.sb-state.dot { font-size: 0; }
@media (hover: none) { .sb-row .sb-more { opacity: .8; } }

/* arranging */
.sb.editing .sb-tile, .sb.editing .sb-row { cursor: grab; }
.sb.editing .sb-tile:hover { transform: none; }
.sb .dragging { opacity: .4; outline: 2px dashed var(--accent); }
.sb-tiles.drop, .sb-list.drop { outline: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 4px; }
.sb-add { border: 1.5px dashed var(--line); background: none; color: var(--muted); justify-content: center; min-height: 92px; border-radius: 13px; }
.sb-list .sb-add { min-height: 0; border: 0; border-top: 1px dashed var(--line); border-radius: 0; padding: 9px; }
.sb-add:hover, .sb-newgroup:hover { color: var(--accent); border-color: var(--accent); }
.sb-newgroup { align-self: flex-start; border-style: dashed; color: var(--muted); }

/* details */
.sb-d-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 14px; margin: 6px 0 4px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel2); }
.sb-d-head.down { border-color: color-mix(in srgb, var(--st-down) 45%, var(--line)); background: color-mix(in srgb, var(--st-down) 8%, var(--panel2)); }
.sb-d-head.up { background: color-mix(in srgb, var(--st-up) 6%, var(--panel2)); }
.sb-d-state { display: flex; align-items: center; gap: 6px; } .sb-d-state .sb-state { font-size: 15px; } .sb-d-state .sb-state i { width: 10px; height: 10px; }
.sb-d-head p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.4; }
.sb-d-scale, .sb-spark-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.sb-spark svg { width: 100%; height: 80px; display: block; }
.sb-spark .line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.sb-spark .area { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: none; }
.sb-d-actions { margin-top: 18px; flex-wrap: wrap; }
.sb-iconrow { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }

/* narrow screens */
@media (max-width: 980px) {
  .sb-summary { grid-template-columns: auto 1fr; }
  .sb-tools { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; } .sb-search { flex: 1 1 200px; width: auto; } .sb-view { align-self: auto; }
}
@media (max-width: 640px) {
  .sb { padding: 12px 10px 48px; gap: 16px; }
  .sb-summary { padding: 16px; gap: 6px 16px; } .sb-ring { width: 96px; height: 96px; } .sb-ring-mid b { font-size: 28px; } .sb-head h1 { font-size: 20px; }
  .sb-tiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  .sb-tile .sb-t-name span { display: none; }
  .sb-row { grid-template-columns: 14px 22px 1fr 56px 44px 28px; } .sb-r-bars { display: none; }
  .sb-att-list { grid-template-columns: 1fr; }
}

/* status board — fixes and the reason-grouped attention list */
.sb-tile, .sb-row { align-items: stretch; text-align: left; }
.sb-row { align-items: center; }
.sb-search { background: var(--panel2); border: 1px solid var(--line); }
.sb-why-list { display: flex; flex-direction: column; gap: 12px; }
.sb-why { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 10px 18px; align-items: start; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--st-down) 22%, var(--line)); }
.sb-why:first-child { border-top: 0; padding-top: 0; }
.sb-why-head { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; align-items: baseline; }
.sb-why-head b { color: var(--st-down); font-size: 14px; }
.sb-why-n { font-size: 12px; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--st-down) 18%, transparent); color: var(--st-down); }
.sb-why-detail { grid-column: 1 / -1; font-size: 12px; color: var(--muted); line-height: 1.4; }
.sb-why-items { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.sb-pill:hover { border-color: color-mix(in srgb, var(--st-down) 60%, var(--line)); background: color-mix(in srgb, var(--st-down) 8%, var(--panel)); }
.sb-pill .sb-ic .bm-icon, .sb-pill .sb-ic .bm-letter { border-radius: 50%; }
.sb-pill small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .sb-why { grid-template-columns: 1fr; } }
.sb-t-foot .why { color: var(--st-down); font-weight: 600; }
.sb-search.search-input { border: 1px solid var(--line) !important; background: var(--panel2) !important; padding: 8px 12px !important; font-size: 14px; }
.sb-search.search-input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent) !important; }

/* status board — layout switch (tiles/list + 1·2·3 columns) and moving groups */
.sb-layout { display: flex; gap: 8px; }
.sb-layout .sb-view { flex: 1; }
.sb-cols button { padding: 5px 9px; }
.sb-cols button.on { background: var(--opt-on); }
.colic { display: inline-flex; gap: 2px; height: 13px; vertical-align: middle; }
.colic i { width: 4px; height: 100%; border-radius: 1.5px; background: currentColor; opacity: .55; }
.sb-cols button.on .colic i { opacity: 1; background: var(--accent); }
.colic:has(i:only-child) i { width: 12px; }
.colic:has(i:nth-child(2):last-child) i { width: 6px; }

/* newspaper columns: groups flow top to bottom, then into the next column */
.sb-groups.cols-2, .sb-groups.cols-3 { display: block; column-gap: 22px; }
.sb-groups.cols-2 { column-count: 2; } .sb-groups.cols-3 { column-count: 3; }
.sb-groups.cols-2 > *, .sb-groups.cols-3 > * { break-inside: avoid; margin-bottom: 24px; }
.sb-groups.cols-2 > .sb-group, .sb-groups.cols-3 > .sb-group { display: block; }
.sb-groups.cols-2 .sb-tiles, .sb-groups.cols-3 .sb-tiles { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; }
.sb-groups.cols-3 .sb-tile { padding: 10px 11px 9px; gap: 8px; }
.sb-groups.cols-3 .sb-bars { height: 16px; }
.sb-groups.cols-2 .sb-row, .sb-groups.cols-3 .sb-row { grid-template-columns: 12px 20px minmax(0, 1fr) minmax(70px, 120px) 54px 40px 26px; gap: 9px; padding: 7px 10px; }
.sb-groups.cols-2 .sb-r-lat, .sb-groups.cols-3 .sb-r-lat { display: none; }
.sb-groups.cols-3 .sb-r-name span { display: none; }
@media (max-width: 1250px) { .sb-groups.cols-3 { column-count: 2; } }
@media (max-width: 860px) { .sb-groups.cols-2, .sb-groups.cols-3 { column-count: 1; } }

/* moving groups (✎ Edit) */
.sb-ggrip { cursor: grab; color: var(--muted); font-size: 15px; padding: 0 2px; user-select: none; }
.sb-ggrip:hover { color: var(--accent); }
.sb-gmove { margin-left: auto; display: inline-flex; gap: 2px; }
.sb-gmove button { width: 26px; height: 24px; padding: 0; justify-content: center; }
.sb.editing .sb-group { border-radius: 14px; outline: 1px dashed transparent; outline-offset: 6px; transition: outline-color .15s; }
.sb.editing .sb-group:hover { outline-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.sb-group.gdragging { opacity: .35; outline: 2px dashed var(--accent) !important; }

/* phone: the latency column by class (replaces the nth-of-type rule) */
@media (max-width: 640px) { .sb-row .sb-r-lat { display: none; } .sb-row .sb-r-num:not(.sb-r-lat) { display: block; } .sb-cols { display: none; } }

/* check intervals */
.sb-gevery { font-size: 11.5px; color: var(--muted); padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--panel2) 80%, transparent); border: 1px solid var(--line); white-space: nowrap; }
button.sb-gevery.edit { cursor: pointer; } button.sb-gevery.edit:hover { color: var(--accent); border-color: var(--accent); }
.sb-every-chain { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-size: 12.5px; color: var(--muted); }
.sb-every-chain span { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); }
.sb-every-chain span.on { border-color: var(--accent); color: var(--text); background: var(--opt-on); }
.sb-every-chain i { font-style: normal; opacity: .6; }

/* timeframe switch */
.sb-range { display: flex; } .sb-range button { flex: 1; padding: 5px 4px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sb-range button.on { background: var(--opt-on); color: var(--text); font-weight: 650; box-shadow: inset 0 -2px 0 var(--accent); }
.sb-since { opacity: .8; }

/* All / Online / Offline toggle */
.sb-show { display: flex; } .sb-show button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 6px; font-size: 12.5px; }
.sb-show button.on { background: var(--opt-on); color: var(--text); font-weight: 650; box-shadow: inset 0 -2px 0 var(--accent); }
.sb-show small { color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-show-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.sb-show-dot.online { background: var(--green); } .sb-show-dot.offline { background: var(--red); }
.sb-hold { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ===================================================================================================== QuizyBit: children's area
   Bright "worlds" independent of the parents' theme. Big targets, rounded shapes, friendly type. */
body.kid { --k-bg: #e8f6ff; --k-bg2: #ffffff; --k-ink: #1d2b3a; --k-mute: #5b6b7d; --k-card: #ffffff; --k-line: #d6e6f3; --k-accent: #3a86ff; --k-accent-ink: #fff; --k-ok: #2a9d4b; --k-no: #e76f51; --k-chip: #ffffffcc;
  background: var(--k-bg); color: var(--k-ink); font-family: "Nunito", "Segoe UI Rounded", "Arial Rounded MT Bold", system-ui, sans-serif; color-scheme: light; }
body.kid[data-world=sky] { --k-bg: #dff1ff; --k-accent: #3a86ff; background: linear-gradient(#bfe3ff, #eef8ff 55%, #fff8e7) fixed; }
body.kid[data-world=forest] { --k-bg: #e3f5e1; --k-accent: #2d8a4e; --k-line: #cfe7cc; background: linear-gradient(#cdeccf, #f2fbef 60%, #fff6dd) fixed; }
body.kid[data-world=ocean] { --k-bg: #d9f3fb; --k-accent: #0077b6; --k-line: #c4e6f2; background: linear-gradient(#a8e3f5, #e6f8fd 55%, #fdf3d7) fixed; }
body.kid[data-world=candy] { --k-bg: #ffeef5; --k-accent: #e0457b; --k-line: #f7d3e2; background: linear-gradient(#ffd6e7, #fff3f8 55%, #fff7d6) fixed; }
body.kid[data-world=space] { --k-bg: #17123b; --k-bg2: #231b55; --k-ink: #f3f0ff; --k-mute: #b9b2e6; --k-card: #2a2266; --k-line: #3d3488; --k-accent: #ffd166; --k-accent-ink: #1d1640; --k-chip: #ffffff1f; color-scheme: dark;
  background: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 20%, #fff, transparent), radial-gradient(1px 1px at 40% 70%, #fff, transparent), radial-gradient(2px 2px at 85% 60%, #ffe9a8, transparent), radial-gradient(1px 1px at 10% 85%, #fff, transparent), linear-gradient(#0f0b2e, #2a1f6b) fixed; }
body.kid #main { background: transparent; }
.kid-page { max-width: 1100px; margin: 0 auto; padding: 14px 18px 60px; font-size: 17px; }
.kid-center { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.kid-card { background: var(--k-card); border: 2px solid var(--k-line); border-radius: 26px; padding: 26px 30px; box-shadow: 0 10px 30px #0b2a4a18; max-width: 560px; }
.kid-card h1 { margin: 6px 0; }
.big-emoji { font-size: 64px; line-height: 1.1; } .big-emoji.sm { font-size: 28px; vertical-align: middle; margin-right: 6px; }
.kid-title { text-align: center; font-size: 30px; margin: 18px 0; }
.kid-sub { color: var(--k-mute); margin: 4px 0 8px; }
.kid-foot { margin-top: 28px; } .kid-foot a, .kid-page a.muted { color: var(--k-mute); }
.kbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800; font-size: 18px; padding: 12px 22px; border-radius: 16px; border: 2px solid var(--k-line); background: var(--k-card); color: var(--k-ink); cursor: pointer; text-decoration: none; transition: transform .08s; }
.kbtn:hover { transform: translateY(-1px); } .kbtn:active { transform: translateY(1px); }
.kbtn.primary { background: var(--k-accent); border-color: transparent; color: var(--k-accent-ink); box-shadow: 0 4px 0 color-mix(in srgb, var(--k-accent) 60%, #000); }
.kbtn.big { font-size: 22px; padding: 16px 30px; margin: 8px; }
.profiles { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.profile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 22px; background: var(--k-card); border: 3px solid var(--k-line); border-radius: 28px; cursor: pointer; font: inherit; font-size: 22px; color: var(--k-ink); min-width: 160px; transition: transform .1s; }
.profile:hover { transform: translateY(-4px) rotate(-1deg); border-color: var(--k-accent); }
.avatar { position: relative; display: inline-grid; place-items: center; border-radius: 50%; flex: none; box-shadow: inset 0 -6px 0 #0000001a; }
.av-sm { width: 34px; height: 34px; font-size: 20px; } .av-md { width: 64px; height: 64px; font-size: 38px; } .av-lg { width: 110px; height: 110px; font-size: 66px; } .av-xl { width: 140px; height: 140px; font-size: 86px; }
.av-hat { position: absolute; top: -22%; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: .6em; }
.av-acc { position: absolute; bottom: -6%; right: -10%; font-size: .45em; }
.kid-top { display: flex; align-items: center; gap: 10px; padding: 6px 0 12px; }
.kid-logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 22px; color: var(--k-ink); text-decoration: none; } .kid-logo img { width: 30px; height: 30px; }
.kicon { width: 46px; height: 46px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 22px; background: var(--k-chip); border: 2px solid var(--k-line); cursor: pointer; text-decoration: none; padding: 0; }
.kicon.on { background: var(--k-accent); border-color: transparent; }
.kchip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 999px; background: var(--k-chip); border: 2px solid var(--k-line); font-weight: 700; color: var(--k-ink); }
.kchip.stars b { color: #c98500; } body.kid[data-world=space] .kchip.stars b { color: #ffd166; } .kchip.fire { border-color: #ffb38a; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.kid-hero { display: flex; align-items: center; gap: 22px; padding: 16px 22px; background: var(--k-card); border: 2px solid var(--k-line); border-radius: 28px; margin-bottom: 18px; }
.kid-hero h1 { margin: 0; font-size: 30px; }
.subject-hero { border-top: 8px solid var(--sc); }
.kid-sec h2 { font-size: 22px; margin: 22px 4px 10px; }
.kid-crumbs { margin: 0 0 10px; } .kid-crumbs a { color: var(--k-accent); font-weight: 800; text-decoration: none; }
.plan { display: flex; gap: 14px; flex-wrap: wrap; }
.plan-card { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 140px; padding: 14px 18px; border-radius: 22px; border: 3px dashed var(--k-accent); background: var(--k-card); font: inherit; color: var(--k-ink); cursor: pointer; }
.plan-card .pc-icon { font-size: 34px; } .plan-card small { color: var(--k-accent); font-weight: 800; }
.plan-card.done { border-style: solid; border-color: var(--k-ok); opacity: .8; } .plan-card.done small { color: var(--k-ok); }
.subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.subjects.small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.subject { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 18px; border-radius: 24px; border: 0; background: var(--k-card); box-shadow: 0 6px 0 color-mix(in srgb, var(--sc) 70%, #000), 0 10px 22px #0b2a4a14; border-top: 10px solid var(--sc); font: inherit; color: var(--k-ink); text-align: left; cursor: pointer; text-decoration: none; transition: transform .1s; }
.subject:hover { transform: translateY(-3px); } .subject:active { transform: translateY(2px); }
.subject .s-icon { font-size: 40px; } .subject b { font-size: 19px; } .subject small { color: var(--k-mute); font-size: 14px; }
.unlocked { background: #e3fbe8; color: #155d2b; border: 2px solid #8fd9a3; border-radius: 20px; padding: 12px 16px; margin: 0 0 14px; font-size: 18px; }
.unlocked.big { font-size: 20px; margin: 12px 0; } .unlocked.limit { background: #fff4dc; color: #7a5200; border-color: #f0cd80; }
.ok-text { color: var(--k-ok); font-weight: 800; font-size: 20px; }
.play-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.play-title { font-size: 18px; }
.dots { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }
.dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--k-line); }
.dots i.now { background: var(--k-accent); transform: scale(1.25); } .dots i.ok { background: var(--k-ok); } .dots i.no { background: var(--k-no); }
.q-card { background: var(--k-card); border: 2px solid var(--k-line); border-radius: 30px; padding: 22px 26px 26px; box-shadow: 0 12px 34px #0b2a4a1c; max-width: 820px; margin: 0 auto; animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: .4; } }
.q-head { display: flex; align-items: flex-start; gap: 12px; }
.prompt { font-size: 26px; line-height: 1.3; margin: 4px 0 12px; }
.speak { flex: none; width: 52px; height: 52px; border-radius: 50%; font-size: 24px; border: 2px solid var(--k-line); background: var(--k-chip); cursor: pointer; padding: 0; display: grid; place-items: center; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.choices.list { grid-template-columns: 1fr; }
.choice { position: relative; font: inherit; font-size: 21px; font-weight: 800; padding: 16px 14px; border-radius: 20px; border: 3px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); cursor: pointer; box-shadow: 0 4px 0 var(--k-line); min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.choice:hover:not(:disabled) { border-color: var(--k-accent); }
.choice.right { background: #d8f6df; border-color: var(--k-ok); color: #135c27; } .choice.wrong { background: #ffe1d9; border-color: var(--k-no); color: #8a2d16; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.mini-speak { position: absolute; right: 10px; top: 8px; font-size: 16px; opacity: .7; }
.typein { display: flex; gap: 10px; margin-top: 12px; }
.big-input { flex: 1; font: inherit; font-size: 28px; font-weight: 800; padding: 12px 16px; border-radius: 18px; border: 3px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); text-align: center; letter-spacing: .04em; min-width: 0; }
.big-input:focus { outline: none; border-color: var(--k-accent); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; max-width: 360px; margin-left: auto; margin-right: auto; }
.key { font: inherit; font-size: 26px; font-weight: 800; padding: 12px; border-radius: 18px; border: 2px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); cursor: pointer; box-shadow: 0 4px 0 var(--k-line); }
.key.go { background: var(--k-ok); color: #fff; border-color: transparent; }
.fb { margin-top: 16px; padding: 14px 18px; border-radius: 20px; font-size: 19px; }
.fb.ok { background: #e3fbe8; border: 2px solid #8fd9a3; color: #135c27; } .fb.no { background: #fff1e6; border: 2px solid #ffc49b; color: #7a3410; }
.fb p { margin: 6px 0 10px; font-size: 17px; } .fb .next { margin-top: 4px; }
.q-card.done { text-align: center; }
.stars3 { font-size: 64px; letter-spacing: 6px; } .bigstar { color: var(--k-line); } .bigstar.on { color: #ffc93c; text-shadow: 0 3px 0 #d99a00; }
.score { font-size: 20px; }
.new-badges { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.row.center { justify-content: center; gap: 12px; } .center { text-align: center; }
.qv { display: flex; justify-content: center; margin: 6px 0 4px; }
.clock { width: 220px; height: 220px; } .clock .face { fill: #fffdf6; stroke: #1d2b3a; stroke-width: 5; } .clock .tick { stroke: #9aa7b4; stroke-width: 2; } .clock .tick.big { stroke: #1d2b3a; stroke-width: 4; }
.clock .num { font: 800 20px "Nunito", system-ui; fill: #1d2b3a; } .clock .hand { stroke-linecap: round; } .clock .hour { stroke: #1d2b3a; stroke-width: 8; } .clock .minute { stroke: #e63946; stroke-width: 5; } .clock .pin { fill: #1d2b3a; }
.coins { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: center; }
.coin-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; } .coin-wrap small { color: var(--k-mute, var(--muted)); font-size: 12px; }
.coin .body, .coin .rim { stroke: #00000033; stroke-width: 3; } .coin.silver .body { fill: #d9dde2; } .coin.gold .body { fill: #e9c15b; } .coin.two .rim { fill: #d9dde2; } .coin.two .core { fill: #e9c15b; stroke: #00000022; stroke-width: 2; }
.coin .lbl { font: 900 22px system-ui; fill: #39424d; }
.fraction { width: 220px; max-height: 220px; } .fraction .on { fill: #ff9f1c; stroke: #fff; stroke-width: 3; } .fraction .off { fill: #fff3df; stroke: #e7c99a; stroke-width: 3; }
.shape { width: 220px; } .shape .sh { fill: #8ecae6; stroke: #023047; stroke-width: 5; stroke-linejoin: round; }
.bars { width: min(100%, 420px); } .bars .ttl { font: 800 14px system-ui; fill: currentColor; } .bars .grid { stroke: #c9d6e2; } .bars .ax { font: 12px system-ui; fill: #6b7a8a; } .bars .bar { fill: #3a86ff; } .bars .lbl { font-size: 22px; }
.map-wrap { display: flex; gap: 18px; align-items: center; }
.mapgrid { display: grid; grid-template-columns: repeat(3, 90px); grid-template-rows: repeat(3, 90px); gap: 6px; background: #cfe9b8; padding: 8px; border-radius: 16px; border: 3px solid #8fb86e; }
.mc { background: #f6fbef; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; } .mc.empty { background: transparent; } .mi { font-size: 34px; } .mc small { font-size: 12px; color: #3c5a2a; }
.compass { position: relative; width: 90px; height: 90px; border: 3px solid currentColor; border-radius: 50%; font-weight: 900; flex: none; }
.compass b, .compass span { position: absolute; } .compass b { left: 50%; transform: translateX(-50%); top: 2px; color: #e63946; } .compass b.s { top: auto; bottom: 2px; color: inherit; } .compass .w { left: 6px; top: 34px; } .compass .e { right: 6px; top: 34px; }
.counters { font-size: 34px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; } .counters .plus { font-size: 30px; }
.arr { display: grid; gap: 8px; } .arr i { width: 22px; height: 22px; border-radius: 50%; background: #ff9f1c; }
.emo { font-size: 72px; } .bigtext { font-size: 80px; font-weight: 900; }
.listen-hint { font-size: 20px; color: var(--k-mute, var(--muted)); }
.passage { background: #fffaf0; color: #3b3021; border: 2px solid #f1e0bd; border-radius: 18px; padding: 14px 18px; font-size: 20px; line-height: 1.6; text-align: left; max-width: 720px; }
.shop-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 10px; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 18px; border: 3px solid var(--k-line); background: var(--k-card); cursor: pointer; font: inherit; color: var(--k-ink); }
.item .it { font-size: 38px; } .item .swatch { width: 40px; height: 40px; border-radius: 50%; display: block; } .item small { font-size: 13px; font-weight: 700; }
.item.on { border-color: var(--k-accent); background: color-mix(in srgb, var(--k-accent) 14%, var(--k-card)); } .item.locked .it { filter: grayscale(.7); opacity: .6; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badges .badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px; border-radius: 22px; background: var(--k-card); border: 2px solid var(--k-line); opacity: .55; }
.badges .badge.have { opacity: 1; border-color: #ffc93c; } .badges .badge span, .new-badges .badge span { font-size: 40px; } .badges .badge small { color: var(--k-mute); font-size: 12px; }
.new-badges .badge { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 12px; border-radius: 16px; background: var(--k-card); border: 2px solid #ffc93c; }
.worlds { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.world { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border-radius: 18px; border: 2px solid var(--line); font-size: 15px; cursor: pointer; }
.world span { font-size: 36px; } .w-sky { background: #dff1ff; color: #1d2b3a; } .w-forest { background: #e3f5e1; color: #1d2b3a; } .w-ocean { background: #d9f3fb; color: #1d2b3a; } .w-space { background: #231b55; color: #fff; } .w-candy { background: #ffeef5; color: #1d2b3a; }
.pinpad { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pin-dots { display: flex; gap: 10px; } .pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--accent); } .pin-dots i.on { background: var(--accent); }
.pin-msg { color: var(--red); min-height: 20px; }
.pinpad .key { background: var(--panel2); color: var(--text); border-color: var(--line); box-shadow: none; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
body.kid .overlay .window { border-radius: 24px; }
@media (max-width: 640px) { .kid-page { padding: 10px 10px 40px; font-size: 16px; } .choices { grid-template-columns: 1fr; } .prompt { font-size: 22px; } .kid-hero { flex-direction: column; text-align: center; } .kid-hero .chips { justify-content: center; } .mapgrid { grid-template-columns: repeat(3, 70px); grid-template-rows: repeat(3, 70px); } .av-xl { width: 110px; height: 110px; font-size: 66px; } }

/* ===================================================================================================== QuizyBit: parents' area extras */
.btnlike { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel2); color: var(--text); text-decoration: none; white-space: nowrap; }
.btnlike.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; } .btnlike.small { font-size: 12px; padding: 2px 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.child-tile { display: flex; flex-direction: column; gap: 8px; } .child-tile .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 16px; margin-bottom: 12px; }
.form-grid textarea, .form-grid input:not([type=checkbox]), .form-grid select { width: 100%; }
.plan-edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-edit { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel2); }
.row.wrap { flex-wrap: wrap; } .row.end { justify-content: flex-end; } .spacer { flex: 1; }
.topic-list { display: flex; flex-direction: column; }
.topic-row { display: grid; grid-template-columns: 26px 220px 1fr auto auto; gap: 10px; align-items: center; padding: 5px 4px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.samples { display: flex; flex-direction: column; gap: 12px; } .sample { padding: 10px; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; }
.sample .qv { justify-content: flex-start; } .sample .clock, .sample .shape, .sample .fraction { width: 140px; height: auto; } .sample .emo { font-size: 40px; } .sample .bigtext { font-size: 40px; } .sample .passage { font-size: 14px; }
.q-edit { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; } .q-row { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; } .q-row .row input { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; } .stat b { font-size: 24px; } .stat small { color: var(--muted); }
.daychart { width: 100%; height: auto; } .daychart .grid { stroke: var(--line); } .daychart .ax { font-size: 11px; fill: var(--muted); }
.daychart .bar-all { fill: color-mix(in srgb, var(--muted) 35%, transparent); } .daychart .bar-ok { fill: var(--accent); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 4px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; } .lg-ok { background: var(--accent); } .lg-all { background: color-mix(in srgb, var(--muted) 35%, transparent); }
.hbars { display: flex; flex-direction: column; gap: 6px; } .hb-row { display: grid; grid-template-columns: 170px 1fr 110px; gap: 10px; align-items: center; }
.hb-track { height: 12px; background: var(--panel2); border-radius: 6px; overflow: hidden; } .hb-track i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin: 3px 0; }
pre.code { background: var(--code); padding: 10px; border-radius: 8px; font-size: 12px; overflow: auto; }
.viz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

.kid-card.gate > a.muted { display: block; margin-top: 12px; }

.admin-card textarea { width: 100%; box-sizing: border-box; }

.rectv, .anglev { width: 260px; } .rectv .r { fill: #c7f0d8; stroke: #2d8a4e; stroke-width: 4; } .rectv .lbl { font: 800 16px system-ui; fill: #1d2b3a; }
.anglev .ray { stroke: #1d2b3a; stroke-width: 5; stroke-linecap: round; } .anglev .arc { fill: none; stroke: #e63946; stroke-width: 4; } .anglev .mark { fill: none; stroke: #e63946; stroke-width: 3; } .anglev .pt { fill: #1d2b3a; }

/* puzzles: drag to connect, drag to order */
.matchboard { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18% ; margin: 10px 0 14px; touch-action: none; }
.mcol { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.mlines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.mline { fill: none; stroke-width: 5; stroke-linecap: round; } .mline.live { stroke-dasharray: 8 7; }
.mtile { font: inherit; font-size: 20px; font-weight: 800; padding: 14px 12px; border-radius: 18px; border: 3px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); cursor: grab; box-shadow: 0 4px 0 var(--k-line); min-height: 58px; touch-action: none; }
.mtile.done { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 14%, var(--k-bg2)); }
.mtile.picked { outline: 4px dashed var(--k-accent); outline-offset: 2px; }
.matchboard.locked .mtile { cursor: default; opacity: .85; }
.orderrow { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0 14px; touch-action: none; }
.otile { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; padding: 12px 16px; border-radius: 16px; border: 3px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); cursor: grab; box-shadow: 0 4px 0 var(--k-line); touch-action: none; }
.otile .onum { font-size: 13px; color: var(--k-mute); background: var(--k-chip); border-radius: 50%; width: 22px; height: 22px; display: inline-grid; place-items: center; }
.otile.dragging { opacity: .35; } .otile.picked { outline: 4px dashed var(--k-accent); outline-offset: 2px; }
.otile.ghost { position: fixed; z-index: 300; pointer-events: none; transform: rotate(-3deg) scale(1.05); box-shadow: 0 12px 24px #0003; }
.orderrow.locked .otile { cursor: default; }
/* no accidental text selection for children (typing boxes still work) */
body.kid { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.kid input, body.kid textarea, body.kid [contenteditable] { -webkit-user-select: text; user-select: text; }
body.kid img, body.kid svg { -webkit-user-drag: none; }

.dt-days { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; } .dt-row { display: grid; grid-template-columns: 90px 120px 24px 120px; gap: 8px; align-items: center; }
.kid-card.rest { background: linear-gradient(#1f2a5c, #2c3e7a); color: #eef2ff; border-color: #3b4c8f; } .kid-card.rest .muted { color: #c3cbef; }

/* downtime grid (Parents › Downtime) */
.dg-wrap { display: grid; gap: 8px; margin: 8px 0; }
.dg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; }
.dg-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; background: color-mix(in srgb, var(--green) 30%, var(--panel2)); border: 1px solid var(--line); }
.dg-key.down { background: color-mix(in srgb, var(--accent) 55%, #1b2240); }
.dg-scroll { overflow-x: auto; max-width: 100%; }
.dg { border-collapse: separate; border-spacing: 2px; user-select: none; touch-action: none; }
.dg th { font-weight: 500; font-size: 11px; color: var(--muted); }
.dg-day { padding-right: 6px; text-align: right; cursor: pointer; white-space: nowrap; }
.dg-hour { cursor: pointer; position: relative; width: 13px; min-width: 13px; height: 16px; padding: 0; }
.dg-hl { position: absolute; left: 0; bottom: 1px; white-space: nowrap; pointer-events: none; }
.dg-cell { width: 13px; height: 22px; border-radius: 3px; cursor: pointer; background: color-mix(in srgb, var(--green) 30%, var(--panel2)); }
.dg-cell.down { background: color-mix(in srgb, var(--accent) 55%, #1b2240); }
.dg-cell:hover { outline: 2px solid var(--accent); outline-offset: -1px; }

/* Nintendo Switch page */
.steps { margin: 0 0 8px 18px; display: grid; gap: 10px; }
.chk.big { font-size: 15px; }
.nin-meter { display: inline-block; width: 140px; height: 8px; border-radius: 4px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; vertical-align: middle; }
.nin-meter i { display: block; height: 100%; background: var(--accent); } .nin-meter i.over { background: var(--red); }

.adb-box { margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); display: grid; gap: 6px; }
.adb-box h4 { margin: 0; }

/* Curriculum › Questions available */
.cur-counts { overflow-x: auto; } .cur-counts td.num, .cur-counts th.num { text-align: right; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.cur-counts td.low { color: var(--red); font-weight: 600; }

/* Overview › earned time */
.earned { display: grid; gap: 6px; margin: 6px 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); }
.earned-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.earned-row { display: grid; grid-template-columns: minmax(90px, auto) auto 1fr; gap: 4px 10px; align-items: center; }
.earned-row .earned-why { grid-column: 1 / -1; }
.earned-row.open .earned-left b { color: var(--green); }
.earned-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; } .earned-bar i { display: block; height: 100%; background: var(--green); }

/* Kid home: countdown to the next lesson */
.k-count { font-variant-numeric: tabular-nums; font-weight: 700; } .k-count.done { font-weight: 600; opacity: .85; }
.k-next { display: flex; gap: 14px; align-items: center; margin: 14px 4px 4px; padding: 14px 18px; border-radius: 18px; background: color-mix(in srgb, #06a77d 18%, var(--k-card, #fff)); border: 2px solid #06a77d; font-size: 18px; }
.k-next-icon { font-size: 34px; } .k-next-time { font-size: 26px; font-variant-numeric: tabular-nums; color: #06a77d; }
.k-next-sub { font-size: 14px; opacity: .8; margin-top: 2px; }
.bday-banner { display: flex; gap: 14px; align-items: center; margin: 14px 4px 4px; padding: 14px 18px; border-radius: 18px; background: color-mix(in srgb, #ff6fb5 16%, var(--k-card, #fff)); border: 2px solid #ff6fb5; font-size: 18px; }
.bday-banner.today { background: linear-gradient(90deg, color-mix(in srgb, #ff6fb5 22%, var(--k-card, #fff)), color-mix(in srgb, #ffd166 30%, var(--k-card, #fff))); }
.bday-icon { font-size: 38px; } .bday-banner.today .bday-icon { animation: bday-bounce 1.2s ease-in-out infinite; }
.bday-sub { font-size: 14px; opacity: .8; margin-top: 2px; }
.bday-days { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.bday-days i { width: 18px; height: 18px; border-radius: 6px; background: color-mix(in srgb, #ff6fb5 35%, transparent); font-style: normal; font-size: 13px; line-height: 18px; text-align: center; }
.bday-days i:last-child { background: none; }
@keyframes bday-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .bday-banner.today .bday-icon { animation: none; } }


/* ============================================================================================== game screens (2026.11.23.4) */
.kidlike { --k-bg: #e8f6ff; --k-bg2: #ffffff; --k-ink: #1d2b3a; --k-mute: #5b6b7d; --k-card: #ffffff; --k-line: #d6e6f3; --k-accent: #3a86ff; --k-accent-ink: #fff; --k-ok: #2a9d4b; --k-no: #e76f51; --k-chip: #ffffffcc;
  background: var(--k-bg); color: var(--k-ink); font-family: "Nunito", "Segoe UI Rounded", "Arial Rounded MT Bold", system-ui, sans-serif; color-scheme: light; padding: 14px; border-radius: 18px; }
.gt-list { display: grid; gap: 6px; }
.gt-row { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.gt-row.off { opacity: .55; } .gt-on { display: flex; gap: 4px; align-items: center; font-weight: 600; cursor: pointer; white-space: nowrap; } .gt-icon { font-size: 24px; text-align: center; } .gt-text b { font-size: 14px; }
.gt-stage { margin-top: 10px; max-height: 70vh; overflow: auto; }
.gt-stage .q-card { box-shadow: none; }
@media (max-width: 640px) { .gt-row { grid-template-columns: 30px 1fr; } .gt-row > button, .gt-row > .gt-on { grid-column: 2; justify-self: start; } }

.g-hint { margin: 6px 0; }
.boss-tag { display: inline-block; font-size: 15px; background: #ffd166; color: #5a3d00; border-radius: 999px; padding: 2px 10px; margin-right: 8px; vertical-align: middle; }
.q-card.boss { border-color: #ffd166; box-shadow: 0 0 0 4px #ffd16655, 0 12px 34px #0b2a4a1c; }
.streak { margin-top: 6px; font-weight: 800; color: #d35400; } .streak.small { font-size: 15px; }
.kbtn.mic { padding: 10px 14px; } .kbtn.mic.on { background: #ffe1d9; border-color: var(--k-no); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.timer { height: 10px; border-radius: 99px; background: var(--k-line); overflow: hidden; margin: 6px 0 10px; } .timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff595e, #ffca3a, #8ac926); transition: width .1s linear; }
.ghost { position: fixed; pointer-events: none; z-index: 1000; opacity: .9; transform: rotate(-3deg) scale(1.05); }

/* fill in the blank */
.cz-line { font-size: 24px; font-weight: 700; line-height: 2.1; text-align: center; margin: 10px 0; }
.cz-slot { display: inline-block; min-width: 110px; border-bottom: 4px solid var(--k-accent); margin: 0 6px; text-align: center; color: var(--k-accent); cursor: pointer; }
.cz-opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 6px 0; } .cz-n { font-size: 15px; }
.choice.cz-o { min-height: 48px; font-size: 18px; padding: 10px 16px; } .choice.picked { border-color: var(--k-accent); background: color-mix(in srgb, var(--k-accent) 14%, var(--k-bg2)); }

/* true / false */
.tf-card { font-size: 26px; font-weight: 800; text-align: center; padding: 26px 16px; border-radius: 22px; background: var(--k-bg2); border: 3px solid var(--k-line); margin: 8px 0 14px; }
.tf-card.pop { animation: pop .25s ease-out; }
.kbtn.tf-t { background: #d8f6df; border-color: var(--k-ok); font-size: 22px; min-width: 150px; } .kbtn.tf-f { background: #ffe1d9; border-color: var(--k-no); font-size: 22px; min-width: 150px; }

/* tap / fix */
.tp-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; align-items: center; }
.tp-tok { font: inherit; font-size: 22px; font-weight: 700; padding: 8px 12px; border-radius: 12px; border: 3px solid transparent; background: var(--k-bg2); color: var(--k-ink); cursor: pointer; }
.tp-tok.big { font-size: 34px; min-width: 70px; } .tp-tok.on { border-color: var(--k-accent); background: color-mix(in srgb, var(--k-accent) 18%, var(--k-bg2)); }
.tp-punct { font-size: 22px; font-weight: 700; }
.fx-opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; min-height: 54px; }

/* sort / label chips */
.st-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 52px; padding: 8px; border: 2px dashed var(--k-line); border-radius: 16px; margin: 8px 0; }
.st-chip { font-size: 18px; font-weight: 800; padding: 8px 14px; border-radius: 14px; background: var(--k-bg2); border: 3px solid var(--k-line); box-shadow: 0 3px 0 var(--k-line); cursor: grab; touch-action: none; user-select: none; }
.st-chip.picked { border-color: var(--k-accent); } .st-chip.dragging { opacity: .35; }
.st-bins { display: grid; gap: 10px; }
.st-bin { border: 3px solid var(--k-line); border-radius: 18px; padding: 8px; min-height: 120px; background: color-mix(in srgb, var(--k-accent) 5%, var(--k-bg2)); cursor: pointer; }
.st-bin > b { display: block; text-align: center; margin-bottom: 6px; } .st-items { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

/* number line */
.nl-target { text-align: center; font-size: 22px; } .nl-target b { font-size: 30px; color: var(--k-accent); }
.nl-svg { width: 100%; max-width: 680px; display: block; margin: 0 auto; touch-action: none; cursor: pointer; }
.nl-axis { stroke: var(--k-ink); stroke-width: 4; stroke-linecap: round; } .nl-tick { stroke: var(--k-ink); stroke-width: 3; } .nl-num { font-size: 18px; font-weight: 700; fill: var(--k-ink); }
.nl-marker path, .nl-marker circle { fill: var(--k-accent); }

/* memory */
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 560px; margin: 10px auto; } .mem-grid.six { grid-template-columns: repeat(4, 1fr); }
.mem-card { position: relative; display: grid; place-items: center; aspect-ratio: 1.1; border-radius: 16px; border: 3px solid var(--k-line); background: var(--k-accent); color: var(--k-ink); font: inherit; font-weight: 800; font-size: 20px; cursor: pointer; perspective: 600px; }
.mem-card .mem-face { display: none; } .mem-card .mem-back { font-size: 28px; }
.mem-card.up { background: var(--k-bg2); } .mem-card.up .mem-face { display: block; } .mem-card.up .mem-back { display: none; }
.mem-card.got { background: #d8f6df; border-color: var(--k-ok); }

/* clock */
.setclock { width: min(300px, 80vw); display: block; margin: 0 auto; touch-action: none; } .setclock .hand.grab { cursor: grab; stroke-linecap: round; }

/* coins */
.mm-bank, .mm-tray { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin: 8px 0; }
.mm-tray { min-height: 90px; border: 2px dashed var(--k-line); border-radius: 16px; padding: 8px; }
.mm-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mm-coin { border-radius: 50%; border: 3px solid #8a8f98; background: radial-gradient(circle at 35% 30%, #f4f6f8, #b9bec6); font: inherit; font-weight: 800; color: #2b2f36; cursor: pointer; display: grid; place-items: center; font-size: 14px; }
.mm-coin.gold { background: radial-gradient(circle at 35% 30%, #fff3b0, #d4a017); border-color: #a77c00; }
.mm-coin.two { background: radial-gradient(circle, #ffe38a 0 42%, #c9ced6 43%); border-color: #8a8f98; }

/* base-ten blocks */
.bt-cols { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.bt-col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 150px; }
.bt-area { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-end; justify-content: center; min-height: 150px; width: 170px; padding: 6px; border: 2px dashed var(--k-line); border-radius: 14px; }
.bt-h-piece { width: 50px; height: 50px; background: repeating-linear-gradient(0deg, #3a86ff 0 4px, #6aa6ff 4px 5px), #3a86ff; border-radius: 3px; }
.bt-t-piece { width: 10px; height: 60px; background: repeating-linear-gradient(0deg, #ff9f1c 0 5px, #ffc46b 5px 6px); border-radius: 2px; }
.bt-o-piece { width: 12px; height: 12px; background: #2a9d4b; border-radius: 2px; }

/* shade */
.fraction.shade { width: min(300px, 80vw); display: block; margin: 0 auto; } .fraction.shade path, .fraction.shade rect { cursor: pointer; stroke: var(--k-ink); stroke-width: 2; }
.fraction.shade .off { fill: var(--k-bg2); } .fraction.shade .on { fill: #ff9f1c; }

/* balance */
.bal-svg { width: 100%; max-width: 460px; display: block; margin: 0 auto; }
.bal-stand { fill: #8d6e63; } .bal-beam { stroke: #5d4037; stroke-width: 8; stroke-linecap: round; } .bal-rope { stroke: #8d6e63; stroke-width: 2; } .bal-pan { fill: #c9ced6; stroke: #8a8f98; stroke-width: 2; }
.bal-w rect { fill: #546e7a; } .bal-w text { fill: #fff; font-weight: 800; font-size: 14px; } .bal-w.rm { cursor: pointer; } .bal-w.bag rect { fill: #ff9f1c; }
.bal-tray { display: flex; gap: 10px; justify-content: center; margin: 8px 0; } .bal-add { font-size: 20px; }

/* grid rectangles */
.gr-grid { display: grid; gap: 3px; max-width: 460px; margin: 8px auto; touch-action: none; user-select: none; }
.gr-grid i { aspect-ratio: 1; background: var(--k-bg2); border: 2px solid var(--k-line); border-radius: 4px; } .gr-grid i.on { background: #8ecae6; border-color: #219ebc; }
.gr-size { font-weight: 800; }

/* estimation jar */
.jar-wrap { position: relative; width: 240px; margin: 0 auto; } .jar { width: 240px; display: block; }
.jar-glass { fill: #e6f4ff88; stroke: #7aa7c7; stroke-width: 4; }
.jar-cover { position: absolute; inset: 0; display: none; place-items: center; text-align: center; font-weight: 800; font-size: 20px; background: var(--k-card); border-radius: 30px; padding: 20px; }
.jar-wrap.hidden .jar-cover { display: grid; }

/* diagrams to label */
.dg-svg { width: 100%; max-width: 520px; display: block; margin: 0 auto; }
.dg-soil { fill: #8d6e63; } .dg-root { stroke: #f3e5ab; stroke-width: 4; fill: none; } .dg-stem { stroke: #2e7d32; stroke-width: 9; fill: none; stroke-linecap: round; } .dg-leaf { fill: #66bb6a; }
.dg-petal { fill: #ff8fab; } .dg-centre { fill: #ffd166; } .dg-sun { fill: #ffd166; } .dg-sea { fill: #48cae4; } .dg-hill { fill: #95d5b2; } .dg-cloud { fill: #f1f5f9; stroke: #cbd5e1; stroke-width: 2; }
.dg-arrow { stroke: #90a4ae; stroke-width: 3; fill: none; stroke-dasharray: 6 5; } .dg-rain { stroke: #0096c7; stroke-width: 3; stroke-linecap: round; }
.dg-body { fill: #6d4c41; } .dg-leg { stroke: #4e342e; stroke-width: 4; fill: none; stroke-linecap: round; } .dg-magma { fill: #e85d04; } .dg-smoke { stroke: #9e9e9e; stroke-width: 6; fill: none; }
.dg-spot circle { fill: #fff; stroke: var(--k-accent); stroke-width: 3; cursor: pointer; } .dg-spot text { font-weight: 800; font-size: 15px; fill: var(--k-accent); pointer-events: none; }
.dg-spot.done circle { fill: var(--k-accent); } .dg-spot.done text { fill: #fff; }
.dg-label { font-size: 15px; font-weight: 800; fill: #1d2b3a; paint-order: stroke; stroke: #fff; stroke-width: 4px; }

/* maps */
.mp-svg { width: 100%; max-width: 600px; display: block; margin: 0 auto; background: #bde0fe; border-radius: 14px; }
.mp-r path { fill: #b7e4c7; stroke: #2d6a4f; stroke-width: 1.5; cursor: pointer; } .mp-r.water path { fill: #90caf9; stroke: #5b9bd5; }
.mp-r:hover path { filter: brightness(1.08); } .mp-r.on path { fill: #ffd166; stroke: #b07d00; stroke-width: 3; } .mp-r.right path { fill: #8ac926; }

/* experiments */
.sim-stage { height: 230px; display: flex; align-items: flex-end; justify-content: center; border-radius: 18px; background: linear-gradient(#e0f2fe, #f0fdf4); margin: 8px 0; overflow: hidden; position: relative; }
.sim-pot { display: flex; flex-direction: column; align-items: center; } .sim-plant { width: 12px; background: #2e7d32; border-radius: 6px 6px 0 0; transition: height 1.2s ease-out; position: relative; }
.sim-plant span { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); font-size: 40px; } .sim-potbase { font-size: 56px; line-height: 1; }
.sim-track { position: absolute; inset: 0; } .sim-car { position: absolute; bottom: 30px; font-size: 40px; transition: left 1.6s cubic-bezier(.2,.7,.4,1); transform: scaleX(-1); }
.sim-flag { position: absolute; bottom: 30px; font-size: 34px; } .sim-floor { position: absolute; bottom: 0; left: 0; right: 0; height: 28px; background: #d7ccc8; text-align: center; font-weight: 800; }
.sim-ctls { display: grid; gap: 8px; max-width: 460px; margin: 0 auto; } .sim-ctl { display: grid; grid-template-columns: 130px 1fr 90px; align-items: center; gap: 8px; font-weight: 700; }
.sim-out { font-weight: 800; min-height: 1.4em; }

/* trace */
.tr-canvas { width: min(300px, 80vw); aspect-ratio: 1; display: block; margin: 0 auto; background: var(--k-bg2); border: 3px solid var(--k-line); border-radius: 20px; touch-action: none; }

/* crossword */
.cw-grid { display: grid; gap: 2px; width: fit-content; margin: 8px auto; }
.cw-blank { aspect-ratio: 1; } .cw-cell { position: relative; aspect-ratio: 1; }
.cw-cell small { position: absolute; top: 1px; left: 3px; font-size: 10px; font-weight: 800; pointer-events: none; }
.cw-in { width: 100%; height: 100%; text-align: center; font: inherit; font-size: 20px; font-weight: 800; text-transform: uppercase; border: 2px solid var(--k-ink); border-radius: 4px; background: var(--k-bg2); color: var(--k-ink); padding: 0; }
.cw-clues { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .cw-clues h3 { margin: 4px 0; } .cw-clues ol { list-style: none; padding: 0; margin: 0; } .cw-clue { font-size: 18px; }

/* word search */
.ws-wrap { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.ws-grid { display: grid; gap: 2px; touch-action: none; user-select: none; width: min(420px, 90vw); }
.ws-c { aspect-ratio: 1; display: grid; place-items: center; font-weight: 800; font-size: 20px; background: var(--k-bg2); border-radius: 6px; } .ws-c.sel { background: #ffd166; } .ws-c.got { background: #b7e4c7; }
.ws-words { list-style: none; padding: 0; margin: 0; font-weight: 800; font-size: 18px; } .ws-words li.got { text-decoration: line-through; color: var(--k-ok); }

/* story chain */
.sc-passage { text-align: left; } .sc-q { margin: 10px 0; } .sc-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* bubble pop */
.pop-field { position: relative; height: 340px; overflow: hidden; border-radius: 20px; background: linear-gradient(#caf0f8, #e0fbfc); }
.bubble { position: absolute; bottom: -80px; width: 78px; height: 78px; border-radius: 50%; border: 2px solid #ffffffcc; background: radial-gradient(circle at 30% 30%, #ffffffee, #90e0efaa 60%, #48cae488); font: inherit; font-weight: 800; font-size: 17px; color: #023e8a; cursor: pointer; animation: rise 9s linear infinite; }
.bubble.popped { animation: popped .25s forwards; pointer-events: none; } .pop-field.over .bubble { animation-play-state: paused; }
@keyframes rise { to { transform: translateY(-460px); } } @keyframes popped { to { transform: scale(1.6); opacity: 0; } }

/* lane runner */
.rn-prompt { text-align: center; font-size: 26px; font-weight: 800; margin: 4px 0 8px; min-height: 1.3em; }
.rn-road { position: relative; height: 330px; display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 18px; overflow: hidden; background: #6c757d; }
.rn-lane { border-right: 3px dashed #ffffff88; cursor: pointer; } .rn-lane:last-of-type { border-right: 0; }
.rn-gate { position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: repeat(3, 1fr); pointer-events: none; }
.rn-gate span { margin: 0 8px; text-align: center; font-size: 24px; font-weight: 800; background: #ffd166; border-radius: 12px; padding: 8px 0; color: #1d2b3a; }
.rn-me { position: absolute; bottom: 12px; font-size: 46px; transform: translateX(-50%); transition: left .15s; pointer-events: none; }

/* whack-a-fact */
.wk-hole { min-height: 170px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 85%, #6d4c41 0 30%, transparent 31%), #c5e1a5; border-radius: 22px; padding: 14px; }
.wk-card { font: inherit; font-size: 21px; font-weight: 800; padding: 16px 18px; border-radius: 18px; border: 3px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); cursor: pointer; max-width: 560px; animation: pop .25s ease-out; }
.wk-card.hit { background: #ffd166; transform: scale(.95); }

/* order variants, number machine */
.orderrow.letters .otile { min-width: 54px; font-size: 26px; text-transform: lowercase; justify-content: center; } .orderrow.letters .onum { display: none; }
.orderrow.cards .otile { flex-direction: column; min-width: 120px; text-align: center; }
.orderrow.timeline { flex-direction: column; align-items: stretch; border-left: 6px solid var(--k-accent); padding-left: 10px; }
.machine { display: flex; flex-direction: column; align-items: center; gap: 8px; } .mc-box { font-weight: 800; background: #ffd166; padding: 6px 14px; border-radius: 12px; }
.mc-table { border-collapse: collapse; font-size: 22px; font-weight: 800; } .mc-table td, .mc-table th { padding: 4px 16px; text-align: center; border-bottom: 2px solid var(--k-line); } .mc-table tr.ask td { color: var(--k-accent); }

/* races */
.race-bar { display: grid; gap: 4px; max-width: 820px; margin: 0 auto 8px; }
.race-row { display: grid; grid-template-columns: 34px 90px 1fr 40px; gap: 8px; align-items: center; }
.race-track { height: 12px; border-radius: 99px; background: var(--k-line); overflow: hidden; } .race-track i { display: block; height: 100%; background: #e63946; transition: width .5s; }
.race-code { font-size: 56px; font-weight: 900; letter-spacing: 10px; color: #e63946; }
.race-players { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; } .race-p { display: flex; gap: 6px; align-items: center; }
.race-menu { display: grid; gap: 18px; } .race-final { margin: 8px 0; } .race-place { margin: 0 8px; font-weight: 800; }
@media (max-width: 640px) { .cw-clues { grid-template-columns: 1fr; } .sim-ctl { grid-template-columns: 100px 1fr 70px; } .rn-road { height: 280px; } .bubble { width: 66px; height: 66px; font-size: 15px; } }

/* ---------------------------------------------------------------------------------------------- pop culture (Fun Stuff) */
.q-card.pop { border-color: #ff006e88; }
.pop-tag { align-self: flex-start; display: inline-block; margin-bottom: 8px; padding: 3px 12px; border-radius: 999px; background: #ff006e; color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.pop-kids { display: grid; gap: 8px; margin: 6px 0 12px; }
.pop-kid { display: grid; grid-template-columns: 36px minmax(80px, 160px) 50px minmax(0, 260px); gap: 10px; align-items: center; }
.pop-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin-top: 10px; }
.pop-cat { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.pop-cat.off { opacity: .55; } .pop-cat .chk { display: flex; gap: 6px; align-items: center; cursor: pointer; } .pc-i { font-size: 20px; }
.pop-fresh { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
@media (max-width: 640px) { .pop-kid { grid-template-columns: 36px 1fr 40px; } .pop-kid > select { grid-column: 2 / 4; } }

/* ---------------------------------------------------------------------------------------------- high scores */
.kchip.score { background: #fff3c4; border-color: #ffd166; color: #7a5300; }
.kchip.score.bump { animation: hs-bump .45s ease; }
@keyframes hs-bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.fb .pts { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: #fff3c4; color: #7a5300; font-weight: 800; font-size: 14px; }
.hs-final { display: grid; justify-items: center; gap: 4px; margin: 10px auto; padding: 12px 18px; border-radius: 16px; background: var(--k-chip); border: 2px solid var(--k-line); max-width: 420px; }
.hs-final.new { border-color: #ffd166; box-shadow: 0 0 0 4px #ffd16655; }
.hs-big { font-size: 34px; font-weight: 900; color: var(--k-ink); line-height: 1.1; } .hs-big small { font-size: 15px; font-weight: 700; }
.hs-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 4px; }
.hs-tab { padding: 8px 14px; border-radius: 999px; border: 2px solid var(--sc, var(--k-line)); background: var(--k-chip); color: var(--k-ink); font-weight: 800; cursor: pointer; font-size: 15px; }
.hs-tab.on { background: var(--sc); color: #fff; }
.hs-mine { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; padding: 12px 16px; border-radius: 16px; background: var(--k-chip); border: 2px solid var(--k-line); color: var(--k-ink); }
.hs-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.hs-list li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 14px; background: var(--k-chip); border: 2px solid var(--k-line); color: var(--k-ink); flex-wrap: wrap; }
.hs-list li.me { border-color: #ffd166; box-shadow: 0 0 0 3px #ffd16644; }
.hs-list .spacer { flex: 1; } .hs-place { width: 30px; text-align: center; font-size: 20px; font-weight: 800; } .hs-pts { font-size: 18px; min-width: 64px; text-align: right; }
.hs-how { margin: 16px auto; max-width: 560px; padding: 10px 16px; border-radius: 14px; background: var(--k-chip); border: 2px solid var(--k-line); color: var(--k-ink); }
.hs-how summary { cursor: pointer; font-weight: 800; }
.chips.center { justify-content: center; }
.kid-sec h3 { font-size: 20px; color: var(--k-ink); margin: 18px 0 6px; }

/* ---------------------------------------------------------------------------------------------- watch live */
.watch-kids { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.watch-kid { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: inherit; }
.watch-kid.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5383b; box-shadow: 0 0 0 0 #e5383b88; animation: live-pulse 1.6s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 #e5383b88; } 70% { box-shadow: 0 0 0 8px #e5383b00; } 100% { box-shadow: 0 0 0 0 #e5383b00; } }
.live-pill { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: #e5383b; color: #fff; font-weight: 700; font-size: 12px; }
.live-pill.done { background: #2a9d4b; } .live-pill.idle { background: #6c757d; }
.watch-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.watch-title { font-size: 17px; } .watch-dots { margin-top: 8px; justify-content: flex-start; }
.watch-dots i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 5px; background: var(--line); }
.watch-dots i.ok { background: #2a9d4b; } .watch-dots i.no { background: #e76f51; } .watch-dots i.now { background: #3a86ff; box-shadow: 0 0 0 3px #3a86ff55; }
.watch-score { display: grid; justify-items: end; } .watch-score b { font-size: 24px; }
.watch-stage { pointer-events: none; user-select: none; max-width: 760px; }
.watch-list { padding-left: 28px; display: grid; gap: 8px; }
.watch-list li { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); }
.watch-list li.ok { border-left: 4px solid #2a9d4b; } .watch-list li.no { border-left: 4px solid #e76f51; }
.wl-q { font-weight: 600; } .wl-a { margin-top: 2px; }
.watch-now { display: block; text-align: center; margin: 6px 0; }
.watch-alerts { display: grid; gap: 4px; }
@media (max-width: 640px) { .watch-head { grid-template-columns: auto 1fr; } .watch-score { grid-column: 1 / -1; justify-items: start; } }

/* ---------------------------------------------------------------------------------------------- live mirror + full screen */
.mirror-wrap { position: relative; overflow: hidden; border-radius: 18px; }
.mirror-frame { border: 0; transform-origin: 0 0; display: block; background: transparent; pointer-events: none; }
.mirror-ptr { position: absolute; width: 18px; height: 18px; margin: -4px 0 0 -4px; pointer-events: none; z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M2 1l13 7-6 1.5L6 16z' fill='%23ff006e' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat; transition: left .12s linear, top .12s linear; }
.mirror-ptr.down { transform: scale(.85); }
.mirror-click { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid #ff006e; pointer-events: none; z-index: 1; animation: mirror-click .6s ease-out forwards; }
@keyframes mirror-click { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.mirror-live { margin-left: 8px; color: #e5383b; font-size: 12px; font-weight: 800; animation: live-blink 1.6s infinite; }
@keyframes live-blink { 50% { opacity: .35; } }
.watch-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; } .watch-bar .spacer { flex: 1; }
.watch-bar .watch-kids { margin: 0; }
.watch-root:fullscreen { background: var(--bg, #111); overflow: auto; padding: 18px 22px; }
.watch-root:fullscreen .watch-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 30%); gap: 16px; align-items: start; }
.watch-root:fullscreen .watch-screen { margin: 0; }
.watch-root:fullscreen .watch-list { max-height: calc(100vh - 260px); overflow: auto; }

/* ---------------------------------------------------------------------------------------------- question history */
.qh-list { display: grid; gap: 8px; }
.qh-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(170px, auto); gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.qh-row.off { opacity: .6; } .qh-score { display: grid; gap: 2px; text-align: right; font-weight: 700; } .qh-rule { display: grid; gap: 2px; }
.wl-rule { margin-top: 2px; }
@media (max-width: 640px) { .qh-row { grid-template-columns: 1fr auto; } .qh-rule { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------------------------------------- downtime soon */
.dt-bar { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; margin: 6px auto 10px; max-width: 1060px; padding: 8px 14px; border-radius: 14px;
  background: #2b2d6e; color: #fff; box-shadow: 0 4px 14px #0b2a4a22; }
.dt-bar.soon { background: #6a2c91; animation: live-blink 1.6s infinite; }
.dt-icon { font-size: 22px; grid-row: span 2; } .dt-text { font-size: 15px; } .dt-sub { opacity: .85; }
.dt-track { height: 8px; border-radius: 99px; background: #ffffff33; overflow: hidden; } .dt-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd166, #ff8a5c); transition: width 1s linear; }

/* ---------------------------------------------------------------------------------------------- movement games */
.g-move { display: grid; gap: 8px; }
.mv-prompt { text-align: center; font-size: 22px; font-weight: 800; color: var(--k-ink); min-height: 30px; }
.mv-field { position: relative; height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(#dff1ff, #f4fbff); border: 2px solid var(--k-line); touch-action: none; outline: none; }
.mv-field:focus { border-color: #3a86ff; }
.mv-pad { display: flex; justify-content: center; gap: 8px; } .mv-btn { min-width: 56px; font-size: 20px; }
.ct-item, .bl-rock, .sn-food { position: absolute; transform: translate(-50%, -50%); padding: 6px 12px; border-radius: 999px; background: #fff; border: 2px solid #3a86ff; font-weight: 800; color: #1d2b3a; white-space: nowrap; font-size: 16px; }
.ct-item.caught { background: #c8f5d2; border-color: #2a9d4b; }
.ct-basket { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 46px; line-height: 1; }
.mz-grid { display: grid; height: 100%; } .mz-cell { border: 1px solid #ffffff; background: #eaf6ff; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #1d2b3a; text-align: center; overflow: hidden; cursor: pointer; }
.mz-cell.wall { background: #5b6b7d; } .mz-cell.door { background: #ffd166; } .mz-cell.reached { background: #8ee6c4; }
.mz-me { position: absolute; transform: translate(-50%, -50%); font-size: 26px; transition: left .12s, top .12s; pointer-events: none; }
.mz-me.bump { animation: hs-bump .3s; }
.sn-seg { position: absolute; background: #2a9d4b; border-radius: 6px; display: grid; place-items: center; font-size: 16px; } .sn-seg.head { background: #1b7a36; }
.sn-food { font-size: 13px; padding: 3px 8px; border-color: #e76f51; }
.mv-blaster { background: linear-gradient(#17123b, #2a2266); }
.bl-rock { background: #3d3488; color: #fff; border-color: #b9b2e6; } .bl-rock.boom { background: #ffd166; color: #1d1640; }
.bl-ship { position: absolute; bottom: 6px; transform: translateX(-50%) rotate(-45deg); font-size: 38px; line-height: 1; }
.bl-shot { position: absolute; width: 6px; height: 16px; margin-left: -3px; border-radius: 3px; background: #ffd166; box-shadow: 0 0 8px #ffd166; }

/* ---------------------------------------------------------------------------------------------- Monster Quest */
.battle { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; max-width: 820px; margin: 0 auto 12px; padding: 14px 18px 10px;
  border-radius: 20px; background: linear-gradient(135deg, #2a2266, #6a4c93); color: #fff; box-shadow: 0 10px 28px #0b2a4a33; }
.ba-side { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
.ba-vs { font-size: 30px; } .ba-hearts { font-size: 16px; letter-spacing: 1px; } .ba-heart.gone { opacity: .5; }
.ba-mon { font-size: 72px; line-height: 1; filter: drop-shadow(0 6px 8px #0006); } .ba-mon.boss { font-size: 92px; }
.ba-name { font-size: 16px; } .ba-line { font-size: 12px; opacity: .8; max-width: 240px; } .ba-hpt { opacity: .85; }
.ba-bar { width: 160px; height: 10px; border-radius: 99px; background: #ffffff33; overflow: hidden; } .ba-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff5d5d, #ffd166); transition: width .35s; }
.ba-say { grid-column: 1 / -1; text-align: center; font-weight: 800; min-height: 22px; }
.ba-queue { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; font-size: 20px; }
.ba-q { padding: 2px 8px; border-radius: 99px; background: #ffffff22; } .ba-q.now { background: #ffd16655; } .ba-q.done { opacity: .5; }
.ba-float { position: absolute; top: -6px; font-weight: 900; font-size: 26px; pointer-events: none; animation: ba-float 1.1s ease-out forwards; }
.ba-float.dmg { color: #ffd166; } .ba-float.hurt { color: #ff8fa3; }
@keyframes ba-float { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-40px); opacity: 0; } }
.lunge { animation: ba-lunge .35s; } .lunge-l { animation: ba-lunge-l .35s; } .hit { animation: ba-hit .4s; } .enter { animation: ba-enter .5s; }
.poof { animation: ba-poof .6s forwards; } .fainted { filter: grayscale(1); opacity: .6; }
@keyframes ba-lunge { 50% { transform: translateX(28px) scale(1.08); } } @keyframes ba-lunge-l { 50% { transform: translateX(-28px) scale(1.08); } }
@keyframes ba-hit { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes ba-poof { to { transform: scale(1.6) rotate(20deg); opacity: 0; } } @keyframes ba-enter { from { transform: translateX(60px); opacity: 0; } }
.quest-final { display: grid; justify-items: center; gap: 4px; margin: 10px auto; padding: 12px 18px; max-width: 460px; border-radius: 16px; background: #efe8ff; color: #2a2266; border: 2px solid #b39dff; }
.quest-final.won { background: #fff3c4; border-color: #ffd166; } .qf-mons { font-size: 30px; display: flex; gap: 6px; }
.qf-xp { width: 220px; height: 10px; border-radius: 99px; background: #0001; overflow: hidden; } .qf-xp.big { width: min(320px, 70vw); height: 14px; background: #0002; }
.qf-xp i { display: block; height: 100%; background: linear-gradient(90deg, #8f5bd6, #ff006e); } .qf-up { font-weight: 900; color: #6a2c91; }
.quest-zones .zone { min-height: 150px; } .zone-mons { display: flex; gap: 4px; font-size: 18px; margin-top: 4px; } .zone-mons .unseen { opacity: .45; } .zone-done { color: #b07d00; font-weight: 800; }
.book { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.book-card { display: grid; justify-items: center; gap: 2px; padding: 10px; border-radius: 14px; background: var(--k-chip); border: 2px solid var(--k-line); color: var(--k-ink); text-align: center; }
.book-card.unseen { opacity: .55; } .book-card.boss { border-color: #ffd166; } .book-emo { font-size: 42px; } .book-card small { font-size: 11px; }
@media (max-width: 640px) { .battle { grid-template-columns: 1fr 1fr; } .ba-vs { display: none; } .ba-mon { font-size: 54px; } .ba-bar { width: 110px; } }

/* ---------------------------------------------------------------------------------------------- classroom */
.class-list { display: flex; flex-wrap: wrap; gap: 8px; } .class-kid { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: inherit; }
.asg-list { display: grid; gap: 8px; } .asg { display: grid; grid-template-columns: 1fr minmax(160px, 260px) auto; gap: 12px; align-items: center; cursor: pointer; }
.asg-prog { display: grid; gap: 3px; } .hb-track { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; } .hb-track i { display: block; height: 100%; background: var(--accent, #3a86ff); }
.gradebook td { text-align: center; } .gradebook td:first-child, .gradebook td:last-child { text-align: left; }
.hb-great { background: #2a9d4b33; } .hb-good { background: #8ac92633; } .hb-ok { background: #ffd16644; } .hb-low { background: #e76f5144; }
.legend i.hb-great, .legend i.hb-good, .legend i.hb-ok, .legend i.hb-low { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lc-root:fullscreen { background: var(--bg, #111); padding: 24px; overflow: auto; }
.lc-card { display: grid; gap: 14px; padding: 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.lc-title { font-size: 26px; font-weight: 900; text-align: center; } .lc-join { text-align: center; font-size: 18px; }
.lc-code { text-align: center; font-size: 72px; font-weight: 900; letter-spacing: 10px; color: #ff9f1c; }
.lc-players { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; } .lc-p { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); opacity: .65; } .lc-p.done { opacity: 1; border-color: #2a9d4b; }
.lc-q { font-size: 30px; font-weight: 800; text-align: center; } .lc-emo { font-size: 56px; text-align: center; } .lc-passage { font-size: 18px; }
.lc-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lc-ch { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); font-size: 20px; font-weight: 700; }
.lc-ch.right { border-color: #2a9d4b; background: #2a9d4b22; } .lc-ch.wrong { opacity: .55; } .lc-l { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #3a86ff; color: #fff; font-weight: 900; }
.lc-n { margin-left: auto; } .lc-typed { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; } .lc-answer { text-align: center; font-size: 22px; }
.lc-timer { font-size: 28px; font-weight: 900; color: #ff9f1c; } .cq-timer { font-size: 20px; color: #ff9f1c; }
.lc-board { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-width: 560px; width: 100%; justify-self: center; }
.lc-board li { display: flex; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line); } .lc-board .spacer { flex: 1; } .lc-rank { width: 28px; text-align: center; font-weight: 900; }
.lc-board.kid li { background: var(--k-chip); border-color: var(--k-line); color: var(--k-ink); }
.lc-podium { display: flex; justify-content: center; gap: 24px; text-align: center; } .lc-medal { font-size: 40px; }
.about-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; } .about-hero img { width: 72px; height: 72px; } .about-hero h2 { margin: 0; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; } .about-list li { margin: 4px 0; }
.cl-entry ul { margin: 6px 0 0; padding-left: 20px; } .cl-entry li { margin: 3px 0; }
.saved-time { margin-top: 10px; padding: 10px 14px; border-radius: 14px; background: #e8f6ff; color: #1d2b3a; }
.asg-k.done { opacity: .75; } .asg-k.late b::after { content: ' ⏰'; }
@media (max-width: 640px) { .asg { grid-template-columns: 1fr; } .lc-choices { grid-template-columns: 1fr; } .lc-code { font-size: 48px; } }

/* ---------------------------------------------------------------------------------------------- "Show me" spotlight + what's new */
.show-me { font-weight: 700; white-space: nowrap; }
.spotlight { position: relative; z-index: 5; border-radius: 10px; outline: 3px solid var(--accent); outline-offset: 4px; animation: spotlight 1.4s ease-in-out 3; }
@keyframes spotlight { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); } }
.whatsnew.page .admin-card { margin-bottom: 10px; } .whatsnew section.new { border-left: 3px solid var(--accent); padding-left: 10px; }
.about-list li { line-height: 1.5; }

/* ---------------------------------------------------------------- full-body figure, My look, tiers, drops */
.figure { display: inline-block; flex: none; line-height: 0; }
.figure svg { width: 100%; height: auto; display: block; }
.fg-xl { width: 260px; } .fg-lg { width: 170px; } .fg-md { width: 110px; } .fg-sm { width: 70px; } .fg-hero { width: 96px; }
.fg-thumb { width: 76px; } .fg-chip { width: 34px; } .fg-head { width: 54px; }
.fg-xl svg, .fg-lg svg, .fg-md svg { border-radius: 22px; box-shadow: 0 6px 18px #0002; }
.fig-head { display: block; width: 100%; height: 100%; line-height: 0; } .fig-head svg { width: 100%; height: 100%; }
.av-fig { overflow: hidden; }
.hero-fig { position: relative; display: inline-block; text-decoration: none; }
.hero-fig-edit { position: absolute; right: -6px; bottom: -6px; font-size: 22px; background: var(--k-card); border: 2px solid var(--k-line); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; line-height: 1; }
.hero-fig:hover .figure { transform: translateY(-2px); transition: transform .15s; }
.home-xp { max-width: 320px; margin-top: 8px; } .hero-shop { display: inline-block; margin-top: 6px; font-weight: 700; }
.profile .figure { margin-bottom: 4px; }
.look { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.look-side { position: sticky; top: 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.look-info { display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: center; text-align: center; }
.look-info .qf-xp { width: 100%; }
.look-use { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.look-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.look-tab { border: 2px solid var(--k-line); background: var(--k-card); color: var(--k-ink); border-radius: 14px; padding: 6px 10px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; display: flex; gap: 4px; align-items: center; }
.look-tab.on { border-color: var(--k-accent); background: color-mix(in srgb, var(--k-accent) 16%, var(--k-card)); }
.look-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 3; background: var(--k-card); border-radius: 16px; }
.look-bar:not(:empty) { padding: 10px 14px; border: 2px solid var(--k-accent); margin-bottom: 8px; box-shadow: 0 4px 14px #0002; }
.look-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.look-body h3 { margin: 14px 0 6px; font-size: 16px; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.look-grid.small { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
.look-grid.scenes { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.look-grid.scenes .figure { width: 90px; } .look-grid.scenes .figure svg { border-radius: 12px; }
.look-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px; border: 3px solid var(--k-line); background: var(--k-card); color: var(--k-ink); cursor: pointer; font: inherit; }
.look-item small { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.2; }
.look-item .cost { color: #b8860b; } .look-item .cost.free { color: #2a9d4b; }
.look-item.on { border-color: var(--k-accent); background: color-mix(in srgb, var(--k-accent) 14%, var(--k-card)); }
.look-item.locked > .figure, .look-item.locked > .pz { filter: grayscale(.8); opacity: .55; }
.look-item .lock { position: absolute; top: 4px; right: 4px; background: #0009; color: #fff; border-radius: 8px; padding: 1px 5px; font-size: 11px; }
.look-item .pz { font-size: 40px; line-height: 1.1; }
.look-item.prize.owned { border-style: dashed; }
.look-item .skin { width: 40px; height: 40px; border-radius: 50%; display: block; border: 2px solid #0002; }
.look-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { position: relative; border: 3px solid transparent; background: none; padding: 2px; border-radius: 50%; cursor: pointer; }
.swatch i { display: block; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #0002; }
.swatch.on { border-color: var(--k-accent); } .swatch.locked i { opacity: .45; }
.swatch span { position: absolute; bottom: -4px; right: -6px; font-size: 10px; font-weight: 800; background: var(--k-card); border-radius: 6px; padding: 0 3px; border: 1px solid var(--k-line); color: var(--k-ink); }
.look-pats, .look-mine { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.look-chip { border: 2px solid var(--k-line); background: var(--k-card); color: var(--k-ink); border-radius: 12px; padding: 4px 9px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; }
.look-chip.on { border-color: var(--k-accent); background: color-mix(in srgb, var(--k-accent) 14%, var(--k-card)); } .look-chip.locked { opacity: .6; }
.look-mine .look-chip { padding: 2px; }
.prize-cat { margin: 10px 0; } .prize-cat h3 small { font-weight: 600; }
.prize-cat.locked { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 3px dashed var(--k-line); border-radius: 18px; opacity: .85; }
.prize-cat.locked .big { font-size: 36px; } .prize-cat.locked small { display: block; }
.perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.perk { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; padding: 14px; border: 3px solid var(--k-line); border-radius: 18px; background: var(--k-card); }
.perk .big { font-size: 40px; line-height: 1; }
.perk.box-common { border-color: #8d99ae; } .perk.box-rare { border-color: #3a86ff; box-shadow: 0 0 14px #3a86ff44; } .perk.box-epic { border-color: #9b5de5; box-shadow: 0 0 18px #9b5de566; }
.tier { display: inline-block; border-radius: 8px; padding: 1px 7px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; vertical-align: middle; }
.tier.t-common { background: #6c757d; } .tier.t-rare { background: #3a86ff; } .tier.t-epic { background: linear-gradient(90deg, #9b5de5, #f15bb5); box-shadow: 0 0 8px #9b5de588; }
.reveal { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.reveal h2 { margin: 4px 0 0; }
.reveal.t-epic .figure svg { box-shadow: 0 0 30px #9b5de5aa; } .reveal.t-rare .figure svg { box-shadow: 0 0 22px #3a86ff88; }
.drop { display: flex; gap: 12px; align-items: center; margin: 10px auto; padding: 10px 14px; border-radius: 18px; border: 3px solid #6c757d; max-width: 420px; text-align: left; background: var(--k-card); }
.drop.t-rare { border-color: #3a86ff; } .drop.t-epic { border-color: #9b5de5; box-shadow: 0 0 18px #9b5de566; }
.level-up { margin: 10px auto; padding: 10px 14px; border-radius: 16px; background: linear-gradient(90deg, #ffd60a33, #fb850033); max-width: 440px; }
.q-card { position: relative; } .fifty { position: absolute; top: 10px; right: 10px; z-index: 2; }
.choice.gone { opacity: .15; pointer-events: none; text-decoration: line-through; }
.potion { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-weight: 700; cursor: pointer; }
.ba-hero .figure { width: 84px; }
@media (max-width: 760px) { .look { grid-template-columns: 1fr; } .look-side { position: static; } .fg-xl { width: 200px; } }
/* Parents › Shop catalogue */
.cat-sec { margin: 8px 0 16px; } .cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.cat-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); cursor: pointer; font-size: 13px; }
.cat-item.off { opacity: .5; text-decoration: line-through; background: transparent; }
.cat-item .figure { width: 36px; } .cat-item .em { font-size: 22px; } .cat-item small { color: var(--muted); }
.cat-item input { margin: 0; }
.cat-sw { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #0003; flex: none; }

@media (max-width: 560px) { .kid-top { flex-wrap: wrap; row-gap: 6px; } .kid-top .kicon { width: 38px; height: 38px; } .perks { grid-template-columns: 1fr; } }

/* SwarmUI art */
.pz.art img, .em.art img { width: 44px; height: 44px; object-fit: contain; mix-blend-mode: multiply; display: block; }
.em.art img { width: 28px; height: 28px; }
.portrait { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; }
.portrait-img { width: 200px; border-radius: 18px; box-shadow: 0 6px 18px #0003; }
.swarm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin: 8px 0; }
.swarm-group { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; text-align: left; }
.swarm-group .em { font-size: 22px; }
.swarm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.swarm-art { position: relative; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.swarm-art img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.swarm-art figcaption { font-size: 11px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swarm-art button { position: absolute; top: 4px; right: 4px; padding: 0 6px; }
.kid-portrait { width: 48px; height: 72px; object-fit: cover; border-radius: 8px; }

/* SwarmUI art page: library, painted characters and clothes */
.swarm-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.swarm-lib textarea, textarea.mono { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.swarm-try img { max-width: 320px; border-radius: 12px; margin-top: 8px; display: block; background: #fff; }
.swarm-bases { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.swarm-base { position: relative; margin: 0; width: 150px; border: 2px solid var(--line); border-radius: 12px; padding: 6px; background: #fff; }
.swarm-base.on { border-color: #3a86ff; }
.swarm-base img { width: 100%; aspect-ratio: 2/3; object-fit: contain; display: block; }
.swarm-base figcaption { display: flex; flex-direction: column; gap: 4px; color: #222; font-size: 12px; }
.swarm-base > button { position: absolute; top: 6px; right: 6px; padding: 0 6px; }
.swarm-wait { aspect-ratio: 2/3; display: grid; place-items: center; color: #777; font-size: 12px; }
.swarm-art.item img { aspect-ratio: 2/3; }
.swarm-art.item figcaption { display: flex; flex-direction: column; gap: 2px; }
.swarm-art.item input[type=number] { width: 52px; padding: 1px 4px; }

/* Question history: questions asked more than once stand out */
.qh-row.repeat { border-left: 4px solid var(--orange); background: color-mix(in srgb, var(--orange) 9%, var(--panel)); }
.qh-rep { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--orange) 22%, transparent); color: var(--text); font-weight: 600; }

/* a next-grade stretch question */
.pop-tag.stretch-tag { background: color-mix(in srgb, #7c5cff 22%, transparent); }

/* rarities parents give uploaded and painted pieces */
.tier.t-uncommon { background: #2a9d8f; }
.tier.t-legendary { background: linear-gradient(90deg, #f77f00, #fcbf49, #f77f00); color: #3a2000; box-shadow: 0 0 10px #fcbf49aa; }
.reveal.t-legendary .figure svg { box-shadow: 0 0 40px #fcbf49cc; } .reveal.t-uncommon .figure svg { box-shadow: 0 0 18px #2a9d8f88; }
.drop.t-legendary { border-color: #f77f00; box-shadow: 0 0 22px #fcbf4988; } .drop.t-uncommon { border-color: #2a9d8f; }

/* sets of characters & gear: owner's list and parents' approval */
.pack-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pack-row input { flex: 1; min-width: 140px; }
.packs .pack-cat h4 { margin: 14px 0 8px; }
.pack-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; background: var(--panel); transition: border-color .15s, box-shadow .15s; }
.pack-card.on { border-color: var(--green, #2a9d8f); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green, #2a9d8f) 25%, transparent); }
.pack-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pack-head > div { flex: 1; min-width: 160px; }
.pack-ok { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--panel2); cursor: pointer; white-space: nowrap; }
.pack-pics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: flex-end; }
.pack-pics figure { margin: 0; position: relative; width: 64px; height: 64px; border-radius: 8px; background: repeating-conic-gradient(#8883 0 25%, #8881 0 50%) 0 0 / 12px 12px; overflow: hidden; }
.pack-pics figure.char { height: 96px; }
.pack-pics img { width: 100%; height: 100%; object-fit: contain; }
.pack-pics .tier { position: absolute; left: 2px; bottom: 2px; font-size: 9px; padding: 0 4px; }

/* Parents › Shop catalogue: tabs, folding sections, compact tiles */
.cat-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; border-bottom: 1px solid var(--line); margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.cat-bar input[type=search] { flex: 1; min-width: 200px; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-tab { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font-size: 14px; }
.cat-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-offn { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #e7656533; color: inherit; font-size: 11px; }
details.cat-sec { margin: 0 0 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
details.cat-sec > summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; list-style: none; }
details.cat-sec > summary::-webkit-details-marker { display: none; }
details.cat-sec > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
details.cat-sec[open] > summary::before { transform: rotate(90deg); }
details.cat-sec > summary h3 { margin: 0; font-size: 15px; }
details.cat-sec > p, details.cat-sec > .cat-grid { margin: 0 12px 10px; }
.cat-count { font-size: 12px; color: var(--muted); } .cat-count.none { color: #e76565; } .cat-count.all { color: var(--green, #2a9d8f); }
details.cat-sec .cat-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px; }
details.cat-sec .cat-item { flex-direction: row; align-items: center; padding: 3px 6px; font-size: 12.5px; background: var(--bg); }
details.cat-sec .cat-item .figure { width: 26px; max-height: 44px; } details.cat-sec .cat-item .em { font-size: 18px; }
.look-jump { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 8px; }
.look-jump .look-chip { font-size: 12.5px; padding: 3px 8px; }
.prize-cat[data-jump] { scroll-margin-top: 12px; }
/* kid home: earned time today per activity */
.k-earn { width: 100%; margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.k-earnbar { display: flex; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--sc, #118ab2) 15%, #fff); overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc, #118ab2) 25%, transparent); }
.k-earnbar i { display: block; height: 100%; transition: width .4s; }
.k-earnbar i.used { background: var(--sc, #118ab2); }
.k-earnbar i.left { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--sc, #118ab2) 55%, #fff) 0 4px, color-mix(in srgb, var(--sc, #118ab2) 35%, #fff) 4px 8px); }
.k-earnbar.full { box-shadow: inset 0 0 0 1px #f4a261; }
.k-earnlbl { font-size: 11.5px; opacity: .8; }
.k-earntotal { font-size: 14px; font-weight: 600; opacity: .7; }

/* character packages (Parents › Shop catalogue) */
.pack-face { width: 64px; height: 96px; object-fit: contain; border-radius: 8px; background: repeating-conic-gradient(#8883 0 25%, #8881 0 50%) 0 0 / 12px 12px; }
.age-chip { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; font-size: 12px; background: color-mix(in srgb, var(--accent, #4895ef) 18%, transparent); }
.pack-kids { display: flex; flex-wrap: wrap; gap: 6px; }
.pack-kid { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.pack-kid.on { border-color: var(--green, #2a9d8f); }
.pack-kid.warn span { color: var(--orange, #e76f51); }
.pack-card.package .row { margin-top: 8px; gap: 8px; align-items: center; }
.pack-preview { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 18px; }
.pack-left .figure { width: 100%; }
.pack-right { max-height: 70vh; overflow: auto; }
.pack-right h4 { margin: 10px 0 4px; }
.pack-pics.preview figure { width: 76px; height: 100px; cursor: pointer; outline: 2px solid transparent; }
.pack-pics.preview figure.char { height: 120px; }
.pack-pics.preview figure.on { outline-color: var(--green, #2a9d8f); }
.pack-pics.preview figure .figure { width: 100%; }
.pack-pics.preview figcaption { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; text-align: center; background: #0008; color: #fff; padding: 1px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pack-pics.preview .tier { bottom: 16px; }
.scene-art img { width: 90px; height: 135px; object-fit: cover; border-radius: 12px; display: block; }
@media (max-width: 720px) { .pack-preview { grid-template-columns: 1fr; } }

/* ===================================================================================== chores (parents + children) */
.chore-art { width: 64px; height: 64px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.chore-art.emoji { font-size: 44px; line-height: 1; }
.chore-art.sm { width: 40px; height: 40px; } .chore-art.sm.emoji { font-size: 28px; }
.chore-art.xs { width: 30px; height: 30px; }
.chore-art.lg { width: 88px; height: 88px; } .chore-art.lg.emoji { font-size: 64px; }
.chore-msg { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; flex-wrap: wrap; }
.chore-msg.ask { border-color: color-mix(in srgb, var(--orange) 60%, var(--line)); background: color-mix(in srgb, var(--orange) 8%, var(--panel)); }
.chore-msg-text { flex: 1; min-width: 200px; }
.chore-code { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 14px; border-radius: 10px; background: color-mix(in srgb, var(--green) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--green) 50%, var(--line)); }
.chore-code b { font-size: 30px; letter-spacing: 4px; font-variant-numeric: tabular-nums; }
.chore-code.big { margin: 10px auto; padding: 10px 30px; } .chore-code.big b { font-size: 64px; }
details.inline { display: inline; margin-left: 8px; } details.inline summary { display: inline; cursor: pointer; color: var(--accent); }
.chore-steps-ro li.done { color: var(--green); } .chore-steps-ro li.done::marker { content: '✔ '; }
h4.chore-cat { margin: 14px 0 6px; }
.chore-list { display: flex; flex-direction: column; gap: 6px; }
.chore-row { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap; }
.chore-row.off { opacity: .55; }
.chore-row-text { flex: 1; min-width: 180px; cursor: pointer; }
.chore-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.chore-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.chore-tile.added { opacity: .7; }
.chore-tile details { align-self: stretch; text-align: left; } .chore-tile ol { margin: 4px 0; padding-left: 18px; }
.chore-artpick { display: flex; flex-wrap: wrap; gap: 4px; }
.chore-artopt { padding: 3px; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; }
.chore-artopt .emoji { font-size: 24px; }
.chore-artopt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.chore-steps-edit { display: flex; flex-direction: column; gap: 6px; }
.chore-step-row { display: flex; gap: 6px; align-items: center; } .chore-step-row input { flex: 1; }
.chore-waiting { display: block; margin-bottom: 12px; text-decoration: none; }
/* children */
.kid-chores .chore-kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
h3.chore-kcat { margin: 16px 4px 8px; font-size: 18px; }
.chore-kcard { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 10px; border-radius: 20px; border: 2px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); font: inherit; cursor: pointer; box-shadow: 0 4px 0 var(--k-line); }
.chore-kcard b { font-size: 16px; }
.chore-kcard.used { opacity: .5; cursor: default; box-shadow: none; }
.chore-kcard.busy { border-color: var(--k-ok); }
.chore-kcard.wait { cursor: default; }
.chore-doing, .chore-ready { max-width: 560px; margin: 10px auto; }
.chore-head { display: flex; gap: 14px; align-items: center; } .chore-head h2 { margin: 0; }
.chore-note { margin: 10px 0; padding: 10px 14px; border-radius: 14px; background: #fff3c4; color: #5a4300; font-weight: 600; }
ol.chore-check { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.chore-step { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; font-size: 18px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); cursor: pointer; }
.chore-step.on { border-color: var(--k-ok); background: color-mix(in srgb, var(--k-ok) 14%, var(--k-bg2)); }
.chore-step.on span:nth-child(2) { text-decoration: line-through; opacity: .75; }
.chore-box { width: 30px; height: 30px; flex: none; border-radius: 9px; border: 3px solid var(--k-line); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; color: #fff; }
.chore-step.on .chore-box { background: var(--k-ok); border-color: var(--k-ok); }
.chore-step span:nth-child(2) { flex: 1; }
.chore-say { font-size: 16px; opacity: .6; }
.chore-code-dots { display: flex; gap: 12px; justify-content: center; margin: 10px 0; }
.chore-code-dots span { width: 56px; height: 64px; border-radius: 14px; border: 3px solid var(--k-line); display: inline-flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 900; background: var(--k-bg2); }
.chore-code-dots span.on { border-color: var(--k-ok); }
.chore-sites { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.chore-keys { max-width: 300px; }
.subject.chore-home.ready { animation: chorePulse 1.6s ease-in-out infinite; }
@keyframes chorePulse { 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .subject.chore-home.ready { animation: none; } }


/* ===================================================================================== extra subjects (tech) */
.qv-part, .qv-resistor, .qv-circuitq, .qv-ohm, .qv-rnet { display: flex; justify-content: center; }
.tech-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tech-pic { width: min(240px, 70vw); height: auto; }
.tech-pic.circ { width: min(280px, 80vw); }
.tech-cap { font-weight: 700; color: var(--k-mute); text-transform: capitalize; }
.tech-bulbs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.tech-bulbs .tb { display: flex; flex-direction: column; align-items: center; }
.tech-bulbs .tb-svg { width: 54px; height: 54px; }
.tech-bulbs small { color: var(--k-mute); font-weight: 700; }
.tech-code { text-align: left; margin: 8px auto; max-width: 460px; background: #1d2b3a; color: #e6edf3; border-radius: 14px; padding: 12px 14px; font: 600 17px/1.55 ui-monospace, Consolas, monospace; overflow-x: auto; }
.tech-code .ln { display: inline-block; width: 22px; color: #6b7c93; user-select: none; }
.tech-code code { white-space: pre; background: none; padding: 0; border: 0; color: inherit; font: inherit; }
.tech-code .kw { color: #ff9f1c; } .tech-code .num { color: #7cc4ff; } .tech-code .lit { color: #06d6a0; }
/* circuit board */
.g-circuit, .g-robot, .g-logic { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.circ-board { width: min(380px, 88vw); height: auto; touch-action: manipulation; }
.circ-board .cc-bg { fill: var(--k-bg2); stroke: var(--k-line); stroke-width: 2; }
.circ-board .cc.fixed .cc-bg { fill: color-mix(in srgb, var(--k-line) 35%, var(--k-bg2)); }
.circ-board .cc-wire { stroke: #8d99ae; stroke-width: 8; stroke-linecap: round; }
.circ-board .cc.live .cc-wire { stroke: #f4a261; }
.circ-board .cc-dot { fill: #8d99ae; } .circ-board .cc.live .cc-dot { fill: #f4a261; }
.circ-board .cc-bat { fill: #ffd166; stroke: #33415c; stroke-width: 2; }
.circ-board .cc-bulb { fill: #f1f3f5; stroke: #33415c; stroke-width: 2; } .circ-board .cc-bulb.on { fill: #ffe066; }
.circ-board .cc-glow { fill: #ffe066; opacity: .45; }
.circ-board .cc-sw { fill: #fde2e4; stroke: #e63946; stroke-width: 2; } .circ-board .cc-sw.on { fill: #d8f3dc; stroke: #2a9d4b; }
.circ-board .cc-lbl { font-size: 20px; pointer-events: none; }
/* robot */
.rb-wrap { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.rb-board { width: min(340px, 86vw); height: auto; }
.rb-board .rb-cell { fill: var(--k-bg2); stroke: var(--k-line); stroke-width: 1.5; }
.rb-board .rb-wall { fill: #c9ada7; stroke: #9a8c98; stroke-width: 1.5; }
.rb-board .rb-emo { font-size: 26px; pointer-events: none; } .rb-board .rb-emo.dim { opacity: .45; }
.rb-board .rb-glow { fill: #ffe066; opacity: .6; }
.rb-board .rb-bot { fill: #cdeffd; stroke: #118ab2; stroke-width: 2; } .rb-board .rb-bot.crash { fill: #fde2e4; stroke: #e63946; }
.rb-board .rb-dir { font-size: 15px; font-weight: 900; fill: #118ab2; }
.rb-side { display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.rb-palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rb-block { font: inherit; display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 12px; border: 2px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); cursor: pointer; box-shadow: 0 3px 0 var(--k-line); }
.rb-block b { font-size: 22px; } .rb-block small { font-size: 11px; color: var(--k-mute); }
.rb-block.loop, .rb-chip.loop { border-color: #9d4edd; }
.rb-label { font-weight: 800; }
.rb-prog { display: flex; flex-wrap: wrap; gap: 4px; min-height: 44px; padding: 6px; border-radius: 12px; border: 2px dashed var(--k-line); }
.rb-chip { font: inherit; font-size: 20px; min-width: 38px; padding: 3px 6px; border-radius: 10px; border: 2px solid var(--k-accent); background: var(--k-bg2); cursor: pointer; }
/* logic */
.lg-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.lg-switches { display: flex; flex-direction: column; gap: 8px; }
.lg-sw { font: inherit; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; border: 2px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); cursor: pointer; min-width: 110px; }
.lg-sw .lg-knob { width: 34px; height: 20px; border-radius: 10px; background: #ced4da; position: relative; }
.lg-sw .lg-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.lg-sw.on { border-color: var(--k-ok); } .lg-sw.on .lg-knob { background: var(--k-ok); } .lg-sw.on .lg-knob::after { left: 16px; }
.lg-tree { display: flex; }
.lg-gate { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 14px; border: 2px solid var(--k-line); background: color-mix(in srgb, var(--k-line) 20%, var(--k-bg2)); }
.lg-gate.on { border-color: #f4a261; background: #fff3e0; }
.lg-inputs { display: flex; flex-direction: column; gap: 6px; }
.lg-op { display: flex; flex-direction: column; align-items: center; font-weight: 900; padding: 8px 10px; border-radius: 10px 24px 24px 10px; background: #33415c; color: #fff; min-width: 54px; }
.lg-gate.on > .lg-op { background: #f4a261; color: #1d2b3a; }
.lg-op small { font-weight: 700; opacity: .8; }
.lg-in { font-weight: 900; padding: 6px 10px; border-radius: 10px; background: #ced4da; color: #1d2b3a; text-align: center; }
.lg-in.on { background: var(--k-ok); color: #fff; }
.lg-arrow { font-size: 26px; color: var(--k-mute); }
.lg-lamp { display: flex; flex-direction: column; align-items: center; }
.lg-bulb { font-size: 48px; filter: grayscale(1) opacity(.5); transition: filter .2s; } .lg-bulb.on { filter: drop-shadow(0 0 14px #ffd60a); }


/* ===================================================================================== kids' chat */
.ch-layout { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 14px; max-width: 1000px; margin: 0 auto; }
@media (max-width: 760px) { .ch-layout { grid-template-columns: 1fr; } }
.ch-friends, .ch-convo { background: var(--k-card); border: 2px solid var(--k-line); border-radius: 20px; padding: 12px; }
.ch-friends { display: flex; flex-direction: column; gap: 8px; }
.ch-me { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 2px dashed var(--k-line); }
.ch-me small { display: block; color: var(--k-mute); }
.ch-code { letter-spacing: 2px; font-family: ui-monospace, Consolas, monospace; color: var(--k-ink); }
.ch-friend { font: inherit; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 2px solid transparent; background: var(--k-bg2); color: var(--k-ink); cursor: pointer; text-align: left; }
.ch-friend.on { border-color: var(--k-accent); }
.ch-av { position: relative; display: inline-flex; }
.ch-dot { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: #adb5bd; border: 2px solid var(--k-card); }
.ch-dot.online { background: #2ecc71; }
.ch-fname { flex: 1; display: flex; flex-direction: column; } .ch-fname small { color: var(--k-mute); }
.ch-unread { min-width: 24px; height: 24px; border-radius: 12px; background: #e63946; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.ch-add { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 2px dashed var(--k-line); }
.ch-codein { font: inherit; font-size: 18px; letter-spacing: 2px; text-transform: uppercase; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--k-line); width: 9em; }
.ch-convo { display: flex; flex-direction: column; min-height: 460px; }
.ch-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 2px dashed var(--k-line); }
.ch-head small { display: block; color: var(--k-mute); }
.ch-look { background: none; border: 0; padding: 0; cursor: pointer; }
.ch-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px 2px; max-height: 50vh; min-height: 260px; }
.ch-b { align-self: flex-start; max-width: 78%; padding: 8px 12px; border-radius: 18px 18px 18px 4px; background: var(--k-bg2); border: 2px solid var(--k-line); font-size: 18px; word-wrap: break-word; }
.ch-b.mine { align-self: flex-end; border-radius: 18px 18px 4px 18px; background: var(--k-accent); color: var(--k-accent-ink); border-color: transparent; }
.ch-b small { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.ch-empty, .ch-pick { text-align: center; color: var(--k-mute); margin: auto; }
.ch-send { display: flex; gap: 8px; align-items: center; }
.ch-input { flex: 1; font: inherit; font-size: 18px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--k-line); }
.ch-emoji { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; padding: 8px; margin-bottom: 6px; border-radius: 14px; background: var(--k-bg2); border: 2px solid var(--k-line); max-height: 180px; overflow-y: auto; }
.ch-emoji button { font-size: 24px; background: none; border: 0; cursor: pointer; border-radius: 8px; padding: 2px; }
.ch-emoji button:hover { background: var(--k-line); }
.ch-lookbox { display: flex; justify-content: center; padding: 10px; }
.kicon.chat-btn { position: relative; }
.chat-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: #e63946; color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
/* parents */
.chat-req, .chat-row { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; flex-wrap: wrap; }
.chat-req .grow, .chat-row .grow { flex: 1; min-width: 160px; }
.chat-code { letter-spacing: 2px; font-family: ui-monospace, Consolas, monospace; }
.chat-read { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.chat-read .ch-b { background: var(--panel); border-color: var(--line); color: var(--ink, inherit); font-size: 15px; }
.chat-read .ch-b.mine { background: color-mix(in srgb, var(--accent) 18%, var(--panel)); color: inherit; }
.ch-input, .ch-codein { background: var(--k-bg2); color: var(--k-ink); }
.ch-input::placeholder, .ch-codein::placeholder { color: var(--k-mute); }


/* ===================================================================================== report charts */
:root, [data-theme="dark"], [data-theme="comfortable"], [data-theme="forest"], [data-theme="dusk"] {
  --seq-0: color-mix(in srgb, var(--muted) 14%, transparent); --seq-1: #0e3d7e; --seq-2: #1757ac; --seq-3: #2370cd; --seq-4: #519ced; --seq-5: #9dc8f7;
  --cat-1: #338ced; --cat-2: #e76624; --cat-3: #00a888; --cat-other: #7d8590;
}
[data-theme="light"], [data-theme="overcast"], [data-theme="paper"] {
  --seq-0: color-mix(in srgb, var(--muted) 14%, transparent); --seq-1: #cce3fd; --seq-2: #9dc8f7; --seq-3: #519ced; --seq-4: #2370cd; --seq-5: #0f4a96;
  --cat-1: #257de0; --cat-2: #f47230; --cat-3: #00b894; --cat-other: #9aa1a9;
}
.chart-tip { position: fixed; z-index: 1000; pointer-events: none; background: var(--panel); color: var(--ink, inherit); border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.25); max-width: 280px; }
.chart-scroll { overflow-x: auto; }
.heatmap { width: 100%; min-width: 420px; max-width: 640px; height: auto; } .heatmap.cal { min-width: 300px; max-width: 520px; }
.heatmap .ax, .linechart .ax { font-size: 10px; fill: var(--muted); }
.heatmap .hm-cell:hover { stroke: var(--ink, currentColor); stroke-width: 1.5; }
.seq-legend { display: flex; align-items: center; gap: 3px; margin-top: 6px; } .seq-legend i { width: 18px; height: 10px; border-radius: 2px; } .seq-legend small { color: var(--muted); margin: 0 4px; }
.linechart { width: 100%; height: auto; } .linechart .grid { stroke: var(--line); }
.linechart .acc-line { fill: none; stroke: var(--cat-1); stroke-width: 2; stroke-linejoin: round; }
.linechart .acc-dot { fill: var(--cat-1); stroke: var(--panel); stroke-width: 2; }
.linechart .avg-line { stroke: var(--muted); stroke-dasharray: 4 4; }
.linechart .hit, .daychart .hit { fill: transparent; }
.daychart .seg { stroke: var(--panel); stroke-width: 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.hb-track i.speed { background: var(--cat-1); }


/* ===================================================================================== owner: infrastructure & Azure */
.infra-kv { margin: 10px 0; } .infra-kv code { font-size: 12px; }
.infra-int { display: flex; flex-direction: column; gap: 6px; }
.infra-row { display: grid; grid-template-columns: minmax(180px, 260px) auto 1fr; gap: 10px; align-items: center; }
@media (max-width: 700px) { .infra-row { grid-template-columns: 1fr auto; } .infra-row small { grid-column: 1 / -1; } }
.infra-diagrams { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; }
.infra-fig { margin: 0; } .infra-fig figcaption { font-weight: 700; margin-bottom: 6px; }
.infra-svg { width: 100%; height: auto; }
.infra-svg .iz rect { fill: color-mix(in srgb, var(--accent) 5%, transparent); stroke: var(--line); stroke-dasharray: 5 4; }
.infra-svg .zl { font-size: 11px; fill: var(--muted); font-weight: 700; }
.infra-svg .ib rect { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }
.infra-svg .ib.main rect { stroke: var(--accent); stroke-width: 2; }
.infra-svg .ib.data rect { stroke: #00a888; stroke-width: 2; }
.infra-svg .ib.ext rect { stroke-dasharray: 3 3; }
.infra-svg .ib.later rect { stroke-dasharray: 3 3; opacity: .8; }
.infra-svg .t { font-size: 12px; font-weight: 700; fill: var(--ink, currentColor); } .infra-svg .s { font-size: 10px; fill: var(--muted); }
.infra-svg .il { stroke: var(--muted); stroke-width: 1.5; } .infra-svg .il.dash { stroke-dasharray: 4 4; }
.infra-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.infra-table th, .infra-table td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.infra-table th { color: var(--muted); font-weight: 600; }
.infra-list li { margin: 6px 0; }
.infra-kv + * , .stat b { overflow-wrap: anywhere; }

/* ===== puzzle games (2026.11.27.5): number path, sudoku, corner store, word ladder, detective, treasure hunt ===== */
.g-numpath, .g-sudoku, .g-shop, .g-ladder, .g-detective, .g-treasure { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.np-grid { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; width: min(360px, 88vw); touch-action: none; user-select: none; }
.np-cell { position: relative; aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); font: inherit; font-size: 24px; font-weight: 800; cursor: pointer; z-index: 1; }
.np-cell small { position: absolute; top: 2px; left: 4px; font-size: 14px; }
.np-cell.next { border-color: var(--k-accent); border-style: dashed; }
.np-cell.on { background: color-mix(in srgb, var(--k-accent) 14%, transparent); border-color: var(--k-accent); }
.np-cell.last { box-shadow: 0 0 0 3px var(--k-accent); }
.np-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.np-cell b { position: relative; z-index: 1; text-shadow: 0 0 4px var(--k-bg2), 0 0 2px var(--k-bg2); }
.np-poly { fill: none; stroke: var(--k-accent); stroke-width: .14; stroke-linecap: round; stroke-linejoin: round; opacity: .45; }
.np-total { font-size: 20px; font-weight: 800; } .np-total b { font-size: 28px; margin: 0 2px; }
.np-total b.ok { color: var(--k-ok); } .np-total b.over { color: var(--k-no); }

.sd-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(340px, 86vw); border: 3px solid var(--k-ink); border-radius: 10px; overflow: hidden; background: var(--k-bg2); }
.sd-cell { aspect-ratio: 1; border: 1px solid var(--k-line); background: var(--k-bg2); color: var(--k-accent); font: inherit; font-size: 26px; font-weight: 800; cursor: pointer; padding: 0; }
.sd-grid.pics .sd-cell { font-size: 30px; }
.sd-cell.given { color: var(--k-ink); background: color-mix(in srgb, var(--k-line) 40%, var(--k-bg2)); cursor: default; }
.sd-cell.bR { border-right: 3px solid var(--k-ink); } .sd-cell.bB { border-bottom: 3px solid var(--k-ink); }
.sd-cell.bad { background: #ffe1d9; color: var(--k-no); }
.sd-palette { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sd-pick { min-width: 52px; height: 52px; border-radius: 14px; border: 2px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); font: inherit; font-size: 26px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 var(--k-line); }
.sd-pick.on { border-color: var(--k-accent); box-shadow: 0 0 0 3px var(--k-accent); }

.sh-dots { display: flex; gap: 10px; font-size: 26px; }
.sh-dot { opacity: .45; } .sh-dot.now { opacity: 1; transform: scale(1.2); } .sh-dot.ok, .sh-dot.no { opacity: 1; }
.sh-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.sh-who { display: flex; align-items: center; gap: 10px; } .sh-face { font-size: 54px; }
.sh-bubble { background: var(--k-bg2); border: 2px solid var(--k-line); border-radius: 18px; padding: 8px 14px; font-weight: 700; max-width: 280px; }
.sh-basket { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sh-item { display: flex; flex-direction: column; align-items: center; background: var(--k-bg2); border: 2px solid var(--k-line); border-radius: 14px; padding: 8px 12px; min-width: 90px; }
.sh-emo { font-size: 36px; } .sh-name { font-size: 13px; color: var(--k-mute); }
.sh-tag { background: #ffd166; color: #3a2a00; font-weight: 800; border-radius: 8px; padding: 1px 8px; margin-top: 4px; }
.sh-screen { display: flex; align-items: baseline; gap: 10px; background: #1d2b3a; color: #7CFC9A; font-family: ui-monospace, Consolas, monospace; border-radius: 10px; padding: 6px 16px; min-width: 180px; justify-content: space-between; }
.sh-screen small { color: #9fb3c8; } .sh-screen b { font-size: 26px; }
.sh-pad { max-width: 260px; }
.sh-paid { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sh-bill { font: inherit; font-weight: 800; width: 84px; height: 42px; border-radius: 6px; border: 2px solid #33415c; cursor: pointer; color: #fff; text-shadow: 0 1px 1px #0006; }
.sh-bill.b5 { background: linear-gradient(135deg, #4d9de0, #2b6cb0); } .sh-bill.b10 { background: linear-gradient(135deg, #9d4edd, #6a2c9e); } .sh-bill.b20 { background: linear-gradient(135deg, #52b788, #2d6a4f); } .sh-bill.b50 { background: linear-gradient(135deg, #e5383b, #a4161a); }
.sh-done { font-size: 22px; font-weight: 800; padding: 16px; }

.ld-ladder { display: flex; flex-direction: column; gap: 6px; padding: 8px 18px; border-left: 6px solid #a0522d; border-right: 6px solid #a0522d; border-radius: 6px; }
.ld-rung { display: flex; align-items: center; gap: 8px; }
.ld-icon { width: 28px; text-align: center; font-size: 20px; }
.ld-boxes { display: flex; gap: 6px; }
.ld-box { width: 48px; height: 52px; border-radius: 10px; border: 2px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); font: inherit; font-size: 26px; font-weight: 900; cursor: pointer; }
.ld-box:disabled { cursor: default; opacity: 1; }
.ld-rung.start .ld-box, .ld-rung.goal .ld-box { background: color-mix(in srgb, var(--k-line) 45%, var(--k-bg2)); }
.ld-rung.goal.ok .ld-box { background: #d8f6df; border-color: var(--k-ok); }
.ld-rung.ok .ld-box { border-color: var(--k-ok); } .ld-rung.notword .ld-box.changed, .ld-rung.bad .ld-box.changed { border-color: var(--k-no); }
.ld-box.changed { background: #fff3c4; color: #3a2a00; } .ld-box.sel { box-shadow: 0 0 0 3px var(--k-accent); }
.ld-start { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); cursor: pointer; font-size: 16px; }
span.ld-start { visibility: hidden; }
.ld-keys { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; max-width: 420px; width: 100%; }
.ld-keys .key { padding: 8px 0; font-size: 18px; }

.dt-wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.dt-side { max-width: 340px; } .dt-side h4 { margin: 0 0 4px; }
.dt-clues { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.dt-clues li { background: var(--k-bg2); border: 2px solid var(--k-line); border-radius: 12px; padding: 6px 10px; cursor: pointer; font-weight: 600; }
.dt-clues li.done { opacity: .45; text-decoration: line-through; }
.dt-tables { display: flex; flex-direction: column; gap: 12px; }
.dt-table { border-collapse: separate; border-spacing: 4px; }
.dt-table th { font-weight: 800; padding: 2px 4px; text-align: center; } .dt-table th small { display: block; font-size: 11px; color: var(--k-mute); font-weight: 600; }
.dt-emo { font-size: 24px; } .dt-table th.dt-name { text-align: right; }
.dt-cell { width: 46px; height: 46px; border-radius: 10px; border: 2px solid var(--k-line); background: var(--k-bg2); font: inherit; font-size: 22px; font-weight: 900; cursor: pointer; color: var(--k-ink); }
.dt-cell.yes { background: #d8f6df; border-color: var(--k-ok); color: var(--k-ok); }
.dt-cell.no { background: #ffe1d9; border-color: var(--k-no); color: var(--k-no); }
.dt-cell.auto { color: color-mix(in srgb, var(--k-mute) 55%, transparent); }

.th-clue { display: flex; flex-direction: column; align-items: center; background: #fff3c4; color: #3a2a00; border: 2px dashed #c9a227; border-radius: 14px; padding: 8px 14px; max-width: 460px; text-align: center; font-size: 18px; }
.th-clue small { color: #7a5c00; font-weight: 700; }
.th-wrap { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
.th-map { position: relative; padding: 14px; border-radius: 24px; background: #8ecae6; }
.th-grid { display: grid; grid-template-columns: 22px repeat(var(--w), 44px); grid-template-rows: 22px; grid-auto-rows: 44px; gap: 2px; }
.th-col, .th-row, .th-corner { display: grid; place-items: center; font-weight: 800; color: #0b3954; }
.th-cell { position: relative; border: 1px dashed #d4b46a; background: #f8e3a8; border-radius: 6px; cursor: pointer; padding: 0; font: inherit; }
.th-cell.trail { background: #ffd166; } .th-cell.here { box-shadow: inset 0 0 0 3px #e76f51; }
.th-emo { font-size: 26px; } .th-me { position: absolute; right: -2px; top: -6px; font-size: 20px; }
.th-hole { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; } .th-hole sub { position: absolute; bottom: 0; right: 3px; font-size: 11px; font-weight: 800; color: #5c4400; }
.th-gold { position: absolute; left: 0; top: -4px; font-size: 18px; }
.th-corner.rose { color: #e76f51; font-size: 11px; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; } .th-corner.rose b { font-size: 13px; }
.th-pad { display: grid; grid-template-columns: repeat(3, auto); gap: 6px; }
.th-pad .kbtn { padding: 10px 12px; font-size: 16px; }
@media (max-width: 520px) { .th-grid { grid-template-columns: 18px repeat(var(--w), 36px); grid-auto-rows: 36px; } .th-emo { font-size: 20px; } .ld-box { width: 40px; height: 46px; } }
body.kid[data-world=space] .th-cell, body.kid[data-world=space] .th-clue { color: #3a2a00; }

/* 🌙 Move to Azure tonight (parent-azure-tonight.js) */
.tn-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 16px; margin: 8px 0 12px; }
.tn-field { display: flex; flex-direction: column; gap: 3px; }
.tn-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--panel2); overflow: hidden; min-width: 120px; }
.tn-bar > span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.tn-steps { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.tn-step { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--panel); }
.tn-step.done { opacity: .6; }
.tn-step.done .tn-body { display: none; }
.tn-head { display: flex; align-items: center; gap: 8px; cursor: pointer; flex-wrap: wrap; }
.tn-head .badge { margin-left: auto; }
.tn-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .8em; font-weight: 600; }
.tn-body p { margin: 6px 0; }
.tn-code { margin: 6px 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.tn-codehead { display: flex; justify-content: space-between; align-items: center; padding: 3px 8px; background: var(--panel2); }
.tn-code pre { margin: 0; padding: 8px 10px; overflow-x: auto; font-size: .85em; white-space: pre; user-select: all; }
.tn-check { color: var(--green); font-size: .92em; }

/* ---------------------------------------------------------------------------------------------- column sums + worked help (2026.11.28.2) */
.col-grid { display: inline-grid; grid-template-columns: repeat(var(--cols), 1.25em); justify-content: center; font-size: 40px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.qv-column { display: flex; justify-content: center; }
.col-c { display: grid; place-items: center; min-height: 1.25em; }
.col-op { color: var(--k-accent, #3a86ff); }
.col-line { border-top: 4px solid currentColor; margin: 2px 0 6px; }
.col-mark { font-size: 22px; min-height: 1.2em; color: #d6336c; align-self: end; }
.col-c.crossed { text-decoration: line-through; text-decoration-color: #d6336c; text-decoration-thickness: 3px; opacity: .6; }
.col-res { color: #1b8a3a; }
.col-in { width: 1.05em; height: 1.15em; padding: 0; text-align: center; font: inherit; border-radius: 12px; border: 3px solid var(--k-line); background: var(--k-bg2); color: var(--k-ink); }
.col-in:focus { outline: none; border-color: var(--k-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--k-accent) 25%, transparent); }
.col-in.mark { width: 1.3em; height: 1.3em; font-size: 20px; border-width: 2px; border-style: dashed; border-radius: 8px; color: #d6336c; }
.col-entry .row { gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.col-dir { font-size: 15px; }
.example { margin: 6px 0 4px; text-align: center; }
.example-body { margin: 8px auto 0; max-width: 560px; text-align: left; padding: 12px 16px; border-radius: 18px; border: 2px dashed var(--k-line); background: var(--k-bg2); }
.example-body .ex-prompt { display: block; font-size: 20px; margin: 4px 0; }
.example-body .col-grid, .explain-box .col-grid { font-size: 28px; }
.ex-answer { margin: 6px 0; font-size: 18px; }
ol.steps { margin: 6px 0 8px; padding-left: 24px; font-size: 16px; line-height: 1.45; }
ol.steps li { margin: 2px 0; }
.explain-box .worked { margin: 4px 0; }
.kbtn.small, .kbtn.hear, .howto .kbtn { font-size: 15px; padding: 7px 14px; border-radius: 12px; }
.howto { margin-bottom: 6px; }
/* 🚀 deploy: route chooser (parent-deploy.js) and folded background (parent-infra.js) */
.dp-routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.dp-route { display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: left; white-space: normal; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); }
.dp-route.on { border-color: var(--accent); background: var(--opt-on); box-shadow: inset 0 0 0 1px var(--accent); }
.dp-route p { margin: 0; }
.dp-rhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dp-ic { font-size: 22px; }
.dp-panel { border-top: 1px solid var(--line); padding-top: 12px; }
.dp-panel h4 { margin: 0 0 6px; }
.tn-field .req { color: var(--red); }
.tn-field select { width: 100%; }
details.infra-fold { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; background: var(--panel); }
details.infra-fold > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; }
details.infra-fold[open] > summary { border-bottom: 1px solid var(--line); }
.infra-fold-body { padding: 10px 12px; }

/* 💳 plans, subscription and sign-up (parent-billing.js) */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 8px 0; }
.plan-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel2); display: flex; flex-direction: column; gap: 6px; }
.plan-card p { margin: 0; }
.plan-name { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.plan-price { font-size: 18px; font-weight: 700; }
.plan-card button { align-self: flex-start; margin-top: auto; }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sub-plan { font-size: 20px; font-weight: 700; }
.use { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; max-width: 520px; }
.use-row { display: grid; grid-template-columns: 150px 1fr 110px; gap: 10px; align-items: center; font-size: 13px; }
.use-bar { height: 8px; border-radius: 4px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.use-bar i { display: block; height: 100%; background: var(--accent); }
.use-bar i.full { background: var(--orange); }
.ro-banner { margin: 0 0 10px; }
.form-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 16px; margin: 8px 0; }
.login.signup { max-width: 640px; width: 100%; }
.join-row { margin-top: 10px; }
a.btnlike.join { display: inline-block; }
pre.codes { margin: 6px 0; font-size: 13px; }
.login.signup .row { flex-wrap: nowrap; }
.login.signup .row input.mono { flex: 1; min-width: 0; }
.login input[type=checkbox] { width: auto; flex: none; margin: 0; }
.login.signup label.row { display: flex; gap: 6px; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
.plan-card { text-align: left; }

.code-ok { color: var(--green); font-size: 13px; font-weight: 600; margin: 0; }
.plan-card, .plan-card * { text-align: left; }

/* QuizyBit wordmark: one word, two colours — "Bit" in the logo colour (the kids' area keeps violet B1); never a gap between */
.wm { display: inline; white-space: nowrap; letter-spacing: normal; }
.wm-bit { color: var(--logo-word, #5b3fe0); margin: 0; padding: 0; }
.wm-bit.b1 { color: #b9adff; }
:root[data-theme="light"] .wm-bit.b1, :root[data-theme="overcast"] .wm-bit.b1, :root[data-theme="paper"] .wm-bit.b1 { color: #5b3fe0; }
.kid-foot > span:not(:empty) { margin-left: 18px; }
