/* Cardinal — liquid glass ---------------------------------------------------- */
:root {
  --bg: #eef0f6;
  --blob-1: #c9d4ff; --blob-2: #bff0e2; --blob-3: #ffdcc4;
  --glass: rgba(255, 255, 255, .58);
  --glass-2: rgba(255, 255, 255, .42);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-line: rgba(255, 255, 255, .75);
  --glass-edge: rgba(20, 30, 60, .07);
  --surface: #ffffff;
  --surface-2: rgba(20, 30, 60, .045);
  --surface-3: rgba(20, 30, 60, .08);
  --border: rgba(20, 30, 60, .08);
  --border-2: rgba(20, 30, 60, .14);
  --text: #0e1220;
  --text-2: #4d5568;
  --text-3: #8a91a3;
  --brand: #3457f0;
  --brand-ink: #fff;
  --brand-soft: rgba(52, 87, 240, .11);
  --good: #0a8f5c;
  --good-2: #16c784;
  --good-soft: rgba(22, 199, 132, .14);
  --warn: #b0620a;
  --warn-soft: rgba(245, 158, 11, .16);
  --bad: #d13a3a;
  --bad-soft: rgba(220, 60, 60, .12);
  --photo: #11141c;
  --shadow: 0 10px 30px rgba(20, 30, 60, .08), 0 1px 2px rgba(20, 30, 60, .04);
  --shadow-lg: 0 30px 80px rgba(20, 30, 60, .25);
  --r: 18px; --r-lg: 26px; --r-xl: 32px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --blur: blur(28px) saturate(1.7);
  color-scheme: light;
}
.dark-tokens {}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090b12; --blob-1: #1a2560; --blob-2: #0d3a35; --blob-3: #3a1f1a;
    --glass: rgba(26, 30, 42, .58); --glass-2: rgba(26, 30, 42, .42); --glass-strong: rgba(28, 32, 46, .82);
    --glass-line: rgba(255, 255, 255, .09); --glass-edge: rgba(0, 0, 0, .35);
    --surface: #161a24; --surface-2: rgba(255, 255, 255, .05); --surface-3: rgba(255, 255, 255, .09);
    --border: rgba(255, 255, 255, .08); --border-2: rgba(255, 255, 255, .15);
    --text: #eef0f5; --text-2: #a6adbd; --text-3: #6c7385; --brand: #8aa0ff; --brand-ink: #0b0d14; --brand-soft: rgba(138, 160, 255, .14);
    --good: #3fd59a; --good-2: #3fd59a; --good-soft: rgba(63, 213, 154, .14); --warn: #f5b454; --warn-soft: rgba(245, 180, 84, .14);
    --bad: #ff7b7b; --bad-soft: rgba(255, 123, 123, .14); --photo: #0b0d12;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090b12; --blob-1: #1a2560; --blob-2: #0d3a35; --blob-3: #3a1f1a;
  --glass: rgba(26, 30, 42, .58); --glass-2: rgba(26, 30, 42, .42); --glass-strong: rgba(28, 32, 46, .82);
  --glass-line: rgba(255, 255, 255, .09); --glass-edge: rgba(0, 0, 0, .35);
  --surface: #161a24; --surface-2: rgba(255, 255, 255, .05); --surface-3: rgba(255, 255, 255, .09);
  --border: rgba(255, 255, 255, .08); --border-2: rgba(255, 255, 255, .15);
  --text: #eef0f5; --text-2: #a6adbd; --text-3: #6c7385; --brand: #8aa0ff; --brand-ink: #0b0d14; --brand-soft: rgba(138, 160, 255, .14);
  --good: #3fd59a; --good-2: #3fd59a; --good-soft: rgba(63, 213, 154, .14); --warn: #f5b454; --warn-soft: rgba(245, 180, 84, .14);
  --bad: #ff7b7b; --bad-soft: rgba(255, 123, 123, .14); --photo: #0b0d12;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6); color-scheme: dark;
}

/* base ----------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  letter-spacing: -.005em;
}
body::before {
  content: ""; position: fixed; inset: -20vh -20vw; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vw 42vw at 12% 8%, var(--blob-1), transparent 65%),
    radial-gradient(38vw 38vw at 88% 18%, var(--blob-2), transparent 62%),
    radial-gradient(44vw 44vw at 60% 100%, var(--blob-3), transparent 64%);
  filter: blur(40px); opacity: .9;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.025em; }
h1 { font-size: 30px; font-weight: 760; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
img { display: block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; }
::selection { background: var(--brand-soft); }

/* glass primitive ------------------------------------------------------------- */
.glass, .panel, .rail, .topbar, .tabbar, .drawer, .modal, .toast, .savebar, .kpi, .dcard, .auth-card, .status-menu {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-line);
}

/* frame ------------------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; gap: 0; }
.rail {
  position: sticky; top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px; border-radius: var(--r-xl);
  display: flex; flex-direction: column; gap: 4px; padding: 18px 14px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 4px 12px rgba(52, 87, 240, .3); }
.brand small { display: block; font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.nav a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 13px; border-radius: 14px; color: var(--text-2); font-weight: 580; text-decoration: none; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 10px rgba(20, 30, 60, .08), inset 0 1px 0 var(--glass-line); }
.nav a.active svg { color: var(--brand); }
.nav a .count { margin-left: auto; min-width: 22px; height: 21px; padding: 0 7px; border-radius: 11px; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; background: var(--brand); color: var(--brand-ink); }
.nav a .count.quiet { background: var(--surface-3); color: var(--text-2); }
.rail .grow { flex: 1; }

.agent-card { border-radius: var(--r); padding: 12px 13px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.agent-card .head { display: flex; align-items: center; gap: 10px; }
.agent-card .head b { display: block; font-weight: 650; font-size: 14px; }
.agent-card .head small { display: block; font-size: 12px; color: var(--text-3); }
.agent-card .orb { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); flex: none; }
.agent-card .orb.on { background: var(--good-soft); color: var(--good); box-shadow: 0 0 0 4px rgba(22, 199, 132, .12); }
.agent-card .orb svg { width: 16px; height: 16px; }
.meter-row .lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.meter { height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.meter > div { height: 100%; border-radius: 5px; background: var(--brand); transition: width .4s; }
.meter.good > div { background: var(--good-2); }
.meter.warn > div { background: var(--warn); }

.me { display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; cursor: pointer; border-radius: 12px; }
.me .who { flex: 1; min-width: 0; }
.me .who b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { color: var(--text-3); font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 13px; background: linear-gradient(135deg, #4f6cf5, #9b5cf6); color: #fff; flex: none; }
.avatar.lg { width: 46px; height: 46px; font-size: 16px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 14px; z-index: 30; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 10px 0 10px;
  margin: 14px 14px 0 14px; border-radius: 999px;
}
.topbar .mobile-brand { display: none; }
.status { display: flex; align-items: center; gap: 11px; min-width: 0; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; border: 0; background: transparent; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.status:hover { background: var(--surface-2); }
.status .txt { min-width: 0; }
.status .t1 { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.status .t2 { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status .chev { color: var(--text-3); }
.status .chev svg { width: 14px; height: 14px; }
.pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); flex: none; }
.pulse.on { background: var(--good-2); }
.pulse.on::after, .pulse.busy::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: ring 2s ease-out infinite; }
.pulse.on::after { color: var(--good-2); }
.pulse.busy { background: var(--brand); }
.pulse.busy::after { color: var(--brand); animation-duration: 1.1s; }
.pulse.warn { background: var(--warn); }
@keyframes ring { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.topbar .spacer { flex: 1; }
.topbar .actions { display: flex; gap: 6px; align-items: center; }
.status-menu { position: absolute; top: 52px; left: 0; min-width: 260px; border-radius: 20px; padding: 8px; z-index: 40; background: color-mix(in srgb, var(--surface) 94%, transparent); display: flex; flex-direction: column; gap: 2px; animation: pop .16s cubic-bezier(.2, .9, .3, 1.2); }
.status-menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-weight: 580; cursor: pointer; text-align: left; }
.status-menu button:hover { background: var(--surface-2); }
.status-menu button:disabled { opacity: .45; cursor: default; }
.status-menu .sep { height: 1px; background: var(--border); margin: 6px 4px; }
.status-menu .note { padding: 6px 12px 8px; font-size: 12px; color: var(--text-3); }
.content { padding: 26px 28px 80px; max-width: 1320px; width: 100%; }

.tabbar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar { margin: 10px 10px 0; height: 52px; }
  .topbar .mobile-brand { display: block; width: 30px; height: 30px; border-radius: 9px; margin-left: 4px; }
  .content { padding: 18px 14px 120px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 12px; left: 12px; right: 12px; z-index: 40;
    border-radius: 24px; padding: 6px 4px;
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 5px; color: var(--text-3); font-size: 11px; font-weight: 600; text-decoration: none; position: relative; border-radius: 16px; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--brand); }
  .tabbar a .count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-size: 10px; display: grid; place-items: center; }
  .btn .label-wide { display: none; }
  h1 { font-size: 24px; }
  .status-menu { left: 10px; right: 10px; }
}

/* controls ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--glass-strong); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  white-space: nowrap; text-decoration: none !important; transition: transform .06s, background .12s; box-shadow: inset 0 1px 0 var(--glass-line);
}
.btn:hover { background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--brand); border-color: transparent; color: var(--brand-ink); box-shadow: 0 6px 18px rgba(52, 87, 240, .3); }
.btn.primary:hover { filter: brightness(1.07); background: var(--brand); }
.btn.buy { background: var(--good); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(10, 143, 92, .25); }
:root[data-theme="dark"] .btn.buy { color: #04140d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.buy { color: #04140d; } }
.btn.buy:hover { filter: brightness(1.07); background: var(--good); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13.5px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 34px; }
.btn.on { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn svg { width: 17px; height: 17px; }
.btn.block { width: 100%; }

input[type=text], input[type=number], input[type=password], input[type=url], select, textarea {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text); font: inherit; outline: none; transition: border-color .12s, box-shadow .12s;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a91a3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input::placeholder { color: var(--text-3); }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; min-width: 0; }
.field .hint { font-weight: 450; color: var(--text-3); font-size: 12px; }
.field > :last-child { margin-top: auto; }
.affix { position: relative; }
.affix input { padding-left: 28px; }
.affix.suffix input { padding-left: 14px; padding-right: 42px; }
.affix span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--text-3); left: 13px; pointer-events: none; }
.affix.suffix span { left: auto; right: 13px; }

.switch { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; font-weight: 600; user-select: none; }
.switch input { appearance: none; width: 42px; height: 26px; border-radius: 26px; background: var(--border-2); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .18s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked { background: var(--good-2); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:disabled { opacity: .5; }
.switch .sub { display: block; font-weight: 450; font-size: 12px; color: var(--text-3); }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface-3); flex-wrap: wrap; }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(20, 30, 60, .12); }
.seg .n { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.brand { background: var(--brand-soft); color: var(--brand); }
.chip svg { width: 13px; height: 13px; }

/* panels ----------------------------------------------------------------------- */
.panel { border-radius: var(--r-lg); }
.panel-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 0; flex-wrap: wrap; }
.panel-head .titles { flex: 1; min-width: 220px; }
.panel-head .titles p { margin-top: 3px; color: var(--text-2); font-size: 13.5px; }
.panel-body { padding: 18px 24px 24px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .titles { flex: 1; min-width: 240px; }
.page-head .titles p { margin-top: 6px; color: var(--text-2); max-width: 640px; }

/* stats strip ----------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 22px; border-radius: var(--r-lg); overflow: hidden;
  background: var(--glass-edge); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }
.kpi { border: 0; border-radius: 0; box-shadow: none; padding: 16px 20px; min-width: 0; }
.kpi .k { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.kpi .k svg { width: 15px; height: 15px; }
.kpi .v { font-size: 26px; font-weight: 760; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v.good { color: var(--good); }
.kpi .s { font-size: 12px; color: var(--text-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpi { padding: 13px 15px; } .kpi .v { font-size: 21px; } }

/* hero (setup) ------------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; padding: 28px 30px; margin-bottom: 24px; border-radius: var(--r-xl); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: center; }
.hero h2 { font-size: 24px; font-weight: 760; letter-spacing: -.03em; }
.hero p { margin-top: 6px; color: var(--text-2); max-width: 520px; }
.hero .steps { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.hero .stepchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: 13px; color: var(--text-2); }
.hero .stepchip .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11.5px; font-weight: 750; }
.hero .stepchip.done { color: var(--good); background: var(--good-soft); }
.hero .stepchip.done .n { background: var(--good-2); color: #fff; }
.hero .stepchip.done .n svg { width: 12px; height: 12px; }
.hero .cta { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.hero .art { justify-self: end; width: 300px; height: 200px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 22px; } .hero .art { display: none; } }

/* deal cards ---------------------------------------------------------------------------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.toolbar select { width: auto; height: 40px; border-radius: 999px; background-color: var(--glass-strong); }
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 18px; }
@media (max-width: 600px) { .deals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 360px) { .deals { grid-template-columns: 1fr; } }
.dcard { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); cursor: pointer; transition: transform .18s, box-shadow .18s; position: relative; }
.dcard:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20, 30, 60, .16), inset 0 1px 0 var(--glass-line); }
.dcard.fresh { animation: fresh 2.6s ease-out; }
@keyframes fresh { 0% { box-shadow: 0 0 0 3px var(--good-2); } 100% { box-shadow: var(--shadow); } }
.dcard.dim { opacity: .62; }
.dphoto { position: relative; aspect-ratio: 4 / 5; background: var(--photo); overflow: hidden; margin: 6px 6px 0; border-radius: calc(var(--r-lg) - 6px); }
.dphoto img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s; }
.dcard:hover .dphoto img { transform: scale(1.03); }
.dphoto .ph { width: 100%; height: 100%; display: grid; place-items: center; color: #3a4050; }
.dphoto .ph svg { width: 54px; height: 54px; }
.ov { position: absolute; display: flex; gap: 6px; flex-wrap: wrap; }
.ov.tl { top: 10px; left: 10px; } .ov.tr { top: 10px; right: 10px; } .ov.bl { bottom: 10px; left: 10px; } .ov.br { bottom: 10px; right: 10px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 750;
  background: rgba(10, 12, 18, .55); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); white-space: nowrap; border: 1px solid rgba(255, 255, 255, .14); }
.pill.deal { background: rgba(22, 199, 132, .92); color: #04140d; border-color: transparent; }
.pill.warn { background: rgba(245, 158, 11, .92); color: #1a1205; border-color: transparent; }
.pill svg { width: 13px; height: 13px; }
.pill.iconbtn { width: 32px; padding: 0; justify-content: center; cursor: pointer; font: inherit; }
.pill.iconbtn svg { width: 15px; height: 15px; }
.pill.iconbtn.on { background: #f5b454; color: #1a1205; border-color: transparent; }
.dbody { padding: 13px 15px 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dtitle { font-weight: 600; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dprice { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dprice .cost { font-size: 22px; font-weight: 780; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dprice .val { color: var(--text-3); font-size: 13px; font-weight: 550; }
.dprice .profit { margin-left: auto; color: var(--good); font-weight: 750; font-variant-numeric: tabular-nums; }
.vbar { height: 5px; border-radius: 5px; background: var(--good-soft); overflow: hidden; }
.vbar > div { height: 100%; background: var(--good-2); border-radius: 5px; }
.dmeta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.dmeta span:first-child { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.dmeta span:first-child svg { width: 14px; height: 14px; color: var(--brand); }
.dactions { display: flex; gap: 6px; padding: 12px 15px 15px; margin-top: auto; }
.dactions .btn.buy { flex: 1; }
@media (max-width: 600px) {
  .dbody { padding: 10px 11px 0; gap: 7px; } .dprice .cost { font-size: 18px; } .dprice .profit { display: none; }
  .dactions { padding: 10px 11px 12px; } .dactions .btn.sm.icon { display: none; } .dmeta > span:last-child { display: none; }
  .ov.tl .pill:not(.deal) { display: none; } .pill { height: 24px; padding: 0 9px; font-size: 11.5px; }
}

.empty { text-align: center; padding: 56px 24px 60px; }
.empty .art { width: 220px; height: 150px; margin: 0 auto 10px; }
.empty h2 { margin-bottom: 6px; font-size: 20px; }
.empty p { color: var(--text-2); max-width: 460px; margin: 0 auto 18px; }

/* drawer ------------------------------------------------------------------------------------ */
.scrim { position: fixed; inset: 0; background: rgba(8, 10, 15, .38); z-index: 60; opacity: 0; transition: opacity .2s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.scrim.open { opacity: 1; }
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(560px, calc(100vw - 24px)); z-index: 61; border-radius: var(--r-xl);
  background: var(--glass-strong); transform: translateX(calc(100% + 24px)); transition: transform .3s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; overflow: hidden; }
.drawer.open { transform: none; }
.drawer .dh { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 22px; border-bottom: 1px solid var(--border); }
.drawer .dh .t { flex: 1; font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer .db { flex: 1; overflow-y: auto; padding: 20px 22px 28px; display: flex; flex-direction: column; gap: 24px; }
.drawer .df { padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: 8px; }
.drawer .df .btn.buy { flex: 1; height: 46px; font-size: 15px; }
.drawer .df .btn.icon { height: 46px; width: 46px; }
@media (max-width: 600px) { .drawer { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; } }
.gallery .main { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r); overflow: hidden; background: var(--photo); cursor: zoom-in; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.gallery .thumbs img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; cursor: pointer; border: 2px solid transparent; background: var(--photo); flex: none; opacity: .7; }
.gallery .thumbs img.on { border-color: var(--brand); opacity: 1; }
.dtitle-lg { font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.sect h3 { margin-bottom: 11px; display: flex; align-items: center; gap: 8px; }
.sect h3 svg { width: 17px; height: 17px; color: var(--brand); }
.math { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.math .ln { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; font-size: 13.5px; }
.math .ln + .ln { border-top: 1px solid var(--border); }
.math .ln.total { background: var(--surface-2); font-weight: 700; }
.math .ln.win { background: var(--good-soft); color: var(--good); font-weight: 750; font-size: 15px; }
.math .ln .v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.math .ln .sub { color: var(--text-3); font-size: 12px; font-weight: 450; }
.report { border-radius: var(--r); padding: 16px; background: linear-gradient(180deg, var(--brand-soft), transparent 180%); border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border)); display: flex; flex-direction: column; gap: 13px; }
.report .verdict { display: flex; align-items: center; gap: 12px; }
.report .verdict .big { font-size: 17px; font-weight: 750; }
.report .summary { font-size: 14.5px; font-weight: 550; line-height: 1.45; }
.conf { --p: 0; width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 750; font-size: 12.5px; background: conic-gradient(var(--good-2) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.conf::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.conf span { position: relative; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.facts div { background: var(--surface); padding: 8px 11px; min-width: 0; }
.facts .k { font-size: 11px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.facts .v { font-weight: 600; overflow-wrap: anywhere; }
.note { display: flex; gap: 9px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--text-3); }
.note b { color: var(--text); font-weight: 650; }
.flags { display: flex; flex-direction: column; gap: 6px; }
.flag { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 10px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 550; }
.flag svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--text-3); font-weight: 550; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.tools { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); display: flex; flex-direction: column; gap: 3px; }

/* lightbox ----------------------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(5, 6, 9, .95); display: grid; grid-template-rows: minmax(0, 1fr) auto; animation: fade .15s; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.lightbox .bar { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 14px; color: #c7cbd4; }
.lightbox .btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.lightbox .x { position: absolute; top: 14px; right: 14px; }

/* lists (watchlist, friends, devices) ------------------------------------------------- */
.wl .item { display: grid; grid-template-columns: 54px minmax(0, 1fr) 120px 140px auto; gap: 16px; align-items: center; padding: 14px 22px; }
.wl .item + .item { border-top: 1px solid var(--border); }
.gradebox { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; text-align: center; background: var(--surface-3); line-height: 1.05; flex: none; }
.gradebox b { display: block; font-size: 17px; font-weight: 800; }
.gradebox small { font-size: 10px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; }
.gradebox.ten { background: var(--good-soft); }
.gradebox.ten b { color: var(--good); }
.wl .name { font-weight: 650; }
.wl .sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl .money .v { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.wl .money .k { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.wl .acts { display: flex; gap: 2px; }
.wl .item.person { grid-template-columns: 46px minmax(0, 1fr) 110px auto; }
.wl .item.invite { grid-template-columns: 54px minmax(0, 1fr) auto; }
.wl .item.invite .gradebox svg { width: 20px; height: 20px; color: var(--text-3); }
.intro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.intro div { padding: 14px 16px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--glass-edge); font-size: 13px; color: var(--text-2); }
.intro b { display: block; color: var(--text); margin-bottom: 3px; font-size: 13.5px; }
@media (max-width: 900px) { .intro { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  .wl .item { grid-template-columns: 46px minmax(0, 1fr) auto; padding: 12px 14px; gap: 12px; }
  .wl .item .money.alert { display: none; }
  .wl .item .money.value { grid-column: 2; grid-row: 2; }
  .wl .item .acts { grid-column: 3; grid-row: 1 / span 2; }
  .wl .gradebox { width: 46px; height: 46px; }
  .wl .item.person { grid-template-columns: 46px minmax(0, 1fr); }
  .wl .item.person .money { display: none; }
  .wl .item.person .acts { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }
}
.invite-box { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-box input { flex: 1; min-width: 220px; font-family: var(--mono); font-size: 12.5px; }
.howto { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.howto svg { width: 16px; height: 16px; vertical-align: -3px; color: var(--brand); }
.devices { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.device { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.device.me { border-color: color-mix(in srgb, var(--good-2) 45%, var(--border)); background: var(--good-soft); }
.device .ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.device .ico svg { width: 17px; height: 17px; }
.device .name { font-weight: 650; }
.device .sub { font-size: 12px; color: var(--text-3); }
.device .acts { display: flex; gap: 4px; }

/* activity ----------------------------------------------------------------------------- */
.feed .entry { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 12px 22px; align-items: start; }
.feed .entry + .entry { border-top: 1px solid var(--border); }
.feed .ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); overflow: hidden; }
.feed .ico svg { width: 16px; height: 16px; }
.feed .ico img { width: 100%; height: 100%; object-fit: cover; }
.feed .ico.good { background: var(--good-soft); color: var(--good); }
.feed .ico.brand { background: var(--brand-soft); color: var(--brand); }
.feed .ico.warn { background: var(--warn-soft); color: var(--warn); }
.feed .ico.bad { background: var(--bad-soft); color: var(--bad); }
.feed .ttl { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.feed .msg { font-size: 13px; color: var(--text-2); }
.feed .msg .kind { font-weight: 650; }
.feed .time { font-size: 12px; color: var(--text-3); font-family: var(--mono); white-space: nowrap; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .two { grid-template-columns: 1fr; } }
.scans .s { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; font-size: 13px; }
.scans .s + .s { border-top: 1px solid var(--border); }
.scans .s .d { color: var(--text-3); font-size: 12px; grid-column: 1 / -1; }

/* check ----------------------------------------------------------------------------------- */
.checkbox { padding: 22px; }
.bigin { display: flex; gap: 10px; flex-wrap: wrap; }
.bigin input { height: 54px; font-size: 15px; border-radius: 999px; padding: 0 20px; flex: 1; min-width: 240px; }
.bigin .btn { height: 54px; padding: 0 26px; font-size: 15px; }
.result { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
@media (max-width: 1000px) { .result { grid-template-columns: 1fr; } }
.banner-v { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r); }
.banner-v.deal { background: var(--good-soft); }
.banner-v.deal .big, .banner-v.deal svg { color: var(--good); }
.banner-v.no, .banner-v.valued { background: var(--surface-2); }
.banner-v.filtered, .banner-v.unknown { background: var(--warn-soft); }
.banner-v.filtered .big, .banner-v.unknown .big, .banner-v.filtered svg, .banner-v.unknown svg { color: var(--warn); }
.banner-v .big { font-size: 18px; font-weight: 750; }
.banner-v .sm { color: var(--text-2); font-size: 13.5px; }
.banner-v svg { width: 28px; height: 28px; flex: none; }

/* settings ------------------------------------------------------------------------------------ */
.settings { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 26px; align-items: start; }
.settings .snav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; }
.settings .snav a { padding: 9px 13px; border-radius: 12px; color: var(--text-2); font-weight: 580; text-decoration: none; display: flex; align-items: center; gap: 9px; }
.settings .snav a:hover { background: var(--glass-2); color: var(--text); }
.settings .snav a.active { background: var(--glass-strong); color: var(--text); box-shadow: var(--shadow); }
.settings .snav .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); margin-left: auto; }
.settings .snav .dot.ok { background: var(--good-2); }
.settings section { scroll-margin-top: 92px; }
.settings section + section { margin-top: 18px; }
@media (max-width: 900px) { .settings { grid-template-columns: 1fr; } .settings .snav { display: none; } }
.conn { display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1.3fr) 92px; gap: 14px; align-items: center; padding: 15px 0; }
.conn + .conn { border-top: 1px solid var(--border); }
.conn .logo { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 12px; letter-spacing: -.02em; color: #fff; }
.conn .name { font-weight: 650; }
.conn .state { font-size: 12px; margin-top: 2px; display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.conn .state .d { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); }
.conn .state.ok { color: var(--good); }
.conn .state.ok .d { background: var(--good-2); }
.conn .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.conn .test { justify-self: end; }
@media (max-width: 760px) { .conn { grid-template-columns: 42px minmax(0, 1fr) auto; } .conn > .inp { grid-column: 1 / -1; } }
.channel { border: 1px solid var(--border); border-radius: var(--r); padding: 15px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.channel .hint { font-size: 12px; color: var(--text-3); }
.band-row { display: grid; grid-template-columns: 1fr 14px 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.band-row .to { color: var(--text-3); text-align: center; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--border-2); border-radius: 14px; min-height: 42px; background: var(--surface); cursor: text; }
.tags .tag { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 600; }
.tags .tag button { border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 6px; }
.tags input { border: 0 !important; box-shadow: none !important; height: 28px; flex: 1; min-width: 140px; padding: 0 6px; background: transparent; }
.savebar { position: sticky; bottom: 16px; z-index: 20; margin-top: 18px; padding: 10px 12px 10px 12px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border-radius: 999px; }
@media (max-width: 900px) { .savebar { bottom: 84px; } }
.estimate { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
details.adv > summary { list-style: none; display: flex; align-items: center; padding-bottom: 22px; cursor: pointer; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv .chev { color: var(--text-3); transform: rotate(0); transition: transform .15s; }
details.adv[open] .chev { transform: rotate(90deg); }
details.adv[open] > summary { padding-bottom: 0; }
details.adv .chev svg { width: 18px; height: 18px; }
.panel-body h3 { margin-bottom: -4px; }

/* modal & toast ------------------------------------------------------------------------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 10, 15, .4); display: grid; place-items: center; z-index: 70; padding: 16px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .15s; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--r-xl); background: var(--glass-strong); animation: pop .18s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 90; max-width: calc(100vw - 40px); }
@media (max-width: 900px) { .toasts { bottom: 96px; right: 16px; left: 16px; } }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-radius: 999px; max-width: 460px; font-weight: 560; animation: pop .2s; background: var(--glass-strong); }
.toast.bad { background: var(--bad); color: #fff; }
.toast.good { background: var(--good); color: #fff; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite; flex: none; }
@keyframes rot { to { transform: rotate(1turn); } }

/* accounts ------------------------------------------------------------------------------------ */
body.auth-mode .app, body.auth-mode .tabbar { display: none; }
body:not(.auth-mode) #auth-root { display: none; }
.auth { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); border-radius: var(--r-xl); padding: 30px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card > p { margin-bottom: 18px; }
.auth-card code { font-family: var(--mono); font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.auth-brand img { width: 42px; height: 42px; border-radius: 12px; }
.auth-brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.auth-brand small { color: var(--text-3); font-size: 12px; }
.auth-err { color: var(--bad); font-size: 13px; font-weight: 550; min-height: 18px; }
.auth-foot { color: var(--text-3); font-size: 12.5px; text-align: center; }
.auth .art { width: 240px; height: 150px; margin: 0 auto -6px; }
.mobile-only { display: none; }
@media (max-width: 900px) { .mobile-only { display: inline-flex; } .me { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 900px) {
  .toolbar .seg { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar .seg::-webkit-scrollbar { display: none; }
  .toolbar .seg button { flex: none; }
  .toolbar .spacer { display: none; }
  .toolbar select { flex: 1; }
  #btn-clear-demo .label-wide { display: none; }
}
details.adv { border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; background: var(--surface-2); }
details.adv > summary { padding-bottom: 0; }
details.adv > summary .titles { flex: 1; }
details.adv[open] > summary { padding-bottom: 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; padding-bottom: 12px; }

/* ---------- sports + settings tabs ---------- */
.pill.sport { width: 30px; padding: 0; justify-content: center; }
.pill.sport svg { width: 15px; height: 15px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-bg span { position: absolute; color: var(--brand); opacity: .07; transform: rotate(calc(var(--i) * 17deg - 30deg)); }
.hero-bg span svg { width: 120px; height: 120px; }
.hero-bg span:nth-child(1) { left: -20px; top: -30px; } .hero-bg span:nth-child(2) { left: 32%; top: 62%; } .hero-bg span:nth-child(3) { left: 55%; top: -40px; }
.hero-bg span:nth-child(4) { left: 78%; top: 70%; } .hero-bg span:nth-child(5) { left: 92%; top: 10%; }
.hero > div:not(.hero-bg), .hero .art { position: relative; }
.settings-wrap { display: flex; flex-direction: column; gap: 18px; }
#settings-tabs { align-self: flex-start; }
#settings-tabs button .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); margin-left: 2px; }
#settings-tabs button .dot.ok { background: var(--good-2); }
.conn { grid-template-columns: 44px minmax(0, 1fr) auto; }
.conn .state { white-space: normal; }
.modal .panel-head .logo { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; flex: none; }
.chip svg { vertical-align: -2px; }
@media (max-width: 900px) { #settings-tabs { align-self: stretch; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } #settings-tabs button { flex: none; } }

/* ---------- choice chips (sports, grades) ---------- */
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.choice button svg { width: 17px; height: 17px; }
.choice button:hover { border-color: var(--brand); color: var(--text); }
.choice button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 14px rgba(52, 87, 240, .25); }
@media (max-width: 900px) { .dactions .btn.buy .label-wide { display: inline; } .dactions .btn.sm { padding: 0 10px; } }

/* ---------- Kalshi-style backdrop ---------- */
body::before { display: none; }
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #070b14; }
/* a hardwood half court seen from the stands: planks, painted key, three-point arc, center circle */
.scene .floor { position: absolute; left: -10%; right: -10%; top: -30%; height: 150%; transform-origin: 50% 100%;
  transform: perspective(1600px) rotateX(18deg) scale(1.06);
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .16) 0 2px, transparent 2px 46px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #c27a3c 0%, #a2622c 45%, #7a461d 100%);
  box-shadow: inset 0 0 160px rgba(0, 0, 0, .45); }
.scene .court-lines { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.scene .glow { position: absolute; inset: 0; background:
  radial-gradient(70% 55% at 50% 0%, rgba(255, 225, 170, .2), transparent 70%),
  linear-gradient(180deg, rgba(5, 10, 20, .15) 0%, rgba(5, 10, 20, .4) 50%, rgba(5, 10, 20, .72) 100%); }
.scene .slab { position: absolute; right: 4%; top: 6%; width: min(340px, 30vw); transform: rotate(-12deg); opacity: .9; }
.scene .slab svg { width: 100%; height: auto; }
.scene::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"); opacity: .07; mix-blend-mode: overlay; }
:root[data-theme="light"] .scene { background: #e9e2d6; }
:root[data-theme="light"] .scene .floor { background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 2px, transparent 2px 46px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .25) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #e3b37c 0%, #d49a5f 45%, #c48a50 100%); }
:root[data-theme="light"] .scene .glow { background: radial-gradient(70% 55% at 50% 0%, rgba(255, 255, 255, .5), transparent 70%), linear-gradient(180deg, rgba(240, 244, 250, .25), rgba(240, 244, 250, .9) 85%); }
@media (max-width: 900px) { .scene .slab { width: 44vw; right: -8%; top: 4%; opacity: .5; } .scene .floor { left: -35%; right: -35%; top: -20%; height: 140%; } }
.rail, .topbar, .tabbar { background: color-mix(in srgb, var(--surface) 80%, transparent); }
:root[data-theme="dark"] .rail, :root[data-theme="dark"] .topbar, :root[data-theme="dark"] .tabbar { background: rgba(14, 18, 30, .7); }

/* ---------- ticket cards ---------- */
.ticket { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; cursor: pointer; position: relative; color: #eef2f6;
  background: linear-gradient(180deg, #0f2a1f 0%, #0b1420 55%, #080c14 100%); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12); transition: transform .18s, box-shadow .18s; }
.ticket:hover { transform: translateY(-3px); box-shadow: 0 30px 70px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .14); }
.ticket.fresh { animation: fresh 2.6s ease-out; }
.ticket.done { filter: saturate(.5) brightness(.8); }   /* dim, but stay opaque: with opacity the backdrop art showed through */
.ticket.done .tbody, .ticket.done .tstats { opacity: .75; }
.ticket .thead { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #bfe9d3; border-bottom: 1px dashed rgba(255, 255, 255, .14); }
.ticket .thead span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket .thead svg { width: 15px; height: 15px; color: #3fe08f; flex: none; }
.ticket .thead b { font-family: var(--font); font-size: 15px; font-weight: 800; letter-spacing: -.02em; color: #3fe08f; text-transform: none; }
.ticket .tphoto { position: relative; aspect-ratio: 4 / 3; margin: 10px 10px 0; border-radius: 14px; overflow: hidden; background: radial-gradient(80% 80% at 50% 30%, #1a2a3f, #0a0f18); }
.ticket .tphoto img { width: 100%; height: 100%; object-fit: contain; }
.ticket .tphoto .ph { width: 100%; height: 100%; display: grid; place-items: center; color: #3a4a66; }
.ticket .tphoto .ph svg { width: 54px; height: 54px; }
.ticket .tphoto .pill { position: absolute; top: 10px; left: 10px; }
.ticket .tphoto .pill.warn { left: auto; right: 10px; }
.ticket .tbody { padding: 14px 16px 6px; }
.ticket .ttitle { font-size: 18px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket .tsub { margin-top: 4px; font-size: 13px; color: #a9b7c6; }
.ticket .ticker { overflow: hidden; margin: 10px 0 0; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .25); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: #5fcf9a; white-space: nowrap; }
.ticket .ticker > div { display: inline-flex; gap: 22px; animation: marquee 28s linear infinite; }
.ticket .ticker b { color: #3fe08f; font-family: var(--font); letter-spacing: -.02em; font-weight: 800; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticket .tstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 6px; }
.ticket .tstats .k { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #c7d2dd; }
.ticket .tstats .k.good { color: #ff6b6b; }
.ticket .tstats .v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ticket .tstats .v.good { color: #ff6b6b; }
.ticket .tfoot { display: flex; justify-content: space-between; padding: 6px 16px 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: #7f8ea0; }
.ticket .dactions { padding: 6px 12px 12px; }
.ticket .btn.buy { background: #3fe08f; border-color: transparent; color: #05140c; box-shadow: 0 8px 20px rgba(63, 224, 143, .3); }
.ticket .btn:not(.buy):not(.ghost) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #eef2f6; }
.ticket .btn.ghost { color: #c7d2dd; }
.deals { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
@media (max-width: 600px) { .deals { grid-template-columns: 1fr; } .ticket .tstats .v { font-size: 26px; } }

/* ---------- preferences range ---------- */
.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.range .to { color: var(--text-3); font-weight: 600; }
.panel-body > div > .field { font-size: 14px; }
@media (max-width: 900px) { .toolbar .seg button { padding: 0 11px; } .toolbar .seg { width: auto; } }

/* the Shut down entry in the status menu */
#status-menu button.danger { color: var(--bad, #ff6b6b); }
#status-menu button.danger svg { stroke: currentColor; }

/* Offer / Check price tag under the discount pill */
.ticket .tphoto .pill.tag, .ticket .tphoto .pill.warn.tag { top: 44px; left: 10px; right: auto; }

/* three numbers on the ticket: Card Ladder value, listed at, under value */
.ticket .tstats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ticket .tstats .v { white-space: nowrap; }
.ticket .tsub a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ticket .tstats .v { font-size: 24px; }
@media (max-width: 420px) { .ticket .tstats .v { font-size: 20px; } }

/* ============ first-run tutorial (liquid glass) ============ */
.tour-bg { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 16px;
  background: rgba(4, 8, 18, .72); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  animation: tourIn .25s ease; }
.tour { position: relative; width: min(440px, 100%); padding: 22px 22px 18px; border-radius: 28px;
  background: linear-gradient(160deg, rgba(58, 70, 110, .92), rgba(22, 28, 48, .94));
  border: 1px solid rgba(255,255,255,.35); box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.45);
  backdrop-filter: blur(28px) saturate(1.6); -webkit-backdrop-filter: blur(28px) saturate(1.6); color: #fff; }
.tour h2 { margin: 6px 0 8px; font-size: 24px; letter-spacing: -.02em; }
.tour p { margin: 0 0 16px; line-height: 1.5; color: rgba(255,255,255,.86); font-size: 15px; }
.tour .tour-x { position: absolute; top: 10px; right: 10px; color: #fff; }
.tour-art { height: 160px; display: grid; place-items: center; margin: 8px 0 6px; overflow: hidden; border-radius: 20px; }
.tour-art .art { transform: scale(.66); }
.tour-ticket { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; padding: 16px; border-radius: 18px;
  background: rgba(8, 12, 22, .78); border: 1px solid rgba(255,255,255,.12); font-family: var(--mono, ui-monospace, monospace); }
.tour-ticket span { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #9fb0c3; }
.tour-ticket b { font-size: 26px; font-family: inherit; }
.tour-ticket .good span, .tour-ticket .good b { color: #ff6b6b; }
.tour-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tour-bell { width: 92px; height: 92px; border-radius: 30px; display: grid; place-items: center;
  background: linear-gradient(145deg, #8fa2ff, #6b7cff); box-shadow: 0 16px 40px rgba(107,124,255,.5); }
.tour-bell svg { width: 44px; height: 44px; stroke: #fff; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin: 0 0 14px; }
.tour-dots span { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.35); transition: width .2s; }
.tour-dots span.on { width: 22px; background: #fff; }
@keyframes tourIn { from { transform: scale(.98); } to { transform: none; } }
.btn.cl { background: rgba(255,255,255,.08); }

/* What you buy: one row per buying rule */
.segs { display: grid; gap: 8px; }
.seg-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 10px 12px;
  border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.seg-row.off { opacity: .55; }
.seg-row .switch { flex: 1; min-width: 200px; }
.seg-row .range { flex: 0 0 auto; }
.seg-row .range input { width: 96px; }
@media (max-width: 520px) { .seg-row .range input { width: 80px; } }
.seg-row .range input { width: 120px; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .seg-row .range input { width: 104px; } .seg-row .range .to { display: none; } }

/* ===== deal card, simplified: eBay price, Card Ladder price, profit ===== */
.ticket .tphoto { margin: 10px 10px 0; }
.ticket .tphoto .pill.state { left: auto; right: 10px; background: rgba(8, 12, 22, .78); color: #eef2f6; border-color: rgba(255,255,255,.18); }
.ticket .tbody { padding: 12px 16px 2px; }
.ticket .tsub a { color: inherit; }
.ticket .tstats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 16px 4px; }
.ticket .tstats .k { font-size: 10.5px; letter-spacing: .12em; }
.ticket .tstats .k.good, .ticket .tstats .v.good, .ticket .tstats .hint.good { color: #3fe08f; }
.ticket .tstats .v { font-size: 24px; white-space: nowrap; }
.ticket .tstats .hint { font-size: 12px; color: #8a99ab; margin-top: 1px; font-weight: 600; }
.ticket .dactions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px 12px; }
.ticket .dactions .btn { width: 100%; justify-content: center; min-width: 0; white-space: nowrap; }
.ticket .dactions .wide { grid-column: 1 / -1; }
@media (max-width: 420px) { .ticket .tstats .v { font-size: 20px; } }

/* ===== Costs (owner) ===== */
.cost-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.cost-tiles .tile { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.cost-tiles .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.cost-tiles .v { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cost-tiles .s { font-size: 12px; color: var(--text-2); margin-top: 2px; }
table.costs { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13.5px; }
table.costs th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.1); }
table.costs td { padding: 8px; border-bottom: 1px solid rgba(255,255,255,.06); font-variant-numeric: tabular-nums; }
table.costs tr.off { opacity: .5; }
@media (max-width: 640px) { .cost-tiles { grid-template-columns: 1fr; } table.costs th:nth-child(5), table.costs td:nth-child(5) { display: none; } }
