/* Dropper design system
   Dark and quiet in the spirit of Apple's and Google's own apps: the system font, flat surfaces
   instead of glows and shadows, one purple accent, and a few small animations that stay still
   when the system asks for reduced motion. */

@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --fill: rgba(118, 118, 128, .24);
  --fill-hover: rgba(118, 118, 128, .34);
  --field: var(--surface);
  --hover: rgba(255, 255, 255, .05);
  --sep: rgba(84, 84, 88, .5);
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, .62);
  --text-3: rgba(235, 235, 245, .34);

  --accent: #9a5cff;
  --accent-hover: #a874ff;
  --accent-text: #b38cff;
  --accent-tint: rgba(154, 92, 255, .18);
  --green: #30d158;
  --red: #ff453a;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --blue: #0a84ff;
  --teal: #64d2ff;
  --gray: #8e8e93;

  --r-card: 16px;
  --r-ctrl: 10px;

  --ease: cubic-bezier(.25, .1, .25, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.3, .6, 1);

  --font: -apple-system, BlinkMacSystemFont, "Inter Variable", "Inter", "Segoe UI Variable Text", "Segoe UI", Roboto, "Noto Sans", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Malgun Gothic", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono Variable", Menlo, Consolas, monospace;

  --sidebar: 240px;
  --gutter: clamp(16px, 3vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 400 14px/1.45 var(--font);
  letter-spacing: -.006em;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(154, 92, 255, .45); }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.hint { color: var(--text-2); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }
.between { justify-content: space-between; }
.mobile-only { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* tones: status colors for text and small marks */
.tone-green { color: var(--green); } .tone-red { color: var(--red); } .tone-orange { color: var(--orange); }
.tone-yellow { color: var(--yellow); } .tone-blue { color: var(--blue); } .tone-teal { color: var(--teal); }
.tone-accent { color: var(--accent-text); } .tone-gray { color: var(--gray); }

/* ------------------------------------------------------------------ shell */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 12px 14px; border-right: 1px solid var(--sep);
}
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 10px 12px; color: var(--text); font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand .logo { width: 26px; height: 26px; flex: none; color: var(--accent); }
.side-search {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 10px; margin-bottom: 8px;
  border-radius: var(--r-ctrl); background: var(--surface); color: var(--text-3); font-size: 13px; text-align: left;
  transition: color .2s var(--ease);
}
.side-search:hover { color: var(--text-2); }
.side-search .i { width: 16px; height: 16px; }
.side-search span { flex: 1; }
kbd { font: 500 11px var(--font); padding: 2px 6px; border-radius: 5px; background: var(--fill); color: var(--text-2); }

.nav { position: relative; display: grid; gap: 2px; }
.nav a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 10px; border-radius: 9px; color: var(--text-2); font-weight: 500;
  transition: color .2s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] .i { color: var(--accent-text); }
.nav-indicator {
  position: absolute; left: 0; right: 0; top: 0; height: 36px; border-radius: 9px; background: var(--surface);
  transform: translateY(calc(var(--i, 0) * 38px)); transition: transform .45s var(--spring);
}
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.nav .count.accent { color: var(--accent-text); }
.nav .count.bad { color: #fff; background: var(--red); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; }

.side-foot { margin-top: auto; }
.account { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-width: 0; }
.account b { display: block; font-size: 13px; font-weight: 600; }
.account span:not(.avatar) { display: block; font-size: 12px; color: var(--text-2); }
.avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text); font-weight: 600; font-size: 14px; text-transform: uppercase;
}
.avatar .i { width: 16px; height: 16px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 22px var(--gutter) 16px; border-bottom: 1px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.topbar.scrolled {
  background: rgba(0, 0, 0, .72); border-bottom-color: var(--sep);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.page-title { flex: 1; min-width: 0; }
.page-title h1, .mobile-title h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.page-title p { margin-top: 3px; color: var(--text-2); font-size: 13.5px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; padding: 4px var(--gutter) calc(48px + env(safe-area-inset-bottom)); }
.banners { display: grid; gap: 8px; padding: 0 var(--gutter); }
.banners:not(:empty) { margin-bottom: 16px; }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--text); background: var(--fill);
  transition: background-color .2s var(--ease), transform .15s var(--ease), opacity .2s;
}
.btn:hover { background: var(--fill-hover); color: var(--text); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn .i { width: 16px; height: 16px; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.sm .i { width: 15px; height: 15px; }
.btn.lg { height: 46px; padding: 0 24px; font-size: 16px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--red); background: rgba(255, 69, 58, .14); }
.btn.danger:hover { background: rgba(255, 69, 58, .22); }
.btn.plain { background: none; color: var(--accent-text); padding: 0 6px; }
.btn.plain:hover { color: var(--text); }
.btn.on { color: var(--yellow); }
.link { font-size: 13.5px; font-weight: 500; color: var(--accent-text); }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%;
  color: var(--text); background: var(--fill); transition: background-color .2s var(--ease), color .2s, transform .15s var(--ease);
}
.icon-btn:hover { background: var(--fill-hover); }
.icon-btn:active { transform: scale(.92); }
.icon-btn:disabled { opacity: .3; pointer-events: none; }
.icon-btn .i { width: 17px; height: 17px; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .i { width: 15px; height: 15px; }
.icon-btn.xs { width: 26px; height: 26px; background: none; color: var(--text-2); }
.icon-btn.xs:hover { background: var(--fill); color: var(--text); }
.icon-btn.xs .i { width: 15px; height: 15px; }
.icon-btn.on { color: var(--orange); background: rgba(255, 159, 10, .16); }
.icon-btn.star.on { color: var(--yellow); background: rgba(255, 214, 10, .14); }
.icon-btn.off { color: var(--red); background: rgba(255, 69, 58, .16); }
.spin .i, .i.spinning { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.state-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px;
  background: var(--fill); font-size: 13px; font-weight: 600; transition: background-color .2s var(--ease);
}
.state-pill:hover { background: var(--fill-hover); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); flex: none; }
.st-watching .dot { background: var(--green); }
.st-refreshing .dot, .st-starting .dot { background: var(--blue); animation: breathe 1.4s ease-in-out infinite; }
.st-idle .dot { background: var(--accent-text); }
.st-paused .dot { background: var(--orange); }
.st-login .dot, .st-offline .dot { background: var(--red); }
@keyframes breathe { 50% { opacity: .35; } }

/* a small live dot with one soft ring, used where something happens right now */
.pulse-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 2s var(--ease-out) infinite; }
@keyframes ping { from { transform: scale(1); opacity: .6; } to { transform: scale(2.6); opacity: 0; } }

.menu-wrap { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--fill); font-size: 13px; font-weight: 600; transition: background-color .2s var(--ease);
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: var(--fill-hover); }
.lang-btn .i { width: 16px; height: 16px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; max-height: min(70vh, 480px); overflow: auto;
  padding: 5px; border-radius: 12px; background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5); transform-origin: top right; animation: pop .22s var(--spring);
}
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.menu button { width: 100%; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 6px; border-radius: 7px; text-align: left; font-size: 14px; }
.menu button:hover { background: var(--accent); color: #fff; }
.menu button:hover .code { color: rgba(255, 255, 255, .7); }
.menu .chk { width: 15px; height: 15px; flex: none; }
.menu span:not(.code) { flex: 1; }
.menu .code { font-size: 11px; font-weight: 600; color: var(--text-3); }

.input, .select, textarea.input {
  width: 100%; height: 36px; padding: 0 12px; border-radius: var(--r-ctrl);
  background: var(--field); border: 0; color: var(--text); outline: none;
  transition: box-shadow .15s var(--ease);
}
.input::placeholder { color: var(--text-3); }
.input:focus, .select:focus-visible, textarea.input:focus { box-shadow: 0 0 0 2px var(--accent); }
textarea.input { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; font: 12.5px/1.5 var(--font-mono); }
.select {
  width: auto; min-width: 160px; padding-right: 32px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ebebf5' stroke-opacity='.6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m7 9 5-5 5 5'/><path d='m7 15 5 5 5-5'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
.select option { background: var(--surface-2); color: var(--text); }
.search { position: relative; flex: 1 1 220px; max-width: 360px; }
.search .i { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 34px; }

/* segmented control: equal segments, the thumb slides to the chosen one */
.seg {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; flex: none;
  padding: 2px; border-radius: 9px; background: var(--fill); max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg::before {
  content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n, 1));
  border-radius: 7px; background: #636366; transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .4s var(--spring);
}
.seg button { position: relative; z-index: 1; height: 28px; padding: 0 14px; border-radius: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--text); }
.seg button[aria-pressed="true"] { font-weight: 600; }
.seg button:active { opacity: .7; }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px; flex: none;
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.chip:hover { background: var(--surface-2); }
.chip:active { transform: scale(.96); }
.chip .i { width: 15px; height: 15px; }
.chip .n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip .cdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip[aria-pressed="true"] { background: var(--text); color: #000; }
.chip[aria-pressed="true"] .n { color: rgba(0, 0, 0, .5); }

/* switch, iOS style: green when on, the knob stretches while pressed */
.switch { position: relative; display: inline-flex; flex: none; width: 46px; height: 28px; cursor: pointer; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--fill-hover); transition: background-color .25s var(--ease); }
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 12px; background: #fff;
  transition: left .35s var(--spring), width .2s var(--ease);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { left: 20px; }
.switch input:active + span::after { width: 30px; }
.switch input:checked:active + span::after { left: 14px; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + span { opacity: .4; }
.inline-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; }

/* range slider */
.range { width: 100%; height: 22px; margin: 0; appearance: none; -webkit-appearance: none; background: none; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent)) 0 / var(--p, 50%) 100% no-repeat, var(--surface-3); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent)) 0 / var(--p, 50%) 100% no-repeat, var(--surface-3); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: #fff; border: 0; transition: transform .2s var(--spring); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; }
.range:active::-webkit-slider-thumb { transform: scale(1.12); }

/* tag input */
.taginput {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; padding: 4px;
  border-radius: var(--r-ctrl); background: var(--field); transition: box-shadow .15s var(--ease);
}
.taginput:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.tchip { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 4px 0 10px; border-radius: 7px; background: var(--surface-3); font-size: 13px; font-weight: 500; }
.tchip.is-new { animation: pop .3s var(--spring); }
.tchip button { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; color: var(--text-2); }
.tchip button:hover { background: var(--fill); color: var(--text); }
.tchip button .i { width: 12px; height: 12px; }
.taginput input { flex: 1; min-width: 140px; height: 28px; padding: 0 8px; border: 0; outline: none; background: none; color: var(--text); }
.taginput input::placeholder { color: var(--text-3); }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; max-height: 240px; overflow: auto; padding: 5px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  transform-origin: top center; animation: pop .2s var(--spring);
}
.suggest button { display: block; width: 100%; padding: 7px 10px; border-radius: 7px; text-align: left; font-size: 13.5px; }
.suggest button:hover { background: var(--accent); color: #fff; }

/* game art: the box art over the game's first letter, which shows until the image is there or without one */
.gart { position: relative; width: 26px; height: 35px; flex: none; display: grid; place-items: center; border-radius: 5px; overflow: hidden; background: var(--surface-3); }
.gart::before { content: attr(data-l); color: var(--text-2); font-size: 13px; font-weight: 600; text-transform: uppercase; }
.gart > img, .gart > span { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gart.plus { background: var(--accent-tint); color: var(--accent-text); }
.gart.plus .i { width: 15px; height: 15px; stroke-width: 2.4; }

/* the game field of the priority list: search known games and Twitch */
.game-add { padding-left: 32px; }
.game-add > .lead { position: absolute; left: 11px; top: 18px; width: 15px; height: 15px; margin-top: -7.5px; color: var(--text-3); pointer-events: none; }
.suggest.games { max-height: 340px; }
.suggest .sg { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.suggest .sg .gart { width: 24px; height: 32px; border-radius: 4px; }
.sg-text { flex: 1; min-width: 0; display: grid; }
.sg-text b { font-weight: 500; }
.sg-text small { color: var(--text-2); font-size: 12px; }
.suggest .sg:hover small { color: rgba(255, 255, 255, .8); }

/* ------------------------------------------------------------------ content */
.grid { display: grid; gap: 16px; }
.cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }

.card { position: relative; min-width: 0; padding: 18px; border-radius: var(--r-card); background: var(--surface); --field: var(--surface-2); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h3 { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 8px 2px 10px; }
.section-head h3 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.section-head span { color: var(--text-2); font-size: 13px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; max-width: 100%;
  font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text-2); background: var(--fill);
}
.tag .i { width: 12px; height: 12px; }
.tag > span:not(.pulse-dot) { overflow: hidden; text-overflow: ellipsis; }
.tag.green { color: var(--green); background: rgba(48, 209, 88, .14); }
.tag.red { color: #ff6961; background: rgba(255, 69, 58, .15); }
.tag.orange { color: var(--orange); background: rgba(255, 159, 10, .15); }
.tag.yellow { color: var(--yellow); background: rgba(255, 214, 10, .13); }
.tag.blue { color: #409cff; background: rgba(10, 132, 255, .16); }
.tag.teal { color: var(--teal); background: rgba(100, 210, 255, .13); }
.tag.accent { color: var(--accent-text); background: var(--accent-tint); }
.live-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: #eb0400; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.bar { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--accent); transition: width .6s var(--ease-out); }
.bar.green > i { background: var(--green); }
.bar.red > i { background: var(--red); }
.segments { display: flex; gap: 3px; width: 100%; }
.segments i { position: relative; flex: 1; height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.segments b { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--accent); transition: width .6s var(--ease-out); }
.segments i.done b { width: 100%; background: var(--green); }

.empty { display: grid; justify-items: center; gap: 8px; padding: 28px 12px; text-align: center; color: var(--text-2); font-size: 13.5px; }
.empty .i { width: 28px; height: 28px; color: var(--text-3); }
.sk { border-radius: 8px; background: var(--surface-2); animation: breathe 1.6s ease-in-out infinite; }

.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 69, 58, .13); }
.banner .bicon { display: grid; color: var(--red); }
.banner .bicon .i { width: 20px; height: 20px; }
.banner b { display: block; font-weight: 600; }
.banner p { color: var(--text-2); font-size: 13px; }
.banner b + p { margin-top: 1px; }
.banner.accent { background: var(--accent-tint); }
.banner.accent .bicon { color: var(--accent-text); }
.banner.orange { background: rgba(255, 159, 10, .13); }
.banner.orange .bicon { color: var(--orange); }

/* lists inside cards: rows with hairlines that start where the text starts */
.list { display: grid; }
.item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 0; min-width: 0; }
.item + .item::before { content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 0); height: 1px; background: var(--sep); }
.item-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.item-main b { font-weight: 600; }
.item-main > span { color: var(--text-2); font-size: 13px; }
.item-main .bar { margin-top: 4px; }
.item-side { display: grid; justify-items: end; gap: 1px; flex: none; color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.item-side b { color: var(--text); font-weight: 600; font-size: 13.5px; }
.item-num { color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.art { width: 36px; height: 48px; flex: none; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.pos { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--fill); }
.pos.on { background: var(--accent); color: #fff; }
.queue .item + .item::before { left: 82px; }
.hicon { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(48, 209, 88, .16); color: var(--green); }
.hicon.bad { background: rgba(255, 69, 58, .16); color: var(--red); }
.hicon .i { width: 14px; height: 14px; stroke-width: 2.4; }
.history .item + .item::before { left: 40px; }
.more-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--accent-text); }
.more-btn .i { width: 15px; height: 15px; transition: transform .3s var(--spring); }
.more-btn.open .i { transform: rotate(180deg); }

/* ------------------------------------------------------------------ overview */
.now { padding: 16px; container-type: inline-size; }
.now-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
  grid-template-areas: "media body" "why body"; gap: 14px 18px; height: 100%;
}
.now-media { grid-area: media; }
.now-body { grid-area: body; }
.now-grid > .why { grid-area: why; }
.now-media { position: relative; display: block; align-self: start; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.now-media img { width: 100%; height: 100%; object-fit: cover; }
.now-media .live-badge { position: absolute; left: 10px; top: 10px; }
.now-media .viewers {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px;
  border-radius: 6px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12.5px; font-weight: 600;
}
.now-media .viewers .i { width: 14px; height: 14px; }
.now-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 2px 4px 2px 0; }
.caption { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.now-body h2 { font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; overflow-wrap: anywhere; }
.now-body h2 a { color: var(--text); }
.now-body h2 a:hover { color: var(--accent-text); }
.now-game { color: var(--text); font-weight: 500; }
.now-title { color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.why { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.why h4 { margin-bottom: 3px; color: var(--text); font-size: 13px; font-weight: 600; }
.why b { color: var(--text); font-weight: 600; }
.now-body > .row { margin-top: auto; padding-top: 12px; }
@container (max-width: 600px) {
  .now-grid { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "media" "body" "why"; gap: 14px; }
  .now-body { padding: 0; }
  .now-grid > .why { padding-top: 12px; border-top: 1px solid var(--sep); }
}

.idle { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 280px; padding: 24px 16px; text-align: center; }
.idle h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.idle p { max-width: 460px; color: var(--text-2); }
.idle .row { margin-top: 10px; }
.idle-icon { width: 44px; height: 44px; color: var(--text-3); stroke-width: 1.5; margin-bottom: 6px; }
.idle-art { width: 72px; height: 72px; margin-bottom: 2px; overflow: visible; }
.idle-art .cloud { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linejoin: round; }
.idle-art .drip { stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; animation: drip 1.5s cubic-bezier(.5, 0, .9, .6) infinite; opacity: 0; }
.idle-art .drip:nth-of-type(2) { animation-delay: .5s; }
.idle-art .drip:nth-of-type(3) { animation-delay: 1s; }
@keyframes drip { 0% { transform: translateY(-5px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }

.drop-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.drop-card .card-head { align-self: stretch; text-align: left; }
.ring { position: relative; width: 168px; height: 168px; margin: 2px 0 12px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--fill); }
.ring .arc { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease-out); }
.ring.full .arc { stroke: var(--green); }
.ring-img { position: absolute; inset: 0; display: grid; place-items: center; }
.ring-img img { width: 76px; height: 76px; object-fit: contain; }
.drop-pct { font-size: 30px; line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.drop-card h4 { margin-top: 8px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.drop-meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; color: var(--text-2); font-size: 13px; }
.drop-card .segments { margin-top: 16px; }
.drop-card .empty { flex: 1; align-content: center; }
.drop-camp { margin-top: 8px; max-width: 100%; color: var(--text-3); font-size: 12.5px; }

.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { --tone: var(--accent-text); display: flex; flex-direction: column; gap: 4px; min-height: 124px; overflow: hidden; color: var(--text); transition: background-color .2s var(--ease); }
a.kpi:hover { background: #232325; color: var(--text); }
.kpi-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tone); }
.kpi-head .i { width: 15px; height: 15px; stroke-width: 2.2; }
.kpi-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-head .chev { color: var(--text-3); }
.kpi-value { margin-top: 6px; font-size: 30px; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-value small { margin-left: 3px; font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.kpi-sub { margin-top: auto; padding-right: 72px; color: var(--text-2); font-size: 12.5px; }
.kpi:not(:has(.mini-bars)) .kpi-sub { padding-right: 0; }
.mini-bars { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.mini-bars i { width: 6px; height: var(--h); border-radius: 3px; background: var(--surface-3); transform-origin: bottom; animation: grow .5s var(--spring) both; animation-delay: calc(var(--k, 0) * 40ms); transition: height .4s var(--ease-out); }
.mini-bars i.cur { background: var(--tone); }
@keyframes grow { from { transform: scaleY(0); } }

.claims { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 14px 10px; }
.claim { display: grid; justify-items: center; gap: 5px; text-align: center; color: var(--text); min-width: 0; }
.claim:hover { color: var(--text); }
.claim-img { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); transition: transform .3s var(--spring); }
.claim:hover .claim-img { transform: scale(1.06); }
.claim.is-new .claim-img { animation: pop .45s var(--spring); }
.claim-img img { width: 46px; height: 46px; object-fit: contain; }
.claim-name { font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.claim time { color: var(--text-3); font-size: 11.5px; }

/* ------------------------------------------------------------------ toolbars, drops */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* games on the priority list without a campaign, on the campaigns page */
.waitlist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.watching-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 2px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.watching-label .i { width: 15px; height: 15px; }
.wchip { display: inline-flex; align-items: center; gap: 8px; max-width: 220px; height: 32px; padding: 0 10px 0 4px; border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 500; }
.wchip .gart { width: 18px; height: 24px; border-radius: 3px; }
.wchip .gart::before { font-size: 10px; }
.wchip.is-new { animation: pop .3s var(--spring); }
.watching-edit { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; font-size: 13px; font-weight: 500; }
.watching-edit .i { width: 14px; height: 14px; }
.note { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; }
.note .ndot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.note.on .ndot { background: var(--green); }

.drops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; align-items: start; }
.dcard { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.dcard-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.reward-img { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.reward-img img { width: 44px; height: 44px; object-fit: contain; }
.dcard-title { display: grid; gap: 2px; min-width: 0; }
.dcard-title b { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.dcard-title span { color: var(--text-2); font-size: 13px; }
.prog { display: grid; gap: 6px; }
.prog-text { display: flex; justify-content: space-between; color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dcard-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.status .i { width: 15px; height: 15px; stroke-width: 2.2; }
.dcard-foot .when { color: var(--text-2); }
.live-label { display: inline-flex; align-items: center; gap: 7px; height: 30px; color: var(--green); font-size: 13px; font-weight: 600; }
.s-expired, .s-missed, .s-other { opacity: .6; }
.errbox { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: rgba(255, 69, 58, .12); font-size: 13px; }
.errbox b { color: #ff6961; font-weight: 600; }
.errbox .tries { color: var(--text-2); font-size: 12px; }
.errbox p { color: var(--text-2); }
.errbox code { justify-self: start; margin-top: 2px; padding: 2px 6px; border-radius: 5px; background: rgba(0, 0, 0, .3); font: 12px var(--font-mono); color: #ffb4ad; overflow-wrap: anywhere; }

.list-card { padding-top: 6px; padding-bottom: 10px; }
.collection { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px 12px; }
.reward-card { position: relative; display: grid; justify-items: center; gap: 3px; text-align: center; min-width: 0; }
.reward-card .reward-img { position: relative; width: 72px; height: 72px; border-radius: 16px; margin-bottom: 4px; }
.reward-card .reward-img img { width: 54px; height: 54px; }
.reward-card b { font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reward-card > span { color: var(--text-2); font-size: 11.5px; }
.reward-card .date { color: var(--text-3); }
.reward-card .cnt { position: absolute; right: -6px; top: -6px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); font-size: 11px; font-weight: 600; }
.reward-card .lk { position: absolute; left: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #000; }
.reward-card .lk .i { width: 12px; height: 12px; stroke-width: 2.4; }

/* ------------------------------------------------------------------ campaigns */
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 12px; align-items: start; }
.camp { display: flex; flex-direction: column; gap: 14px; padding: 16px; transition: opacity .2s var(--ease); }
.camp.mining { box-shadow: inset 0 0 0 1.5px var(--accent); }
.camp.dim { opacity: .55; }
.camp.dim:hover { opacity: 1; }
.camp-head { display: flex; gap: 12px; align-items: flex-start; }
.camp-head .art { width: 54px; height: 72px; border-radius: 8px; }
.camp-ttl { flex: 1; min-width: 0; display: grid; gap: 2px; }
.camp-ttl .game { color: var(--text-2); font-size: 13px; }
.camp-ttl h4 { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-2); font-size: 12.5px; }
.meta > * { display: inline-flex; align-items: center; gap: 5px; }
.meta .i { width: 14px; height: 14px; }
.camp-drops { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--sep); }
.cdrop { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.cdrop-img { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); }
.cdrop-img img { width: 26px; height: 26px; object-fit: contain; }
.cdrop-main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.cdrop .st { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12px; font-weight: 500; white-space: nowrap; }
.cdrop .st .i { width: 14px; height: 14px; }
.camp-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.camp-foot .skip { flex: 1; min-width: 150px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; }
.camp-foot .skip .i { width: 14px; height: 14px; color: var(--orange); }
.camp-foot .acts { display: flex; gap: 6px; margin-left: auto; }

/* ------------------------------------------------------------------ channels */
.ch-table-wrap { padding: 0; overflow: auto; }
.ch-table { width: 100%; border-collapse: collapse; }
.ch-table th { position: sticky; top: 0; z-index: 1; padding: 12px 14px 10px; text-align: left; font-size: 12px; font-weight: 500; color: var(--text-2); background: var(--surface); border-bottom: 1px solid var(--sep); white-space: nowrap; }
.ch-table td { padding: 10px 14px; border-bottom: 1px solid var(--sep); vertical-align: middle; }
.ch-table tbody tr:last-child td { border-bottom: 0; }
.ch-table tbody tr { transition: background-color .15s var(--ease); }
.ch-table tbody tr:hover { background: var(--hover); }
.ch-table tr.watching { background: rgba(48, 209, 88, .07); }
.ch-table tr.offline { opacity: .5; }
.ch-table td.muted { font-size: 13px; }
.ch-cell { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.ch-thumb { position: relative; width: 96px; height: 54px; flex: none; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.ch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ch-thumb .live-badge { position: absolute; left: 5px; top: 5px; height: 16px; padding: 0 4px; font-size: 9.5px; }
.ch-name { display: grid; gap: 3px; min-width: 0; }
.ch-name a { color: var(--text); font-weight: 600; }
.ch-name a:hover { color: var(--accent-text); }
.ch-name small { max-width: 320px; color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-camps { display: flex; flex-wrap: wrap; gap: 5px; max-width: 420px; }
.ch-camps .reason { width: 100%; color: var(--text-2); font-size: 12px; }
.ch-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.ch-cards { display: none; gap: 12px; }
.ch-card { display: grid; gap: 12px; padding: 14px; }
.ch-card .ch-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; }
.ch-card .ch-thumb .live-badge { left: 8px; top: 8px; height: 20px; padding: 0 6px; font-size: 11px; }

/* ------------------------------------------------------------------ stats */
.legend { display: flex; gap: 14px; color: var(--text-2); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chart { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: 220px auto; }
.chart-y { position: relative; }
.chart-y span { position: absolute; right: 8px; bottom: var(--y); transform: translateY(50%); color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; }
.chart-plot .gl { position: absolute; left: 0; right: 0; bottom: var(--y); height: 1px; background: var(--sep); }
.chart-plot .gl:first-child { background: rgba(84, 84, 88, .9); }
.chart-bars { position: absolute; inset: 0; display: flex; align-items: stretch; }
.col { position: relative; flex: 1; min-width: 0; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.col .b {
  width: min(64%, 30px); height: var(--h); min-height: 0; border-radius: 4px 4px 1px 1px; background: var(--accent);
  transform-origin: bottom; animation: grow .55s var(--spring) both; animation-delay: calc(min(var(--k, 0), 40) * 10ms);
  transition: opacity .15s var(--ease);
}
.col .dot { position: absolute; left: 50%; bottom: calc(var(--h) + 5px); width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--green); }
.chart.hovering .col:not(.hl) .b { opacity: .35; }
.chart-tip {
  position: absolute; left: var(--x); bottom: calc(var(--h) + 16px); z-index: 2; transform: translateX(-50%); pointer-events: none;
  padding: 7px 10px; border-radius: 9px; background: var(--surface-3); font-size: 12px; white-space: nowrap; color: var(--text-2);
}
.chart-tip.l { transform: translateX(-14px); }
.chart-tip.r { transform: translateX(calc(-100% + 14px)); }
.chart-tip b { display: block; color: var(--text); font-size: 12.5px; font-weight: 600; }
.chart-x { grid-column: 2; display: flex; padding-top: 7px; }
.chart-x span { flex: 1; min-width: 0; text-align: center; color: var(--text-3); font-size: 11px; white-space: nowrap; overflow: visible; }
.stat-list .item + .item::before { left: 48px; }
.stat-list.plain .item + .item::before { left: 0; }
.stat-list a { color: var(--text); }
.stat-list a:hover { color: var(--accent-text); }

/* ------------------------------------------------------------------ settings: grouped lists */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; align-items: start; }
.settings-col { display: grid; gap: 26px; }
.group-title { margin: 0 16px 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.group { border-radius: 12px; background: var(--surface); --field: var(--surface-2); }
.group-foot { margin: 7px 16px 0; color: var(--text-2); font-size: 12.5px; }
.cell { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px; width: 100%; text-align: left; }
.cell + .cell::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
label.cell { cursor: pointer; }
.cell:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.cell:last-child { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.cell.action { color: var(--accent-text); font-size: 14px; font-weight: 500; transition: background-color .15s var(--ease); }
.cell.action:hover { background: var(--hover); }
.cell.action:disabled { opacity: .6; }
.cell-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cell b { font-weight: 500; font-size: 14px; }
.cell small { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.cell.stack { display: grid; gap: 8px; align-items: stretch; }
.cell.stack > small { margin-top: -2px; }
.cell small.bad { color: var(--red); }
.cell.pic-cell { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.avatar.pic { width: 44px; height: 44px; object-fit: cover; }
.pic-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cell-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cell output { color: var(--text-2); font-variant-numeric: tabular-nums; }
.cell .select { max-width: 60%; }
.cell.dim .cell-text { opacity: .5; }
.cell.choice { transition: background-color .15s var(--ease); }
.cell.choice:hover { background: var(--hover); }
.cell.choice .chk { width: 18px; height: 18px; color: var(--accent-text); stroke-width: 2.4; opacity: 0; transform: scale(.5); transition: opacity .2s var(--ease), transform .3s var(--spring); }
.cell.choice[aria-pressed="true"] .chk { opacity: 1; transform: none; }
.prio-list { display: grid; gap: 2px; }
.prio-item { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 7px 4px 7px 8px; border-radius: 10px; background: var(--surface-2); }
.prio-item .ord { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; }
.prio-item.is-new { animation: pop .3s var(--spring); }
.prio-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.prio-text b { font-weight: 500; font-size: 14px; }
.wstate { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); font-size: 12px; }
.wstate i { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--tone); }
.savebar {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 999px; max-width: calc(100vw - 32px);
  background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  transform: translate(-50%, calc(100% + 140px)); visibility: hidden;
  transition: transform .5s var(--spring), visibility 0s .5s;
}
.savebar.show { transform: translate(-50%, 0); visibility: visible; transition: transform .5s var(--spring); }
.savebar-text { display: flex; align-items: center; gap: 8px; margin-right: 8px; font-weight: 600; white-space: nowrap; }
.savebar-text .dot { background: var(--orange); }

/* ------------------------------------------------------------------ log */
.log { padding: 0; overflow: hidden; }
.log-head { padding: 12px 16px; color: var(--text-2); font-size: 12.5px; border-bottom: 1px solid var(--sep); }
.log-body { height: min(66vh, 720px); overflow: auto; padding: 8px 0 12px; font: 12.5px/1.6 var(--font-mono); }
.lline { display: grid; grid-template-columns: 70px 66px minmax(0, 1fr); gap: 10px; padding: 1px 16px; }
.lline:hover { background: var(--hover); }
.lline.is-new { animation: flash 1.2s var(--ease) both; }
@keyframes flash { from { background: rgba(154, 92, 255, .14); } }
.lline time { color: var(--text-3); white-space: nowrap; }
.lline .lv { font-size: 11px; font-weight: 600; color: var(--text-3); }
.lline .msg { color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.lv-WARNING .lv { color: var(--orange); }
.lv-ERROR .lv, .lv-CRITICAL .lv { color: var(--red); }
.lv-ERROR .msg, .lv-CRITICAL .msg { color: #ff8f88; }

/* ------------------------------------------------------------------ login */
.login { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px 16px; overflow: auto; background: var(--bg); }
.login.leaving { animation: leave .35s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: scale(1.02); } }
.login-top { position: absolute; top: 16px; right: 16px; }
.login-card { width: min(460px, 100%); display: grid; gap: 18px; text-align: center; }
.login-logo { width: 56px; height: 56px; margin: 0 auto 2px; color: var(--accent); }
.login-card h2 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.login-card .lead { margin-top: -8px; color: var(--text-2); font-size: 15px; }
.login-steps { text-align: left; }
.login-steps .cell { padding: 16px; gap: 12px; }
.step-head { display: flex; align-items: center; gap: 10px; }
.step-head b { font-weight: 600; }
.step-head .n { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; font-weight: 600; }
.login-steps .btn { justify-self: stretch; }
.login-steps .btn.sm { justify-self: center; }
.code { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 14px; padding: 4px 0; }
.code .grp { display: flex; gap: 6px; }
.code .grp span {
  width: 38px; height: 50px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2);
  font: 600 26px var(--font-mono); animation: reveal .45s var(--spring) both; animation-delay: calc(var(--d) * 45ms);
}
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.code.skeleton .grp span { animation: breathe 1.6s ease-in-out infinite; }
.login-meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; color: var(--text-2); font-size: 13px; }
.login-meta .errbox { width: 100%; text-align: left; }
.waiting { display: inline-flex; align-items: center; gap: 9px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); animation: hop 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 0%, 80%, 100% { transform: none; opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }
.mini-ring { width: 16px; height: 16px; transform: rotate(-90deg); }
.mini-ring circle { fill: none; stroke-width: 3; }
.mini-ring .t { stroke: var(--fill); }
.mini-ring .b { stroke: var(--accent-text); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.login-note { display: flex; justify-content: center; align-items: flex-start; gap: 8px; color: var(--text-3); font-size: 12.5px; }
.login-note .i { width: 15px; height: 15px; margin-top: 1px; color: var(--green); }

/* ------------------------------------------------------------------ toasts, alert, palette, sheet */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  animation: toastIn .45s var(--spring) both;
}
.toast.out { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: scale(.96); } }
.toast .ticon { position: relative; width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--fill); color: var(--text); }
.toast .ticon .i { width: 16px; height: 16px; }
.toast .ticon img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
.toast.good .ticon { background: rgba(48, 209, 88, .16); color: var(--green); }
.toast.bad .ticon { background: rgba(255, 69, 58, .16); color: var(--red); }
.toast.party .ticon { background: var(--accent-tint); color: var(--accent-text); animation: bump .5s var(--spring) .1s both; }
.toast.party .ticon:has(img) { background: none; }
@keyframes bump { from { transform: scale(.4); } }
.toast b { display: block; font-size: 14px; font-weight: 600; }
.toast p { margin-top: 1px; color: var(--text-2); font-size: 13px; }
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i {
  position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--accent-text);
  transform: rotate(var(--a)) translateY(0); animation: burst .7s var(--ease-out) .15s both;
}
.burst i:nth-child(even) { background: var(--yellow); width: 4px; height: 4px; margin: -2px; }
@keyframes burst { from { transform: rotate(var(--a)) translateY(-8px); opacity: 1; } to { transform: rotate(var(--a)) translateY(-28px) scale(.3); opacity: 0; } }

.modal-bg { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .55); animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.alert { width: min(300px, 100%); border-radius: 16px; background: var(--surface-2); text-align: center; overflow: hidden; animation: alertIn .3s var(--spring); }
@keyframes alertIn { from { opacity: 0; transform: scale(1.12); } }
.alert-body { display: grid; gap: 6px; padding: 20px 18px 18px; }
.alert-body h3 { font-size: 17px; font-weight: 600; }
.alert-body p { color: var(--text-2); font-size: 13px; }
.alert-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(84, 84, 88, .7); }
.alert-actions button { height: 46px; font-size: 16px; color: var(--accent-text); transition: background-color .15s; }
.alert-actions button + button { border-left: 1px solid rgba(84, 84, 88, .7); }
.alert-actions button:hover { background: var(--hover); }
.alert-actions .strong { font-weight: 600; }
.alert-actions .danger { color: var(--red); font-weight: 600; }

.palette-bg { align-items: start; padding-top: 14vh; }
.palette { width: min(580px, 100%); border-radius: 14px; background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .08); overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); animation: pop .25s var(--spring); }
.pinput { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--sep); }
.pinput .i { width: 20px; height: 20px; color: var(--text-2); }
.pinput input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 18px; }
.pinput input::placeholder { color: var(--text-3); }
.plist { max-height: 50vh; overflow: auto; padding: 6px; }
.pitem { width: 100%; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 8px; text-align: left; font-size: 14px; }
.pitem .i { width: 17px; height: 17px; color: var(--text-2); }
.pitem small { margin-left: auto; color: var(--text-3); font-size: 12px; }
.pitem.hl { background: var(--accent); color: #fff; }
.pitem.hl .i, .pitem.hl small { color: rgba(255, 255, 255, .8); }

.sheet-bg { background: rgba(0, 0, 0, .45); }
.sheet { position: fixed; left: 10px; right: 10px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 86; animation: sheetIn .4s var(--spring); }
@keyframes sheetIn { from { transform: translateY(24px); opacity: 0; } }
.sheet .group { background: var(--surface-2); border-radius: 16px; }
.sheet a, .sheet button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 50px; padding: 0 16px; color: var(--text); font-size: 16px; text-align: left; }
.sheet a + a::before, .sheet a + button::before { content: ""; position: absolute; top: 0; left: 46px; right: 0; height: 1px; background: rgba(84, 84, 88, .6); }
.sheet .i { color: var(--text-2); }
.sheet a[aria-current="page"], .sheet a[aria-current="page"] .i { color: var(--accent-text); }

/* ------------------------------------------------------------------ tab bar (phones) */
.tabbar { display: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  :root { --sidebar: 72px; }
  .sidebar { align-items: center; padding: 18px 10px; }
  .sidebar .brand { padding: 4px 0 12px; }
  .sidebar .brand span, .side-search, .nav a span, .nav .count:not(.bad), .account > div { display: none; }
  .nav { width: 100%; }
  .nav a { justify-content: center; padding: 0; }
  .nav a .i { width: 20px; height: 20px; }
  .nav .count.bad { position: absolute; top: 1px; left: calc(50% + 3px); min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }
  .account { padding: 8px 0; }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .settings { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .app { grid-template-columns: 1fr; }
  .sidebar, .desk-only, .page-title { display: none !important; }
  .mobile-only { display: flex !important; }
  .topbar { justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px; }
  .topbar .brand { padding: 0; font-size: 17px; }
  .mobile-title { padding: 6px var(--gutter) 14px; }
  .mobile-title h1 { font-size: 30px; }
  .view { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
  .kpis { gap: 12px; }
  .kpi { min-height: 116px; padding: 14px; }
  .kpi-value { font-size: 26px; }
  .kpi-sub { padding-right: 0; }
  .mini-bars { display: none; }
  .now { padding: 14px; }
  .now-body h2 { font-size: 23px; }
  .camp-grid, .drops-grid { grid-template-columns: 1fr; }
  .ch-table-wrap { display: none; }
  .ch-cards { display: grid; }
  .search { max-width: none; flex-basis: 100%; }
  .toolbar .select { flex: 1; }
  .toolbar .seg { max-width: 100%; }
  .banner { flex-wrap: wrap; }
  .banner .btn { width: 100%; }
  .tabbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
    display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px; border-radius: 999px;
    background: rgba(30, 30, 32, .82); border: 1px solid rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  }
  .tabbar::before {
    content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 5); border-radius: 999px;
    background: rgba(255, 255, 255, .1); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .45s var(--spring);
  }
  .tabbar a, .tabbar button { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2px; padding: 7px 2px 6px; border-radius: 999px; color: var(--text-2); font-size: 10.5px; font-weight: 600; }
  .tabbar .i { width: 22px; height: 22px; transition: transform .35s var(--spring); }
  .tabbar [aria-current="page"] { color: var(--accent-text); }
  .tabbar a:active .i, .tabbar button:active .i { transform: scale(.85); }
  .tabbar [data-badge]::after { content: ""; position: absolute; top: 5px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
  .toasts { left: 50%; right: auto; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
  .savebar { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .lline { grid-template-columns: 60px minmax(0, 1fr); padding: 1px 12px; }
  .lline .lv { display: none; }
  .login { place-items: start center; padding-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .pulse-dot::after, .idle-art .drip { display: none; }
}
