/* CloudTV Signage: warm neutral + ink with a teal accent (the TV's Signage colour). Light / dark: <html data-theme>, set by
   index.html from the profile menu's choice (System follows the OS setting, live).
   One typeface (Roboto 400–700). Type scale 12 · 13 · 14 · 15 (body) · 17 · 20 · 28; weights 400 text · 500 controls · 600 headings. */
:root {
  color-scheme: light;
  --bg: #f6f3ec; --surface: #fffdf9; --card: #fff; --card-2: #f2eee5; --line: #e7e0d2; --line-2: #d6cdbb;
  --text: #1a1c21; --muted: #6e695e; --faint: #9a9486;
  --accent: #00936f; --accent-2: #19b48c; --accent-text: #00785b; --accent-ink: #ffffff; --accent-soft: rgba(0, 147, 111, .1); --accent-line: rgba(0, 147, 111, .45);
  --ink: #15171c; --ink-2: #1f2229; --ink-text: #ece7da; --ink-muted: #9c978a;
  --red: #c2413b; --red-soft: rgba(194, 65, 59, .09); --good: #2f8f57; --good-soft: rgba(47, 143, 87, .1); --warn: #a86b00; --blue: #2f6fb3;
  --ring: 0 0 0 1px rgba(40, 32, 10, .07);
  --shadow: 0 1px 2px rgba(40, 32, 10, .04), 0 4px 16px rgba(40, 32, 10, .05);
  --shadow-lg: 0 2px 6px rgba(20, 16, 6, .08), 0 24px 60px rgba(20, 16, 6, .18);
  --radius: 16px;
  /* motion: quick ease-out for things entering / responding, never linear or bouncy */
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --sans: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: var(--sans); /* one typeface across the dashboard: Roboto */
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0e1014; --surface: #15181d; --card: #181b21; --card-2: #20242b; --line: #2a2e36; --line-2: #3a3f49;
    --text: #efebe2; --muted: #a29d90; --faint: #767165;
    --accent: #2bc79f; --accent-2: #5ad8b6; --accent-text: #5ad8b6; --accent-ink: #04140f; --accent-soft: rgba(43, 199, 159, .12); --accent-line: rgba(43, 199, 159, .45);
    --ink: #0a0b0e; --ink-2: #16181d;
    --red: #ec6a63; --red-soft: rgba(236, 106, 99, .12); --good: #4cc27e; --good-soft: rgba(76, 194, 126, .12); --warn: #f0b84a; --blue: #6aa8ea;
    --ring: 0 0 0 1px rgba(255, 255, 255, .07);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .22);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); min-height: 100%; }
body, input, select, textarea { font-family: var(--sans); font-weight: 400; }
button { font-family: var(--sans); font-weight: 500; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h1 { font: 600 28px/1.15 var(--serif); letter-spacing: -.022em; }
h2 { font-size: 17px; letter-spacing: -.012em; }
h3 { font-size: 15px; }
p { text-wrap: pretty; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; letter-spacing: .03em; }
/* small context line above a title: sentence case, quiet; the title carries the weight */
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 30px 0; }
.loading.boot { padding: 40px; }
.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes modal-out { to { opacity: 0; transform: scale(.98); } }

/* ---- shell: ink side bar (desktop) · top bar + bottom tabs (phone) ---- */
/* the ink column is painted by the shell too, so it always runs the full height of the page (not just one screen) */
.shell { min-height: 100vh; min-height: 100dvh; }
/* Top bar: brand left (→ overview), page tabs, profile orb right. */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--ink); color: var(--ink-text);
  border-bottom: 1px solid rgba(255, 255, 255, .06); padding-top: max(12px, env(safe-area-inset-top)); }
.topbar { transition: transform .3s var(--ease-out); will-change: transform; }
.topbar.away { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 11px; font: 600 17px/1.1 var(--serif); letter-spacing: -.005em; }
.brand-logo { height: 26px; width: auto; flex: none; display: block; }
/* The logo is white: on the light sign-in card (light theme) it is drawn dark. */
:root:not([data-theme="dark"]) .auth-card .brand-logo { filter: invert(1); }
.brand-link { color: inherit; } .brand-link:hover { text-decoration: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* Page tabs in the dark bar: quiet labels, a light pill slides under the open page (ui.js glide). */
.navtabs { position: relative; isolation: isolate; display: flex; gap: 2px; margin-left: 20px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); overflow-x: auto; scrollbar-width: none; }
.navtabs::-webkit-scrollbar { display: none; }
.navtab { flex: none; padding: 8px 16px; border-radius: 999px; color: var(--ink-muted); font: 500 14px/1 var(--sans); transition: color .2s var(--ease-out); }
.navtab:hover { color: var(--ink-text); text-decoration: none; }
.navtab[aria-selected="true"] { color: var(--ink); }
.navtabs .glider { border-radius: 999px; background: var(--ink-text); }
.navtabs:not(.gliding) .navtab[aria-selected="true"] { background: var(--ink-text); }
/* Storage meter: the plan's storage per owner. */
.meter { display: grid; gap: 6px; }
.meter-bar { height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.meter-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .4s var(--ease-out); }
.meter.full .meter-bar > span { background: var(--red); }
.menu-storage { display: grid; gap: 8px; padding: 6px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.orb { height: 42px; min-width: 42px; border-radius: 21px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px;
  background: rgba(255, 255, 255, .07); color: var(--ink-text); border: 1px solid rgba(255, 255, 255, .08); font: 600 14px/1 var(--sans); cursor: pointer; }
.orb:hover { background: rgba(255, 255, 255, .13); text-decoration: none; }
.orb svg { width: 19px; height: 19px; flex: none; }
.orb.avatar { width: 42px; padding: 0; background: var(--accent-2); color: var(--accent-ink); border: 0; letter-spacing: .02em; }
.orb.avatar.big { width: 46px; height: 46px; cursor: default; flex: none; }
.profile { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); width: 280px; background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 50; transform-origin: top right; animation: pop .18s var(--ease-out); }
.menu-who { display: flex; gap: 12px; align-items: center; padding: 10px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-id { min-width: 0; } .menu-id > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item { display: block; width: 100%; text-align: left; padding: 11px 12px; border: 0; background: none; color: inherit; font: inherit; border-radius: 9px; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--card-2); outline: none; }
.menu-item.danger { color: var(--red); }
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-theme .seg { flex: none; }
main { padding: 36px 44px 96px; max-width: 1320px; width: 100%; min-width: 0; animation: rise .3s var(--ease-out); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .title { min-width: 0; }
.page-head .title p { margin: 6px 0 0; max-width: 640px; }
.page-head .eyebrow { margin-bottom: 4px; }
@media (max-width: 760px) {
  .topbar { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar .brand { font-size: 16px; gap: 9px; } .topbar .brand-logo { height: 22px; }
  .topbar { flex-wrap: wrap; }
  .navtabs { order: 3; width: 100%; margin: 4px 0 0; }
  main { padding: 22px 16px 40px; }
  h1 { font-size: 25px; }
  .page-head { margin-bottom: 18px; }
}

/* ---- surfaces ---- */
/* cards: depth from a soft shadow + hairline ring (no border on top of a shadow) */
.card { background: var(--card); border-radius: var(--radius); padding: 24px; border: 1px solid transparent; box-shadow: var(--ring), var(--shadow); min-width: 0; }
.card.flush { padding: 4px 8px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.card-head h2 { font: 600 17px/1.3 var(--serif); }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { padding: 16px 18px; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font: 600 28px/1.1 var(--serif); letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
/* colour carries meaning only: a green dot marks the online count (the teal accent stays for the one main action) */
.stat.on .stat-label::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 7px; vertical-align: 1px; }
@media (max-width: 760px) { .card { padding: 18px; } .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .stat { padding: 12px; } .stat-label { font-size: 13px; } .stat-value { font-size: 24px; } }

/* ---- controls ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; padding: 9px 16px; border-radius: 11px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s var(--ease-out), border-color .15s var(--ease-out), color .15s var(--ease-out), transform .16s var(--ease-out); }
.btn:hover { background: var(--card-2); text-decoration: none; }
/* press feedback: a small scale, released with the same curve */
.btn:active, .chip:active, .sec-tab:active, .seg button:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
/* the one main action of a screen: flat accent, no gradient or glow */
.btn.primary { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(40, 32, 10, .12); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent-2) 88%, #000); border-color: transparent; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--red) 50%, transparent); color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--card-2); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { padding: 13px 22px; font-size: 15px; border-radius: 13px; }
.btn.saved { background: var(--good); border-color: var(--good); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; padding: 5px 9px; border-radius: 8px; }
.icon-btn:hover { color: var(--text); background: var(--card-2); }
.icon-btn:disabled { opacity: .3; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 12px; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 72px; }
/* One dropdown arrow everywhere: same chevron, 12px from the right, centred; text never runs under it. */
select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239a9486' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat;
  background-position: right 12px center; background-size: 12px 8px; padding-right: 36px; text-overflow: ellipsis; cursor: pointer; }
select::-ms-expand { display: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input:disabled { opacity: .6; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); padding: 0; flex: none; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 500; }
.field-label .req { color: var(--accent-text); margin-left: 3px; }
.field-label .opt { color: var(--faint); font-weight: 400; margin-left: 6px; }
.hint { font-size: 13px; color: var(--muted); }
.field-err { font-size: 13px; color: var(--red); }
.field-err:empty { display: none; }
.field.bad input, .field.bad select, .field.bad textarea, .field.bad .chips { border-color: var(--red); }
.form { display: grid; gap: 18px; align-content: start; }
.form.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form.three { grid-template-columns: 2fr 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form.two, .form.three { grid-template-columns: 1fr; } }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; border: 1px solid transparent; border-radius: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s var(--ease-out), border-color .15s var(--ease-out), transform .16s var(--ease-out); }
.chip:hover { border-color: var(--accent-line); }
.chip[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); font-weight: 500; }
.chip[aria-pressed=true]::before { content: "✓"; color: var(--accent-text); font-weight: 700; }
.chip .n { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.chip.static { cursor: default; }
.chip.static::before { content: none; }
.chip.tv { font-variant-numeric: tabular-nums; }
.chip.tv.dim { opacity: .5; text-decoration: line-through; }
.chip.x::after { content: "✕"; color: var(--muted); font-size: 11px; }
.seg { display: inline-flex; align-self: flex-start; max-width: 100%; padding: 3px; background: var(--card-2); border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 9px; cursor: pointer; color: var(--muted); transition: color .2s var(--ease-out), transform .16s var(--ease-out); }
.seg button[aria-pressed=true] { background: var(--card); color: var(--text); box-shadow: var(--shadow); font-weight: 500; }

/* checklists */
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 9px; }
@media (max-width: 500px) { .checklist { grid-template-columns: 1fr; } }
.choice { display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: 8px 11px; min-height: 50px; padding: 8px 12px 8px 14px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--accent-line); }
.choice.on { border-color: var(--accent-line); background: var(--accent-soft); }
.choice .grow { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.choice select { width: auto; padding: 5px 28px 5px 10px; font-size: 14px; background-position: right 9px center; background-size: 10px 7px; }
/* A ticked item's controls (times, hours, photo) sit on their own line under its name, lined up with the name. */
.choice > .row { flex: 1 0 100%; gap: 6px 8px; flex-wrap: wrap; padding-left: 29px; }
.choice > .row select { max-width: 100%; }
/* Short controls (extension "Dial 9") stay on the item's line, at the right. */
.choice > .row.inline { flex: none; padding-left: 0; margin-left: auto; flex-wrap: nowrap; }

/* setup page */
.sec { padding: 0; overflow: hidden; }
.sec > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 22px; cursor: pointer; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 auto; transition: transform .2s; flex: none; }
.sec[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.sec > summary:hover { background: var(--card-2); }
.sec-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; font-size: 17px; }
.sec .sec-t { min-width: 0; }
.sec .sec-t b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.sec .sec-t span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec.bad > summary .sec-ico { background: var(--red-soft); color: var(--red); }
.sec-body { padding: 20px 22px 24px; display: grid; gap: 18px; border-top: 1px solid var(--line); }
.card:not(.sec) > .sec-body { padding: 0; border: 0; }
.help { color: var(--muted); font-size: 14px; margin: 0; }
/* a group heading inside a form ("Guest Wi-Fi", "Welcome"): sentence case, like the fields it groups */
.section-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--text); margin: 14px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.sec-body > .section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.section-title + .help { margin-top: -12px; }
.later { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.later b { color: var(--text); }
.savebar { position: sticky; bottom: 16px; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px 12px 20px; border-radius: 16px; background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow-lg); animation: rise .26s var(--ease-out); }
.savebar .btn.ghost { color: var(--ink-muted); }
.savebar .btn.ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.savebar .msg { font-size: 14px; }
.savebar .msg::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); margin-right: 9px; vertical-align: 1px; }
/* the floating save bar never hides what is being edited: scrolling / focus keep fields above it (setup.js nudges a
   focused field that would sit under it), and the page ends with room for it */
html:has(.savebar:not([hidden])) { scroll-padding-bottom: 112px; }
main:has(.savebar:not([hidden])) { padding-bottom: 128px; }
.savebar { margin-top: 8px; }
@media (max-width: 760px) {
  .savebar { bottom: 12px; } .savebar .msg { width: 100%; }
  html:has(.savebar:not([hidden])) { scroll-padding-bottom: 210px; }
  main:has(.savebar:not([hidden])) { padding-bottom: 200px; }
}

/* images */
.img-pick { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.img-box { width: 176px; height: 64px; border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--card-2) center / contain no-repeat; display: grid; place-items: center; color: var(--faint); font-size: 13px; overflow: hidden; flex: none; cursor: pointer; }
.img-box.has { border-style: solid; border-color: var(--line); }
.img-box.dark { background-color: #15171c; }
.img-box.wide { width: 176px; height: 99px; background-size: cover; }

/* ---- badges / status ---- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--card-2); color: var(--text); border: 1px solid var(--line); white-space: nowrap; }
.badge.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); }
.badge.ok { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 40%, transparent); color: var(--good); }
.badge.accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.online { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; color: var(--muted); }
.online .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.online.on { color: var(--text); }
.online.on .dot { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.alert { background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); padding: 11px 14px; border-radius: 12px; font-size: 14px; }
.note { background: var(--card-2); border: 1px solid var(--line); padding: 13px 16px; border-radius: 12px; font-size: 14px; }
.note.accent { background: var(--accent-soft); border-color: var(--accent-line); }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .chk { width: 40px; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--card-2); }
.table tr.sel td { background: var(--accent-soft); }
.table td.num .btn { border-color: transparent; background: transparent; color: var(--muted); }
.table tbody tr:hover td.num .btn, .table td.num .btn:focus-visible { border-color: var(--line-2); background: var(--card); color: var(--text); }
.table .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
@media (max-width: 760px) {
  .tv-table thead { display: none; }
  .tv-table tr { display: grid; grid-template-columns: 34px 1fr auto; gap: 3px 8px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .tv-table tr:last-child { border-bottom: 0; }
  .tv-table td { border: 0; padding: 1px 4px; background: none !important; }
  .tv-table td.chk { grid-row: span 4; padding-top: 3px; }
  .tv-table td.num { grid-column: 3; grid-row: 1 / span 2; }
  .tv-table td:not(.chk):not(.num) { grid-column: 2; }
}

/* toolbar + bulk bar */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { max-width: 300px; padding-left: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999180' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px 50% / 16px no-repeat; }
.toolbar select { width: auto; }
.bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--ink); color: var(--ink-text); border-radius: var(--radius); padding: 10px 12px 10px 18px; margin-bottom: 14px; position: sticky; top: 12px; z-index: 8; box-shadow: var(--shadow-lg); animation: rise .26s var(--ease-out); }
.bulk select { width: auto; min-width: 160px; padding: 7px 34px 7px 10px; background-color: var(--ink-2); color: var(--ink-text); border-color: rgba(255, 255, 255, .14); }
.bulk .btn { background: var(--ink-2); border-color: rgba(255, 255, 255, .14); color: var(--ink-text); }
.bulk .btn:hover { background: #2a2d35; }
.bulk .btn.danger { color: #ff8f88; }
.bulk .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-muted); }
@media (max-width: 760px) { main:has(.bulk:not([hidden])) { padding-bottom: 300px; } .bulk { position: fixed; left: 10px; right: 10px; top: auto; bottom: 12px; margin: 0; } }

/* room type cards */
.rule { display: inline-block; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; }
.preview { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.preview .chips { max-height: 150px; overflow: auto; }

/* ---- modal / toast / empty ---- */
.backdrop { position: fixed; inset: 0; background: rgba(12, 10, 6, .55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .2s var(--ease-out); }
.backdrop.closing { pointer-events: none; animation: fade-out .16s var(--ease-out) forwards; }
.backdrop.closing .modal { animation: modal-out .16s var(--ease-out) forwards; }
@keyframes fade { from { opacity: 0; } }
.modal { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; width: 100%; max-width: 500px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: modal-in .24s var(--ease-out); }
.modal.wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 8px; gap: 12px; }
.modal-head h2 { font: 600 20px/1.25 var(--serif); letter-spacing: -.015em; }
.modal-body { padding: 8px 24px 4px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 22px; flex-wrap: wrap; }
.modal-actions .left { margin-right: auto; }
@media (max-width: 560px) { .backdrop { place-items: end stretch; padding: 0; } .modal, .modal.wide { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; } }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); top: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; width: max-content; max-width: calc(100vw - 24px); }
.toast { display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--ink-text); padding: 12px 16px 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); animation: pop .26s var(--ease-out); font-size: 14px; }
.toast::before { content: "✓"; color: var(--good); font-weight: 700; }
.toast.err::before { content: "!"; color: #ff8f88; }
.toast button { background: none; border: 0; color: var(--accent-2); font: inherit; font-weight: 600; cursor: pointer; padding: 2px 4px; }
.toast.out { opacity: 0; transform: translateY(-6px); }
@media (max-width: 760px) { #toasts { top: 70px; } }
.empty { text-align: center; padding: 56px 24px; color: var(--muted); background: var(--card); border-radius: var(--radius); border: 1px dashed var(--line-2); }
.empty h3 { color: var(--text); font: 600 17px/1.3 var(--serif); margin-bottom: 6px; }
.empty p { max-width: 460px; margin: 0 auto; }
.empty .btn { margin-top: 18px; }
.pin { font: 600 44px/1 var(--serif); letter-spacing: .32em; text-align: center; padding: 18px 0 18px .32em; background: var(--card-2); border-radius: 14px; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.id-input { text-transform: uppercase; letter-spacing: .1em; font-size: 17px; }
.pin-input { letter-spacing: .45em; font-size: 20px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- first TV / onboarding ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; padding: 32px; }
.hero h2 { font: 600 28px/1.15 var(--serif); letter-spacing: -.022em; margin: 6px 0 8px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 22px; gap: 22px; } }
.steps { list-style: none; padding: 0; margin: 18px 0 20px; display: grid; gap: 10px; counter-reset: s; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.steps li::before { counter-increment: s; content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 13px; display: grid; place-items: center; margin-top: 1px; }
.done-list { display: grid; gap: 8px; }
.done-list .row { padding: 10px 14px; background: var(--card-2); border-radius: 12px; }
.bulk-rows { display: grid; gap: 8px; }
.bulk-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 96px minmax(0, .8fr) 30px; gap: 8px; align-items: start; }
.bulk-row .st { grid-column: 1 / -1; font-size: 13px; margin-top: -2px; }
.bulk-row .st.bad { color: var(--red); }
.bulk-row .st.ok { color: var(--good); }
.bulk-row input { padding: 0 10px; height: 44px; font-size: 16px; }
.bulk-row .pin-input { letter-spacing: .25em; padding: 0 4px 0 calc(4px + .25em); }
.bulk-rows .bulk-row:only-child .icon-btn { visibility: hidden; }
.bulk-head { font-size: 13px; color: var(--muted); font-weight: 500; }

/* ---- auth ---- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--bg); }
.auth-art { background: radial-gradient(900px 600px at 0% 0%, rgba(43, 199, 159, .16), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(43, 199, 159, .08), transparent 60%), var(--ink); color: var(--ink-text); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art blockquote { margin: 0; font: 500 34px/1.2 var(--serif); max-width: 460px; letter-spacing: -.025em; text-wrap: balance; }
.auth-art blockquote em { color: var(--accent-2); font-style: normal; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: var(--ink-muted); }
.auth-art li::before { content: "✓"; color: var(--accent-2); margin-right: 10px; font-weight: 700; }
.auth-side { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { padding: 0 0 28px; display: none; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .btn.primary { width: 100%; padding: 13px; font-size: 15px; }
.auth-card .swap { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
.auth-card .form { margin-top: 22px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-card .brand { display: flex; } }

/* ui.glass(): smoked fill, lighter at the top, hairline edge */

/* ---- Scan the code on a TV (Add TVs) ---- */
.scan-box { display: grid; gap: 10px; justify-items: start; }
.hero .scan-box { margin-bottom: 16px; } /* first-TV card: scanner above the TV ID / PIN / room row */
.scan-open { width: 100%; justify-content: center; font-size: 15px; padding: 12px 16px; }
.scan-view { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #000; justify-self: center; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid var(--accent-2); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.scan-msg { font-size: 14px; color: var(--muted); }
.scan-msg.ok { color: var(--good); font-weight: 600; }
.scan-msg.bad { color: var(--red); }


/* Add TVs on a phone: the TV ID gets its own full line ("0000 0000 0000" fits), PIN · room · ✕ below it. */
@media (max-width: 560px) {
  .bulk-row { grid-template-columns: 96px minmax(0, 1fr) 30px; }
  .bulk-row > .field:first-child { grid-column: 1 / -1; }
  .bulk-row.bulk-head { display: none; }
}

/* Setup wizard progress */

/* TV snapshot (TV dialog → Screen) */

/* Phones and touch screens: 16px text in fields (no iOS zoom on tap) and finger-sized targets (≥ 40px). */
@media (max-width: 760px), (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
  .choice select { font-size: 16px; padding: 8px 30px 8px 10px; }
  .btn, .btn.sm, .chip { min-height: 40px; }
  .seg button { min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .icon-btn { min-width: 40px; min-height: 40px; }
  .link-btn, .auth-card .swap a { display: inline-block; padding: 10px 4px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  .brand-link { display: block; padding: 3px 0; }
}
/* A bare checkbox (TV list) gets a 40px tappable area around it. */
.hit { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; cursor: pointer; margin: -9px; }
@media (max-width: 760px), (pointer: coarse) { .note a[href^="mailto:"] { display: inline-block; padding: 10px 0; } }


/* Hotel page: one tab per section (scrolls sideways on a phone) */
.sec-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
.sec-tabs::-webkit-scrollbar { display: none; }
.sec-tab { flex: none; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; padding: 9px 16px;
  min-height: 40px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: color .2s var(--ease-out), border-color .2s var(--ease-out), transform .16s var(--ease-out); }
.sec-tab:hover { color: var(--text); }
.sec-tab.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.sec-tab.bad { border-color: var(--red); color: var(--red); }
.sec-tab.on.bad { background: var(--red); border-color: var(--red); color: #fff; }
/* The scrollable tab strip must not widen its grid column (phones): columns never grow past the screen. */

/* Sliding selection pill (ui.glide): one pill moves under the chosen segment / tab instead of each one switching on. */
.gliding { position: relative; isolation: isolate; }
.glider { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; opacity: 0;
  transition: transform .28s var(--ease-out), width .28s var(--ease-out), height .28s var(--ease-out), opacity .15s; }
.seg .glider { border-radius: 9px; background: var(--card); box-shadow: var(--ring), var(--shadow); }
.seg.gliding button[aria-pressed=true] { background: transparent; box-shadow: none; }
.sec-tabs .glider { border-radius: 999px; background: var(--text); }
.sec-tabs.gliding .sec-tab.on:not(.bad) { background: transparent; border-color: transparent; }

/* Reduced motion: keep fades and state changes, drop movement. */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .spin { animation-duration: .8s !important; animation-iteration-count: infinite !important; }
}

/* ---- Signage: TVs page ---- */
.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat.warn .stat-value { color: var(--warn); }
.stat-sub { margin-top: 2px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* The TV's pairing screen beside the first-TV steps (teal-tinted, like the launcher's Signage mode). */
@media (max-width: 900px) { .hero .tvmock { order: -1; } }
.tvmock { aspect-ratio: 16 / 9; border-radius: 12px; background: radial-gradient(120% 90% at 20% 0%, #0f2a23, #0b0c0f 60%); outline: 7px solid #050506; box-shadow: var(--shadow-lg); color: #e6ece9; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6%; padding: 7% 8%; font-size: clamp(9px, 1.25vw, 13px); }
.tvmock .t { font: 600 1.7em/1.2 var(--sans); margin-bottom: 1em; }
.tvmock .k { color: #8fa39c; font-size: .8em; letter-spacing: .12em; text-transform: uppercase; }
.tvmock .v { font: 600 1.45em/1.3 ui-monospace, Menlo, monospace; letter-spacing: .08em; margin-bottom: .8em; color: #5ad8b6; }
.tvmock .q { width: 7em; aspect-ratio: 1; border-radius: 6px; background: conic-gradient(#fff 0 25%, #111 0 50%, #fff 0 75%, #111 0) 0 0 / 1.75em 1.75em; outline: .5em solid #fff; }
/* Orientation glyph: a small screen outline, wide or tall. */
.orient { display: inline-block; flex: none; border: 1.6px solid currentColor; border-radius: 3px; opacity: .7; }
.orient.landscape { width: 18px; height: 11px; }
.orient.portrait { width: 11px; height: 18px; }
.tv-name { display: flex; align-items: center; gap: 9px; }
.tv-table .sub { margin-top: 2px; }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.chips.tight { gap: 5px; }
/* Orientation picker: two cards with the screen drawn to scale. */
.orient-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.orient-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s var(--ease-out), background .15s var(--ease-out); }
.orient-card:hover { border-color: var(--accent-line); }
.orient-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.orient-screen { flex: none; border: 2px solid var(--text); border-radius: 4px; background: linear-gradient(135deg, var(--accent-soft), transparent); }
.orient-screen.landscape { width: 44px; height: 26px; }
.orient-screen.portrait { width: 26px; height: 44px; margin: 0 9px; }
.orient-text { display: grid; gap: 2px; }
.tag-pick { display: grid; gap: 12px; }
.tag-group { display: grid; gap: 6px; }
.tag-add { display: flex; gap: 6px; align-items: center; }
.tag-add input { width: 200px; }
.grid-2, .grid-3 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .orient-pick { grid-template-columns: 1fr; } }
.tv-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; padding: 14px 16px; border-radius: 12px; background: var(--card-2); }
.kv { display: grid; gap: 3px; min-width: 0; } .kv > span:last-child { overflow: hidden; text-overflow: ellipsis; }

/* ---- Signage: media page ---- */
.storage-card { display: grid; gap: 14px; margin-bottom: 22px; }
.storage-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.storage-of { font: 400 15px/1 var(--sans); letter-spacing: 0; }
.storage-split { display: flex; gap: 16px; flex-wrap: wrap; }
.storage-split .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.storage-split .dot.img { background: var(--accent); } .storage-split .dot.vid { background: var(--blue); }
.storage-card .meter-label { display: none; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.media-card { display: grid; gap: 0; padding: 0; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: inherit; font: inherit;
  overflow: hidden; cursor: pointer; box-shadow: var(--ring); transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s; }
.media-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.media-thumb { position: relative; aspect-ratio: 16 / 10; background: #0d0f12; display: grid; place-items: center; overflow: hidden; }
.media-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.media-none { color: #6d7480; font-size: 28px; }
.media-dur, .media-warn { position: absolute; bottom: 8px; font: 600 12px/1 var(--sans); padding: 5px 8px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; }
.media-dur { right: 8px; font-variant-numeric: tabular-nums; } .media-warn { left: 8px; background: rgba(168, 107, 0, .9); }
.media-meta { display: grid; gap: 3px; padding: 12px 14px 14px; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.media-view { border-radius: 12px; overflow: hidden; background: #000; display: grid; place-items: center; max-height: 56vh; }
.media-view img, .media-view video { max-width: 100%; max-height: 56vh; display: block; }
/* Drop zone + page-wide drag highlight. */
.drop { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 28px; border: 1.5px dashed var(--line-2); border-radius: 16px; background: var(--surface);
  color: inherit; font: inherit; cursor: pointer; transition: border-color .2s, background .2s; }
.drop.big { padding: 64px 24px; }
.drop:hover, body.dragging .drop { border-color: var(--accent); background: var(--accent-soft); }
.drop-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-size: 20px; font-weight: 700; }
body.dragging main { outline: 2px dashed var(--accent); outline-offset: -12px; border-radius: 18px; }
/* Upload queue. */
.upq-card { display: grid; gap: 12px; margin-bottom: 18px; }
.upq-head { display: flex; justify-content: space-between; align-items: center; }
.upq-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(80px, 1fr) minmax(0, 1.3fr); gap: 14px; align-items: center; }
.upq-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.upq-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--card-2); color: var(--muted); }
.upq-row.done .upq-ico { background: var(--good-soft); color: var(--good); } .upq-row.err .upq-ico { background: var(--red-soft); color: var(--red); }
.upq-bar { height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.upq-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .2s linear; }
.upq-row.err .upq-bar > span { background: var(--red); }
.bad-text { color: var(--red); } .warn-text { color: var(--warn); }
@media (max-width: 700px) { .upq-row { grid-template-columns: 1fr; gap: 6px; } .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---- Signage: campaigns ---- */
.grow { flex: 1; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); padding: 5px 10px; border-radius: 999px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.pill.st-live { background: var(--good-soft); color: var(--good); }
.pill.st-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); animation: pulse 2s var(--ease-in-out) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .pill.st-live::before { animation: none; } }
.pill.st-idle, .pill.st-scheduled { background: var(--accent-soft); color: var(--accent-text); }
.pill.st-draft { background: rgba(168, 107, 0, .12); color: var(--warn); }
.note.warn { border-color: rgba(168, 107, 0, .4); background: rgba(168, 107, 0, .08); }
.empty.slim { padding: 18px; margin-bottom: 12px; }
.camp-list { display: grid; gap: 12px; }
.camp { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 16px 20px; }
.camp.st-paused, .camp.st-ended { opacity: .72; }
.camp-order { display: grid; justify-items: center; gap: 2px; }
.camp-rank { font: 600 13px/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.camp-main { display: grid; gap: 6px; min-width: 0; color: inherit; }
.camp-main:hover { text-decoration: none; } .camp-main:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.camp-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.camp-title h3 { font-size: 17px; }
.camp-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.camp-strip { display: flex; }
.camp-thumb { width: 52px; height: 36px; border-radius: 7px; overflow: hidden; background: #0d0f12; border: 2px solid var(--card); margin-left: -12px; display: grid; place-items: center; font: 600 12px/1 var(--sans); color: #fff; }
.camp-thumb:first-child { margin-left: 0; } .camp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.camp-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
@media (max-width: 1000px) { .camp { grid-template-columns: auto minmax(0, 1fr); } .camp-strip, .camp-actions { grid-column: 2; } }
/* Editor: form left, sticky reach panel right. */
.back { display: inline-block; margin-bottom: 6px; color: var(--muted); }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.editor-main { display: grid; gap: 16px; min-width: 0; }
.sticky { position: sticky; top: 90px; }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } .editor-side { order: -1; } .sticky { position: static; } }
.sec-card { display: grid; gap: 14px; }
.sec-head p { margin: 4px 0 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s var(--ease-out); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease-out); }
.switch input:checked { background: var(--accent); } .switch input:checked::after { transform: translateX(16px); }
.pl { display: grid; gap: 6px; margin-bottom: 12px; }
.pl-row { display: grid; grid-template-columns: 22px 64px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pl-n { text-align: center; font-variant-numeric: tabular-nums; }
.pl-thumb { width: 64px; height: 40px; border-radius: 6px; overflow: hidden; background: #0d0f12; }
.pl-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pl-name { min-width: 0; }
.pl-secs { display: inline-flex; align-items: center; gap: 4px; } .pl-secs input { width: 64px; text-align: right; }
.pl-btns { display: flex; gap: 2px; }
@media (max-width: 600px) { .pl-row { grid-template-columns: 56px minmax(0, 1fr) auto; } .pl-n { display: none; } .pl-btns { grid-column: 1 / -1; justify-content: flex-end; } }
.media-grid.pick { max-height: 58vh; overflow: auto; padding: 2px; }
.media-card { position: relative; }
.pick-mark { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; font-weight: 700; }
.pick-mark.on { background: var(--accent); border-color: var(--accent); }
.tv-pick { display: grid; gap: 4px; max-height: 280px; overflow: auto; }
.tv-pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.tv-pick-row:hover { background: var(--card-2); } .tv-pick-row.on { background: var(--accent-soft); }
.reach { display: grid; gap: 10px; }
.reach-big { font: 600 40px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.reach-big span { font: 400 17px/1 var(--sans); letter-spacing: 0; }
.reach-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reach-list summary { cursor: pointer; color: var(--accent-text); }
.reach-tv { display: flex; align-items: center; gap: 8px; padding: 4px 0; }

/* ---- Signage: analytics (dataviz: one series = --viz; validated #00936f light / #1aa682 dark) ---- */
/* Share bars: categorical slots 1–6 in fixed order (dataviz reference palette; validate_palette.js PASS on #fff and
   on #181b21 — light slots 2–5 are under 3:1 on the card, so the legend always prints names, values and shares). */
:root { --viz: #00936f; --viz-grid: #ece6da; --cat-1: #257de0; --cat-2: #f47230; --cat-3: #00b894; --cat-4: #f2a600; --cat-5: #ee7fac; --cat-6: #6a4ce2; }
:root[data-theme="dark"] { --viz: #1aa682; --viz-grid: #262a31; --cat-1: #338ced; --cat-2: #e76624; --cat-3: #00a888; --cat-4: #d28e05; --cat-5: #e24d8b; --cat-6: #9887ef; }
.seg.sm { padding: 2px; border-radius: 10px; } .seg.sm button { padding: 3px 10px; font-size: 12px; border-radius: 8px; }
.viz-switch { justify-self: end; margin-top: -4px; }
.viz-line { fill: none; stroke: var(--viz); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-dot { fill: var(--viz); stroke: var(--card); stroke-width: 2; transition: opacity .15s; }
.viz-dot.hover-only { opacity: 0; } .viz-col:hover .viz-dot, .viz-col:focus .viz-dot { opacity: 1; }
.share-bar { display: flex; gap: 2px; height: 32px; border-radius: 6px; overflow: hidden; }
.share-seg { min-width: 3px; outline: none; transition: opacity .15s; } .share-seg:hover, .share-seg:focus-visible { opacity: .82; }
.share-seg.other, .share-sw.other { background: var(--line-2); }
.share-legend { display: grid; gap: 2px; }
.share-key { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 8px; color: inherit; }
a.share-key:hover { background: var(--card-2); text-decoration: none; }
.share-sw { width: 12px; height: 12px; border-radius: 3px; }
.share-key .num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.range-row { align-items: center; }
.range-custom { display: flex; align-items: center; gap: 6px; } .range-custom input { width: 150px; }
.an-body { transition: opacity .2s var(--ease-out); } .an-body.refreshing { opacity: .55; }
.an-grid { display: grid; gap: 16px; }
.an-grid > .stats { margin-bottom: 0; }
.an-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .an-two { grid-template-columns: 1fr; } .range-custom input { width: 130px; } }
.panel { display: grid; gap: 14px; min-width: 0; align-content: start; }
.panel > * { min-width: 0; } /* wide tables scroll inside the card, not the page */
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stat-value .delta { font: 600 13px/1 var(--sans); margin-left: 10px; color: var(--muted); letter-spacing: 0; vertical-align: 4px; }
.delta.good { color: var(--good); } .delta.bad { color: var(--red); }
.viz { display: grid; gap: 8px; min-width: 0; }
.viz-scroll { overflow-x: auto; }
.viz-svg { display: block; overflow: visible; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { stroke: var(--line-2); stroke-width: 1; }
.viz-tick { fill: var(--muted); font: 400 11px var(--sans); font-variant-numeric: tabular-nums; }
.viz-hit { fill: transparent; }
.viz-mark { fill: var(--viz); transition: opacity .15s; }
.viz-col { cursor: default; outline: none; }
.viz-col:hover .viz-mark, .viz-col:focus .viz-mark { opacity: .78; }
.viz-col:focus-visible .viz-hit { stroke: var(--accent); stroke-width: 1.5; }
.viz-tip { position: absolute; z-index: 80; pointer-events: none; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: var(--shadow-lg); min-width: 90px; }
.viz-tip-v { font: 600 15px/1.2 var(--sans); font-variant-numeric: tabular-nums; } .viz-tip-l { font-size: 12px; color: var(--muted); }
.viz-table summary { cursor: pointer; color: var(--muted); width: max-content; }
.viz-table .table-wrap { margin-top: 8px; max-height: 260px; overflow: auto; }
.viz-empty { padding: 18px 0; }
.viz-bars { display: grid; gap: 4px; align-content: start; }
.viz-bar-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 64px; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 8px; color: inherit; outline: none; }
a.viz-bar-row:hover, .viz-bar-row:focus-visible { background: var(--card-2); text-decoration: none; }
.viz-bar-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.viz-bar-thumb { width: 36px; height: 24px; border-radius: 4px; object-fit: cover; flex: none; background: #0d0f12; }
.viz-bar-track { height: 10px; }
.viz-bar { display: block; height: 100%; background: var(--viz); border-radius: 0 4px 4px 0; }
.viz-bar-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.heat { display: grid; gap: 2px; min-width: 560px; align-items: center; }
.heat-c { aspect-ratio: 1.6; border-radius: 3px; background: color-mix(in oklab, var(--viz) calc(var(--k) * 100%), var(--card-2)); outline: none; }
.heat-c:hover, .heat-c:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.viz-tick-html { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.heat-h { text-align: left; } .heat-d { white-space: nowrap; }
.heat-legend { display: flex; align-items: center; gap: 8px; }
.heat-ramp { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--card-2), var(--viz)); }
.tl { position: relative; height: 28px; border-radius: 6px; background: var(--card-2); overflow: hidden; }
.tl-seg { position: absolute; top: 0; bottom: 0; outline: none; }
.tl-seg.online { background: var(--good); } .tl-seg.offline { background: transparent; }
.tl-seg:hover, .tl-seg:focus-visible { box-shadow: inset 0 0 0 2px var(--text); }
.tl-axis, .tl-key { display: flex; justify-content: space-between; } .tl-key { justify-content: flex-start; gap: 16px; }
.tl-sw { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 6px; } .tl-sw.online { background: var(--good); } .tl-sw.offline { background: var(--card-2); border: 1px solid var(--line-2); }
.list { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line); color: inherit; }
.list-row:last-child { border-bottom: 0; } .list-row:hover { background: var(--card-2); text-decoration: none; }
.uptime { display: flex; align-items: center; gap: 10px; }
.uptime-bar { width: 90px; height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.uptime-bar > span { display: block; height: 100%; background: var(--viz); }
.table tbody tr { cursor: default; } .an-grid .table tbody tr[onclick], .an-grid .table tbody tr:hover { cursor: pointer; }
@media (max-width: 600px) {
  .range-custom { width: 100%; } .range-custom input { flex: 1; width: auto; min-width: 0; }
  .viz-bar-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 52px; gap: 8px; }
  .viz-bar-name .muted { display: none; }
}

/* Admin: access requests. Approve / Reject stay visible; rows aren't links; a card per row on phones. */
.access-table tbody tr { cursor: default; }
.access-table tbody tr:hover td { background: none; }
.access-table td.acts { text-align: right; white-space: nowrap; }
.access-table td.acts .row { justify-content: flex-end; }
.access-table td.who { overflow-wrap: anywhere; }
.access-table td.from { font-size: 14px; }
.access-table .by { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
@media (max-width: 760px) {
  .access-table thead { display: none; }
  .access-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .access-table tr:last-child { border-bottom: 0; }
  .access-table td { border: 0; padding: 0 4px; }
  .access-table td:nth-child(3) { text-align: right; order: 2; }
  .access-table td.from { grid-column: 1 / -1; order: 3; }
  .access-table td.acts { order: 4; }
  .access-table .by { max-width: 110px; margin-left: auto; }
  .access-table td.acts { grid-column: 1 / -1; }
  .access-table td.acts .row { justify-content: flex-start; }
  .access-table td.acts:empty, .access-table td.acts .row:empty { display: none; }
}

/* Google sign-in (Google's light button style: reads on both themes). */
.btn.google { width: 100%; background: #fff; color: #1f1f1f; border-color: #747775; font-weight: 500; gap: 12px; }
.btn.google:hover { background: #f2f2f2; border-color: #747775; }
.btn.google:disabled { opacity: .7; cursor: progress; }
/* Admin: requests waiting — a dot on the avatar, a count in the menu. */
.orb.avatar { position: relative; }
.orb.avatar.has-dot::after { content: ""; position: absolute; top: 1px; right: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--ink); }
.menu-item .count { float: right; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; text-align: center; }
/* Admin: who can approve. */
.admins { margin-top: 36px; }
.admins-head { align-items: flex-end; margin-bottom: 12px; }
.admins-head h2 { font: 600 18px/1.3 var(--serif); margin: 0; }
.admins-head p { margin: 4px 0 0; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list li { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-list li:last-child { border-bottom: 0; }
.admins .grow { flex: 1 1 0; min-width: 0; }

/* ---- account ---- */
.account-grid { display: grid; gap: 16px; max-width: 760px; }
.danger-zone { box-shadow: var(--ring), var(--shadow); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.danger-zone h2 { color: var(--red); }
input[readonly] { color: var(--muted); background: var(--card-2); }

/* ---- media performance ---- */
.th-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.th-sort:hover { color: var(--text); }
.table tbody tr.static { cursor: default; }
.media-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 360px; }
.media-cell .grow { min-width: 0; }

/* campaign preview (TV mockup) */
.modal.pv-modal { max-width: 900px; }
.pv-stage { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 22px 12px 46px; background: var(--card-2); border-radius: 16px; min-width: 0; }
.pv-device { --bez: 10px; --h: 46vh; position: relative; background: #0d0e11; padding: var(--bez); border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .18), 0 14px 34px rgba(0, 0, 0, .18); width: min(100%, calc(var(--h) * 16 / 9)); }
.pv-screen { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; border-radius: 2px; }
.pv-screen img, .pv-screen video { display: block; width: 100%; height: 100%; object-fit: contain; }
.dev-kiosk, .dev-stand { width: min(100%, calc(var(--h) * 9 / 16)); }
.dev-kiosk .pv-screen, .dev-stand .pv-screen { aspect-ratio: 9 / 16; }
.dev-menu { --bez: 7px; width: min(100%, calc(var(--h) * .8 * 21 / 9)); }
.dev-menu .pv-screen { aspect-ratio: 21 / 9; }
.pv-seams { display: none; }
.dev-wall { --bez: 5px; }
.dev-wall .pv-seams { display: block; position: absolute; inset: var(--bez); pointer-events: none;
  background: linear-gradient(90deg, transparent calc(50% - 2px), #0d0e11 calc(50% - 2px), #0d0e11 calc(50% + 2px), transparent calc(50% + 2px)),
    linear-gradient(transparent calc(50% - 2px), #0d0e11 calc(50% - 2px), #0d0e11 calc(50% + 2px), transparent calc(50% + 2px)); }
.dev-outdoor { --bez: 20px; border-radius: 18px; background: linear-gradient(#3a3e46, #24272d); }
.dev-outdoor::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -30px; height: 30px; border-left: 12px solid #2a2d33; border-right: 12px solid #2a2d33; }
.dev-stand { --bez: 12px; border-radius: 14px; }
.dev-stand::before { content: ""; position: absolute; left: 44%; width: 12%; bottom: -24px; height: 24px; background: #2a2d33; }
.dev-stand::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: -34px; height: 10px; border-radius: 6px; background: #2a2d33; }
.pv-controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pv-play { min-width: 88px; }
.pv-info { flex: 1; min-width: 0; display: flex; gap: 5px; white-space: nowrap; overflow: hidden; }
.pv-modal .modal-body > * { min-width: 0; }
.pv-info .muted { flex: none; }
.pv-time { font-variant-numeric: tabular-nums; flex: none; }
.pv-bars { display: flex; gap: 3px; }
.pv-bars span { flex: 1; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.pv-bars i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.pv-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; }
.pv-thumb { position: relative; flex: none; width: 96px; height: 54px; padding: 0; border-radius: 9px; overflow: hidden; border: 2px solid transparent; background: #0d0e11; color: #fff; cursor: pointer; display: grid; place-items: center; opacity: .7; transition: opacity .15s, border-color .15s; }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pv-thumb:hover, .pv-thumb.on { opacity: 1; }
.pv-thumb.on { border-color: var(--accent); }
.pv-n { position: absolute; left: 4px; top: 4px; font: 600 11px/1 var(--sans); padding: 3px 5px; border-radius: 5px; background: rgba(0, 0, 0, .6); color: #fff; }
@media (max-width: 560px) { .pv-device { --h: 38vh; } .pv-controls { flex-wrap: wrap; } .pv-info { order: 5; flex-basis: 100%; } .pv-thumb { width: 76px; height: 43px; } }

/* map of screens */
:root { --pin-ink: #fff; }
:root[data-theme="dark"] { --pin-ink: #0d0e11; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.map-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.map-top { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 2px 4px 0; }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); }
.map-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.map { height: min(496px, 54vh); border-radius: 12px; overflow: hidden; background: var(--card-2); z-index: 0; }
:root[data-theme="dark"] .map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.85); }
.map .leaflet-container, .map.leaflet-container { font: inherit; background: var(--card-2); }
.map .leaflet-control-attribution { font-size: 11px; background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--muted); }
.map .leaflet-control-attribution a, .map-pop a { color: var(--accent-text); }
.map .leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--line); }
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.map .leaflet-popup-content { margin: 12px 14px; font-size: 14px; line-height: 1.4; }
.map-pin { display: grid; place-items: center; border-radius: 50%; font: 600 13px/1 var(--sans); color: var(--pin-ink); box-shadow: 0 0 0 2px var(--surface), 0 2px 6px rgba(0, 0, 0, .25); cursor: pointer; }
.map-pin.st-on, .map-dot.st-on { background: var(--good); }
.map-pin.st-some, .map-dot.st-some { background: var(--warn); }
.map-pin.st-off, .map-dot.st-off { background: var(--muted); }
.map-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: -1px; }
.map-side { padding: 16px; display: flex; flex-direction: column; gap: 8px; max-height: calc(min(496px, 54vh) + 56px); overflow: auto; }
.map-side h2, .map-unplaced h2 { font-size: 16px; }
.map-list { display: grid; }
.map-place { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 0; min-width: 0; }
.map-place:last-child { border-bottom: 0; }
.map-place:hover { background: var(--card-2); }
.map-unplaced { margin-top: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.map-pop { display: flex; flex-direction: column; gap: 6px; }
.map-pop-list { display: grid; gap: 2px; max-height: 220px; overflow: auto; }
.map .map-pop-list a { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--text); }
@media (max-width: 900px) { .map-layout { grid-template-columns: minmax(0, 1fr); } .map-side { max-height: none; } .map { height: 45vh; } }

/* reCAPTCHA badge: hidden, the "Request access" screen shows Google's required notice instead */
.grecaptcha-badge { visibility: hidden; }

/* ---- reports: title + a tab per report ---- */
.reports-head { display: grid; gap: 4px; margin-bottom: 14px; }
.reports-head .page-head { margin-bottom: 10px; }
.report-tabs .sec-tab { text-decoration: none; }

/* ---- plans ---- */
.plans-grid-wrap { display: grid; gap: 18px; min-width: 0; }
.plan-now .plan-uses { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 28px; }
.plan-use { display: grid; gap: 8px; }
.row.between { justify-content: space-between; }
.plan-bar { margin-top: 6px; }
.plan-bar h2 { font: 600 19px/1.3 var(--serif); }
.seg-badge { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--accent-text); }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.plan { display: flex; flex-direction: column; gap: 14px; }
.plan-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.plan-tag { background: var(--accent-soft); color: var(--accent-text); }
.plan-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; flex: 1; align-content: start; }
.plan-facts .fact { font: 600 17px/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.plan.mine { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.plan h3 { font: 600 17px/1.3 var(--serif); margin: 0; }
.plan-price { display: flex; align-items: baseline; gap: 2px; }
.plan-price .amt { font: 700 30px/1.1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan .btn { width: 100%; justify-content: center; }
.note.test-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 16px; }
.modal .note.test-note { margin: 0; }
.pill.test { background: rgba(168, 107, 0, .14); color: var(--warn); }
.pill.pay-ok { background: var(--good-soft); color: var(--good); }
.pill.pay-bad { background: var(--red-soft); color: var(--red); }
.pill.pay-info { background: var(--accent-soft); color: var(--accent-text); }
.pay-table .pill + .pill { margin-left: 6px; }
.pay-sum { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--card-2); font-size: 14px; }
.pay-total { border-top: 1px solid var(--line); padding-top: 8px; font-size: 16px; }
.storage-more { margin-top: 8px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
@media (max-width: 560px) { .plan-bar { align-items: flex-start; flex-direction: column; } .plans-grid { grid-template-columns: 1fr; } }
.pay-table td { white-space: nowrap; }
@media (max-width: 560px) { .pay-table th:nth-child(3), .pay-table td:nth-child(3) { display: none; } .pay-table td .pill { display: inline-flex; margin: 2px 0; } .pay-table .pill + .pill { margin-left: 0; } .pay-table td:last-child { white-space: normal; } }
.card-head .push-right { margin-left: auto; flex: none; }
.plan-card .card-head { margin-bottom: 0; }
/* Wide screens: brand left, the tab tray centred in the bar, the profile orb right. */
@media (min-width: 761px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .topbar .navtabs { margin: 0; justify-self: center; max-width: calc(100vw - 340px); }
  .topbar .top-actions { justify-self: end; }
}
.map-section { margin-top: 16px; display: grid; gap: 12px; min-width: 0; }
.map-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.map-head h2 { font: 600 17px/1.3 var(--serif); }
.orb.avatar .who { display: contents; }
.avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.orb.avatar:has(.avatar-img) { background: var(--card-2); overflow: visible; }
