  :root {
    color-scheme: dark;
    --bg:        #100807;
    --bg-grad:   radial-gradient(1200px 760px at 100% -10%, #5b140d 0%, #21100c 32%, #100807 68%);
    --surface:   #1d100d;
    --surface-2: #281510;
    --surface-3: #351b13;
    --line:      #47251b;
    --line-soft: #321a14;
    --text:      #fff4e6;
    --muted:     #bd9480;
    --dim:       #785448;
    --accent:    #ff4b1f;
    --accent-2:  #ffc247;
    --green:     #6fb56b;
    --amber:     #ffc247;
    --blue:      #6f8db5;
    --red:       #ef3823;
    --purple:    #b079f0;
    --kick:      #53e7a4;
    --header-bg: rgba(16,8,7,.86);
  }

  /* Light theme — applied when <html data-theme="light"> (set pre-paint from
     localStorage in _layout.html). Warm cream palette to match the brand
     orange; brand/status colors darkened for contrast on a light surface. */
  html[data-theme="light"] {
    color-scheme: light;
    --bg:        #fff7ed;
    --bg-grad:   radial-gradient(1200px 760px at 100% -10%, #ffd4ad 0%, #fff0dd 38%, #fff7ed 70%);
    --surface:   #ffffff;
    --surface-2: #ffead5;
    --surface-3: #ffdcc0;
    --line:      #efc5a7;
    --line-soft: #f7ddc9;
    --text:      #35120b;
    --muted:     #825443;
    --dim:       #b58b78;
    --accent:    #d92f14;
    --accent-2:  #ee8d0b;
    --green:     #4e9a4a;
    --amber:     #b2841c;
    --blue:      #4f6e96;
    --red:       #c2402f;
    --purple:    #8b4fd0;
    --kick:      #16a574;
    --header-bg: rgba(255,247,237,.86);
  }

  * { box-sizing: border-box; }

  /* Thin, themed scrollbars — replace the heavy default OS bars (especially
     ugly on Windows) with a subtle dark handle that matches the UI. */
  * { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  ::-webkit-scrollbar { width: 9px; height: 9px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; }
  ::-webkit-scrollbar-corner { background: transparent; }

  /* Global <select> theming — native dropdowns pick up the surface color
     so they don't flash white in dark mode. color-scheme on :root handles
     the popup chrome; these rules handle the visible button area. */
  select {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 5px 8px;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    cursor: pointer;
  }
  select:hover, select:focus { border-color: var(--accent); }
  select option {
    background-color: var(--surface-2);
    color: var(--text);
  }

  html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    background-image: var(--bg-grad);
    color: var(--text);
    font-family: 'IBM Plex Sans', sans-serif;
    font-feature-settings: 'ss03', 'cv11';
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.45;
    min-height: 100vh;
  }
  /* body::before grain overlay removed (optional nice-to-have) */

  /* TOP BAR */
  header.top {
    position: sticky; top: 0; z-index: 10;
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
    backdrop-filter: blur(14px) saturate(120%);
  }
  /* Theme toggle button in the top bar. */
  .theme-toggle {
    appearance: none;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    width: 26px; height: 26px;
    border-radius: 7px;
    font-size: 13px; line-height: 1;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color .15s, border-color .15s, background .15s;
  }
  .theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
  .topbar {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 12px 24px;
  }
  .brand {
    display: flex; align-items: center; gap: 9px;
  }
  .brand-logo { display: block; width: 32px; height: 32px; }
  .brand .mark {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-variation-settings: 'opsz' 96, 'wdth' 200;
    letter-spacing: -0.02em;
    font-size: 20px;
  }
  .brand .mark span { color: var(--accent-2); }
  .brand .tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 3px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
  }
  .nav { display: flex; gap: 4px; justify-self: center; }
  .nav a {
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 2px;
    transition: color .15s, background .15s;
  }
  .nav a:hover { color: var(--text); background: var(--surface); }
  .nav a.active {
    color: var(--text);
    background: var(--surface);
    box-shadow: inset 0 -2px 0 var(--accent);
  }
  .user {
    justify-self: end;
    display: flex; align-items: center; gap: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; color: var(--muted);
  }
  .user .clock { color: var(--text); }
  .user .pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 1.8s ease-in-out infinite;
  }
  @keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }
  /* Update available: pulse dot turns amber, plus a small pill by the GitHub icon. */
  .user .pulse.update { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
  /* GitHub icon + (when an update exists) a tiny version pill stacked under it. */
  .user .gh-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1; }
  .update-pill {
    font-family: 'JetBrains Mono', monospace; font-size: 8px; line-height: 1;
    padding: 1px 5px; border-radius: 8px;
    color: var(--amber); border: 1px solid var(--amber);
    text-decoration: none; letter-spacing: 0.02em; white-space: nowrap;
  }
  .update-pill:hover { background: var(--amber); color: #1a1a1a; }
  .user .gh-link {
    display: inline-flex; align-items: center;
    color: var(--muted); transition: color .15s;
  }
  .user .gh-link:hover { color: var(--text); }

  /* LAYOUT */
  main {
    position: relative; z-index: 1;
    max-width: 1640px; margin: 0 auto;
    padding: 24px 24px 80px;
  }

  /* PAGE HEAD compact */
  .page-head {
    display: grid; grid-template-columns: 1fr auto;
    gap: 24px; align-items: end;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
  }
  .page-head .kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.2em;
    margin-bottom: 8px;
  }
  .page-head .sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.15em;
    margin-top: 8px;
  }
  .apply-form { display: inline; }
  .page-head h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-variation-settings: 'opsz' 96, 'wdth' 90;
    font-weight: 500;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin: 0;
  }
  .page-head h1 em {
    font-style: italic;
    color: var(--accent);
    background: linear-gradient(105deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .page-head .actions { display: flex; gap: 8px; }

  /* BUTTON SYSTEM — global secondary (.btn) + primary (.btn.primary) pair.
     Shared geometry; the secondary reads as a quiet ghost, the primary is
     the single accent-forward action. Both get tactile :active and a
     visible :focus-visible ring. Sizing/colors live here only — never
     inline padding/font/border on a button. */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 9px 15px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    border-radius: 2px;
    transition: color .15s, border-color .15s, background-color .15s, transform .06s;
    cursor: pointer;
  }
  /* Secondary hover: lift the muted text to full, warm the border, faint tint. */
  .btn:hover {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(255, 75, 31, 0.08);
  }
  .btn:active { transform: translateY(1px); }
  .btn:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
  }

  /* Primary: the one accent-filled action. Dark ink on accent, a hairline
     top highlight (accent-2) gives it dimension without reading heavy. */
  .btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a0d04;
    box-shadow: inset 0 1px 0 rgba(240, 164, 94, 0.45);
  }
  .btn.primary:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #1a0d04;
  }
  .btn.primary:focus-visible {
    outline-color: var(--accent-2);
    outline-offset: 2px;
  }

  .btn.sm { padding: 5px 9px; font-size: 10px; letter-spacing: 0.12em; }
  /* Ghost: borderless quiet variant (nav logout, BACK link). */
  .btn.ghost { background: transparent; border-color: transparent; }
  .btn.ghost:hover { border-color: transparent; background: var(--surface); color: var(--text); }

  /* ALERT BANNER — surfaces accounts that need attention (needs_auth,
     needs_drops). Single-line callout with kind tag + body + CTA. */
  .alerts {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
  }
  /* Flat alert row — accent left tick + soft tint, no full box border
     (matches the kind-colored row accent used everywhere else). */
  .alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    box-shadow: inset 3px 0 0 var(--accent);
    background: rgba(212, 99, 30, 0.06);
  }
  .alert-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .alert-body {
    font-size: 12.5px;
    color: var(--text);
    flex: 1;
    line-height: 1.45;
  }
  /* CTA reads as a line action, not a box (the .btn classes on the
     element are overridden here so the template stays platform-agnostic). */
  .alert-cta {
    border: none;
    background: none;
    padding: 4px 2px;
    letter-spacing: 0.16em;
    color: var(--accent);
  }
  .alert-cta:hover { color: var(--text); background: none; border: none; }

  /* TELEMETRY STRIP — 6 stats */
  /* Flat stat strip — no boxed grid; cards separated by space, the strip
     closed by a dashed rule (matches /drops + the rest of the app). */
  .telemetry {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 22px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--line);
  }
  .stat {
    padding: 6px 2px 0;
    position: relative;
  }
  .stat::after {
    content: ""; position: absolute; top: 0; left: 0;
    width: 28px; height: 2px;
    background: var(--accent);
  }
  .stat .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.16em;
    margin-bottom: 8px;
  }
  .stat .value {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-variation-settings: 'opsz' 96;
    font-weight: 500;
    font-size: 26px;
    line-height: 1;
    letter-spacing: -0.025em;
  }
  .stat .value sup {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    font-weight: 400;
    margin-left: 6px;
    letter-spacing: 0;
    vertical-align: middle;
  }
  .stat .delta {
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--green);
  }
  .stat .delta.flat { color: var(--muted); }
  .stat .delta.bad { color: var(--red); }

  .history-telemetry { grid-template-columns: repeat(4, 1fr); }
  .history-daily-pane { margin-bottom: 18px; }
  .daily-campaign .ac { max-width: 220px; color: var(--green); }
  .daily-items { margin-top: 2px; }

  /* GRID: primary + side */
  .layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
  }
  @media (max-width: 1200px) { .layout { grid-template-columns: 1fr; } }

  /* SECTION HEADER */
  .section {
    margin-bottom: 24px;
  }
  .sec-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 14px;
    margin: 0 0 12px;
  }
  .sec-head h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    margin: 0;
  }
  .sec-head .rule { border-bottom: 1px dashed var(--line); align-self: end; margin-bottom: 6px; }
  .sec-head .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.15em;
  }
  .sec-head .meta b { color: var(--text); }

  /* Full-width sections (used for currently-mining and live-pair below
     the 2-col upper layout). Breaks out of any narrower wrapper above
     while still respecting the page's max-width via main's padding. */
  .section-wide {
    grid-column: 1 / -1;
  }

  /* CURRENTLY MINING — compact two-column platform layout. The wrapper
     splits the row into a TWITCH column and a KICK column; each column
     holds one .account-row per account. Old .mcard grid removed. */
  .mining-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  @media (max-width: 1100px) {
    .mining-columns { grid-template-columns: 1fr; }
  }
  .mining-col {
    display: flex;
    flex-direction: column;
  }
  .mining-col-head {
    display: grid;
    grid-template-columns: 10px auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 0 4px 8px;
    border-bottom: 1px dashed var(--line);
  }
  .mining-col-head .pip {
    width: 8px; height: 8px; border-radius: 50%;
  }
  .mining-col-head .pip.twitch { background: var(--purple); box-shadow: 0 0 6px rgba(176, 121, 240, 0.5); }
  .mining-col-head .pip.kick   { background: var(--kick);   box-shadow: 0 0 6px rgba(83, 231, 164, 0.4); }
  .mining-col-head h3 {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text);
  }
  .mining-col-head .count {
    grid-column: 4;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 1px 7px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
  }
  /* Bubble next to the KICK header showing the active accrual path. */
  /* Per-account live watch-path pill (WS green / Chrome blue). Small, sits
     under the name in the .who flex column. align-self:flex-start so it hugs
     its text instead of stretching to the column width. */
  .watch-mode {
    align-self: flex-start;
    margin-top: 6px; /* gap under the name; lands the pill near the avatar's bottom edge */
    font-family: 'JetBrains Mono', monospace;
    font-size: 7px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 4px;
    border-radius: 999px;
    border: 1px solid transparent;
    opacity: 0.75;
    cursor: help;
  }
  .watch-mode.ws     { color: var(--green); border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
  .watch-mode.chrome { color: var(--blue);  border-color: var(--blue);  background: color-mix(in srgb, var(--blue) 12%, transparent); }
  /* Each account-row is an <a> so the whole row is a click-target into
     the account detail page. Grid lays out: avatar · who · state pill ·
     activity · progress bar. Progress bar slot is empty unless the row
     is in the watching state — keeps the column rhythm consistent. */
  .account-row {
    display: grid;
    grid-template-columns: 28px minmax(120px, 1fr) minmax(0, 2fr) max-content max-content;
    grid-template-areas: "av who activity pill reload";
    gap: 12px;
    align-items: center;
    padding: 9px 14px;
    /* border-top lives on .account-row-d; don't double it on the summary. */
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
  }
  .account-row .av { grid-area: av; }
  .account-row .who { grid-area: who; }
  .account-row .activity {
    grid-area: activity;
    text-align: right;
    min-width: 0;
    overflow: hidden; /* clip long meta so it can't run under the pill */
    margin-right: auto; /* keep text pushed left of the pill */
    margin-left: auto;
  }
  .account-row .state-pill {
    grid-area: pill;
    justify-self: end;
  }
  .account-row .pbar.mini {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 6px;
  }

  /* Per-account reload arrow — a subtle icon button at the end of each row.
     Reuses .btn.sm sizing but renders as a borderless glyph until hovered,
     so it reads as a quiet line action (like the global Reload, but scoped
     to one account). gap:8px between it and the pill is via the grid. */
  .account-row .row-reload {
    grid-area: reload;
    justify-self: end;
    padding: 2px 6px;
    min-width: 0;
    line-height: 1;
    font-size: 13px;
    letter-spacing: 0;
    background: transparent;
    border-color: transparent;
    color: var(--muted);
    opacity: 0.55;
    transition: opacity 0.12s, color 0.12s, border-color 0.12s, background 0.12s;
  }
  .account-row-d:hover .row-reload { opacity: 1; }
  .account-row .row-reload:hover {
    color: var(--text);
    border-color: var(--line);
    background: var(--surface);
  }

  /* <details> wrapper around each row — click-to-expand inline. */
  .account-row-d { border-top: 1px dashed var(--line); }
  .mining-col .account-row-d:first-of-type { border-top: none; }
  .account-row-d > summary {
    list-style: none;
    cursor: pointer;
    /* re-apply the grid layout the bare .account-row had since
       <summary> resets some user-agent display values. */
    border-top: none;
  }
  .account-row-d > summary::-webkit-details-marker { display: none; }
  .account-row-d > summary::marker { display: none; }
  .account-row-d[open] > summary { background: var(--surface-2); }

  .account-row-expand {
    padding: 10px 14px 14px;
    background: var(--surface-2);
    border-top: 1px dashed var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
  }
  .acc-exp-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: baseline;
  }
  .acc-exp-k {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
  }
  .acc-exp-v {
    color: var(--text);
    word-break: break-word;
  }
  .acc-exp-v a { color: var(--accent); text-decoration: none; }
  .acc-exp-v a:hover { text-decoration: underline; }
  .acc-exp-next .acc-exp-v {
    display: flex; flex-direction: column; gap: 3px;
  }
  .acc-exp-queue-item small {
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    margin-left: 6px;
  }
  /* Drops page: expanded campaign item list — row style consistent with the
     app's other tables (icon · name · required). */
  /* Borderless item list — matches the app's row aesthetic (no table
     chrome). Columns align via grid; rows separate by spacing + a hover
     tint, not borders. */
  .drop-items {
    margin: 4px 18px 12px;
  }
  .drop-items-head,
  .drop-item {
    display: grid;
    grid-template-columns: 32px minmax(120px, 1.3fr) minmax(80px, 1.4fr) auto;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
  }
  .drop-items-head {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .drop-items-head span:last-child { text-align: right; }
  .drop-item { border-radius: 4px; }
  .drop-item:hover { background: var(--surface-2); }
  .drop-item-icon { display: inline-flex; }
  .drop-item-icon img,
  .drop-item-icon .ph {
    width: 28px; height: 28px;
    border-radius: 4px;
    object-fit: contain;
    background: var(--bg);
    border: 1px solid var(--line);
    display: inline-block;
  }
  .drop-item-name { color: var(--text); font-size: 13px; word-break: break-word; }
  .drop-item-type { text-align: right; }
  .dtype {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid var(--line);
    white-space: nowrap;
  }
  .dtype-watch { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
  .dtype-action { color: var(--muted); }

  /* Campaign connected (account-linked) status chip. */
  .link-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid transparent;
  }
  .link-ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
  .link-warn { color: var(--accent); border-color: var(--accent); background: rgba(212, 99, 30, 0.08); }

  /* Drops header: the // kicker carries the Twitch/Kick drops-page links. */
  .kicker-link { color: var(--accent); text-decoration: none; }
  .kicker-link:hover { text-decoration: underline; }

  /* Per-campaign collection chips in the drops row's right column.
     One chip per account that has claimed; green tick = all watch-time
     drops collected, yellow = partial. Cross = action-only campaign. */
  .ac.collect { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
  .ccol {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 3px;
    border: 1px solid var(--line);
    white-space: nowrap;
    color: var(--muted);
  }
  .ccol.tw { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 35%, transparent); }
  .ccol.kk { color: var(--kick); border-color: color-mix(in srgb, var(--kick) 35%, transparent); }
  .ccol .tk { color: var(--green); }
  .ccol .tk.partial { color: var(--amber); }
  .ccross { color: var(--red); font-family: 'JetBrains Mono', monospace; font-size: 13px; }

  /* Collection marks: one bordered box holding a green ✓ per collector
     (no @login — account identity doesn't matter), or an orange ✗ for
     action-required campaigns that can't be auto-mined. Shared style so
     every page renders collection the same way. */
  .collect-box {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid var(--line);
    line-height: 1;
  }
  .collect-box .tk { color: var(--green); font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; }
  .collect-box .tk.partial { color: var(--amber); }
  .collect-box .tk.cross { color: var(--accent); }

  /* Non-watch-time drops/items (reward / 0-min action) render at default
     opacity — the ✗ action mark already signals they can't be auto-mined. */

  /* Discoverable row: add-to-whitelist control, secondary under the contents. */
  .disc-add {
    border-top: 1px dashed var(--line);
    margin: 4px 16px 12px;
    padding-top: 10px;
    display: flex;
  }
  .disc-add-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .disc-add-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .disc-add-label strong { color: var(--text); font-weight: 600; }
  .disc-add-form select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    padding: 4px 7px;
    max-width: 220px;
  }
  /* auth-health pill on the accounts list */
  .auth-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    white-space: nowrap;
  }
  .auth-pill.ok      { color: var(--green);  border: 1px solid rgba(111, 181, 107, 0.4); }
  .auth-pill.bad     { color: var(--accent); border: 1px solid rgba(212, 99, 30, 0.5); background: rgba(212, 99, 30, 0.08); }
  .auth-pill.unknown { color: var(--dim);    border: 1px solid var(--line); }
  /* Per-account enable/disable toggle — boxed pill that reads as a switch:
     green-bordered when the account is ON (button disables it), muted when
     OFF (button enables it). */
  .row-toggle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 11px;
    border-radius: 4px;
    margin-left: 10px;
    background: transparent;
    cursor: pointer;
    transition: color .12s, border-color .12s, background .12s;
  }
  .row-toggle.on        { color: var(--green); border: 1px solid rgba(111, 181, 107, 0.4); }
  .row-toggle.on:hover  { background: rgba(111, 181, 107, 0.10); border-color: var(--green); }
  .row-toggle.off       { color: var(--dim);   border: 1px solid var(--line); }
  .row-toggle.off:hover { color: var(--text);  border-color: var(--accent); background: rgba(212, 99, 30, 0.06); }
  /* not-linked row actions: "connect account →" link + "I've linked it"
     override button, kept on one line, right-aligned in the .ac cell. */
  /* per-account connect chips on a not-linked row */
  .conn-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--line);
    white-space: nowrap;
    text-decoration: none;
  }
  .conn-chip.ok   { color: var(--green); }
  .conn-chip.need { color: var(--accent); border-color: rgba(212, 99, 30, 0.5); }
  .conn-chip.need:hover { background: rgba(212, 99, 30, 0.1); }
  .dl-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
  .link-actions { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; white-space: nowrap; }
  .link-actions > a { white-space: nowrap; }
  .link-actions form { display: inline; margin: 0; }
  /* Matches the .collect-box tick style: neutral border, green ✓, no fill.
     Scoped under .link-actions so it out-specifies .btn.sm (padding 5px 9px),
     which would otherwise make the row taller than the whitelisted rows. */
  .link-actions .linked-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 7px;
    white-space: nowrap;
    color: var(--green);
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
  }
  .linked-btn:hover { border-color: color-mix(in srgb, var(--green) 45%, transparent); }
  .linked-btn:disabled { opacity: 0.5; cursor: default; }
  /* Discoverable row right-cell whitelist control (compact select + button). */
  .whitelist-add { display: inline-flex; justify-content: flex-end; }
  .whitelist-add .disc-add-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
  /* Fixed height so discoverable rows match the whitelisted rows: a native
     select floors ~21px at any padding, so pin the box height explicitly. */
  .whitelist-add select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    line-height: 1;
    height: 17px;
    padding: 0 4px;
    box-sizing: border-box;
    max-width: 160px;
  }
  .whitelist-add .btn.sm { white-space: nowrap; font-size: 9.5px; line-height: 1; height: 17px; padding: 0 6px; box-sizing: border-box; }
  /* COLLECTED marks — one chip per account that claimed the benefit. */
  .drop-item-collected { display: flex; flex-wrap: wrap; gap: 5px; }
  .cmark {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 3px;
    border: 1px solid var(--line);
    color: var(--muted);
    white-space: nowrap;
  }
  .cmark::before { content: "✓ "; color: var(--green); }
  .cmark-twitch { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 35%, transparent); }
  .cmark-kick { color: var(--kick); border-color: color-mix(in srgb, var(--kick) 35%, transparent); }
  .cmark-none { color: var(--dim); font-size: 12px; }
  /* Clickable collected mark — manual un-collect escape hatch. Looks like
     the static chip; reveals it's actionable only on hover (no visible X). */
  button.cmark-btn { background: transparent; cursor: pointer; transition: opacity .12s, border-color .12s; }
  button.cmark-btn:hover { opacity: .65; border-color: color-mix(in srgb, var(--red) 55%, transparent); }
  /* Manual "mark collected" add menu on a benefit row. */
  .cmark-add { position: relative; display: inline-block; }
  .cmark-add-btn { cursor: pointer; display: inline-block; list-style: none; padding: 1px 7px;
    border: 1px dashed var(--muted); border-radius: 10px; color: var(--muted); font-size: 11px; }
  .cmark-add-btn::-webkit-details-marker { display: none; }
  .cmark-add-btn::marker { content: ""; }
  .cmark-add[open] .cmark-add-btn { color: var(--accent); border-color: var(--accent); }
  .cmark-add-menu { position: absolute; right: 0; z-index: 20; margin-top: 4px; padding: 6px;
    background: var(--panel, #161616); border: 1px solid var(--border, #2a2a2a); border-radius: 8px;
    display: flex; flex-direction: column; gap: 4px; min-width: 140px; box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
  .cmark-add-head { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
  .cmark-add-opt { cursor: pointer; text-align: left; padding: 3px 6px; border-radius: 6px;
    border: 1px solid transparent; background: transparent; color: var(--text, #e8e8e8); font-size: 11px; }
  .cmark-add-opt:hover { border-color: var(--accent); }

  /* Watching expand: detail rows on the left, the drop's item icon on the
     right, vertically centered in the free space beside the rows. */
  .acc-exp-grid {
    display: flex;
    gap: 20px;
    align-items: center;
  }
  .acc-exp-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .acc-exp-img {
    margin: 0;
    flex: 0 0 auto;
    align-self: center;
  }
  .acc-exp-img img {
    display: block;
    width: auto;
    height: auto;
    max-height: 112px;
    max-width: 160px;
    object-fit: contain;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px;
  }
  .acc-exp-views {
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
  }
  .mining-col .account-row:first-of-type { border-top: none; }
  .account-row:hover { background: var(--surface-2); }
  .account-row.disabled { opacity: 0.45; }
  .account-row.empty {
    padding: 18px 14px;
    text-align: center;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }
  .account-row .av {
    position: relative;
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--surface-3), var(--dim));
    border-radius: 50%;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    overflow: hidden;
  }
  /* Real avatar fills the circle; the letter underneath shows through if the
     image is absent or fails to load (onerror removes the <img>). */
  .account-row .av img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1; /* opaque image covers the letter fallback beneath it */
  }
  .account-row .av .av-i {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .mining-col-twitch .account-row .av { border-color: rgba(176, 121, 240, 0.5); }
  .mining-col-kick   .account-row .av { border-color: rgba(83, 231, 164, 0.5); }
  .account-row .who { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; min-width: 0; min-height: 30px; }
  .account-row .who .login {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .account-row .who .name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* State pills — share the .state-pill base from the accounts table
     so the visual vocabulary is consistent. Per-state overrides give
     each kind a distinct color. */
  .account-row .state-pill {
    display: inline-block;
    text-align: center;
    padding: 3px 6px;
    font-size: 9.5px;
    line-height: 1.2;
    letter-spacing: 0.12em;
    border-radius: 2px;
  }
  .pill-watching,
  .pill-force_watch { color: var(--green);  border-color: rgba(111, 181, 107, 0.45); background: rgba(111, 181, 107, 0.06); }
  .pill-pinned_watch { color: var(--green); border-color: rgba(111, 181, 107, 0.45); background: rgba(111, 181, 107, 0.06); }
  .pill-claiming   { color: var(--amber);  border-color: rgba(225, 176, 74, 0.45);  background: rgba(225, 176, 74, 0.06); }
  .pill-pick_stream,
  .pill-pick_campaign { color: var(--blue); border-color: rgba(111, 141, 181, 0.45); background: rgba(111, 141, 181, 0.06); }
  .pill-sleeping   { color: var(--muted);  border-color: var(--line); }
  .pill-awaiting_connect { color: #e8d44d; border-color: rgba(232, 212, 77, 0.5); background: rgba(232, 212, 77, 0.08); }
  .pill-needs_auth { color: var(--accent); border-color: rgba(212, 99, 30, 0.5);    background: rgba(212, 99, 30, 0.08); }
  .pill-idle,
  .pill-stopped    { color: var(--dim);    border-color: var(--line); }
  .account-row .activity {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* right-align the drop/meta lines */
    line-height: 1.2;
    min-width: 0;
    overflow: hidden; /* clip so a long campaign name can't reach the pill */
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
  }
  /* The drop/meta lines are flex-column children; without an explicit max-width
     a nowrap line keeps its full intrinsic width and slides under the state
     pill. Cap at the container width so text-overflow:ellipsis actually fires. */
  .account-row .activity .drop {
    color: var(--text);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .account-row .activity .meta {
    color: var(--muted);
    font-size: 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* Compact progress bar shown only on the watching row. Empty grid
     cell when absent keeps the row alignment stable across states. */
  .account-row .pbar.mini {
    position: relative;
    width: 100%;
    height: 3px;
    background: var(--surface-3);
    overflow: hidden;
  }
  .account-row .pbar.mini .fill {
    position: absolute; inset: 0 auto 0 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
  }
  @media (max-width: 720px) {
    .account-row {
      grid-template-columns: 28px 1fr auto;
      grid-template-areas:
        "av who pill"
        "av act act"
        "av bar bar";
      row-gap: 4px;
    }
    .account-row .av       { grid-area: av; }
    .account-row .who      { grid-area: who; }
    .account-row .state-pill { grid-area: pill; }
    .account-row .activity { grid-area: act; }
    .account-row .pbar.mini { grid-area: bar; }
  }

  /* Legacy .mining-grid + .mcard styles kept below for any pages that
     still reference them (none currently — dashboard moved to the
     compact account-row layout above). Safe to delete once nothing
     else points at them. */
  .mining-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
  }
  .mcard {
    background: var(--surface);
    padding: 16px 18px 14px;
    position: relative;
    overflow: hidden;
  }
  .mcard:hover { background: var(--surface-2); }
  .mcard.disabled { opacity: .42; }

  .mcard-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 12px;
  }
  .mcard .name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 500;
    font-variation-settings: 'opsz' 60;
    font-size: 19px;
    letter-spacing: -0.015em;
    line-height: 1.1;
    margin: 0 0 2px;
  }
  .mcard .handle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
  }
  .mcard .plat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--muted);
    height: fit-content;
    white-space: nowrap;
  }
  .plat.twitch { color: var(--purple); border-color: #4a3970; background: rgba(122,75,176,.08); }
  .plat.kick   { color: var(--kick);   border-color: #2d5c44; background: rgba(83,231,164,.06); }

  .mcard .state-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center; gap: 10px;
    margin-bottom: 12px;
    font-family: 'JetBrains Mono', monospace;
  }
  .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--muted);
  }
  .dot.watching { background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s ease-in-out infinite; }
  .dot.claiming { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
  .dot.pick     { background: var(--blue);  box-shadow: 0 0 8px var(--blue); animation: pulse 2.2s ease-in-out infinite; }
  .dot.sleeping { background: var(--dim); }
  .dot.error    { background: var(--red);   box-shadow: 0 0 10px var(--red); animation: pulse 1.2s ease-in-out infinite; }
  .state-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }
  .state-label .sub { color: var(--muted); margin-left: 6px; letter-spacing: 0.08em; }
  .uptime { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }

  /* now-playing strip */
  .nowp {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 12px;
    background: var(--surface-2);
    border-left: 2px solid var(--purple);
    font-size: 12.5px;
  }
  .nowp.kick { border-left-color: var(--kick); }
  .nowp .av {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--surface-3), var(--dim));
    border-radius: 50%;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
  }
  .nowp .meta1 { line-height: 1.25; }
  .nowp .meta1 .ch { font-weight: 600; }
  .nowp .meta1 .game { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); }
  .nowp .views {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
  }
  .nowp .views::before { content: "●"; color: var(--red); margin-right: 4px; }

  /* drop block */
  .drop {
    border-top: 1px dashed var(--line);
    padding-top: 11px;
    margin-bottom: 10px;
  }
  .drop .meta {
    display: flex; justify-content: space-between;
    margin-bottom: 6px;
    align-items: baseline;
  }
  .drop .meta .nm {
    font-size: 13px;
    font-weight: 500;
  }
  .drop .meta .nm .campaign {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    margin-left: 6px;
  }
  .drop .meta .progress {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .drop .meta .progress b { color: var(--text); }
  .pbar {
    height: 4px; background: var(--surface-3); position: relative;
    overflow: hidden;
  }
  .pbar .fill {
    position: absolute; inset: 0 auto 0 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
  }
  .pbar .tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
  .drop .eta {
    margin-top: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
  }
  .drop .eta b { color: var(--accent); }

  /* queue mini-list inside card */
  .qmini {
    border-top: 1px dashed var(--line);
    padding-top: 10px;
    margin-top: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
  }
  .qmini .h {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 5px;
    color: var(--muted);
  }
  .qmini ul { list-style: none; margin: 0; padding: 0; }
  .qmini li {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 8px;
    padding: 3px 0;
    align-items: baseline;
  }
  .qmini li .n { color: var(--dim); }
  .qmini li .name { color: var(--text); font-family: 'IBM Plex Sans', sans-serif; font-size: 12px; }
  .qmini li .name small { color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-left: 4px; }
  .qmini li .req { color: var(--muted); }

  .mcard-foot {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }
  .mcard-foot a {
    color: var(--accent); text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }
  .mcard-foot .row { display: flex; gap: 14px; }

  /* PENDING CLAIMS */
  .pending {
    display: grid;
    /* Fill the row regardless of count, capped at 4 columns. Less than
       four cards spread out evenly; more than four wrap. */
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-bottom: 24px;
  }
  .pending:has(> :nth-child(5)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pcard {
    background: linear-gradient(180deg, rgba(225,176,74,.06), transparent 70%) var(--surface);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    align-items: center;
  }
  .pcard .sprite {
    width: 36px; height: 36px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    display: grid; place-items: center;
    color: var(--amber);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 18px;
  }
  .pcard .meta { line-height: 1.25; }
  .pcard .nm { font-size: 13px; font-weight: 500; }
  .pcard .nm .ac {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    margin-left: 6px;
  }
  .pcard .sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
  }
  .pcard .claim {
    background: var(--amber);
    color: #1a1305;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 10px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid var(--amber);
    transition: all .15s;
  }
  .pcard .claim:hover { background: var(--accent-2); border-color: var(--accent-2); }
  .pcard .sprite.muted { color: var(--muted); }
  /* Future-claim pill — pending ETAs are not yet actionable so the
     amber call-to-action becomes a neutral outline. */
  .pcard .claim.future {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
  }
  .pcard .claim.future:hover {
    background: transparent;
    border-color: var(--line);
  }

  /* EVENTS BOTTOM DRAWER — flat (no border/fill); dashed-rule header. */
  .drawer {
    margin-top: 20px;
  }
  .subnav {
    display: flex;
    gap: 6px;
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
  }
  .subnav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid var(--line);
    color: var(--muted);
    text-decoration: none;
    background: transparent;
  }
  .subnav-link:hover { color: var(--text); border-color: var(--text); }
  .subnav-link.on {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(212, 99, 30, 0.08);
  }

  .drawer-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 0 2px 10px;
    border-bottom: 1px dashed var(--line);
    min-width: 0;
    box-sizing: border-box;
  }
  /* Both drawer-heads inside .live-pair sit on the same subgrid row,
     so they grow to whichever side has more content. Pin the channels
     side to top alignment so its single-row content doesn't centre
     vertically inside the inherited row height. */
  .live-pair-channels .drawer-head {
    align-content: flex-start;
  }
  .drawer-head .filter { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
  .drawer-head .ev-account { flex: 0 0 auto; }
  .drawer-head .live { flex: 0 0 auto; margin-left: auto; }
  .drawer-head h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin: 0;
  }
  .drawer-head .filter {
    display: flex; gap: 4px; font-family: 'JetBrains Mono', monospace; font-size: 10px;
  }
  .drawer-head .filter a {
    color: var(--muted);
    text-decoration: none;
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }
  .drawer-head .filter a.on { color: var(--text); background: var(--surface-2); border-color: var(--surface-2); }
  /* Per-kind filter color — applied by data-kind so the dashboard
     template doesn't need inline color styles. */
  .drawer-head .filter a[data-kind="claim"]    { color: var(--green); }
  .drawer-head .filter a[data-kind="progress"] { color: var(--amber); }
  .drawer-head .filter a[data-kind="state"]    { color: var(--blue); }
  .drawer-head .filter a[data-kind="auth"]     { color: var(--accent); }
  .drawer-head .filter a[data-kind="error"]    { color: var(--red); }
  .drawer-head .filter a.on { color: var(--text); }
  .drawer-head .live-meta {
    margin-left: auto;
    color: var(--muted);
  }
  .drawer-head .live-meta::before { display: none; }
  .drawer-head .live {
    font-family: 'JetBrains Mono', monospace; font-size: 10px;
    color: var(--green); display: flex; align-items: center; gap: 6px;
  }
  .drawer-head .live::before { content: "●"; animation: pulse 1.5s ease-in-out infinite; }

  .drawer-head .ev-account {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 2px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    max-width: 220px;
  }
  .drawer-head .ev-account:focus { outline: 1px solid var(--accent); }

  .events { padding: 4px 0; }
  /* Only the dashboard live-events drawer is a fixed scrollable feed; the
     /history + /drops lists grow with content (no black dead-space). */
  .drawer .events { max-height: 530px; overflow: auto; }
  /* Each .ev is a <details> element so the operator can click to
     reveal the structured fields from the underlying log line. One
     tight summary row: chevron · timestamp · kind-colored dot · body
     (with inline <em>kind</em> upcased) · account handle. The
     color-coded inset left border encodes the event kind so the eye
     can scan vertically without reading. */
  .ev {
    position: relative;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
  }
  .ev > summary {
    display: grid;
    grid-template-columns: 14px minmax(64px, max-content) 10px 1fr 160px;
    gap: 10px;
    align-items: center;
    padding: 5px 16px 5px 20px;
    cursor: pointer;
    list-style: none;
    line-height: 1.3;
  }
  /* Long lists (Discoverable) scroll inside the pane instead of stretching
     the page to thousands of px. Capped + scrollable; other panes stay
     uncapped. */
  .drops-rows.scroll-cap { max-height: 520px; overflow-y: auto; }

  /* Wider time column variant — used by /drops + /history rows where
     the timestamp includes the date (16 chars vs the dashboard
     drawer's 8 chars). Override the second grid track explicitly. */
  .drops-rows .ev > summary,
  .events .ev > summary {
    grid-template-columns: 14px 160px 10px 1fr 160px;
  }
  /* not-linked rows pack "connect account →" + "✓ I've linked it" into the
     last cell — give it room so they stay on one line. */
  .drops-rows .ev-linkrow > summary {
    grid-template-columns: 14px 160px 10px 1fr 240px;
  }
  /* Uniform row height across every /drops section regardless of the
     right-cell control (collect box, connect chip, or whitelist select). */
  .drops-rows .ev > summary { min-height: 27px; }
  .ev > summary::-webkit-details-marker,
  .ev > summary::marker { display: none; content: ""; }
  .ev:hover { background: var(--surface-2); }
  .ev[open] { background: var(--surface-2); border-color: var(--line); }
  .ev .chev {
    display: inline-block;
    width: 14px;
    color: var(--dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1;
    text-align: center;
    transition: transform 0.12s ease, color 0.12s;
    transform-origin: 50% 50%;
  }
  .ev[open] > summary .chev { transform: rotate(90deg); color: var(--accent); }
  .ev > summary:hover .chev { color: var(--text); }
  .ev .t { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ev .body {
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .ev .body em {
    color: var(--muted);
    font-style: normal;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-right: 6px;
  }
  .ev .ac {
    color: var(--muted);
    font-size: 10.5px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ev .ac-twitch { color: var(--purple); }
  .ev .ac-kick   { color: var(--kick); }
  .ev .lvl { font-size: 10px; line-height: 1; }
  .ev.empty { padding: 12px 18px; color: var(--muted); }
  .ev-detail {
    padding: 4px 18px 10px 132px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 10.5px;
  }
  .ev-detail .kv {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--bg);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.2;
  }
  .ev-detail .kv .k {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 9.5px;
  }
  .ev-detail .kv .eq { display: none; }
  .ev-detail .kv .v {
    color: var(--text);
    font-size: 10.5px;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ev-detail .kv .v a {
    color: var(--accent);
    text-decoration: none;
  }
  .ev-detail .kv .v a:hover { text-decoration: underline; }

  /* Items table inside drops campaign expand — match the card style
     of other tabular surfaces. */
  .ev-detail + .tbl.items,
  .tbl.items {
    width: auto;
    min-width: 320px;
    margin: 8px 18px 14px;
    font-size: 11.5px;
  }
  .tbl.items thead th {
    font-size: 9.5px;
    letter-spacing: 0.14em;
  }
  .tbl.items tbody td { padding: 6px 12px; }

  /* Color-coded left border per event kind. Both `.ev-<kind>` (legacy)
     and `.kind-<kind>` (current template) selectors are honored so
     templates can drift without breaking the visual cue. The inset
     shadow lives in front of the row background so :hover keeps it
     visible. */
  /* Static row variant — same visual as .ev but no <details>/expand.
     Used on the accounts list where rows don't have extra detail. */
  .ev.static { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; border-top:1px solid transparent; border-bottom:1px solid transparent; }
  .ev.static .ev-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 10px minmax(0, 2fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 16px 8px 20px;
  }
  /* Accounts list reuses the .ev.static row chrome but prepends an avatar
     cell, so it needs its own 5-column track (avatar · name · ● · body ·
     state). Without this the avatar lands in the name column and the name
     gets shoved into the 10px ● column, where it overflows and appears to
     float mid-row. Scoped to .accounts-rows so the shared .ev.static grid
     (live-channels etc.) is untouched. */
  .accounts-rows .ev.static .ev-row {
    grid-template-columns: auto minmax(120px, 1fr) 10px minmax(0, 2fr) auto;
  }
  .accounts-rows .ev.static .list-av { justify-self: start; }

  .ev.static .row-link {
    margin-left: 10px;
    color: var(--accent);
    text-decoration: none;
    font-size: 11px;
  }
  .ev.static .row-link:hover { text-decoration: underline; }
  .ev.static:hover { background: var(--surface-2); }

  .ev.kind-claim,    .ev.ev-claim    { box-shadow: inset 3px 0 0 var(--green);  }
  .ev.kind-progress, .ev.ev-progress { box-shadow: inset 3px 0 0 var(--amber);  }
  .ev.kind-state,    .ev.ev-state    { box-shadow: inset 3px 0 0 var(--blue);   }
  .ev.kind-discovery,.ev.ev-discovery{ box-shadow: inset 3px 0 0 var(--dim);    }
  .ev.kind-error,    .ev.ev-error    { box-shadow: inset 3px 0 0 var(--red);    }
  .ev.kind-auth,     .ev.ev-auth     { box-shadow: inset 3px 0 0 var(--accent); }

  /* Live-channel rows reuse the .ev row chrome but render as a flat
     anchor (no <details>) since clicking opens the broadcaster in a
     new tab. Match the grid track sizes drops-rows already uses so
     the chevron / time / dot / body / accessory columns align. */
  .events .live-row {
    display: grid;
    grid-template-columns: 14px 130px 10px 1fr 160px;
    gap: 10px;
    align-items: center;
    padding: 5px 16px 5px 20px;
    text-decoration: none;
    color: inherit;
  }
  .events .live-row:hover { background: var(--surface-2); }
  .events .live-row .chev { color: var(--green); }
  .ev.kind-info,     .ev.ev-info     { box-shadow: inset 3px 0 0 var(--line);   }

  /* SIDE PANEL */
  aside {
    display: flex; flex-direction: column; gap: 18px;
  }
  .panel {
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .panel-head {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: center;
  }
  .panel-head h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin: 0;
  }
  .panel-head .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
  }
  .panel-body { padding: 8px 0; }

  /* Active campaigns */
  .camp {
    display: grid;
    grid-template-columns: 8px 1fr auto;
    gap: 10px;
    padding: 9px 14px;
    align-items: start;
    border-top: 1px dashed transparent;
  }
  .camp + .camp { border-top-color: var(--line); }
  .camp:hover { background: var(--surface-2); }
  .camp .pip {
    width: 8px; height: 8px; border-radius: 50%;
    margin-top: 5px;
  }
  .camp .pip.twitch { background: var(--purple); }
  .camp .pip.kick { background: var(--kick); }
  .camp .body { line-height: 1.3; }
  .camp .name {
    font-size: 12.5px; font-weight: 500;
  }
  .camp .sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
  }
  .camp .sub b { color: var(--text); }
  .camp .right {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.4;
  }
  .camp .right .ends { color: var(--amber); }
  .camp .right .pct { color: var(--text); }

  /* PRIORITY LIST */
  .prio-item {
    display: grid;
    grid-template-columns: 22px 22px 1fr auto;
    gap: 10px;
    padding: 8px 14px;
    border-top: 1px dashed transparent;
    align-items: center;
    cursor: grab;
  }
  .prio-item + .prio-item { border-top-color: var(--line); }
  .prio-item:hover { background: var(--surface-2); }
  .prio-item .rank {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
  }
  .prio-item .grip {
    color: var(--dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
  }
  .prio-item .name {
    font-size: 12.5px;
  }
  .prio-item .name small {
    font-family: 'JetBrains Mono', monospace;
    color: var(--muted);
    font-size: 10px;
    margin-left: 6px;
  }
  .prio-item .toggle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }
  .prio-item.off .toggle { color: var(--muted); }
  .prio-item.off .name { opacity: .5; }

  /* CHANNEL ALLOW-LIST */
  .ch-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    padding: 0 8px;
    gap: 0;
  }
  .ch-tabs a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    text-decoration: none;
    padding: 8px 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-bottom: 2px solid transparent;
  }
  .ch-tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
  .ch-list {
    padding: 6px 0;
    max-height: 280px;
    overflow: auto;
  }
  .ch {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    padding: 7px 14px;
    align-items: center;
  }
  .ch:hover { background: var(--surface-2); }
  .ch .av {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--surface-3), var(--dim));
    border-radius: 50%;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 12px;
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
  }
  .ch.live .av { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
  .ch .meta { line-height: 1.25; }
  .ch .name { font-size: 12.5px; font-weight: 500; }
  .ch .sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
  }
  .ch .sub .live-tag { color: var(--red); }
  .ch .views {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .ch .views.off { color: var(--dim); }

  /* LIVE PAIR — Live Events drawer + Live Channels grid, side by side
     full-width. Stacks on narrow viewports so neither column gets
     squeezed. */
  .live-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Heads share row 1 via chained subgrid so both bodies start at
       the same y-coord even when left filter row wraps. Row 2 is
       auto so each body sizes to its own content — the right column
       doesn't stretch to match a tall left-side events list. */
    grid-template-rows: auto auto;
    gap: 16px;
    margin-top: 8px;
    align-items: start;
  }
  @media (max-width: 1200px) {
    .live-pair {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto auto auto;
    }
    .live-pair-col, .live-pair .drawer { display: block; }
  }
  .live-pair-col {
    min-width: 0;
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;
    align-self: start;
  }
  .live-pair .drawer {
    margin-top: 0;
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;
    align-self: start;
  }
  /* Channel cards shouldn't stretch to fill the grid row when there's
     only one of them. */
  .live-pair-channels .live-channels-grid { align-content: start; }
  .live-pair-channels .lch { align-self: start; }
  /* Cap the events drawer height to roughly match the live-channels
     column so the two columns visually align. Internal .events
     already scrolls past max-height: 320px. */
  .live-pair-events .events { max-height: 360px; }
  .live-pair-channels .live-channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
  }

  /* WIDE LIVE-CHANNELS GRID (under live events drawer) */
  .live-channels {
    margin-top: 24px;
  }
  .live-channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
  }
  .live-channels-empty {
    border: 1px dashed var(--line);
    background: var(--surface);
    padding: 24px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .lch {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
    padding: 10px 12px;
    align-items: center;
    border: 1px solid var(--line);
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s, background 0.12s;
  }
  .lch:hover {
    background: var(--surface-2);
    border-color: var(--accent);
  }
  .lch .av {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--surface-3), var(--dim));
    border-radius: 50%;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 14px;
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
  }
  .lch.twitch .av { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
  .lch.kick .av { border-color: var(--kick); box-shadow: 0 0 0 1px var(--kick); }
  .lch .meta {
    line-height: 1.3;
    min-width: 0;
  }
  .lch .name {
    font-size: 12.5px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lch .sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lch .tag {
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lch .views {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    align-self: start;
  }

  /* ---- AUTH / FORM CARDS ---- */
  .auth-wrap {
    /* center the auth card in the viewport (main has 24/80 padding) */
    min-height: calc(100vh - 104px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
  }
  .auth-card {
    width: 100%;
    max-width: 460px;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 36px 36px 32px;
  }
  .auth-card h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-variation-settings: 'opsz' 96, 'wdth' 90;
    font-weight: 500;
    font-size: 32px;
    letter-spacing: -0.03em;
    margin: 0 0 18px;
    line-height: 1;
  }
  .auth-card .kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 24px;
  }
  .auth-card p {
    color: var(--muted);
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.55;
  }
  .auth-card p.intro {
    color: var(--text);
  }
  .auth-card label {
    display: block;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
  }
  .auth-card input[type="text"],
  .auth-card input[type="password"],
  .auth-card input[type="url"],
  .auth-card input[type="number"],
  .auth-card input[type="email"],
  .auth-card select,
  .auth-card textarea {
    display: block;
    width: 100%;
    margin-top: 8px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text);
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    padding: 11px 13px;
    border-radius: 2px;
    outline: none;
    transition: border-color .15s;
  }
  .auth-card input:focus, .auth-card select:focus, .auth-card textarea:focus {
    border-color: var(--accent);
  }
  .auth-card textarea { min-height: 80px; resize: vertical; }
  .auth-card .submit-row,
  .auth-wrap > .submit-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 22px;
  }
  .auth-wrap > .submit-row { width: 100%; max-width: 460px; }
  .auth-wrap.wide > .submit-row { max-width: 760px; }
  /* solo: a lone cancel link, centered with a little breathing room above */
  .auth-wrap > .submit-row.solo { justify-content: center; padding-top: 10px; }
  .auth-card .submit-row .alt,
  .auth-wrap > .submit-row .alt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .auth-card .submit-row .alt:hover,
  .auth-wrap > .submit-row .alt:hover { color: var(--accent); }
  .auth-card .err {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-left: 2px solid var(--red);
    padding: 8px 12px;
    background: rgba(198,74,60,.06);
    margin-bottom: 22px;
  }
  .auth-card .ok {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  /* Device-code display */
  .device-code {
    text-align: center;
    margin: 24px 0;
    padding: 22px;
    background: var(--bg);
    border: 1px dashed var(--line);
  }
  .device-code .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
  }
  .device-code .code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--accent);
  }
  .device-code .url {
    display: inline-block;
    margin-top: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text);
  }
  .device-code .url:hover { color: var(--accent); }

  /* Wider auth card for richer flows (Kick cookie paste, Twitch login) */
  .auth-wrap.wide { max-width: 620px; margin: 0 auto; }
  .auth-wrap.wide .auth-card + .auth-card { margin-top: 16px; }

  /* Method cards used by twitch paste page — one card per auth method
     (helper CLI vs manual paste). The preferred card glows orange so
     the eye is steered toward the safer flow. */
  .auth-card.method .method-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
  }
  .auth-card.method h2 {
    margin: 0;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 500;
    font-size: 20px;
    letter-spacing: -0.02em;
  }
  .auth-card.method.preferred {
    border-color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
  }
  .method-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: rgba(212,99,30,0.06);
    border-radius: 2px;
  }
  .method-tag.muted {
    border-color: var(--line);
    color: var(--muted);
    background: transparent;
  }
  .auth-card.method p {
    color: var(--muted);
    margin: 0 0 14px;
    line-height: 1.55;
  }
  .auth-card.method code {
    background: var(--surface-2);
    padding: 1px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent);
  }
  .auth-card.method .hint {
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    margin: 0;
  }
  .method-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 6px;
  }
  .method-cta .hint {
    flex: 1 1 200px;
    min-width: 0;
  }

  /* paste form helper spans */
  .auth-card .req { color: var(--accent); }
  .auth-card .opt { color: var(--muted); font-weight: 400; }
  .auth-card .raw-paste {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    width: 100%;
  }
  .auth-flash {
    max-width: 620px;
    margin: 0 auto 0;
    padding: 0 24px;
  }

  /* Step list (used by Kick login) */
  .steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0 0 22px;
  }
  .steps li {
    counter-increment: step;
    position: relative;
    padding: 8px 0 8px 36px;
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.55;
  }
  .steps li::before {
    content: counter(step);
    position: absolute;
    left: 0; top: 8px;
    width: 22px; height: 22px;
    background: var(--surface-2);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
  }
  .steps li code {
    background: var(--surface-2);
    padding: 1px 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent);
  }
  /* Instruction links inside the numbered steps — match the app's accent
     link treatment (no default browser blue); underline only on hover. */
  .steps li a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  }
  .steps li a:hover {
    color: var(--accent-2);
    border-bottom-color: var(--accent-2);
  }

  /* ---- PAGE SHELLS (non-dashboard pages) ---- */
  .shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 80px;
  }
  .shell .ph {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: end;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
  }
  .shell .ph .kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 8px;
  }
  .shell .ph h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-variation-settings: 'opsz' 96, 'wdth' 90;
    font-weight: 500;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin: 0;
  }
  .shell .ph .actions { display: flex; gap: 8px; }
  /* Narrow shell for single-column forms (account login). */
  .shell.narrow { max-width: 640px; }

  /* Page lede — intro prose under a .ph; flat, no box. */
  .lede {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 60ch;
  }
  .lede.sm { font-size: 13px; margin: 0 0 14px; }

  /* Accent variant of the section-h meta tag (e.g. "recommended"). */
  .section-h .meta.rec { color: var(--accent); }

  /* Inline flash above a flat form — red left accent, no panel. */
  .login-flash {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: inset 3px 0 0 var(--red);
    background: rgba(198,74,60,.06);
    padding: 9px 14px;
    margin: 0 0 24px;
  }

  /* Helper text inside a numbered step — normal prose, not the step label. */
  .steps li .step-hint {
    display: block;
    margin-top: 5px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
  }

  /* required / optional markers on flat form labels */
  .settings-card .req,
  .settings-card .opt {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    font-size: 10px;
  }
  .settings-card .req { color: var(--accent); }
  .settings-card .opt { color: var(--muted); }

  /* flash */
  .flash-ok {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-left: 2px solid var(--green);
    background: rgba(111,181,107,.06);
    padding: 10px 14px;
    margin-bottom: 18px;
  }

  /* table */
  .tbl {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .tbl thead th {
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
  }
  .tbl tbody td {
    padding: 14px 16px;
    border-bottom: 1px dashed var(--line);
    font-size: 13.5px;
    vertical-align: middle;
  }
  .tbl tbody tr:last-child td { border-bottom: none; }
  .tbl tbody tr:hover { background: var(--surface-2); }
  .tbl td.name { font-weight: 500; }
  .tbl td.handle { font-family: 'JetBrains Mono', monospace; color: var(--muted); font-size: 12.5px; }
  .tbl td.plat span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 3px 7px;
    border: 1px solid var(--line);
    color: var(--muted);
  }
  .tbl td.plat .twitch { color: var(--purple); border-color: #4a3970; background: rgba(122,75,176,.08); }
  .tbl td.plat .kick   { color: var(--kick);   border-color: #2d5c44; background: rgba(83,231,164,.06); }
  .tbl td.enabled.yes { color: var(--green); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

  .state-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 9px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    white-space: nowrap;
  }
  .state-pill.state-green  { color: var(--green); border-color: rgba(90, 209, 154, 0.4); background: rgba(90, 209, 154, 0.06); }
  .state-pill.state-orange { color: var(--accent); border-color: rgba(212, 99, 30, 0.4); background: rgba(212, 99, 30, 0.06); }
  .state-pill.state-grey   { color: var(--muted); }
  .tbl td.enabled.no  { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
  .tbl td.act a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
  }
  .tbl td.act a:hover { color: var(--accent-2); }

  /* detail form layout */
  /* Flat forms — no card border/fill; fields carry the only surface. */
  .form-card {
    padding: 4px 0 0;
    max-width: 560px;
  }
  .form-card.wide { max-width: none; }

  /* Re-auth row on accounts_detail — primary CTA on top, collapsible
     helper CLI block below. The expanded helper section pushes users
     toward the safer flow without burying the manual button. */
  .reauth-row {
    margin: 16px 0;
    padding: 14px 16px;
    border: 1px dashed var(--line);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .reauth-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
  }
  /* Section header used inside settings + future config pages.
     Mirrors the .drops-pane-h pattern but lives outside the
     two-column drops grid so the page can have multiple sections
     stacked vertically. See docs/DESIGN.md. */
  .section-h {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
  }
  .section-h h3 {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
  }
  .section-h .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }
  .settings-block { margin-bottom: 28px; }
  /* Card stack — each section in its own surface card. Replaces the
     single wide form-card so sections are visually distinct and easy
     to find. Spacing between cards lets the eye rest. */
  .settings-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  /* Flat settings sections — no card box; the section-h dashed rule + fields
     carry structure (matches the console/drops/forms redesign). */
  .settings-card {
    padding: 4px 0 8px;
  }
  .settings-card form { margin: 0; }
  .settings-card .section-h { margin-bottom: 18px; }
  .settings-sub-h {
    margin: 22px 0 12px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
  }
  /* Add-by-name lives as a single kvedit STATUS row; the form just adds a
     dashed separator from the priority columns above. */
  .add-by-name {
    margin-top: 14px;
    border-top: 1px dashed var(--line);
  }
  .settings-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
  /* Both priority columns share the row height (= the taller "Selected"
     list); "Available" fills it and scrolls internally so the two columns
     line up instead of the right one stopping short. */
  .settings-grid-2 > div { display: flex; flex-direction: column; min-height: 0; }
  .settings-grid-2 > div > .kicker { flex: 0 0 auto; }
  .settings-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  /* KV-style status read-out used in settings status panel. */
  .kvlist {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    display: grid;
    gap: 6px;
  }
  .kvlist .kvrow {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--line);
    padding-bottom: 6px;
  }
  .kvlist .kvrow:last-child { border-bottom: none; }
  .kvlist .k { color: var(--muted); }
  .kvlist .v { color: var(--text); }

  /* Editable STATUS-style rows: same dashed-leader table as .kvlist, but the
     value is a compact inline input. Matches the read-only Status panel's
     density (12px mono, tight rows) instead of full-width form boxes. */
  .kvedit { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
  .kvedit .row {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px dashed var(--line);
    padding: 9px 0;
  }
  .kvedit .row:last-child { border-bottom: none; }
  /* Right-align numeric values so the digits hug the unit at the right edge
     (e.g. "21600 s") instead of floating at the left of the input box. */
  .kvedit .v input[type="number"] { text-align: right; }
  .kvedit .k { color: var(--text); font-weight: 600; white-space: nowrap; }
  .kvedit .d {
    flex: 1;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 11px;
    line-height: 1.3;
    color: #586068;
  }
  .kvedit .d b { color: var(--muted); font-weight: 600; }
  .kvedit .v {
    margin-left: auto;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex: 0 0 auto;
    color: var(--text);
  }
  /* The value reads like the Status value text — plain, no box. Underline
     only on hover/focus to signal it's editable. Prefixed with .settings-card
     so it beats the generic .settings-card input[type=number] box style. */
  .settings-card .kvedit .v input,
  .settings-card .kvedit .v select {
    width: auto;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-align: right;
    padding: 1px 0;
    margin: 0;
    border-radius: 0;
    outline: none;
    transition: border-color .12s;
  }
  .settings-card .kvedit .v input { width: 3.2em; }
  /* Kill the native number-input spinner arrows — they break the flat
     STATUS-row look. Value still editable by typing / arrow keys. */
  .settings-card input[type="number"]::-webkit-inner-spin-button,
  .settings-card input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .settings-card input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
  .settings-card .kvedit .v input:hover,
  .settings-card .kvedit .v select:hover { border-bottom-color: var(--line); }
  .settings-card .kvedit .v input:focus,
  .settings-card .kvedit .v select:focus { border-bottom-color: var(--accent); background: transparent; }
  .kvedit .v .u { color: var(--muted); font-size: 10.5px; min-width: 26px; }
  /* Wide-value rows (URLs, passwords, free text): add .grow to the .v so
     the input fills the row. Same bare style as every other value input —
     transparent background, right-aligned, with the accent underline showing
     only on focus (see the generic .v input rule above). Skip .d on these. */
  .kvedit .v.grow { flex: 1 1 auto; }
  /* Right-aligned, anchored to the right edge, and grows LEFT to fit its
     content (field-sizing) instead of being a full-width line. Capped at the
     row width so it never overflows; min-width keeps an empty field usable.
     Where field-sizing isn't supported, width:auto falls back to the input's
     default intrinsic size (still right-anchored, not full-width). */
  .settings-card .kvedit .v.grow input {
    field-sizing: content;
    width: auto;
    min-width: 12ch;
    max-width: 100%;
    margin-left: auto;
  }
  .settings-card .kvedit .v.grow input::placeholder { color: var(--dim); }
  /* Inline checkbox group as a STATUS-row value (notify kinds). */
  .kvedit .v.cbs { gap: 22px; flex-wrap: wrap; }
  .kvedit .v.cbs label.cb {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
  }
  .kvedit .v.cbs label.cb input[type="checkbox"] {
    width: 13px; height: 13px;
    accent-color: var(--accent);
    margin: 0;
  }
  /* Read-only kvlist value with an inline copy action (SSO callback). */
  .kvlist .v code { background: none; border: none; padding: 0; font: inherit; color: inherit; }
  .kvlist .v .btn-linear { padding: 0; margin-left: 12px; font-size: 10px; }
  @media (max-width: 560px) {
    .kvedit .row { flex-wrap: wrap; gap: 4px 12px; }
    .kvedit .d { flex-basis: 100%; order: 3; }
  }

  /* Linear (text + arrow) action button — matches the .back-link treatment,
     used for Save so it reads as a line action, not a filled box. */
  .btn-linear {
    background: none;
    border: none;
    text-decoration: none;
    display: inline-block;
    padding: 4px 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    cursor: pointer;
    transition: color .12s;
  }
  .btn-linear:hover { color: var(--text); }
  /* Destructive linear action (Delete account). */
  .btn-linear.red { color: var(--red); }
  .btn-linear.red:hover { color: var(--text); }

  /* Flat danger zone — dashed-rule strip, red mono label + linear action,
     replaces the boxed .form-card .danger. */
  .danger-zone {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .danger-zone .danger-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--red);
  }
  .danger-zone form { margin-left: auto; }

  /* Drag-reorder rank picker. Shared by per-account whitelist editor
     + Settings global priority list. */
  .rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px dashed var(--line);
    min-height: 160px;
    max-height: 360px;
    overflow-y: auto;
  }
  .rank-list.rank-available { flex: 1 1 auto; min-height: 0; max-height: 360px; overflow-y: auto; }
  .rank-list li {
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
    background: var(--surface-2);
    font-size: 12px;
  }
  .rank-list.rank-available li { cursor: default; background: transparent; }
  .rank-list li:last-child { border-bottom: none; }
  .rank-list li.dragging { opacity: 0.4; }
  .rank-list li.drag-over-top { box-shadow: inset 0 2px 0 0 var(--accent); }
  .rank-list li.drag-over-bot { box-shadow: inset 0 -2px 0 0 var(--accent); }
  .rank-list .rank-empty {
    cursor: default;
    color: var(--muted);
    font-size: 11.5px;
    justify-content: center;
    background: transparent;
  }
  .rank-list .rank-rm, .rank-list .rank-add {
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    cursor: pointer;
  }
  .rank-list .rank-add { color: var(--accent); }
  .rank-list .rank-rm:hover { color: var(--red); }
  .hint {
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
  }
  .form-card h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 500;
    font-size: 22px;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
  }
  .form-card .platrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 22px;
    display: flex; gap: 14px;
  }
  .form-card .platrow code {
    color: var(--text);
    background: var(--surface-2);
    padding: 1px 6px;
    font-size: 11px;
  }
  .form-card label,
  .settings-card label {
    display: block;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
  }
  /* Inline "optional" marker + multi-line helper text under a field label.
     Reset the label's uppercase/mono/tracking so hints read as normal prose. */
  .form-card .opt {
    color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0;
  }
  .form-card .field-hint {
    display: block;
    margin-top: 7px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 11.5px;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
  }
  .form-card label.cb,
  .settings-card label.cb {
    display: flex; align-items: center; gap: 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 22px;
  }
  .form-card label.cb input[type="checkbox"],
  .settings-card label.cb input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--accent);
  }
  .form-card input[type="text"],
  .form-card input[type="url"],
  .form-card input[type="password"],
  .form-card input[type="number"],
  .form-card select,
  .settings-card input[type="text"],
  .settings-card input[type="url"],
  .settings-card input[type="password"],
  .settings-card input[type="number"],
  .settings-card select,
  .settings-card textarea {
    display: block;
    width: 100%;
    margin-top: 8px;
    background: var(--surface);
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 4px 4px 0 0;
    outline: none;
    transition: border-color .15s, background .15s;
  }
  .form-card input:focus, .form-card select:focus,
  .settings-card input:focus, .settings-card select:focus,
  .settings-card textarea:focus { border-bottom-color: var(--accent); background: var(--surface-2); }
  .settings-card textarea { min-height: 120px; resize: vertical; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
  /* Numeric inputs hold a handful of digits — don't stretch them to the full
     column like text/URL fields. Keep them compact + left-aligned. */
  .form-card input[type="number"],
  .settings-card input[type="number"] {
    width: 8.5em;
    max-width: 100%;
    font-family: 'JetBrains Mono', monospace;
  }
  /* Helper text under settings fields (the rule above only covered .form-card).
     Reset the label's uppercase/mono so hints read as normal prose. */
  .settings-card .field-hint {
    display: block;
    margin-top: 7px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 11.5px;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 400;
    color: var(--muted);
    max-width: 46ch;
  }
  .settings-card .field-hint b { color: var(--text); font-weight: 600; }
  .form-card .row,
  .settings-card .row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 14px;
  }
  .form-card .danger {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px dashed var(--line);
  }
  .form-card .danger h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--red);
    margin: 0 0 12px;
  }
  .form-card .danger button {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 9px 14px;
    border: 1px solid var(--red);
    background: transparent;
    color: var(--red);
    cursor: pointer;
    border-radius: 2px;
    transition: all .15s;
  }
  .form-card .danger button:hover { background: var(--red); color: #1a0d04; }
  .back-link {
    display: inline-block;
    margin-top: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }
  .back-link:hover { color: var(--accent); }
  .empty {
    padding: 40px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
  }
  .empty a { color: var(--accent); }

  /* /drops tab strip — refinery pill row. Each tab is an anchor
     styled as a monospace caps pill with a thin border; the active
     tab gets an orange underline and accent-colored text + count.
     `text-decoration: none` and explicit `color` defeat the browser
     default blue underline when the stylesheet's later rules don't
     win on specificity. */
  .drops-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin: 16px 0 0;
    padding: 0;
  }
  /* Drops two-pane layout — stacked vertically (whitelisted on top,
     discoverable below). Single column so the wide table doesn't
     have to fight for width with a narrower neighbour. */
  .drops-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 16px;
  }
  .drops-pane { min-width: 0; }
  .drops-pane-h {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line);
  }
  .drops-pane-h h3 {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text);
  }
  .drops-pane-h .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }
  .drops-tab,
  a.drops-tab,
  a.drops-tab:link,
  a.drops-tab:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
  }
  .drops-tab:hover,
  a.drops-tab:hover {
    color: var(--text);
    background: var(--surface-2);
  }
  .drops-tab.on,
  a.drops-tab.on {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: transparent;
  }
  .drops-tab .count {
    display: inline-block;
    padding: 1px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 10px;
    line-height: 1.4;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .drops-tab.on .count { color: var(--accent); border-color: var(--accent); }
  .drops-tabpanel { margin-top: 16px; }

  /* CAMPAIGN MODAL — opened from .camp.clickable rows in the
     Active Campaigns sidebar. Centered overlay with backdrop click
     and ESC dismiss (wired in dashboard.html). */
  .camp.clickable { cursor: pointer; }
  .camp.clickable:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: -2px;
  }

  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px 24px;
    overflow-y: auto;
  }
  .modal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    max-width: 560px;
    width: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  }
  .modal-list { margin: 0; padding-left: 20px; }
  .modal-list li { padding: 3px 0; font-size: 13px; }
  .modal-list .rank {
    display: inline-block;
    min-width: 28px;
    margin-right: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
  }
  .modal-list ol, .modal-list ol li { list-style-position: inside; }
  .modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  .modal-head-id {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }
  /* Account avatar in the modal head — larger sibling of the mining-row .av,
     same letter-circle fallback (image fills it, letter shows through). */
  .modal-av {
    position: relative;
    flex: 0 0 auto;
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--surface-3), var(--dim));
    border-radius: 50%;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    overflow: hidden;
  }
  .modal-av.twitch { border-color: rgba(176, 121, 240, 0.5); }
  .modal-av.kick   { border-color: rgba(83, 231, 164, 0.5); }
  .modal-av img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
  }
  .modal-av .av-i {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
  }
  /* Account avatar in the accounts-list rows — small circle before the name,
     same letter-circle fallback as the mining rows. */
  .list-av {
    position: relative;
    flex: 0 0 auto;
    width: 22px; height: 22px;
    margin-right: 8px;
    background: linear-gradient(135deg, var(--surface-3), var(--dim));
    border-radius: 50%;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    display: inline-flex; align-items: center; justify-content: center;
    vertical-align: middle;
    border: 1px solid var(--line);
    overflow: hidden;
  }
  .list-av.twitch { border-color: rgba(176, 121, 240, 0.5); }
  .list-av.kick   { border-color: rgba(83, 231, 164, 0.5); }
  .list-av img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
  }
  .list-av .av-i {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
  }
  .modal-sub {
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .modal-sub .pip {
    width: 8px; height: 8px; border-radius: 50%;
  }
  .modal-sub .pip.twitch { background: var(--purple); }
  .modal-sub .pip.kick { background: var(--kick); }
  .modal-close {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    width: 28px;
    height: 28px;
    border-radius: 2px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }
  .modal-close:hover { color: var(--text); border-color: var(--text); }
  .modal-body { padding: 16px 20px 20px; }
  .modal-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
    margin-bottom: 14px;
  }
  .modal-row .kv { display: flex; flex-direction: column; gap: 2px; }
  .modal-row .kv .k {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
  }
  .modal-row .kv .v {
    font-size: 12.5px;
    color: var(--text);
    word-break: break-all;
  }
  .modal-row .kv .v small.muted { color: var(--muted); }
  .modal-section { margin-top: 14px; }
  .modal-section h4 {
    margin: 0 0 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .modal-section h4 .meta {
    color: var(--accent);
    font-size: 10px;
  }
  .modal-section summary {
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    padding: 6px 0;
  }
  .modal-section summary:hover { color: var(--text); }
  .modal-empty {
    padding: 8px 0;
    font-size: 12px;
    color: var(--muted);
  }
  .modal-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .modal-benefits li {
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    background: var(--surface-2);
    border-radius: 3px;
    align-items: center;
  }
  .modal-benefits .benefit-img {
    width: 36px; height: 36px;
    object-fit: contain;
    background: var(--bg);
    border-radius: 2px;
  }
  .modal-benefits .benefit-name {
    font-size: 12.5px;
    color: var(--text);
  }
  .modal-benefits .benefit-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
  }
  .modal-accounts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .modal-accounts li {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    padding: 3px 8px;
    border-radius: 2px;
  }
  .modal-json {
    margin: 8px 0 0;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
  }

/* ── Discord notification test result (settings page) ───────────── */
.notify-test-result { font-size: 13px; }
.notify-test-result.ok { color: #23a55a; }
.notify-test-result.err { color: #e74c3c; }

/* --- login SSO --- */
/* centered auth card */
.auth-centered { text-align: center; }
.auth-logo { display: block; width: 96px; height: 96px; margin: 4px auto 10px; }
.auth-centered .login-row { text-align: left; }
.auth-centered .login-row input::placeholder { color: var(--muted); }
/* C: borderless, floats on the page, square corners */
.auth-bare { border-color: transparent; background: transparent; padding-top: 10px; }
.auth-bare .btn-sso,
.auth-bare .btn-arrow,
.auth-bare .login-row input { border-radius: 0; }
/* login wordmark — matches the nav GRUB·DROPS mark (uppercase, wide, accent dot) */
.auth-card h1.auth-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-variation-settings: 'opsz' 96, 'wdth' 200;
  font-size: 28px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 22px;
}

/* Claim intake monitor + live-code ticker */
.claim-listener-monitor{margin:0 0 12px;padding:20px;border:1px solid rgba(68,210,124,.25);border-radius:16px;background:radial-gradient(circle at 15% 0,rgba(68,210,124,.09),transparent 35%),var(--panel);overflow:hidden}.claim-listener-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.claim-listener-head span{font:700 9px 'JetBrains Mono',monospace;letter-spacing:.16em;color:#44d27c}.claim-listener-head h2{margin:5px 0 0;font-size:19px}.claim-transport-badge{display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid currentColor;border-radius:999px;font:700 9px 'JetBrains Mono',monospace;text-transform:uppercase}.claim-transport-badge i,.claim-listener-grid b i{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 12px currentColor}.claim-listener-grid{display:grid;grid-template-columns:minmax(0,1fr) 70px minmax(0,1fr) 70px minmax(0,1fr);align-items:center;gap:8px;margin-top:17px}.claim-listener-grid article{padding:14px;border:1px solid var(--border);border-radius:12px;background:rgba(0,0,0,.14)}.claim-listener-grid article>span{display:block;color:var(--muted);font:700 8px 'JetBrains Mono',monospace;letter-spacing:.1em}.claim-listener-grid b{display:flex;align-items:center;gap:8px;margin-top:8px;text-transform:uppercase;font:800 12px 'JetBrains Mono',monospace}.claim-listener-grid small{display:block;margin-top:6px;color:var(--muted);font-size:10px}.claim-route-line{display:flex;align-items:center;gap:5px;color:var(--muted)}.claim-route-line i{height:1px;flex:1;background:linear-gradient(90deg,var(--border),#44d27c,var(--border))}.claim-route-line em{font:600 7px 'JetBrains Mono',monospace;font-style:normal;text-transform:uppercase}.claim-listener-foot{display:flex;gap:18px;align-items:center;margin-top:13px;color:var(--muted);font-size:9px}.claim-listener-foot span:first-child{color:#44d27c}.claim-listener-foot time{margin-left:auto;font-family:'JetBrains Mono',monospace}.claim-live-ticker{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;margin:0 0 14px;border:1px solid rgba(255,177,59,.28);border-radius:12px;background:#100d0a;overflow:hidden;box-shadow:inset 0 0 24px rgba(255,126,45,.035)}.claim-ticker-label{display:flex;align-items:center;gap:8px;align-self:stretch;padding:0 15px;background:linear-gradient(100deg,#ff572f,#ff9d23);color:#130905}.claim-ticker-label i{width:7px;height:7px;border-radius:50%;background:#fff;box-shadow:0 0 10px #fff;animation:claimPulse 1.2s infinite}.claim-ticker-label span,.claim-ticker-signal{font:900 9px 'JetBrains Mono',monospace;letter-spacing:.12em;white-space:nowrap}.claim-ticker-window{min-width:0;overflow:hidden;padding:11px 0;mask-image:linear-gradient(90deg,transparent,#000 4%,#000 96%,transparent)}.claim-ticker-track{display:flex;width:max-content;animation:claimTicker 55s linear infinite}.claim-ticker-window:hover .claim-ticker-track{animation-play-state:paused}.claim-ticker-item{display:flex;align-items:center;gap:9px;padding:0 20px;border-right:1px solid var(--border);white-space:nowrap}.claim-ticker-item time{color:var(--muted);font:500 9px 'JetBrains Mono',monospace}.claim-ticker-item b{color:#fff;font:800 11px 'JetBrains Mono',monospace}.claim-ticker-item em{padding:3px 6px;border-radius:5px;background:rgba(255,177,59,.12);color:#ffb13b;font:700 8px 'JetBrains Mono',monospace;font-style:normal}.claim-ticker-item small{font:700 8px 'JetBrains Mono',monospace;text-transform:uppercase}.claim-ticker-item>i{color:var(--muted);font:500 8px 'JetBrains Mono',monospace;font-style:normal}.claim-ticker-signal{padding:0 14px;color:#44d27c}@keyframes claimTicker{to{transform:translateX(-50%)}}@keyframes claimPulse{50%{opacity:.35;transform:scale(.75)}}@media(max-width:800px){.claim-listener-grid{grid-template-columns:1fr}.claim-route-line{height:18px;flex-direction:column}.claim-route-line i{width:1px}.claim-listener-foot{align-items:flex-start;flex-direction:column;gap:5px}.claim-listener-foot time{margin-left:0}.claim-ticker-signal{display:none}}@media(max-width:560px){.claim-listener-head{align-items:flex-start;flex-direction:column}.claim-transport-badge{width:100%;justify-content:center}.claim-live-ticker{grid-template-columns:auto minmax(0,1fr)}.claim-ticker-label{padding:0 10px}.claim-ticker-label span{display:none}}

/* Claim Automation */
.claim-sub{margin:6px 0 0;color:var(--muted)}.claim-live{color:#ff9a35;font:700 11px 'JetBrains Mono',monospace;letter-spacing:.14em}.claim-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}.claim-card,.claim-status-card,.claim-log,.claim-account-card{border:1px solid var(--border);background:var(--panel);border-radius:14px}.claim-card{padding:18px;display:grid;gap:8px}.claim-card>span,.claim-head span,.claim-metrics span,.claim-section-title span,.claim-account-head span{font:600 10px 'JetBrains Mono',monospace;letter-spacing:.12em;color:var(--muted)}.claim-card b{text-transform:uppercase}.claim-card small{color:var(--muted)}.state-online,.state-ready,.state-running{color:#44d27c!important}.state-offline,.state-error{color:#ff5a47!important}.state-unknown,.state-setup,.state-paused{color:#ffb13b!important}.claim-accounts{margin:0 0 14px}.claim-section-title{display:flex;align-items:end;justify-content:space-between;margin:0 2px 10px}.claim-section-title h2{margin:4px 0 0;font-size:18px}.claim-section-title small{color:var(--muted)}.claim-account-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.claim-account-card{padding:17px}.claim-account-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.claim-account-head h3{margin:4px 0 0}.claim-account-head>b{text-transform:uppercase;font-size:11px}.claim-account-health{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:14px 0}.claim-account-health span{padding:8px;background:var(--bg);border-radius:8px;color:var(--muted);font-size:10px}.claim-account-health b{display:block;margin-top:4px;text-transform:uppercase}.claim-account-meta{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;font-size:11px}.claim-account-meta span{color:var(--muted)}.claim-account-meta b{text-align:right;overflow-wrap:anywhere}.claim-setup-note{margin:13px 0 0;padding-top:11px;border-top:1px solid var(--border);color:var(--muted);font-size:11px}.claim-main{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:14px}.claim-status-card{padding:22px}.claim-head{display:flex;justify-content:space-between;align-items:flex-start}.claim-head h2{text-transform:uppercase;margin:5px 0}.claim-head small{color:var(--muted)}.claim-metrics{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:20px 0}.claim-metrics>div{background:var(--bg);border:1px solid var(--border);border-radius:10px;padding:14px;display:grid;gap:7px}.claim-metrics b{font-family:'JetBrains Mono',monospace}.claim-actions{display:flex;gap:8px;flex-wrap:wrap}.claim-log{padding:18px;min-height:285px}.claim-log-title{display:flex;justify-content:space-between;margin-bottom:12px}.claim-log-title span{font:600 9px 'JetBrains Mono',monospace;color:var(--muted)}.claim-event{display:grid;grid-template-columns:70px 12px 1fr;gap:8px;padding:9px 0;border-bottom:1px solid var(--border);font-size:12px}.claim-event time{font-family:'JetBrains Mono',monospace;color:var(--muted)}.event-ok{color:#44d27c}.event-warn{color:#ffb13b}.event-error{color:#ff5a47}@media(max-width:900px){.claim-grid{grid-template-columns:repeat(2,1fr)}.claim-account-grid{grid-template-columns:1fr}.claim-main{grid-template-columns:1fr}}@media(max-width:560px){.claim-grid,.claim-metrics{grid-template-columns:1fr}.claim-head,.claim-section-title{display:grid;gap:8px}}
.claim-quota{margin:18px 0;padding:16px;background:var(--bg);border:1px solid var(--border);border-radius:10px}.claim-quota>div:first-child{display:flex;align-items:center;justify-content:space-between}.claim-quota span{font:600 10px 'JetBrains Mono',monospace;letter-spacing:.12em;color:var(--muted)}.claim-quota strong{font:800 24px 'JetBrains Mono',monospace;color:#44d27c}.claim-quota small{display:block;margin-top:8px;color:var(--muted)}.claim-quota-bar{height:8px;margin-top:12px;overflow:hidden;background:var(--border);border-radius:99px}.claim-quota-bar i{display:block;height:100%;background:linear-gradient(90deg,#44d27c,#ffb13b);border-radius:inherit}
.claim-code-console{position:relative;overflow:hidden;margin:0 0 18px;padding:22px;border:1px solid rgba(255,177,59,.22);background:linear-gradient(145deg,rgba(255,177,59,.055),transparent 42%),var(--panel);border-radius:16px;box-shadow:0 12px 36px rgba(0,0,0,.16)}
.claim-code-console:before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:linear-gradient(#ffb13b,#ff6b35)}
.claim-code-console-head{display:flex;justify-content:space-between;align-items:center;gap:18px}.claim-code-console-head>div{min-width:0}.claim-code-console-head span{font:700 10px 'JetBrains Mono',monospace;letter-spacing:.16em;color:#ffb13b}.claim-code-console-head h2{margin:5px 0 0;font-size:20px;line-height:1.25}.claim-code-console form{margin:0;min-width:0}
.claim-master-switch,.claim-type-chip{appearance:none;-webkit-appearance:none;border:1px solid var(--border);font-family:inherit;color:var(--text);cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease}.claim-master-switch:hover,.claim-type-chip:hover{transform:translateY(-1px);border-color:rgba(255,177,59,.55)}
.claim-master-switch{display:flex;align-items:center;justify-content:center;gap:9px;min-width:116px;border-radius:999px;padding:10px 14px;background:rgba(255,90,71,.08);font:800 10px 'JetBrains Mono',monospace;letter-spacing:.06em}.claim-master-switch.is-on{border-color:rgba(68,210,124,.42);background:rgba(68,210,124,.1);color:#6ee7a0}.claim-master-switch i,.claim-type-chip i{display:block;width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#ff5a47;box-shadow:0 0 0 4px rgba(255,90,71,.1)}.claim-master-switch.is-on i,.claim-type-chip.is-on i{background:#44d27c;box-shadow:0 0 0 4px rgba(68,210,124,.1),0 0 14px rgba(68,210,124,.48)}
.claim-type-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}.claim-type-list>form{display:block;width:100%}.claim-type-chip{width:100%;min-height:68px;display:grid;grid-template-columns:9px minmax(0,1fr);grid-template-rows:auto auto;column-gap:11px;row-gap:3px;align-content:center;text-align:left;padding:13px 14px;border-radius:12px;background:rgba(255,255,255,.025)}.claim-type-chip i{grid-row:1/3;align-self:center}.claim-type-chip b{display:block;font-size:13px;line-height:1.2;white-space:nowrap}.claim-type-chip small{display:block;color:var(--muted);font-size:10px;line-height:1.25;white-space:nowrap}.claim-type-chip.is-on{border-color:rgba(68,210,124,.25);background:linear-gradient(135deg,rgba(68,210,124,.09),rgba(68,210,124,.025))}.claim-type-chip.is-off{opacity:.62;filter:saturate(.7)}.claim-code-hint{margin:15px 0 0;padding-top:13px;border-top:1px solid var(--border);color:var(--muted);font-size:11px;line-height:1.55}
.claim-history{margin-top:14px;padding:18px;border:1px solid var(--border);background:var(--panel);border-radius:14px}.claim-history .claim-log-title small{display:block;margin-top:4px;color:var(--muted)}.claim-history-scroll{overflow-x:auto}.claim-history-head,.claim-history-row{display:grid;grid-template-columns:140px 130px 60px minmax(180px,.8fr) 105px minmax(220px,1.3fr) 75px;gap:12px;align-items:center;min-width:1050px;padding:10px 6px}.claim-history-head{border-bottom:1px solid var(--border);font:600 9px 'JetBrains Mono',monospace;letter-spacing:.1em;color:var(--muted)}.claim-history-row{border-bottom:1px solid var(--border);font-size:11px}.claim-history-row time,.claim-history-row code,.claim-history-row small{font-family:'JetBrains Mono',monospace}.claim-history-row code{overflow-wrap:anywhere;color:var(--text)}.claim-history-row strong{color:#6db6ff}.claim-history-row em{font-style:normal;color:#ffb13b}.claim-history-row small{color:var(--muted)}.claim-history-row b{text-transform:uppercase}.history-success{color:#44d27c}.history-failed{color:#ff5a47}.history-quota_skipped,.history-schedule_skipped,.history-type_skipped,.history-account_skipped{color:#ffb13b}@media(max-width:700px){.claim-code-console{padding:18px}.claim-code-console-head{align-items:flex-start;flex-direction:column}.claim-code-console-head form,.claim-master-switch{width:100%}.claim-type-list{grid-template-columns:repeat(2,minmax(0,1fr))}.claim-type-chip{min-height:64px;padding:12px}}@media(max-width:390px){.claim-type-list{grid-template-columns:1fr}}
.auth-name .dot {
  display: inline-block;
  width: .26em; height: .26em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 .22em .12em;
}

.btn-sso {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin-top: 8px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 2px;
  text-decoration: none;
  transition: background .15s, color .15s, transform .05s;
}
.btn-sso:hover { background: var(--accent); color: #1a1006; }
.btn-sso:active { transform: translateY(1px); }
/* SSO disabled (OIDC not configured) — faded, non-interactive, keeps layout */
.btn-sso.is-disabled {
  color: var(--dim);
  border-color: var(--line);
  background: transparent;
  cursor: not-allowed;
  pointer-events: none;
  opacity: .65;
}

/* password + square arrow submit, side by side */
.login-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}
.login-row input[type="password"] {
  flex: 1;
  margin-top: 0;
}
.btn-arrow {
  flex: 0 0 auto;
  width: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-arrow:hover { background: var(--accent); color: #1a1006; }
.btn-arrow:active { transform: translateY(1px); }

.sso-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.sso-divider::before,
.sso-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-secondary label { color: var(--muted); }

/* --- settings: SSO status card --- */
.sso-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
}
.sso-status-pill.on  { color: var(--green); border-color: var(--green); }
.sso-status-pill.off { color: var(--muted); }
.copy-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.copy-field code {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
}
.copy-field button {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
}
.copy-field button:hover { color: var(--text); }

/* ===== MOBILE (phone-width) =====
   Consolidated small-screen pass. Desktop-first file, so these override
   at the end. Two breakpoints: 720px (tablet/large phone) and 560px
   (phone). Targets the overflow culprits found at 390px viewport:
   topbar nav (forced 700px page width), 6-col telemetry, and the
   event-row grid whose 1fr body track collapsed to 0. */
@media (max-width: 720px) {
  /* Topbar: brand + user on row 1, nav gets its own full-width row. */
  .topbar {
    grid-template-columns: auto 1fr;
    row-gap: 6px;
    padding: 10px 14px;
  }
  .topbar .brand { grid-row: 1; grid-column: 1; }
  .topbar .user  { grid-row: 1; grid-column: 2; justify-self: end; gap: 10px; }
  .topbar .nav {
    grid-row: 2; grid-column: 1 / -1;
    justify-self: stretch;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .topbar .nav a { padding: 7px 10px; white-space: nowrap; }
  .user .clock { display: none; }

  main { padding: 18px 14px 64px; }

  /* Auth cards (device-code login): long handles/URLs break instead of
     widening the page. */
  .auth-card h1 { overflow-wrap: anywhere; }
  .device-code .url { overflow-wrap: anywhere; }

  /* Expanded event detail: long kv chips (campaign names) wrap inside
     the chip instead of overflowing. */
  .ev-detail .kv { max-width: 100%; white-space: normal; word-break: break-word; }

  /* Settings tab strip: horizontal scroll instead of widening the page. */
  .subnav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .subnav-link { white-space: nowrap; flex: 0 0 auto; }

  /* Page heads (both variants): actions drop under the title instead of
     squeezing it. */
  .page-head,
  .shell .ph { grid-template-columns: 1fr; gap: 12px; align-items: start; }
  .shell { padding: 20px 14px 64px; }

  /* Campaign item rows: type chip stays beside the name, collected marks
     get their own full-width second row. Header row hidden (labels are
     obvious from content at this size). */
  .drop-items { margin: 4px 6px 12px; }
  .drop-items-head { display: none; }
  .drop-item {
    grid-template-columns: 28px 1fr auto;
    grid-template-areas:
      "icon name type"
      "icon collected collected";
    row-gap: 4px;
  }
  .drop-item-icon      { grid-area: icon; }
  .drop-item-name      { grid-area: name; }
  .drop-item-collected { grid-area: collected; }
  .drop-item-type      { grid-area: type; }

  /* Telemetry: 6 cols -> 3. */
  .telemetry { grid-template-columns: repeat(3, 1fr); gap: 16px 14px; }

  /* Event rows: meta on row 1 (chev · time · dot · account), message on
     its own full-width row 2 so the 1fr track can't collapse to zero. */
  .events .ev > summary,
  .drops-rows .ev > summary,
  .drops-rows .ev-linkrow > summary {
    grid-template-columns: 14px auto 10px 1fr;
    grid-template-areas:
      "chev t lvl ac"
      "chev body body body";
    row-gap: 1px;
    padding: 3px 12px 3px 14px;
  }
  .ev .chev { grid-area: chev; }
  .ev .t    { grid-area: t; }
  .ev .lvl  { grid-area: lvl; }
  .ev .body { grid-area: body; }
  .ev .ac   { grid-area: ac; justify-self: end; }
  .ev-detail { padding-left: 38px; }

  /* Static rows (accounts list): name+dot+state on row 1, links/pills on
     row 2. Without this the minmax(120px,1fr)+2fr grid collapses and the
     text renders overlapped. */
  .ev.static .ev-row {
    grid-template-columns: auto 10px 1fr;
    grid-template-areas:
      "t lvl ac"
      "body body body";
    row-gap: 4px;
    padding: 8px 12px 8px 14px;
  }
  .ev.static .ev-row .t    { grid-area: t; white-space: normal; }
  .ev.static .ev-row .lvl  { grid-area: lvl; }
  .ev.static .ev-row .body { grid-area: body; white-space: normal; }
  .ev.static .ev-row .ac   { grid-area: ac; justify-self: end; }
}

@media (max-width: 560px) {
  .telemetry { grid-template-columns: repeat(2, 1fr); }
  .stat .value { font-size: 22px; }
  /* Wide-value settings rows (webhook/avatar URLs): input gets its own
     full-width line instead of a sliver next to the label. */
  .kvedit .row { flex-wrap: wrap; }
  .kvedit .v.grow { flex-basis: 100%; order: 2; }
  .kvedit .row .d { order: 3; }
}

/* ── Language dropdown (custom, not native <select>) ─────── */
.lang-dd { position: relative; display: inline-block; margin-left: 6px; }
.lang-dd-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font: 500 11px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 8px 5px 10px;
  cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  transition: border-color .15s;
}
.lang-dd-btn:hover, .lang-dd-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--text); }
.lang-dd-arrow { font-size: 8px; opacity: .6; }
.lang-dd-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  list-style: none; margin: 0; padding: 4px 0;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  z-index: 900;
}
.lang-dd-menu li {
  padding: 7px 14px;
  font: 500 12px/1.4 'JetBrains Mono', monospace;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background .1s;
}
.lang-dd-menu li:hover { background: var(--surface-2); }
.lang-dd-menu li.selected { color: var(--accent); }

/* Flash toast — transient feedback after an action (whitelist add, etc.).
   Fixed bottom-right, fades out on its own so it reads as a popup. */
.toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  padding: 9px 16px;
  background: var(--surface-2, #1a1a1a);
  color: var(--green, #6fb56b);
  border: 1px solid rgba(111, 181, 107, 0.45);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  animation: toast-life 4s ease forwards;
  pointer-events: none;
}
@keyframes toast-life {
  0%   { opacity: 0; transform: translateY(8px); }
  10%  { opacity: 1; transform: translateY(0); }
  80%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(8px); }
}

/* Removable whitelist chip (✓ login ✕) in the drops null-game + promoted rows.
   Sized to the row text, compact, with a little left gap from the name. */
button.chip-rm {
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  line-height: 1.2;
  padding: 1px 5px;
  margin-left: 5px;
  border-radius: 3px;
  background: rgba(111, 181, 107, 0.06);
  border: 1px solid rgba(111, 181, 107, 0.4);
  color: var(--green, #6fb56b);
  white-space: nowrap;
  vertical-align: middle;
}
button.chip-rm:hover {
  background: rgba(212, 99, 30, 0.1);
  border-color: rgba(212, 99, 30, 0.5);
  color: var(--accent, #d4631e);
}

/* ===== KICK WATCH CONTROL CENTER (v4) ===== */
.watch-page { display: flex; flex-direction: column; gap: 18px; }
.watch-head { align-items: flex-end; }
.watch-subtitle {
  margin: 8px 0 0;
  max-width: 76ch;
  color: var(--muted);
  font-size: 13px;
}
.watch-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.watch-head-actions form { margin: 0; }

.watch-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}
.watch-stat {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.watch-stat span {
  font: 500 10px/1.3 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.watch-stat strong {
  font: 700 24px/1 'Bricolage Grotesque', sans-serif;
  color: var(--text);
}
.watch-stat.is-danger { border-color: rgba(224, 89, 89, .5); }
.watch-stat.is-danger strong { color: var(--red); }

.watch-now-card,
.watch-queue-card,
.watch-accounts-card,
.watch-editor-card,
/* Claim account cards v2 */
.claim-account-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.claim-account-card{position:relative;overflow:hidden;padding:0;border-color:rgba(255,106,34,.28);background:linear-gradient(145deg,var(--panel),rgba(54,15,7,.82));box-shadow:0 12px 32px rgba(22,4,0,.18);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.claim-account-card:before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:linear-gradient(#ff3d24,#ff9d23)}
.claim-account-card.account-running{border-color:rgba(68,210,124,.34)}.claim-account-card.account-running:before{background:linear-gradient(#39df7d,#1aa75a)}
.claim-account-card:hover{transform:translateY(-2px);border-color:rgba(255,119,42,.65);box-shadow:0 16px 38px rgba(35,8,0,.28)}
.claim-account-head{align-items:center;padding:18px 18px 15px;border-bottom:1px solid var(--border)}
.claim-account-identity{display:flex;align-items:center;gap:11px;min-width:0}.claim-account-identity>div{min-width:0}.claim-account-identity small{font:600 8px 'JetBrains Mono',monospace;letter-spacing:.13em;color:var(--muted)}
.claim-account-head h3{margin:3px 0 0;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.claim-name-line{display:flex;align-items:center;gap:7px;min-width:0}.claim-name-line h3{min-width:0}.claim-name-edit-button{flex:0 0 auto;width:25px;height:25px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--muted);cursor:pointer}.claim-name-edit-button:hover{border-color:rgba(255,126,45,.35);background:rgba(255,106,34,.09);color:#ff8b32}
.claim-slot{display:grid!important;place-items:center;flex:0 0 38px;height:38px;border:1px solid rgba(255,119,42,.35);border-radius:11px;background:linear-gradient(145deg,rgba(255,61,36,.16),rgba(255,157,35,.07));color:#ff8b32!important;font:800 10px 'JetBrains Mono',monospace!important;text-transform:uppercase}
.claim-status-toggle{flex:0 0 auto}.claim-status-pill{display:flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid currentColor;border-radius:999px;background:rgba(0,0,0,.16);text-transform:uppercase;font:700 9px 'JetBrains Mono',monospace;letter-spacing:.08em;cursor:pointer}.claim-status-pill:hover{background:rgba(255,255,255,.06);transform:translateY(-1px)}.claim-status-pill i{width:6px;height:6px;border-radius:50%;background:currentColor;box-shadow:0 0 8px currentColor}
.claim-account-health{gap:8px;margin:0;padding:15px 18px}.claim-account-health span{padding:11px 8px 10px;border:1px solid var(--border);background:rgba(0,0,0,.14);border-radius:10px;text-align:center}.claim-account-health small{display:block;margin:5px 0 3px;color:var(--muted);font:600 8px 'JetBrains Mono',monospace;letter-spacing:.08em}.claim-account-health b{margin-top:0;font-size:10px}.claim-health-icon{color:#ff8a31;font-style:normal;font-size:11px}
.claim-account-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 18px 15px}.claim-account-meta>div{min-width:0;padding:11px;border-radius:10px;background:rgba(0,0,0,.12)}.claim-account-meta span{display:block;margin-bottom:5px;font-size:9px}.claim-account-meta b{display:block;text-align:left;font-size:10px}
.claim-account-score{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 18px;border-top:1px solid var(--border);background:rgba(0,0,0,.10)}.claim-account-score>span{color:var(--muted);font:600 8px 'JetBrains Mono',monospace;letter-spacing:.08em}.claim-account-score>div{display:flex;align-items:center;gap:8px;font-size:9px}.claim-account-score i{width:1px;height:11px;background:var(--border)}.score-success{color:#44d27c}.score-failed{color:#ff6856}
.claim-setup-note{margin:0;padding:12px 18px;border-top:1px solid var(--border);background:rgba(255,177,59,.04);font-size:10px}
@media(max-width:1100px){.claim-account-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.claim-account-grid{grid-template-columns:1fr}.claim-account-card:hover{transform:none}}@media(max-width:390px){.claim-account-head{padding:15px}.claim-account-health,.claim-account-meta{padding-left:15px;padding-right:15px}.claim-account-score{align-items:flex-start;flex-direction:column;padding:11px 15px}}

.watch-claim-card,
.watch-progress-card,
.watch-auto-slots-card,
.watch-auto-runtime-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.watch-now-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 22px;
  align-items: start;
}
.watch-channel-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.watch-channel-row > a {
  color: var(--text);
  text-decoration: none;
  font: 700 21px/1.2 'Bricolage Grotesque', sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watch-live-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto;
  background: var(--green); box-shadow: 0 0 10px var(--green);
}
.watch-position {
  margin-left: auto;
  color: var(--muted);
  font: 500 10px/1.2 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
}
.watch-progress-track {
  height: 8px;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
}
.watch-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s ease;
}
.watch-time-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.watch-time-grid > div {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  min-width: 0;
}
.watch-time-grid span {
  display: block;
  color: var(--muted);
  font: 500 9px/1.3 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.watch-time-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font: 700 16px/1.2 'JetBrains Mono', monospace;
}
.watch-next-url { overflow-wrap: anywhere; }
.watch-control-stack { display: flex; flex-direction: column; gap: 8px; }
.watch-control-stack form { margin: 0; }
.watch-control-stack .btn { width: 100%; justify-content: center; }
.watch-control-stack .btn.danger { color: var(--red); border-color: rgba(224, 89, 89, .5); }
.watch-control-stack .btn.danger:hover { background: rgba(224, 89, 89, .1); }
.watch-state-badge {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.watch-state-badge.is-running { color: var(--green); border-color: rgba(111, 181, 107, .45); }
.watch-state-badge.is-paused { color: var(--amber); border-color: rgba(215, 166, 84, .45); }
.watch-empty-state {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}
.watch-empty-state strong { color: var(--text); }

.watch-queue-list { display: flex; flex-direction: column; gap: 6px; }
.watch-queue-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 90px 90px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.watch-queue-row.is-current { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.watch-queue-row.is-done { opacity: .65; }
.watch-queue-index {
  width: 25px; height: 25px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  font: 600 10px/1 'JetBrains Mono', monospace;
}
.watch-queue-url { min-width: 0; }
.watch-queue-url a { color: var(--text); font-weight: 600; text-decoration: none; }
.watch-queue-url small {
  display: block; margin-top: 2px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.watch-queue-duration,
.watch-queue-state {
  font: 500 10px/1.2 'JetBrains Mono', monospace;
  color: var(--muted);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.watch-queue-row.is-current .watch-queue-state { color: var(--accent); }
.watch-queue-row.is-done .watch-queue-state { color: var(--green); }

.watch-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, .85fr);
  gap: 18px;
  align-items: start;
}
.watch-editor-field { margin-bottom: 14px !important; }
.watch-editor-field textarea {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-family: 'JetBrains Mono', monospace;
}
.watch-options-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) repeat(2, minmax(180px, .7fr));
  gap: 12px;
  align-items: center;
}
.settings-card label.watch-check,
.settings-card label.watch-number {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-transform: none;
  letter-spacing: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  color: var(--text);
}
.settings-card label.watch-check { display: flex; align-items: center; gap: 9px; }
.settings-card label.watch-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.settings-card label.watch-number {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px auto;
  gap: 8px;
  align-items: center;
}
.settings-card label.watch-number input[type="number"] {
  width: 76px;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: right;
}
.watch-form-actions { display: flex; gap: 10px; margin-top: 14px; }
.watch-help { margin: 12px 0 0; line-height: 1.55; }
.watch-settings-form { display: flex; flex-direction: column; gap: 10px; }
.watch-settings-form .btn { align-self: flex-start; }
.watch-divider { margin: 18px 0; border-top: 1px dashed var(--line); }
.watch-catalog-block > strong {
  display: block; margin-bottom: 10px;
  font: 700 10px/1.3 'JetBrains Mono', monospace;
  color: var(--accent); text-transform: uppercase; letter-spacing: .14em;
}
.watch-catalog-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.watch-catalog-form select { max-width: none; margin: 0; padding: 8px 9px; }
.table-scroll { overflow-x: auto; }
.watch-table { width: 100%; }
.watch-mono { font-family: 'JetBrains Mono', monospace; }
.watch-error { color: var(--red) !important; }

.watch-scan-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px 18px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.watch-scan-strip > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.watch-scan-strip strong {
  color: var(--text); font: 700 10px/1.2 'JetBrains Mono', monospace;
  text-transform: uppercase; letter-spacing: .12em;
}
.watch-scan-strip span,
.watch-scan-strip small { color: var(--muted); }
.watch-scan-strip small { grid-column: 1 / -1; }
.watch-scan-metrics { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.watch-scan-metrics b { color: var(--text); }
.watch-scan-strip.has-error { border-color: rgba(224, 89, 89, .45); }

@media (max-width: 1100px) {
  .watch-summary-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .watch-time-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .watch-config-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .watch-head { align-items: flex-start; }
  .watch-head-actions { margin-top: 12px; }
  .watch-summary-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .watch-now-grid { grid-template-columns: 1fr; }
  .watch-position { margin-left: 0; }
  .watch-channel-row { flex-wrap: wrap; }
  .watch-control-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-options-grid { grid-template-columns: 1fr; }
  .watch-queue-row { grid-template-columns: 30px minmax(0, 1fr) 70px; }
  .watch-queue-state { grid-column: 2 / -1; text-align: left; }
  .watch-scan-strip { grid-template-columns: 1fr; }
  .watch-scan-metrics { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .watch-summary-grid { grid-template-columns: 1fr 1fr; }
  .watch-stat { padding: 11px 12px; }
  .watch-stat strong { font-size: 20px; }
  .watch-time-grid { grid-template-columns: 1fr; }
  .watch-control-stack { grid-template-columns: 1fr; }
  .watch-catalog-form { grid-template-columns: 1fr; }
}
.watch-empty-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.watch-empty-actions form { margin: 0; }
.watch-empty-actions .btn.danger { color: var(--red); border-color: rgba(224, 89, 89, .5); }


/* ===== KICK AUTO SLOTS + CURRENT PRIORITY (v5.2) ===== */
.watch-auto-slots-card,
.watch-auto-runtime-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.watch-auto-slots-card .section-h > div { min-width: 0; }
.watch-auto-slots-card .section-h .hint { margin: 5px 0 0; max-width: 90ch; }
.watch-auto-slots-form { margin-top: 14px; }
.watch-auto-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}
.watch-auto-stop-form { margin: -38px 0 0 auto; width: max-content; }
.watch-auto-runtime-card.is-priority {
  border-color: rgba(212, 99, 30, .65);
  box-shadow: inset 3px 0 0 var(--accent);
}
.watch-priority-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(212, 99, 30, .45);
  background: rgba(212, 99, 30, .07);
}
.watch-priority-banner > div:first-child { min-width: 0; }
.watch-priority-banner strong { display: block; color: var(--text); }
.watch-priority-banner a {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.watch-priority-banner > div:last-child { text-align: right; }
.watch-priority-banner span {
  display: block;
  color: var(--muted);
  font: 500 9px/1.3 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.watch-priority-banner > div:last-child strong {
  margin-top: 4px;
  font: 700 20px/1.1 'JetBrains Mono', monospace;
  color: var(--accent);
}
.watch-auto-metrics { justify-content: flex-start; }

@media (max-width: 900px) {
  .history-telemetry { grid-template-columns: repeat(2, 1fr); }
  .daily-campaign .ac { max-width: none; }
}

@media (max-width: 540px) {
  .history-telemetry { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .watch-auto-slots-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
@media (max-width: 720px) {
  .watch-auto-slots-grid { grid-template-columns: 1fr; }
  .watch-auto-stop-form { margin: 10px 0 0; width: auto; }
  .watch-priority-banner { grid-template-columns: 1fr; }
  .watch-priority-banner > div:last-child { text-align: left; }
}


/* Auto Slots parallel watch lanes */
.watch-parallel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}
.watch-parallel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.watch-slot-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}
.watch-slot-card .watch-channel-row { flex-wrap: wrap; }
@media (max-width: 980px) {
  .watch-parallel-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .watch-parallel-grid { grid-template-columns: 1fr; }
}

/* Per-account proxy dashboard */
.proxy-page { display: grid; gap: 18px; }
.proxy-import-card { position: relative; }
.proxy-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 18px;
  align-items: stretch;
}
.proxy-list-field textarea {
  min-height: 210px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}
.proxy-file-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}
.proxy-assignment-note {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--muted);
  font-size: 13px;
}
.proxy-assignment-note strong { color: var(--text); }
.proxy-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.proxy-clear-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.proxy-summary-grid { margin-bottom: 18px; }
.watch-stat.is-success strong { color: var(--green); }
.proxy-table { min-width: 1120px; }
.proxy-table td { vertical-align: middle; }
.proxy-code {
  display: inline-block;
  max-width: 310px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text);
}
.proxy-direct { color: var(--muted); }
.proxy-row-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.proxy-watch-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.proxy-watch-badge.is-watching { color: var(--green); border-color: rgba(90, 209, 154, .4); }
.proxy-watch-badge.is-error { color: var(--red); border-color: rgba(231, 97, 97, .45); }
.proxy-watch-badge.is-starting,
.proxy-watch-badge.is-waiting,
.proxy-watch-badge.is-claiming { color: var(--amber); border-color: rgba(215, 166, 84, .45); }
.proxy-watch-badge.is-disabled,
.proxy-watch-badge.is-stopped,
.proxy-watch-badge.is-raw { color: var(--muted); }
.proxy-row-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.proxy-inline-form {
  display: flex;
  gap: 7px;
  min-width: 360px;
}
.proxy-inline-form input[type="text"] {
  min-width: 245px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
@media (max-width: 850px) {
  .proxy-import-grid { grid-template-columns: 1fr; }
}

.claim-setup-box { display: grid; gap: 10px; margin-top: 12px; }
.claim-setup-box .claim-setup-note { margin: 0; }
.claim-setup-button { width: 100%; justify-content: center; }
.claim-account-vnc{display:grid;gap:7px;padding:13px 18px;border-top:1px solid var(--border);background:rgba(0,0,0,.08)}.claim-account-vnc small{color:var(--muted);font-size:9px;line-height:1.45;text-align:center}
.claim-setup-steps {
  margin: 0;
  padding: 12px 12px 12px 30px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.claim-coming-soon { color: var(--muted); font-size: 12px; }
.claim-inline-name-editor{grid-template-columns:minmax(0,1fr) auto auto;gap:8px;padding:11px 18px;border-bottom:1px solid var(--border);background:linear-gradient(90deg,rgba(255,106,34,.08),rgba(255,177,59,.025))}.claim-inline-name-editor:not([hidden]){display:grid}.claim-inline-name-editor input{min-width:0;height:36px;padding:0 11px;border:1px solid rgba(255,126,45,.38);border-radius:9px;background:rgba(10,8,7,.65);color:var(--text);outline:none}.claim-inline-name-editor input:focus{border-color:#ff7a2f;box-shadow:0 0 0 3px rgba(255,106,34,.1)}.claim-inline-name-editor .btn{height:36px;padding:0 11px;white-space:nowrap}
.claim-account-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:13px 18px;border-top:1px solid var(--border);background:rgba(0,0,0,.08)}
.claim-account-controls .btn{min-width:0;height:35px;padding:0 7px;justify-content:center;font-size:9px;letter-spacing:.04em;white-space:nowrap}
@media(max-width:420px){.claim-account-controls{grid-template-columns:repeat(2,minmax(0,1fr))}}
.claim-readiness-summary{margin:-2px 0 14px;padding:17px 19px;border:1px solid rgba(68,210,124,.25);border-radius:14px;background:linear-gradient(135deg,rgba(25,75,45,.18),rgba(35,10,4,.25))}.claim-readiness-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.claim-readiness-head span{font:600 9px 'JetBrains Mono',monospace;letter-spacing:.13em;color:var(--muted)}.claim-readiness-head h2{margin:5px 0 0;font-size:17px}.claim-readiness-head>small{max-width:390px;color:var(--muted);font:600 9px 'JetBrains Mono',monospace;text-align:right}.claim-readiness-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.claim-readiness-columns>div{padding:12px;border:1px solid var(--border);border-radius:10px;background:rgba(0,0,0,.13)}.claim-readiness-columns b{font:700 9px 'JetBrains Mono',monospace;letter-spacing:.1em}.claim-ready-list>b{color:#44d27c}.claim-attention-list>b{color:#ffb13b}.claim-readiness-columns>div>div{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.claim-readiness-columns span,.claim-readiness-columns em{padding:5px 8px;border-radius:7px;background:rgba(255,255,255,.035);font:500 10px 'JetBrains Mono',monospace;font-style:normal}.claim-ready-list span{color:#70e69c}.claim-attention-list span{color:#ffc36a}.claim-recovery-note{margin:0;padding:8px 18px;border-top:1px solid var(--border);font:600 9px 'JetBrains Mono',monospace}.claim-recovery-note.is-working{color:#ffb13b}.claim-recovery-note.is-manual{color:#ff6856}@media(max-width:720px){.claim-readiness-head,.claim-readiness-columns{display:grid;grid-template-columns:1fr}.claim-readiness-head>small{text-align:left}}
@media(max-width:520px){.claim-inline-name-editor{grid-template-columns:1fr 1fr}.claim-inline-name-editor input{grid-column:1/-1}.claim-inline-name-editor .btn{width:100%}}

/* Claim account cards v3: readable controls and results on dashboard widths. */
.claim-account-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.claim-account-card{display:flex;min-width:0;flex-direction:column}
.claim-account-head{padding:16px 18px 14px}
.claim-account-health{padding:13px 18px}
.claim-account-health span{padding:9px 8px}
.claim-account-meta{grid-template-columns:minmax(105px,.7fr) minmax(0,1.3fr);padding:0 18px 13px}
.claim-account-meta>div{min-height:64px}
.claim-account-meta b{line-height:1.45;overflow-wrap:anywhere;word-break:break-word}
.claim-account-score{padding:11px 18px}
.claim-account-controls{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 18px}
.claim-account-controls .btn{height:38px;font-size:10px}
.claim-account-vnc{margin-top:auto;padding:12px 18px 15px}
.claim-setup-button{min-height:40px;text-decoration:none;font-size:10px;letter-spacing:.045em}
.claim-account-vnc small{font-size:10px}
@media(min-width:1500px){.claim-account-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:860px){.claim-account-grid{grid-template-columns:1fr}}
@media(max-width:420px){.claim-account-head,.claim-account-health,.claim-account-meta,.claim-account-controls,.claim-account-vnc{padding-left:14px;padding-right:14px}}
