/* NextClient cabinet — "player's lounge" design system.
   Sections: 1 tokens, 2 base, 3 layout, 4 buttons, 5 forms, 6 cards & surfaces, 7 data (tables, badges, avatars,
   stats, kv), 8 overlays (modal, menu, toast, tooltip), 9 tabs/segmented/pager, 10 feedback (alerts, empty,
   skeleton, progress), 11 charts, 12 landing & status pages, 13 page-specific kit parts (player, partner), 14 utils. */

/* ---------------------------------------------------------------- 1. tokens */
:root {
  --c-accent-50: #e8f7f4; --c-accent-100: #c8ede6; --c-accent-200: #94dccd; --c-accent-300: #5cc6b3;
  --c-accent-400: #2bb09b; --c-accent-500: #0f9d8a; --c-accent-600: #0b8273; --c-accent-700: #0a685d;
  --c-accent-800: #0b524a; --c-accent-900: #0a3f39;
  --c-amber-50: #fff6e6; --c-amber-100: #ffe8bf; --c-amber-300: #ffc65c; --c-amber-500: #f2a516; --c-amber-600: #d48806; --c-amber-700: #a86a04;
  --c-red-50: #fdeeee; --c-red-500: #d6453d; --c-red-600: #b93830; --c-red-700: #952b25;
  --c-green-50: #eaf7ee; --c-green-500: #2f9e5b; --c-green-700: #217343;
  --c-blue-50: #ebf3fd; --c-blue-500: #3a7bd5; --c-blue-700: #2a5ea6;

  --bg: #fbf8f3;            /* warm paper */
  --bg-soft: #f4efe6;
  --surface: #ffffff;
  --surface-2: #faf7f1;
  --surface-3: #f2ede4;
  --border: #e7e0d4;
  --border-strong: #d6ccbc;
  --text: #1f2a28;
  --text-2: #4d5b58;
  --text-3: #7a8582;
  --accent: var(--c-accent-500);
  --accent-hover: var(--c-accent-600);
  --accent-press: var(--c-accent-700);
  --accent-soft: var(--c-accent-50);
  --accent-soft-2: var(--c-accent-100);
  --accent-text: var(--c-accent-700);
  --on-accent: #ffffff;
  --warm: var(--c-amber-500);
  --warm-soft: var(--c-amber-50);
  --warm-text: var(--c-amber-700);
  --danger: var(--c-red-500);
  --danger-hover: var(--c-red-600);
  --danger-soft: var(--c-red-50);
  --danger-text: var(--c-red-700);
  --success: var(--c-green-500);
  --success-soft: var(--c-green-50);
  --success-text: var(--c-green-700);
  --info: var(--c-blue-500);
  --info-soft: var(--c-blue-50);
  --info-text: var(--c-blue-700);
  --focus: 0 0 0 3px rgba(15, 157, 138, .35);
  --overlay: rgba(24, 32, 30, .45);
  --skeleton: #efe9df;
  --skeleton-hi: #f8f4ee;
  --chart-1: #0f9d8a; --chart-2: #f2a516; --chart-3: #3a7bd5; --chart-4: #d6453d; --chart-5: #8a63d2; --chart-6: #2f9e5b; --chart-grid: #ece6dc;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px;
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(60, 46, 20, .06), 0 1px 1px rgba(60, 46, 20, .04);
  --sh-2: 0 4px 14px rgba(60, 46, 20, .07), 0 1px 3px rgba(60, 46, 20, .05);
  --sh-3: 0 18px 48px rgba(40, 32, 16, .14), 0 4px 12px rgba(40, 32, 16, .06);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --fs-xs: 12px; --fs-sm: 13.5px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 20px; --fs-2xl: 26px; --fs-3xl: 34px; --fs-4xl: 46px;
  --lh: 1.55;
  --container: 1160px;
  --topbar-h: 64px;
  --t-fast: 120ms; --t: 180ms; --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121816; --bg-soft: #161e1b; --surface: #1a2320; --surface-2: #1f2925; --surface-3: #25302c;
  --border: #2c3833; --border-strong: #3a4842;
  --text: #e9efec; --text-2: #b4c0bb; --text-3: #85928d;
  --accent: #23b39d; --accent-hover: #3cc4ad; --accent-press: #5ad0bb; --accent-soft: rgba(35, 179, 157, .14); --accent-soft-2: rgba(35, 179, 157, .24);
  --accent-text: #6fdcc8; --on-accent: #06221e;
  --warm: #f4b23a; --warm-soft: rgba(244, 178, 58, .14); --warm-text: #ffcf7a;
  --danger: #ef6a62; --danger-hover: #f4847d; --danger-soft: rgba(239, 106, 98, .14); --danger-text: #ff9c95;
  --success: #4cc07c; --success-soft: rgba(76, 192, 124, .14); --success-text: #85dcaa;
  --info: #6aa2f0; --info-soft: rgba(106, 162, 240, .14); --info-text: #a5c8ff;
  --focus: 0 0 0 3px rgba(60, 196, 173, .45);
  --overlay: rgba(0, 0, 0, .6);
  --skeleton: #222c28; --skeleton-hi: #2a3531;
  --chart-grid: #2a3531;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .3); --sh-2: 0 4px 16px rgba(0, 0, 0, .35); --sh-3: 0 20px 50px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121816; --bg-soft: #161e1b; --surface: #1a2320; --surface-2: #1f2925; --surface-3: #25302c;
    --border: #2c3833; --border-strong: #3a4842;
    --text: #e9efec; --text-2: #b4c0bb; --text-3: #85928d;
    --accent: #23b39d; --accent-hover: #3cc4ad; --accent-press: #5ad0bb; --accent-soft: rgba(35, 179, 157, .14); --accent-soft-2: rgba(35, 179, 157, .24);
    --accent-text: #6fdcc8; --on-accent: #06221e;
    --warm: #f4b23a; --warm-soft: rgba(244, 178, 58, .14); --warm-text: #ffcf7a;
    --danger: #ef6a62; --danger-hover: #f4847d; --danger-soft: rgba(239, 106, 98, .14); --danger-text: #ff9c95;
    --success: #4cc07c; --success-soft: rgba(76, 192, 124, .14); --success-text: #85dcaa;
    --info: #6aa2f0; --info-soft: rgba(106, 162, 240, .14); --info-text: #a5c8ff;
    --focus: 0 0 0 3px rgba(60, 196, 173, .45);
    --overlay: rgba(0, 0, 0, .6);
    --skeleton: #222c28; --skeleton-hi: #2a3531;
    --chart-grid: #2a3531;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .3); --sh-2: 0 4px 16px rgba(0, 0, 0, .35); --sh-3: 0 20px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- 2. base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 400 var(--fs-md)/var(--lh) var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--text); line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: var(--fs-2xl); font-weight: 700; } h2 { font-size: var(--fs-xl); font-weight: 650; } h3 { font-size: var(--fs-lg); font-weight: 600; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: .92em; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }
ul, ol { margin: 0; padding-left: 1.2em; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-xs); }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft-2); }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm, .btn-sm .icon { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; background: var(--accent); color: var(--on-accent); border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------------------------------------------------------------- 3. layout */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5); }
.container-wide { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--s-5); }
.main { flex: 1 0 auto; padding: var(--s-8) 0 var(--s-16); }
.main-center { display: flex; align-items: center; min-height: 100vh; }
/* vertical rhythm of page blocks and of AJAX panels: siblings never touch (class margins still win) */
html :where(.main > .container, .main > .container-wide, .fragment) > :where(* + *) { margin-top: var(--s-5); }
html :where(.main > .container, .main > .container-wide, .fragment) > :where(.page-head + *) { margin-top: 0; }
html :where(.narrow, .page-narrow, .card-body, .modal-body, .tab-panel) > :where(* + *) { margin-top: var(--s-4); }
html :where(.narrow, .page-narrow) > :where(.page-head + *) { margin-top: 0; }
.partner > .page-head, .partner-body > .page-head, .partner-start > .page-head { margin-bottom: 0; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .topbar { background: var(--bg); } }
.topbar-inner { height: 100%; display: flex; align-items: center; gap: var(--s-5); max-width: 1320px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--text); text-decoration: none; flex: none; }
.brand:hover { color: var(--text); }
.brand-mark svg { display: block; }
.bm-bg { fill: var(--accent); }
.bm-n { fill: none; stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { font: 700 17px/1 var(--font-display); letter-spacing: -.01em; display: flex; flex-direction: column; gap: 2px; }
.brand-sub { font: 500 11px/1 var(--font); color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; }
.topnav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav-link { display: inline-flex; align-items: center; gap: var(--s-2); padding: 8px 12px; border-radius: var(--r-full); color: var(--text-2);
  text-decoration: none; font-weight: 550; font-size: var(--fs-sm); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
.topnav-link .icon { width: 18px; height: 18px; }
.topnav-link:hover { background: var(--surface-3); color: var(--text); }
.topnav-link.is-active { background: var(--accent-soft); color: var(--accent-text); }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); flex: none; }
.lang-switch { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: var(--r-full); }
.lang-btn { border: 0; background: transparent; color: var(--text-3); font: 650 12px/1 var(--font); padding: 6px 9px; border-radius: var(--r-full); cursor: pointer; letter-spacing: .04em; }
.lang-btn.is-on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.theme-dark { display: none; }
:root[data-theme="dark"] .theme-light { display: none; } :root[data-theme="dark"] .theme-dark { display: inline; }
.account-btn { display: inline-flex; align-items: center; gap: var(--s-2); padding: 4px 10px 4px 4px; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-full); cursor: pointer; color: var(--text); font: 550 var(--fs-sm)/1 var(--font); max-width: 220px; }
.account-btn:hover { border-color: var(--border-strong); }
.account-name { max-width: 120px; }
.account-caret { width: 16px; height: 16px; color: var(--text-3); }
.subnav-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.subnav-inner { display: flex; align-items: center; gap: var(--s-4); min-height: 52px; max-width: 1320px; }
.subnav-partner { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; color: var(--text); text-decoration: none; max-width: 220px; flex: none; }
.subnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.subnav-link { display: inline-flex; align-items: center; gap: 6px; padding: 14px 12px; color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 550;
  border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav-link .icon { width: 17px; height: 17px; }
.subnav-link:hover { color: var(--text); }
.subnav-link.is-active { color: var(--accent-text); border-bottom-color: var(--accent); }
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: var(--s-8) 0; margin-top: auto; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-8); justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.footer-name { font-weight: 700; font-family: var(--font-display); }
.footer-links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.footer-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); }
.footer-links a .icon { width: 14px; height: 14px; }
.bottombar { display: none; }
.page-head { margin-bottom: var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.page-title { font-size: var(--fs-3xl); font-weight: 750; letter-spacing: -.02em; }
.page-sub { color: var(--text-2); margin-top: var(--s-1); max-width: 70ch; }
.page-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--text-3); flex-wrap: wrap; }
.crumbs a { color: var(--text-2); text-decoration: none; } .crumbs a:hover { color: var(--accent-text); }
.crumb-sep { width: 14px; height: 14px; }
.section-title { font-size: var(--fs-xl); margin-bottom: var(--s-4); }
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-4); }
.grid-cards { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.grid-editor { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s-8); }
.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.row-center { justify-content: center; }
.narrow, .page-narrow { max-width: 640px; margin: 0 auto; }
.toolbar { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-4); }

/* ---------------------------------------------------------------- 4. buttons */
.btn { --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--border-strong); --b-hover: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 40px; padding: 0 16px; border-radius: var(--r-full);
  border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg); font: 600 var(--fs-sm)/1.2 var(--font); text-decoration: none; cursor: pointer;
  white-space: nowrap; user-select: none; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); position: relative; }
.btn:hover { background: var(--b-hover); color: var(--b-fg); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--focus); border-radius: var(--r-full); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-primary { --b-bg: var(--accent); --b-fg: var(--on-accent); --b-bd: transparent; --b-hover: var(--accent-hover); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, var(--sh-1); }
.btn-secondary { }
.btn-soft { --b-bg: var(--accent-soft); --b-fg: var(--accent-text); --b-bd: transparent; --b-hover: var(--accent-soft-2); }
.btn-ghost { --b-bg: transparent; --b-fg: var(--text-2); --b-bd: transparent; --b-hover: var(--surface-3); }
.btn-danger { --b-bg: var(--danger); --b-fg: #fff; --b-bd: transparent; --b-hover: var(--danger-hover); }
.btn-link { --b-bg: transparent; --b-bd: transparent; --b-hover: transparent; --b-fg: var(--accent-text); padding: 0; min-height: auto; text-decoration: underline; text-underline-offset: 3px; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: var(--fs-xs); }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: var(--fs-md); }
.btn-block { width: 100%; white-space: normal; text-align: center; padding-top: 8px; padding-bottom: 8px; }
.hero > * { min-width: 0; }
.main { overflow-x: clip; }
.btn-icon { padding: 0; width: 40px; } .btn-icon.btn-sm { width: 32px; } .btn-icon.btn-lg { width: 50px; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--b-fg); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.is-loading[data-loading-text] { color: var(--b-fg) !important; }
.btn.is-loading[data-loading-text]::after { position: static; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; padding-top: var(--s-2); }
.cell-who { display: inline-flex; align-items: center; gap: var(--s-2); min-width: 0; }
.form-actions-sticky { position: sticky; bottom: 0; background: var(--bg); padding: var(--s-3) 0; border-top: 1px solid var(--border); z-index: 5; }

/* ---------------------------------------------------------------- 5. forms */
.form { display: flex; flex-direction: column; gap: var(--s-4); }
.form-inline { display: flex; flex-direction: row; gap: var(--s-3); align-items: flex-end; flex-wrap: wrap; }
.form-inline .field { flex: 1 1 220px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 650; margin-bottom: var(--s-2); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-weight: 600; font-size: var(--fs-sm); color: var(--text); }
.field-req { color: var(--danger); margin-left: 3px; }
.field-help { font-size: var(--fs-xs); color: var(--text-3); }
.field-error { font-size: var(--fs-xs); color: var(--danger-text); font-weight: 550; display: flex; gap: 4px; }
.input { width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface);
  color: var(--text); font: 400 var(--fs-md)/1.4 var(--font); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: var(--text-3); }
.input:focus { border-color: var(--accent); box-shadow: var(--focus); }
.input[readonly] { background: var(--surface-2); }
.input[disabled] { opacity: .6; cursor: not-allowed; }
.input[aria-invalid="true"], .field.has-error .input { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(214, 69, 61, .25); }
textarea.input { min-height: 96px; resize: vertical; }
.select-wrap { position: relative; }
.select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; }
.select-caret { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-3); width: 18px; height: 18px; }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.input-group:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.input-group .input { border: 0; border-radius: 0; box-shadow: none; flex: 1; min-width: 0; }
.input-addon { display: flex; align-items: center; padding: 0 12px; color: var(--text-3); background: var(--surface-2); font-size: var(--fs-sm); }
.input-addon-btn { border: 0; background: transparent; color: var(--text-2); padding: 0 12px; cursor: pointer; display: flex; align-items: center; }
.input-addon-btn:hover { color: var(--accent-text); background: var(--surface-2); }
.toggle { display: flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; position: relative; }
.toggle-text { display: flex; flex-direction: column; gap: 2px; }
.toggle-label { font-weight: 550; }
.switch-input, .check-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { flex: none; width: 42px; height: 24px; border-radius: var(--r-full); background: var(--border-strong); position: relative; transition: background var(--t); margin-top: 1px; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--t) var(--ease); }
.switch-input:checked + .switch-track { background: var(--accent); }
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch-input:focus-visible + .switch-track, .check-input:focus-visible + .check-box { box-shadow: var(--focus); }
.switch-input:disabled + .switch-track { opacity: .5; }
.check-box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; margin-top: 1px; transition: background var(--t-fast); }
.check-box .icon { width: 14px; height: 14px; stroke-width: 2.4; color: var(--on-accent); opacity: 0; }
.check-input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check-input:checked + .check-box .icon { opacity: 1; }
.segmented { position: relative; display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: var(--r-full); gap: 2px; flex-wrap: wrap; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label, .segmented-item { padding: 7px 14px; border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); cursor: pointer; text-decoration: none; }
.segmented input:checked + label, .segmented-item.is-active { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.segmented input:focus-visible + label { box-shadow: var(--focus); }
.file-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); background: var(--surface-2);
  color: var(--text-2); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); flex-wrap: wrap; }
.file-drop:hover, .file-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.file-input:focus-visible + .file-drop, .file-drop:focus-within { box-shadow: var(--focus); }
.file-drop-name { font-weight: 600; color: var(--text); }
.file-preview { max-height: 180px; border-radius: var(--r-sm); border: 1px solid var(--border); background: repeating-conic-gradient(var(--surface-3) 0 25%, var(--surface) 0 50%) 0 0/16px 16px; }
.copy-field .input { font-size: var(--fs-md); }
.copy-lg .input { font: 700 28px/1.2 var(--mono); letter-spacing: .18em; text-align: center; min-height: 64px; }

/* ---------------------------------------------------------------- 6. cards & surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-width: 0; display: flex; flex-direction: column; }
.card-raised { box-shadow: var(--sh-3); border-color: transparent; }
.card-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-5) var(--s-6) 0; }
.card-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.card-titles { flex: 1; min-width: 0; }
.card-title { font-size: var(--fs-lg); font-weight: 650; }
.card-sub { color: var(--text-3); font-size: var(--fs-sm); margin-top: 2px; }
.card-actions { display: flex; gap: var(--s-2); flex: none; }
.card-body { padding: var(--s-5) var(--s-6) var(--s-6); flex: 1; min-width: 0; }
.card-flush { padding: var(--s-4) 0 0; }
.card-foot { padding: var(--s-4) var(--s-6); border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.card-accent { background: linear-gradient(160deg, var(--accent-soft) 0%, var(--surface) 60%); border-color: var(--accent-soft-2); }
.card-warm { background: linear-gradient(160deg, var(--warm-soft) 0%, var(--surface) 60%); }
.card-warm .card-icon { background: var(--surface); color: var(--warm-text); box-shadow: inset 0 0 0 1px var(--border); }
.card-muted { background: var(--surface-2); box-shadow: none; }
.card-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.card-danger .card-icon { background: var(--danger-soft); color: var(--danger-text); }
.card-link { text-decoration: none; color: inherit; transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t); }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--border-strong); color: inherit; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); border-radius: var(--r-lg); padding: var(--s-5); display: flex; gap: var(--s-4); align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 7. data */
.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; }
.table-sticky { max-height: 70vh; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th { text-align: left; font-weight: 600; color: var(--text-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; padding: 10px var(--s-4); border-bottom: 1px solid var(--border); background: var(--surface); white-space: nowrap; }
.table-sticky th { position: sticky; top: 0; z-index: 1; }
.table td { padding: 12px var(--s-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--surface-2); }
.table th:first-child, .table td:first-child { padding-left: var(--s-6); }
.table th:last-child, .table td:last-child { padding-right: var(--s-6); }
.ta-end { text-align: right !important; } .ta-center { text-align: center !important; }
.th-sort { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.th-sort:focus-visible { box-shadow: var(--focus); border-radius: 4px; }
.sort-caret { width: 14px; height: 14px; opacity: .35; transition: transform var(--t-fast); }
th[aria-sort="ascending"] .sort-caret { opacity: 1; transform: rotate(180deg); }
th[aria-sort="descending"] .sort-caret { opacity: 1; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 650; white-space: nowrap; line-height: 1.5;
  background: var(--surface-3); color: var(--text-2); }
.badge .icon { width: 13px; height: 13px; }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.badge-success { background: var(--success-soft); color: var(--success-text); }
.badge-warning { background: var(--warm-soft); color: var(--warm-text); }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.badge-info { background: var(--info-soft); color: var(--info-text); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; font-weight: 700; color: #fff; background: var(--accent); user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 22px; height: 22px; font-size: 10px; } .avatar-sm { width: 30px; height: 30px; font-size: 12px; } .avatar-md { width: 40px; height: 40px; font-size: 15px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; } .avatar-xl { width: 88px; height: 88px; font-size: 30px; }
.avatar-h0 { background: #0f9d8a; } .avatar-h1 { background: #d48806; } .avatar-h2 { background: #3a7bd5; } .avatar-h3 { background: #c2477e; }
.avatar-h4 { background: #7a5bc7; } .avatar-h5 { background: #2f9e5b; } .avatar-h6 { background: #b65a2c; } .avatar-h7 { background: #4b6b88; }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2);
  position: relative; overflow: hidden; color: inherit; text-decoration: none; box-shadow: var(--sh-1); min-width: 0; }
a.stat-tile:hover { border-color: var(--border-strong); box-shadow: var(--sh-2); color: inherit; }
.stat-top { display: flex; align-items: center; gap: var(--s-2); }
.stat-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.stat-icon .icon { width: 18px; height: 18px; }
.stat-label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 550; }
.stat-value { font: 750 30px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-foot { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--text-3); flex-wrap: wrap; }
.stat-delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; }
.stat-delta .icon { width: 13px; height: 13px; }
.delta-up { color: var(--success-text); } .delta-down { color: var(--danger-text); } .delta-flat { color: var(--text-3); }
.stat-accent { background: linear-gradient(150deg, var(--accent) 0%, var(--c-accent-700) 100%); border-color: transparent; color: var(--on-accent); }
.stat-accent .stat-label, .stat-accent .stat-foot { color: rgba(255,255,255,.82); }
.stat-accent .stat-icon { background: rgba(255,255,255,.16); color: #fff; }
.stat-warm .stat-icon { background: var(--warm-soft); color: var(--warm-text); }
.stat-spark { margin-top: var(--s-1); }
.kv { display: grid; gap: 0; margin: 0; }
.kv-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: var(--s-3); padding: 10px 0; border-bottom: 1px dashed var(--border); }
.kv-row:last-child { border-bottom: 0; }
.kv dt { color: var(--text-3); font-size: var(--fs-sm); }
.kv dd { margin: 0; font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.list-plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.list-plain > li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-plain > li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- 8. overlays */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: var(--s-4); }
.modal-backdrop { position: absolute; inset: 0; background: var(--overlay); animation: fade var(--t) var(--ease); }
.modal-panel { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--sh-3); animation: pop var(--t) var(--ease); display: flex; flex-direction: column; }
.modal-sm .modal-panel { max-width: 400px; } .modal-lg .modal-panel { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-5) var(--s-6) 0; }
.modal-title { font-size: var(--fs-xl); flex: 1; }
.modal-x { margin-right: -8px; }
.modal-desc { padding: var(--s-2) var(--s-6) 0; color: var(--text-2); }
.modal-body { padding: var(--s-5) var(--s-6); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-4) var(--s-6) var(--s-5); flex-wrap: wrap; }
.modal-foot > .form { flex-direction: row; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: var(--s-2); flex: 1 1 auto; }
.modal.is-under .modal-panel { transform: scale(.97); filter: brightness(.92); }
body.has-modal { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dropdown { position: relative; display: inline-flex; }
.menu { position: absolute; top: calc(100% + 6px); z-index: 60; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--sh-3); padding: 6px; animation: pop var(--t-fast) var(--ease); }
.dd-end .menu { right: 0; } .dd-start .menu { left: 0; }
.menu-item { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font: 500 var(--fs-sm)/1.3 var(--font);
  border: 0; background: transparent; cursor: pointer; text-align: left; }
.menu-item .icon { width: 18px; height: 18px; color: var(--text-3); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); color: var(--text); box-shadow: none; }
.menu-item.is-danger, .menu-item.is-danger .icon { color: var(--danger-text); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-raw { margin: 0; }
.menu-head { display: flex; gap: var(--s-3); align-items: center; padding: 8px 10px; }
.menu-name { font-weight: 650; } .menu-login { color: var(--text-3); font-size: var(--fs-xs); }
.toasts { position: fixed; z-index: 100; right: var(--s-5); bottom: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: var(--s-3); align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--text); color: var(--bg);
  box-shadow: var(--sh-3); animation: pop var(--t) var(--ease); font-size: var(--fs-sm); }
.toast .icon { margin-top: 1px; }
.toast-text { flex: 1; }
.toast-x { border: 0; background: transparent; color: inherit; opacity: .6; cursor: pointer; padding: 0; }
.toast-success .icon:first-child { color: #6fe0a3; } .toast-error .icon:first-child { color: #ff9c95; } .toast-warning .icon:first-child { color: #ffcf7a; } .toast-info .icon:first-child { color: #9cc4ff; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity var(--t), transform var(--t); }
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); font: 500 12px/1.3 var(--font); padding: 6px 9px; border-radius: 8px; white-space: nowrap; z-index: 70; pointer-events: none; }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw); background: var(--surface); box-shadow: var(--sh-3); z-index: 85; padding: var(--s-6); overflow: auto; animation: slide var(--t) var(--ease); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

/* ---------------------------------------------------------------- 9. tabs, pager */
.tabs { display: flex; flex-direction: column; gap: var(--s-4); }
.tab-list { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { all: unset; display: inline-flex; align-items: center; gap: var(--s-2); padding: 10px 14px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: var(--fs-sm);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tab .icon { width: 17px; height: 17px; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.tab:focus-visible { box-shadow: var(--focus); border-radius: 6px; }
.tab-count { background: var(--surface-3); color: var(--text-2); border-radius: var(--r-full); font-size: 11px; padding: 1px 7px; }
.tab-panel:focus-visible { box-shadow: none; }
.pager { display: flex; justify-content: center; gap: 4px; padding: var(--s-5) 0 var(--s-2); flex-wrap: wrap; }
.pager-item { min-width: 36px; height: 36px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--r-full); text-decoration: none; color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.pager-item:hover { background: var(--surface-3); color: var(--text); }
.pager-item.is-current { background: var(--accent); color: var(--on-accent); }
.pager-gap { color: var(--text-3); padding: 0 4px; align-self: center; }

/* ---------------------------------------------------------------- 10. feedback */
.alert { display: flex; gap: var(--s-3); align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--info-soft); color: var(--info-text); font-size: var(--fs-sm); }
.alert-body { flex: 1; min-width: 0; color: var(--text); }
.alert-title { font-weight: 650; margin-bottom: 2px; }
.alert-action { flex: none; }
.alert-success { background: var(--success-soft); color: var(--success-text); }
.alert-warning { background: var(--warm-soft); color: var(--warm-text); }
.alert-danger { background: var(--danger-soft); color: var(--danger-text); }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); padding: var(--s-10) var(--s-5); }
.empty-icon { width: 64px; height: 64px; border-radius: 22px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin-bottom: var(--s-2); }
.empty-icon .icon { width: 30px; height: 30px; }
.empty-title { font-weight: 650; font-size: var(--fs-lg); }
.empty-text { color: var(--text-2); max-width: 46ch; }
.empty-action { margin-top: var(--s-3); }
.empty-error .empty-icon { background: var(--danger-soft); color: var(--danger-text); }
.skeleton { display: block; background: linear-gradient(90deg, var(--skeleton) 0%, var(--skeleton-hi) 50%, var(--skeleton) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-wrap { display: flex; flex-direction: column; gap: 10px; }
.skeleton-line { height: 12px; }
.sk-w1 { width: 92%; } .sk-w2 { width: 64%; } .sk-w3 { width: 38%; }
.skeleton-title { height: 20px; width: 45%; margin-bottom: 8px; }
.skeleton-value { height: 30px; width: 50%; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.skeleton-chart { height: 180px; border-radius: var(--r-md); }
.sk-table { display: flex; flex-direction: column; }
.sk-row { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: var(--s-4); padding: 14px var(--s-6); border-bottom: 1px solid var(--border); }
.sk-row:last-child { border-bottom: 0; }
.sk-list { display: flex; flex-direction: column; gap: var(--s-4); }
.sk-item { display: flex; gap: var(--s-3); align-items: center; }
.sk-item-text { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-tile { box-shadow: none; }
.fragment { min-width: 0; }
.fragment[aria-busy="true"] { cursor: progress; }
.fragment.is-refreshing { opacity: .6; transition: opacity var(--t); }
.progress { height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .4s var(--ease); }
.countdown { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 650; }
.countdown.is-done { color: var(--danger-text); }

/* ---------------------------------------------------------------- 11. charts */
.chart { position: relative; width: 100%; min-width: 0; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .c-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .c-axis { fill: var(--text-3); font: 500 11px var(--font); }
.chart .c-line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .c-area { opacity: .16; }
.chart .c-bar { transition: opacity var(--t-fast); }
.chart .c-bar:hover { opacity: .8; }
.chart .c-dot { stroke: var(--surface); stroke-width: 2; }
.chart .c-hover { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.chart .c-s0 { stroke: var(--chart-1); fill: var(--chart-1); } .chart .c-s1 { stroke: var(--chart-2); fill: var(--chart-2); }
.chart .c-s2 { stroke: var(--chart-3); fill: var(--chart-3); } .chart .c-s3 { stroke: var(--chart-4); fill: var(--chart-4); }
.chart .c-s4 { stroke: var(--chart-5); fill: var(--chart-5); } .chart .c-s5 { stroke: var(--chart-6); fill: var(--chart-6); }
.chart .c-line.c-s0, .chart .c-line.c-s1, .chart .c-line.c-s2, .chart .c-line.c-s3, .chart .c-line.c-s4, .chart .c-line.c-s5 { fill: none; }
.chart .c-donut-hole { fill: var(--surface); }
.chart .c-center { fill: var(--text); font: 750 22px var(--font-display); }
.chart .c-center-sub { fill: var(--text-3); font: 500 11px var(--font); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: 10px; font-size: 12px; box-shadow: var(--sh-2);
  white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.chart-tip b { display: block; font-weight: 650; margin-bottom: 2px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 6px; }
.chart-tip .tip-sw { width: 8px; height: 8px; border-radius: 3px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px var(--s-4); margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--text-2); list-style: none; padding: 0; }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.sw.c-s0 { background: var(--chart-1); } .sw.c-s1 { background: var(--chart-2); } .sw.c-s2 { background: var(--chart-3); }
.sw.c-s3 { background: var(--chart-4); } .sw.c-s4 { background: var(--chart-5); } .sw.c-s5 { background: var(--chart-6); }
.chart-empty { display: grid; place-items: center; color: var(--text-3); font-size: var(--fs-sm); border: 1px dashed var(--border); border-radius: var(--r-md); }
.chart-sparkline svg { height: 36px; }

/* ---------------------------------------------------------------- 12. landing & status pages */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--s-10); align-items: center; padding: var(--s-6) 0 var(--s-12);
  position: relative; }
.hero::before { content: ""; position: absolute; inset: -40px -10vw auto; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 85% 30%, var(--accent-soft-2) 0%, transparent 70%), radial-gradient(40% 50% at 10% 10%, var(--warm-soft) 0%, transparent 70%); }
.hero-eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); padding: 6px 12px 6px 8px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border);
  color: var(--accent-text); font-weight: 650; font-size: var(--fs-sm); box-shadow: var(--sh-1); }
.hero-eyebrow .icon { width: 18px; height: 18px; }
.hero-title { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin: var(--s-5) 0 var(--s-4); max-width: 14ch; }
.hero-lead { font-size: var(--fs-lg); color: var(--text-2); max-width: 54ch; margin-bottom: var(--s-8); }
.signin { max-width: 440px; }
.signin-title { font-size: var(--fs-xl); }
.cstop-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.2); font: 800 12px/1 var(--font); letter-spacing: -.02em; }
.signin-cstop .icon { margin-left: auto; }
.signin-note { display: flex; gap: var(--s-2); align-items: flex-start; }
.signin-note .icon { width: 16px; height: 16px; margin-top: 2px; }
.tg-wait { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.tg-wait-head { display: flex; gap: var(--s-3); align-items: center; }
.tg-wait-title { font-weight: 650; }
.tg-pulse { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--info-soft); color: var(--info-text); flex: none; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(58, 123, 213, .35); } 50% { box-shadow: 0 0 0 10px rgba(58, 123, 213, 0); } }
.hero-art { display: flex; justify-content: center; }
.hero-svg { width: 100%; max-width: 480px; height: auto; }
.art-panel { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
.art-screen { fill: var(--accent-soft); }
.art-chart { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.art-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.art-soft { fill: var(--surface-3); }
.art-warm { fill: var(--warm-soft); stroke: var(--warm); stroke-width: 1.5; }
.art-card { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.art-accent { fill: var(--accent); }
.art-accent-soft { fill: var(--accent-soft-2); }
.art-check { fill: none; stroke: var(--on-accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.art-line { fill: var(--border); }
.art-stroke { fill: none; stroke: var(--accent-text); stroke-width: 3; stroke-linecap: round; }
.features { padding: var(--s-8) 0; }
.feature { padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s-2); }
.feature-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: var(--s-2); }
.feature:nth-child(3n+2) .feature-icon { background: var(--warm-soft); color: var(--warm-text); }
.feature-title { font-size: var(--fs-lg); }
.feature-text { color: var(--text-2); font-size: var(--fs-sm); }
.steps { padding: var(--s-8) 0 0; }
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.steps-list li { display: flex; gap: var(--s-4); align-items: flex-start; }
.step-n { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-weight: 750; }
.step-title { font-weight: 650; margin-bottom: 2px; }
.status-page { text-align: center; max-width: 520px; margin: var(--s-10) auto; display: flex; flex-direction: column; align-items: center; gap: var(--s-4); }
.status-code { font: 800 88px/1 var(--font-display); letter-spacing: -.05em; color: var(--accent); opacity: .9; }
.status-title { font-size: var(--fs-2xl); }
.status-text { color: var(--text-2); }
.status-art svg { max-width: 100%; }

/* ---------------------------------------------------------------- 13. page parts (player / partner) */
.prose { line-height: 1.7; overflow-wrap: anywhere; }
.prose > * + * { margin-top: .9em; }
.prose h2 { font-size: var(--fs-xl); } .prose h3 { font-size: var(--fs-lg); }
.prose img { border-radius: var(--r-md); }
.prose blockquote { margin: 0; padding-left: var(--s-4); border-left: 3px solid var(--accent-soft-2); color: var(--text-2); }
.code-view { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); font: 13px/1.6 var(--mono); max-height: 60vh; overflow: auto; white-space: pre; }
/* player: home hero (signed-in) */
.hero-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); min-width: 0; }
.hero-text { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; max-width: 100%; }
.hero-kicker { margin: 0; color: var(--accent-text); font-size: var(--fs-sm); font-weight: 650; letter-spacing: .02em; }
.hero-body .hero-title { margin: 0; max-width: 100%; font-size: var(--fs-3xl); overflow-wrap: anywhere; }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
svg.hero-art { display: block; width: 100%; max-width: 300px; height: auto; justify-self: end; }
.art-a { fill: var(--accent-soft-2); }
.art-b { fill: var(--accent); }
.art-c { fill: var(--on-accent); opacity: .9; }
.art-d { fill: var(--warm); }
/* player: tables, devices, cloud */
.cell-main { display: block; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.cell-sub { display: block; font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
.device-card .card-foot { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-4); position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--border); border-radius: 2px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.timeline-dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; margin-top: var(--s-4);
  background: var(--surface); border: 2px solid var(--border-strong); color: var(--text-3); }
.timeline-dot .icon { width: 16px; height: 16px; }
.timeline-item.is-current .timeline-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.timeline-item .card-foot { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: var(--fs-sm); max-width: 100%; }
.file-chip .icon { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip:hover { border-color: var(--accent); color: var(--accent-text); }
.file-chip:focus-visible { outline: none; box-shadow: var(--focus); }
.cloud-file-view { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.cloud-file-view .code-view { margin: 0; }
/* player: linking a game */
.link-start { display: flex; flex-direction: column; gap: var(--s-5); }
.link-start .steps { padding: 0; margin: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: var(--s-3); }
.link-start .steps li { counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s-3); align-items: start; color: var(--text-2); }
.link-start .steps li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text);
  font-weight: 700; font-size: var(--fs-sm); }
.link-code { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 200px); gap: var(--s-5); align-items: start; }
.link-code-main { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.link-code-main .muted { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
.link-code-main .muted .icon { width: 16px; height: 16px; }
.link-qr { margin: 0; display: flex; flex-direction: column; gap: var(--s-2); align-items: center; text-align: center; font-size: var(--fs-xs); }
.link-qr .qr, .link-qr svg { display: block; width: 100%; max-width: 200px; height: auto; padding: var(--s-3); background: #fff; border-radius: var(--r-md); border: 1px solid var(--border); }
.link-state { min-height: 32px; }
.link-waiting { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin: 0; }
.stat-hint { color: inherit; }
/* settings editor (partner) */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.settings-toc { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 2px; }
.settings-toc a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 550; }
.settings-toc a:hover, .settings-toc a.is-active { background: var(--accent-soft); color: var(--accent-text); }
.settings-section { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-8); }
.setting-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.setting-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); flex-wrap: wrap; }
.setting-head > :first-child { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.setting-body { border-top: 1px solid var(--border); padding: var(--s-5); }
.setting-editor { display: flex; flex-direction: column; gap: var(--s-4); }
.setting-state { font-size: var(--fs-xs); color: var(--text-3); }
.setting-fields { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.setting-reset { margin-left: auto; }
.setting-inherited { font-size: var(--fs-sm); color: var(--text-2); background: var(--surface-2); border-radius: var(--r-sm); padding: var(--s-3); }
.rows { display: flex; flex-direction: column; gap: var(--s-2); }
.rows-head, .rows-item { display: grid; grid-template-columns: 2fr 72px 1fr 2fr auto; gap: var(--s-2); align-items: center; }
.rows-head { font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 0 2px; }
.rows-item .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rows-item-block { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
/* a block row (announcement) is a small form, not a table line: labels visible, fields full width */
.rows-item-block { align-items: stretch; position: relative; gap: var(--s-4); }
.rows-item-block .field-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.rows-item-block > .row-wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3) var(--s-5); padding-right: 40px; }
.rows-item-block > .row-wrap > .field { flex: 0 0 auto; }
.rows-item-block > [data-row-remove] { position: absolute; top: var(--s-3); right: var(--s-3); }
.rows-item-block .lang-group > .field-label { margin-bottom: var(--s-2); display: block; }
.rows-cvars .rows-head, .rows-item-cvar { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto auto; }
.announcement { display: flex; flex-direction: column; gap: var(--s-3); }
.sort-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sort-item { display: flex; align-items: center; gap: var(--s-3); padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.sort-handle { cursor: grab; color: var(--text-3); display: inline-flex; }
.sort-item.is-dragging { box-shadow: var(--sh-3); opacity: .95; cursor: grabbing; }
.sort-order { width: 64px; }
.js .sort-order { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sort-moves { display: inline-flex; gap: 2px; margin-left: auto; }
.lang-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.source-panel { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); }
.announcement-button > summary, details.disclosure > summary { cursor: pointer; font-weight: 600; color: var(--accent-text); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.announcement-button > summary::-webkit-details-marker { display: none; }
.announcement-button[open] > summary { margin-bottom: var(--s-3); }
.menu-preview { display: grid; grid-template-columns: 200px 1fr; gap: 0; border-radius: var(--r-lg); overflow: hidden; background: #171c22; color: #d9e1e8; font-size: 13px; min-height: 220px; }
.menu-preview:has(> .menu-preview-side:not(:has(*))) { grid-template-columns: 1fr; }
.menu-preview-side:not(:has(*)) { display: none; }
.menu-preview-side { background: #11151a; padding: var(--s-4); display: flex; flex-direction: column; gap: 6px; }
.menu-preview-button { padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,.04); color: #e8edf2; }
.menu-preview-link { color: #8fd8cb; font-size: 12px; padding: 2px 10px; }
.menu-preview-main { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.menu-preview-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.menu-preview-tab { padding: 5px 10px; border-radius: 6px; background: rgba(255,255,255,.06); color: #b9c4ce; }
.menu-preview-tab.is-active { background: #0f9d8a; color: #fff; }
.menu-preview-note { padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,.05); border-left: 3px solid #23b39d; }
.menu-preview-note.is-important { border-left-color: #f2a516; background: rgba(242,165,22,.1); }
.editor-main, .editor-side { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.editor-side { position: sticky; top: calc(var(--topbar-h) + 16px); }
.md-toolbar { display: flex; gap: 2px; flex-wrap: wrap; padding: 4px; border: 1px solid var(--border-strong); border-bottom: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--surface-2); }
.md-tool { border: 0; background: transparent; color: var(--text-2); min-width: 32px; height: 32px; border-radius: 6px; cursor: pointer; display: inline-grid; place-items: center; }
.md-tool:hover { background: var(--surface-3); color: var(--text); }
.md-glyph { font: 700 14px/1 var(--font); }
.md-bold { font-weight: 800; } .md-italic { font-style: italic; font-weight: 500; } .md-heading { font-weight: 800; letter-spacing: -.02em; }
.md-input { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; min-height: 320px; font: 14px/1.6 var(--mono); }
.md-preview { min-height: 160px; }
.md-preview.is-loading { opacity: .55; transition: opacity var(--t); }
.splash-current img { max-width: 100%; border-radius: var(--r-md); border: 1px solid var(--border); background: repeating-conic-gradient(var(--surface-3) 0 25%, var(--surface) 0 50%) 0 0/16px 16px; }
.partner, .partner-body { display: flex; flex-direction: column; gap: var(--s-6); min-width: 0; }
.partner-start { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-6); }
.fragment-host { min-height: 60px; }
.device { display: flex; gap: var(--s-3); align-items: center; min-width: 0; }
.device-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); flex: none; }

/* ---------------------------------------------------------------- 14. utilities */
.muted { color: var(--text-3); } .text-2 { color: var(--text-2); }
.small { font-size: var(--fs-sm); } .xsmall { font-size: var(--fs-xs); }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tabular { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.mb-4 { margin-bottom: var(--s-4); }
.w-sm { width: 90px; } .w-md { width: 160px; } .w-lg { width: 260px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.text-danger { color: var(--danger-text); } .text-success { color: var(--success-text); } .text-accent { color: var(--accent-text); } .text-warm { color: var(--warm-text); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1360px) {
  .topnav-link:not(.is-active) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topnav-link:not(.is-active) { padding: 9px; }
}
@media (max-width: 1080px) {
  .topnav-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topnav-link { padding: 9px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-editor { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); padding-top: 0; }
  .hero-art { order: -1; } .hero-svg { max-width: 340px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-list { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-toc { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .settings-toc a { white-space: nowrap; }
}
@media (max-width: 720px) {
  :root { --topbar-h: 56px; }
  .container, .container-wide { padding: 0 var(--s-4); }
  .main { padding: var(--s-5) 0 calc(var(--s-16) + 64px); }
  .topnav { display: none; }
  .account-name, .account-caret, .brand-sub { display: none; }
  .account-btn { padding: 3px; }
  .bottombar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; box-shadow: 0 -4px 18px rgba(0,0,0,.06); }
  .bottombar-link { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: var(--r-sm); color: var(--text-3);
    text-decoration: none; font: 600 10.5px/1.2 var(--font); border: 0; background: transparent; cursor: pointer; min-width: 0; }
  .bottombar-link span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottombar-link.is-active { color: var(--accent-text); }
  .bottombar-link.is-active .icon { background: var(--accent-soft); border-radius: var(--r-full); }
  .bottombar-link .icon { width: 40px; height: 26px; padding: 3px 10px; }
  .account .menu { position: fixed; left: 8px; right: 8px; top: auto; bottom: calc(70px + env(safe-area-inset-bottom)); }
  .page-title { font-size: var(--fs-2xl); }
  .hero-title { font-size: var(--fs-3xl); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .card-head { padding: var(--s-4) var(--s-4) 0; flex-wrap: wrap; row-gap: var(--s-2); }
  .card-titles { flex: 1 1 120px; }
  .card-body { padding: var(--s-4); }
  .card-flush { padding: var(--s-3) 0 0; }
  .card-foot { padding: var(--s-3) var(--s-4); }
  .modal { align-items: flex-end; padding: 0; }
  .modal-panel { max-width: none !important; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh; }
  .toasts { left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); width: auto; }
  .footer { padding-bottom: calc(var(--s-8) + 64px); }
  .lang-grid { grid-template-columns: 1fr; }
  .link-code { grid-template-columns: minmax(0, 1fr); }
  .link-qr { max-width: 220px; justify-self: center; }
  svg.hero-art { display: none; }
  .hero-body .hero-title { font-size: var(--fs-2xl); }
  .rows-head { display: none; }
  .rows-item { grid-template-columns: 1fr; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); }
  .rows-item .field-label { position: static; width: auto; height: auto; clip: auto; }
  .menu-preview { grid-template-columns: 1fr; min-height: 0; }
  /* a segmented control that does not fit becomes a tidy two-column block instead of a wrapped pill */
  .field .segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--r-md); }
  .field .segmented label { border-radius: calc(var(--r-md) - 3px); text-align: center; }
  .subnav-inner { flex-wrap: wrap; gap: 0; min-height: 0; padding-top: var(--s-2); }
  .subnav-partner { max-width: 100%; flex: 1 1 100%; padding: 4px 0; }
  .subnav { flex: 1 1 100%; margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-2); }
  .subnav-link { padding: 12px 10px; }
  .kv-row { grid-template-columns: minmax(96px, 40%) minmax(0, 1fr); gap: var(--s-2); padding: 8px 0; }
  /* tables become cards */
  .table-wrap.table-sticky { max-height: none; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td[data-label=""] { justify-content: flex-end; }
  .table td { border: 0; padding: 4px 0 !important; display: flex; justify-content: space-between; gap: var(--s-3); text-align: right; }
  .table td::before { content: attr(data-label); color: var(--text-3); font: 400 var(--fs-xs)/1.5 var(--font); letter-spacing: 0; text-align: left; flex: none; max-width: 45%; }
  .table td[data-label=""]::before { content: none; }
  .table td.ta-end, .table td.ta-start { text-align: right !important; }
  .table td:has(> .cell-sub) { flex-wrap: wrap; row-gap: 0; }
  .table td > .cell-main { margin-left: auto; }
  .table td > .cell-sub { flex-basis: 100%; }
  .form-actions-sticky { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .topbar-tools .btn-sm .btn-label { display: none; }
  .topbar-tools .btn-sm { width: 36px; padding: 0; }
  .topbar-inner { gap: var(--s-2); }
  .hero-title { font-size: var(--fs-2xl); }
}
@media (max-width: 360px) {
  .brand-text { display: none; }
  .lang-btn { padding: 6px 7px; }
}
@media print {
  .topbar, .bottombar, .footer, .toasts, .subnav-bar { display: none !important; }
  body { background: #fff; }
}
