/* ============================================================
   burgl.ar — the owner's console
   Builds on styles.css (fonts, .btn, .card, #toast …) and re-tokens it
   for a work surface: Tanuki's grey-green (Slate, #45554f) stepped
   down into four quiet surfaces, one green accent for what matters.
   Sections: tokens · base · app shell (sidebar, top bar) · gate
             · common (buttons, fields, chips, states, toasts, tooltip)
             · store editor · preview phone · players · audit · money
             · home · analytics · extensions · palette · modal · responsive
   See DESIGN_NOTES.md for the why.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #161c1a;            /* page plane */
  --bg-side: #1a211e;       /* sidebar */
  --s1: #1f2724;            /* panel / card */
  --s2: #26302c;            /* raised: inputs, hovered rows */
  --s3: #2f3a36;            /* pressed / selected */
  --slate: #45554f;         /* the Tanuki field: brand marks only */
  --line: rgba(255,255,255,0.075);
  --line-2: rgba(255,255,255,0.13);
  --text: #eef3f0;
  --muted: #a5b2ac;         /* 7.4:1 on --s1 */
  --faint: #7b8983;         /* 4.6:1 on --s1: labels, ticks */
  --accent: #5fe38a;        /* the one call-to-action green */
  --accent-ink: #0d2416;
  --accent-soft: rgba(95,227,138,0.12);
  --accent-ring: rgba(95,227,138,0.28);
  --good: #5fe38a;
  --warn: #f2c25b;
  --bad: #f2857b;
  --bad-strong: #d9473b;
  --lav: #eddaff;           /* the app's InkDim: a whisper of warmth on the motto */
  --series-1: #2fae60;      /* chart marks: validated pair (dataviz validator, dark, on --s1) */
  --series-2: #9a7cf0;
  --grid: rgba(255,255,255,0.06);
  --axis: rgba(255,255,255,0.16);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --side-w: 244px;
  --topbar-h: 60px;
  --subnav-h: 48px;
  --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 12px 32px rgba(0,0,0,0.28);
  --panel: var(--s1);       /* legacy names the editor still uses */
  --panel-2: var(--s2);
}

/* ---------- base ---------- */
html { scroll-behavior: auto; }
body.console { background: var(--bg); color: var(--text); min-height: 100vh; font-size: 15px; line-height: 1.5; }
body.console::after { display: none; }
body.console .spotlight-grid { display: none; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.btn .ic { width: 16px; height: 16px; }
.hint.small, .small { font-size: 0.8rem; }
.mono { font-family: var(--mono); font-size: 0.86em; }
.muted { color: var(--muted); }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
::selection { background: rgba(95,227,138,0.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kbd { display: inline-block; font: 600 0.68rem var(--body); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--muted); background: var(--s2); line-height: 1.3; white-space: nowrap; }

/* styles.css is the public site's: undo its page-level rules that would leak in here
   (a fixed full-width <nav>, the account page's .side/.main/.panel, the site's .ext cards) */
.console nav { position: static; top: auto; left: auto; right: auto; z-index: auto; transition: none; border-bottom: 0; }
.console nav.subnav { position: sticky; top: var(--topbar-h); z-index: 60; border-bottom: 1px solid var(--line); }
.console nav.subnav.inline { position: static; }
.console .panel { padding: 0; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); }
.console .ext { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 14px 16px; align-items: start; }
.console .ext h3 { margin: 0; }
.console .ext.pending { opacity: 1; border-style: solid; box-shadow: inset 3px 0 0 var(--warn); background: rgba(242,194,91,0.03); }

.console .tbl { border-collapse: separate; font-size: 0.86rem; }
.console .tbl.packs { padding: 0; }
.console .tbl td { border-top: 0; }
.console .tbl .num { font-weight: inherit; }
.tbl.packs .c-label input { min-width: 96px; }
.tbl.packs .c-amt input, .tbl.packs .c-price input { min-width: 78px; }
.tbl.packs .c-id input { min-width: 90px; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; }
.side {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); z-index: 120;
  display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 12px;
  background: var(--bg-side); border-right: 1px solid var(--line);
}
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 4px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.06rem; letter-spacing: 0.2px; color: var(--text); }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--slate); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.brand-mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(95,227,138,0.5); }
.side .side-close { display: none; }
.side-search { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--s1); color: var(--faint); font: inherit; font-size: 0.86rem; cursor: pointer; transition: border-color .15s, color .15s; }
.side-search span { flex: 1; text-align: left; }
.side-search:hover { color: var(--text); border-color: var(--line-2); }
.areas { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; margin: 4px -4px 0; padding: 0 4px; scrollbar-width: thin; }
.areas a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: background .12s, color .12s; }
.areas a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.areas a.active { background: var(--s3); color: var(--text); }
.areas a.active .ic { color: var(--accent); }
.areas a.active::before { content: ""; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.areas a span { flex: 1; }
.nav-group { margin: 14px 10px 4px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.9px; text-transform: uppercase; color: var(--faint); }
.nav-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #2a1f00; font-size: 0.7rem; font-weight: 700; line-height: 18px; text-align: center; }
.nav-n.soft { background: var(--s3); color: var(--muted); }
.side-foot { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.side-keys { display: flex; align-items: center; gap: 8px; justify-self: start; font-size: 0.8rem; color: var(--faint); padding: 2px 6px; }
.side-keys:hover { color: var(--text); }
.who-row { display: flex; align-items: center; gap: 10px; padding: 4px 4px 2px; min-width: 0; }
.who-face { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 0.86rem; background: var(--slate); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.who-id { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.who-id b { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-id span { font-size: 0.74rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.icon-btn:disabled { opacity: .35; cursor: default; background: none; }
.icon-btn.quiet-danger:hover { background: rgba(242,133,123,0.12); color: var(--bad); }
.scrim { position: fixed; inset: 0; z-index: 110; background: rgba(5,8,7,0.6); backdrop-filter: blur(2px); }

.main { margin-left: var(--side-w); min-width: 0; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 100; background: rgba(22,28,26,0.86); backdrop-filter: saturate(1.2) blur(14px); -webkit-backdrop-filter: saturate(1.2) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-row { max-width: 1440px; margin: 0 auto; min-height: 60px; padding: 8px 28px; display: flex; align-items: center; gap: 14px; }
.menu-btn { display: none; margin-left: -8px; }
.page-title { min-width: 0; display: flex; align-items: center; gap: 8px; line-height: 1.2; font-size: 0.9rem; }
.page-title .crumb { color: var(--faint); white-space: nowrap; }
.page-title .crumb::after { content: "/"; margin-left: 8px; color: var(--line-2); }
.page-title h1 { font-family: var(--body); font-weight: 600; font-size: 0.9rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.search-btn { display: none; }
.draft-status { font-size: 0.8rem; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; background: var(--s1); border: 1px solid var(--line); }
.draft-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; flex: none; }
.draft-status.dirty { color: var(--text); border-color: rgba(242,194,91,0.35); }
.draft-status.dirty i { background: var(--warn); box-shadow: 0 0 0 3px rgba(242,194,91,0.16); }
.draft-status.saving i { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.draft-status.bad i { background: var(--bad); }
.store-actions { display: inline-flex; gap: 6px; }

.shell { max-width: 1440px; margin: 0 auto; padding: 20px 28px 96px; }
.area { padding-top: 4px; animation: areaIn .22s ease; }
@keyframes areaIn { from { opacity: 0; transform: translateY(4px); } }

/* the motto */
.motto { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 20px; padding: 14px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(100deg, rgba(69,85,79,0.55), rgba(69,85,79,0.12) 60%, transparent), var(--s1); }
.motto > .ic { color: var(--accent); margin-top: 3px; width: 20px; height: 20px; }
.motto-line { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.1px; color: var(--text); }
.motto-sub { margin: 3px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; max-width: 82ch; }
.motto.slim { padding: 9px 14px; margin-bottom: 16px; align-items: center; background: transparent; border-color: var(--line); }
.motto.slim .motto-sub { display: none; }
.motto.slim .motto-line { font-size: 0.86rem; font-weight: 600; color: var(--muted); }
.motto.slim > .ic { margin-top: 0; width: 16px; height: 16px; }

/* restored-from-this-browser bar */
.restore-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r); border: 1px solid rgba(242,194,91,0.35); background: rgba(242,194,91,0.07); font-size: 0.88rem; }
.restore-bar > .ic { color: var(--warn); }
.restore-bar span { flex: 1; min-width: 200px; }

/* ---------- gate ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background: radial-gradient(1200px 600px at 50% -10%, rgba(69,85,79,0.7), transparent 70%), var(--bg); }
.gate-card { width: 100%; max-width: 400px; min-width: 0; text-align: center; padding: 36px 28px 30px; border-radius: 22px; border: 1px solid var(--line-2); background: rgba(31,39,36,0.82); box-shadow: 0 30px 80px rgba(0,0,0,0.45); backdrop-filter: blur(8px); }
.gate-mark { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 15px; background: var(--slate); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 10px 30px rgba(0,0,0,0.35); }
.gate-mark i { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 20px rgba(95,227,138,0.6); }
.gate .eyebrow { letter-spacing: 2.5px; font-size: 0.74rem; }
.gate-title { font-family: var(--display); font-weight: 800; font-size: 2.1rem; letter-spacing: -1.2px; line-height: 1.05; margin: 10px 0 8px; }
.gate .google-slot { margin-top: 24px; display: grid; justify-items: center; min-height: 44px; }
.gate .google-slot > div { max-width: 100%; }
.nope { margin-top: 22px; font-family: var(--display); font-weight: 600; }
.gate .linkish { margin-top: 14px; }
.spinner { width: 22px; height: 22px; margin: 22px auto 8px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.console .btn { padding: 9px 16px; gap: 7px; border-radius: 10px; font-size: 0.86rem; font-weight: 600; background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink); line-height: 1.2; text-decoration: none; justify-content: center; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s, opacity .15s; }
.console .btn:hover { opacity: 1; background: #79eb9e; border-color: #79eb9e; }
.console .btn-outline { background: var(--s2); color: var(--text); border-color: var(--line-2); }
.console .btn-outline:hover { background: var(--s3); border-color: rgba(255,255,255,0.22); }
.console .btn:disabled, .console .btn[disabled] { opacity: .45; cursor: default; }
.btn.small { padding: 7px 12px; font-size: 0.82rem; }
.btn.tiny { padding: 4px 9px; font-size: 0.74rem; gap: 5px; border-radius: 8px; }
.btn.tiny .ic { width: 14px; height: 14px; }
.console .btn.danger { background: var(--bad-strong); border-color: var(--bad-strong); color: #fff; }
.console .btn.danger:hover { background: #e85a4e; border-color: #e85a4e; }
.console .btn.danger.btn-outline { background: transparent; color: var(--bad); border-color: rgba(242,133,123,0.4); }
.console .btn.danger.btn-outline:hover { background: rgba(242,133,123,0.1); }
.btn.toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: rgba(95,227,138,0.45); color: var(--accent); }
.btn.working { opacity: .6; pointer-events: none; }
.console .linkish { color: var(--muted); font-size: 0.86rem; display: inline-flex; align-items: center; gap: 5px; }
.console .linkish:hover { color: var(--text); }
.linkish.inline { display: inline-flex; padding: 0; font-size: inherit; color: var(--accent); }
.linkish.inline:hover { color: #8ff0ae; }
.linkish.danger { color: var(--bad); }

/* ---------- section head inside a tab ---------- */
.tab-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.tab-head h2 { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.4px; }
.tab-head p { color: var(--muted); font-size: 0.88rem; margin-top: 4px; max-width: 68ch; }
.tab-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- states: empty, not ready, skeleton ---------- */
.notready, .empty { display: grid; justify-items: center; gap: 4px; padding: 28px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r-lg); font-size: 0.9rem; background: rgba(255,255,255,0.012); }
.notready b, .empty b { color: var(--text); font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.notready span, .empty span { max-width: 60ch; }
.notready { border-style: solid; border-color: rgba(242,194,91,0.25); background: rgba(242,194,91,0.04); }
.empty-ic { width: 22px; height: 22px; color: var(--faint); margin-bottom: 4px; }
.notready .empty-ic { color: var(--warn); }
li.empty { list-style: none; }
.skel { display: grid; gap: 10px; }
.skel i, .skel-tiles i, .skel-kpi { display: block; height: 44px; border-radius: var(--r); background: linear-gradient(90deg, var(--s1) 0%, var(--s2) 40%, var(--s1) 80%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skel i:nth-child(2n) { width: 86%; } .skel i:nth-child(3n) { width: 70%; }
.skel.cards i { height: 96px; width: 100% !important; border-radius: var(--r-lg); }
.skel-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.skel-tiles i, .skel-kpi { height: 104px; border-radius: var(--r-lg); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- fields ---------- */
.f { display: grid; gap: 6px; min-width: 0; }
.f > span { font-size: 0.74rem; color: var(--muted); letter-spacing: .2px; font-weight: 500; }
.f input[type=text], .f input[type=number], .f input[type=url], .f input[type=date], .f input[type=datetime-local], .f input[type=search], .f select, .f textarea,
.search input, .modal input, .modal select, .modal textarea, .qbox {
  width: 100%; padding: 8px 11px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--s2); color: var(--text); font: inherit; font-size: 0.9rem; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; min-width: 0; color-scheme: dark;
}
.f input:hover, .f select:hover, .f textarea:hover, .qbox:hover { border-color: rgba(255,255,255,0.2); }
.f textarea, .modal textarea { resize: vertical; min-height: 72px; line-height: 1.45; }
.f input:focus, .f select:focus, .f textarea:focus, .search input:focus, .modal input:focus, .modal select:focus, .modal textarea:focus, .qbox:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: #2a3430; }
.f.err input, .f.err select, .f.err textarea { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(242,133,123,0.15); }
.f input::placeholder, .qbox::placeholder, .modal input::placeholder, .modal textarea::placeholder { color: var(--faint); }
.f .sub { font-size: 0.72rem; color: var(--faint); }
.ferr { font-size: 0.76rem; color: var(--bad); min-height: 0; }
.ferr:empty { display: none; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { opacity: .35; }
.f.compact input, .f.compact select { padding: 6px 9px; font-size: 0.86rem; }
.f .mono, .f.mono input { font-family: var(--mono); font-size: 0.84rem; }
select { cursor: pointer; }
.money { font-size: 0.78rem; color: var(--muted); }
.money b { color: var(--text); font-variant-numeric: tabular-nums; }
.qwrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.qwrap > .ic { position: absolute; left: 11px; color: var(--faint); pointer-events: none; width: 16px; height: 16px; }
.qwrap input { padding-left: 34px !important; }

/* switch */
.sw { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 0.82rem; color: var(--muted); user-select: none; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw i { width: 32px; height: 18px; border-radius: 999px; background: var(--s3); box-shadow: inset 0 0 0 1px var(--line-2); position: relative; transition: background .2s; flex: none; }
.sw i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #dfe7e3; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.sw input:checked + i { background: var(--series-1); box-shadow: none; }
.sw input:checked + i::after { transform: translateX(14px); background: #fff; }
.sw input:focus-visible + i { box-shadow: 0 0 0 3px var(--accent-ring); }
.sw.on, .sw:has(input:checked) { color: var(--text); }

/* radio dot */
.rd { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--s2); cursor: pointer; }
.rd input { position: absolute; opacity: 0; }
.rd i { width: 10px; height: 10px; border-radius: 50%; background: transparent; transition: background .15s; }
.rd input:checked + i { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* id picker: chips of chosen ids + a way to add */
.ids { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 36px; padding: 4px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--s2); }
.ids .idc { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; border-radius: 999px; background: var(--s3); font-size: 0.78rem; font-family: var(--mono); }
.ids .idc.unknown { background: rgba(242,133,123,0.14); color: var(--bad); }
.ids .idc button, .chips-ed .bch button { display: inline-grid; place-items: center; border: 0; background: transparent; color: inherit; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; opacity: .7; padding: 0; }
.ids .idc button .ic, .chips-ed .bch button .ic { width: 13px; height: 13px; vertical-align: 0; }
.ids .idc button:hover, .chips-ed .bch button:hover { opacity: 1; background: rgba(255,255,255,0.12); }
.ids select { flex: 1; min-width: 120px; padding: 5px 8px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 0.82rem; }
.ids select:focus { outline: none; border-color: var(--line-2); color: var(--text); }

/* chips editor (badges) */
.chips-ed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-ed .bch { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: rgba(242,194,91,0.13); color: #ffe4a8; font-family: var(--display); font-weight: 700; font-size: 0.72rem; letter-spacing: .5px; text-transform: uppercase; }
.chips-ed input, .f .chips-ed input[type=text] { width: 130px; flex: none; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; color: var(--text); font: inherit; font-size: 0.8rem; outline: none; }
.chips-ed input:focus, .f .chips-ed input[type=text]:focus { border-color: var(--accent); border-style: solid; box-shadow: none; background: transparent; }

/* filter chips (audit, ideas, extensions) */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.console .chip-f { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-size: 0.8rem; font-weight: 500; gap: 7px; }
.console .chip-f:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.console .chip-f.active, .console .chip-f.on { border-color: rgba(95,227,138,0.5); color: var(--text); background: var(--accent-soft); }
.chip-f .cn { color: var(--faint); font-variant-numeric: tabular-nums; }
.chip-f.active .cn, .chip-f.on .cn { color: var(--accent); }

/* segmented control (ranges) */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); }
.seg button { padding: 5px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--s3); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.25); }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 500; display: grid; gap: 8px; justify-items: end; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px 10px 14px; border-radius: var(--r); background: #2a3531; border: 1px solid var(--line-2); color: var(--text); font-size: 0.88rem; box-shadow: 0 18px 50px rgba(0,0,0,0.5); animation: toastIn .24s cubic-bezier(.16,1,.3,1); }
.toast > .ic { color: var(--good); }
.toast.bad { border-color: rgba(242,133,123,0.45); }
.toast.bad > .ic { color: var(--bad); }
.toast .tmsg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast .tact { border: 0; background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 600; font-size: 0.82rem; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.toast .tact:hover { background: rgba(95,227,138,0.22); }
.toast .tx { border: 0; background: none; color: var(--faint); cursor: pointer; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; padding: 0; }
.toast .tx:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.toast .tx .ic { width: 14px; height: 14px; vertical-align: 0; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
#toast { max-width: calc(100vw - 32px); text-align: center; background: #2a3531; }

/* ---------- chart tooltip ---------- */
.tip { position: fixed; z-index: 450; pointer-events: none; min-width: 120px; max-width: 260px; padding: 8px 10px; border-radius: 10px; background: #0f1412; border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0,0,0,0.5); font-size: 0.78rem; display: grid; gap: 3px; }
.tip .th { color: var(--muted); font-size: 0.74rem; margin-bottom: 1px; }
.tip .tr { display: flex; align-items: center; gap: 7px; }
.tip .tr b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.tip .tr span { color: var(--muted); }
.tip .key { width: 12px; height: 2px; border-radius: 1px; flex: none; }

/* ---------- store sub-nav ---------- */
.subnav { position: sticky; top: var(--topbar-h); z-index: 60; display: flex; gap: 2px; height: var(--subnav-h); align-items: center; overflow-x: auto; scrollbar-width: none; background: var(--bg); border-bottom: 1px solid var(--line); margin: 0 -28px; padding: 0 28px; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { position: relative; padding: 7px 12px; border-radius: var(--r-sm); color: var(--muted); font-size: 0.86rem; font-weight: 500; white-space: nowrap; transition: color .12s, background .12s; }
.subnav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.subnav a.active { color: var(--text); font-weight: 600; }
.subnav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -7px; height: 2px; border-radius: 2px; background: var(--accent); }
.subnav a .n { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--bad-strong); color: #fff; font-size: 0.66rem; line-height: 16px; vertical-align: 1px; }
.subnav.inline { position: static; margin: 4px 0 0; padding: 0; height: 44px; background: transparent; }
.store-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 22px; }
.store-body.with-preview { grid-template-columns: minmax(0, 1fr) 410px; }
.editor { min-width: 0; }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.86rem; }
.tbl th { text-align: left; color: var(--faint); font-weight: 600; font-size: 0.7rem; letter-spacing: .5px; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .1s; }
.tbl.data tbody tr:hover { background: rgba(255,255,255,0.025); }
.tbl tr.dragging { opacity: .4; }
.tbl tr.over td { box-shadow: inset 0 2px 0 var(--accent); }
.tbl tr.inactive td { opacity: .5; }
.tbl tr.inactive td.keep { opacity: 1; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .w-id { width: 150px; } .tbl .w-n { width: 100px; } .tbl .w-sw { width: 70px; } .tbl .w-x { width: 40px; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); }
.editor > .tbl-wrap, .chest .tbl-wrap { border: 1px solid var(--line); background: var(--s1); padding: 4px 6px; }
.handle { cursor: grab; color: var(--faint); user-select: none; width: 22px; display: inline-grid; place-items: center; touch-action: none; }
.handle .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.handle:active { cursor: grabbing; }
.ord { display: inline-flex; flex-direction: column; gap: 2px; }
.ord button { display: grid; place-items: center; border: 0; background: var(--s2); color: var(--muted); width: 22px; height: 15px; border-radius: 4px; cursor: pointer; padding: 0; }
.ord button .ic { width: 13px; height: 13px; vertical-align: 0; stroke-width: 2.2; }
.ord button:hover { color: var(--text); background: var(--s3); }
.ord button:disabled { opacity: .3; cursor: default; }
.x { display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--faint); width: 30px; height: 30px; border-radius: var(--r-sm); cursor: pointer; padding: 0; transition: background .12s, color .12s; }
.x .ic { width: 16px; height: 16px; vertical-align: 0; }
.x:hover { background: rgba(242,133,123,0.12); color: var(--bad); }
.tbl.data td, .tbl.data th { white-space: nowrap; }
.tbl-foot { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* ---------- looks ---------- */
.looks { display: grid; gap: 8px; }
.look { display: grid; grid-template-columns: 1.3fr repeat(2, 92px) 1fr 1.2fr auto; gap: 10px 12px; align-items: end; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); transition: border-color .2s, background .2s; }
.look.over { border-color: rgba(95,227,138,0.35); background: linear-gradient(90deg, rgba(95,227,138,0.07), var(--s1) 40%); }
.look-id { display: grid; gap: 2px; min-width: 0; align-self: center; }
.look-id b { font-family: var(--display); font-weight: 600; font-size: 0.96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-id span { font-size: 0.74rem; color: var(--faint); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; }
.look-id em, .tag { font-style: normal; font-size: 0.66rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); margin-left: 6px; text-transform: uppercase; letter-spacing: .5px; vertical-align: 2px; font-family: var(--body); }
.look-more { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.look .tail { display: grid; gap: 6px; justify-items: end; }
.look-filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- bundles ---------- */
.bundles { display: grid; gap: 12px; }
.bundle { display: grid; grid-template-columns: 150px 1fr 110px auto; gap: 10px 12px; align-items: end; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); }
.bundle .span { grid-column: 1 / -1; }
.bundle.inactive { opacity: .65; }

/* ---------- banners ---------- */
.banners { display: grid; gap: 16px; }
.banner-card { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); overflow: hidden; transition: border-color .2s, opacity .2s; box-shadow: var(--shadow); }
.banner-card.dragging { opacity: .45; }
.banner-card.over { border-color: var(--accent); box-shadow: 0 -2px 0 var(--accent); }
.banner-card.inactive { opacity: .62; }
.banner-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.015); }
.banner-top .title { font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: -0.1px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-top .title small { color: var(--faint); font-weight: 500; font-size: 0.74rem; margin-left: 8px; font-family: var(--mono); }
.state { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state.live { color: var(--good); border-color: rgba(95,227,138,0.32); background: rgba(95,227,138,0.07); }
.state.scheduled { color: var(--warn); border-color: rgba(242,194,91,0.32); background: rgba(242,194,91,0.06); }
.state.ended { color: var(--faint); }
.state.off { color: var(--bad); border-color: rgba(242,133,123,0.32); background: rgba(242,133,123,0.06); }
.banner-grid { display: grid; grid-template-columns: 260px 1fr; gap: 18px; padding: 16px; }
.banner-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.banner-fields .span { grid-column: 1 / -1; }
.art { position: relative; aspect-ratio: 7 / 4; border-radius: var(--r); overflow: hidden; border: 1px dashed var(--line-2); background: var(--s2) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 0.8rem; text-align: center; padding: 10px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.art.has { border-style: solid; border-color: var(--line); color: transparent; }
.art:hover { border-color: rgba(95,227,138,0.4); }
.art.drag { border-color: var(--accent); background-color: var(--accent-soft); }
.art input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.art .busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,20,18,0.65); color: var(--text); font-size: 0.82rem; }
.art-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.art-name { font-size: 0.72rem; color: var(--faint); font-family: var(--mono); margin-top: 8px; word-break: break-all; }
.sched, .rot { grid-column: 1 / -1; display: grid; gap: 10px 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(0,0,0,0.12); }
.sched { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rot { grid-template-columns: 1fr 90px 130px; }
.sched h4, .rot h4 { grid-column: 1 / -1; font-family: var(--body); font-size: 0.7rem; letter-spacing: .7px; text-transform: uppercase; color: var(--faint); font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rot .strip { grid-column: 1 / -1; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.strip .day { display: grid; gap: 3px; padding: 6px 4px; border-radius: 8px; background: var(--s2); text-align: center; font-size: 0.66rem; color: var(--faint); min-width: 0; }
.strip .day b { font-family: var(--display); font-size: 0.72rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .day.me { background: var(--accent-soft); outline: 1px solid rgba(95,227,138,0.45); }
.strip .day.today { box-shadow: inset 0 -2px 0 var(--warn); }
.banner-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* art library */
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-height: 50vh; overflow: auto; padding: 2px; }
.lib button.pick { position: relative; width: 100%; border: 1px solid var(--line); border-radius: var(--r); padding: 0; background: var(--s2) center / cover no-repeat; aspect-ratio: 7 / 4; cursor: pointer; overflow: hidden; }
.lib button.pick:hover, .lib button.pick.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.lib .meta { font-size: 0.7rem; color: var(--faint); display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; font-family: var(--mono); }
.lib .meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- chests ---------- */
.chests { display: grid; gap: 16px; }
.chest { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); padding: 16px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.chest .tbl-wrap { background: rgba(0,0,0,0.1); }
.chest-head { display: grid; grid-template-columns: 1fr 110px 170px auto; gap: 12px; align-items: start; }
.total { font-family: var(--display); font-weight: 700; font-size: 0.92rem; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(95,227,138,0.35); color: var(--good); background: rgba(95,227,138,0.07); white-space: nowrap; font-variant-numeric: tabular-nums; }
.total.off { color: var(--bad); border-color: rgba(242,133,123,0.45); background: rgba(242,133,123,0.08); }
.tier-name { font-weight: 600; }
.tier-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; flex: none; }

/* ---------- copy · history ---------- */
.copy-grid { display: grid; gap: 14px; max-width: 720px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); }
.versions { display: grid; gap: 8px; }
.ver { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); }
.ver .v { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.ver .v small { display: block; font-size: 0.62rem; letter-spacing: .7px; color: var(--good); text-transform: uppercase; font-family: var(--body); font-weight: 700; }
.ver .note { font-size: 0.92rem; }
.ver .meta { font-size: 0.78rem; color: var(--faint); margin-top: 2px; }

/* ---------- diff (import) ---------- */
.diff { display: grid; gap: 6px; max-height: 50vh; overflow: auto; font-size: 0.84rem; }
.diff .d { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s2); }
.diff .d b { font-size: 0.66rem; letter-spacing: .6px; text-transform: uppercase; align-self: start; padding: 2px 7px; border-radius: 999px; text-align: center; }
.diff .d.add b { background: rgba(95,227,138,0.14); color: var(--good); }
.diff .d.chg b { background: rgba(242,194,91,0.14); color: var(--warn); }
.diff .d.same b { background: rgba(255,255,255,0.06); color: var(--muted); }
.diff .d ul { list-style: none; color: var(--muted); font-size: 0.78rem; margin-top: 4px; display: grid; gap: 2px; }
.diff .d ul code { color: var(--text); font-size: 0.78rem; }

/* ---------- preview phone (drawn in the app's Slate) ---------- */
.preview { position: sticky; top: calc(var(--topbar-h) + var(--subnav-h) + 20px); }
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.scrub { display: flex; gap: 4px; align-items: center; margin-bottom: 12px; font-size: 0.8rem; }
.scrub input { padding: 5px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--s2); color: var(--text); font: inherit; font-size: 0.8rem; color-scheme: dark; }
.scrub .icon-btn { width: 30px; height: 30px; }
.scrub #scrub-today { font-size: 0.8rem; margin-left: 6px; }
.phone-scale { width: 390px; height: 844px; transform-origin: top left; }
.phone {
  width: 390px; height: 844px; border-radius: 48px; border: 1px solid rgba(255,255,255,0.14); overflow: hidden; position: relative;
  background: linear-gradient(180deg, #45554f, #4f5f55); color: #fff; box-shadow: 0 40px 100px rgba(0,0,0,0.55), inset 0 0 0 10px #0b0e0d;
  font-family: var(--body);
}
.ph-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 120px; height: 34px; border-radius: 20px; background: #000; z-index: 3; }
.ph-status { position: absolute; top: 20px; left: 38px; right: 38px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; z-index: 2; }
.ph-icons { display: inline-flex; gap: 4px; align-items: center; }
.ph-icons i { display: block; width: 16px; height: 10px; border-radius: 3px; background: rgba(255,255,255,0.9); }
.ph-icons i:first-child { width: 14px; background: linear-gradient(90deg, #fff 0 20%, transparent 20% 27%, #fff 27% 47%, transparent 47% 54%, #fff 54% 74%, transparent 74% 80%, #fff 80%); height: 9px; border-radius: 1px; }
.ph-icons i:nth-child(2) { width: 12px; border-radius: 6px 6px 1px 1px; }
.ph-icons i:last-child { width: 22px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px #fff; background: linear-gradient(90deg, #fff 0 70%, transparent 70%); }
.ph-scroll { position: absolute; inset: 10px; top: 62px; bottom: 10px; overflow-y: auto; scrollbar-width: none; padding: 0 16px 90px; border-radius: 0 0 38px 38px; }
.ph-scroll::-webkit-scrollbar { display: none; }
.ph-title { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.8px; margin: 6px 0 12px; }
.ph-bal { border-radius: 16px; padding: 14px 16px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.12); display: grid; gap: 10px; }
.ph-bal .r1 { display: flex; justify-content: space-between; align-items: center; }
.ph-bal .big { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -1px; }
.ph-bal .big small { font-size: 12px; color: #eddaff; font-weight: 600; letter-spacing: 0; }
.ph-coin { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe9a3, #e8a83a 55%, #9a6412); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25); flex: none; display: inline-block; }
.ph-bal .daily { text-align: right; font-size: 11px; color: #eddaff; }
.ph-bal .daily b { display: block; color: #ffd27a; font-size: 12px; }
.ph-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.22); overflow: hidden; }
.ph-bar i { display: block; width: 46%; height: 100%; background: #ffd27a; }
.ph-hint { font-size: 10.5px; color: #eddaff; font-family: var(--mono); line-height: 1.4; }
.ph-plus { justify-self: end; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,0.9); color: #2b3632; font-size: 11.5px; font-weight: 700; font-family: var(--display); }
.ph-banners { display: grid; gap: 14px; margin-top: 14px; }
.ph-banner { position: relative; aspect-ratio: 1400 / 800; border-radius: 14px; overflow: hidden; margin: 0 6px; background: #15151a center / cover no-repeat; box-shadow: 0 10px 30px rgba(0,0,0,0.35); font-family: var(--display); color: #fff; isolation: isolate; }
.ph-banner.has-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-banner.ph-ph { background: linear-gradient(135deg, #2a1c3f, #0f2a4a 55%, #3a1b2a); }
.ph-banner.ph-ph::before { content: ""; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 60%, rgba(255,255,255,0.05) 0 6deg, transparent 6deg 12deg); }
.ph-banner .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.4)); }
.ph-banner .bd { position: absolute; top: 9%; left: 5%; display: flex; gap: 6px; flex-wrap: wrap; max-width: 60%; }
.ph-badge { padding: 3px 9px; border-radius: 6px; background: #e3242b; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .4px; text-transform: uppercase; box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(0,0,0,0.4); transform: rotate(-3deg); }
.ph-badge.alt { background: none; box-shadow: none; color: #ffd84a; font-size: 15px; font-weight: 800; text-shadow: -1px 0 #7a3b00, 1px 0 #7a3b00, 0 1px #7a3b00, 0 -1px #7a3b00, 0 3px 4px rgba(0,0,0,0.5); transform: rotate(-6deg); position: absolute; right: -45%; top: 0; white-space: nowrap; }
.ph-banner .mid { position: absolute; left: 6%; right: 6%; top: 24%; display: grid; justify-items: center; gap: 2px; text-align: center; }
.ph-banner .eye { color: #ffd84a; font-weight: 800; font-size: 11px; text-shadow: -1px 0 #4a2a00, 1px 0 #4a2a00, 0 1px #4a2a00, 0 -1px #4a2a00, 0 2px 3px rgba(0,0,0,0.5); }
.ph-banner .ttl { font-weight: 800; font-size: 46px; line-height: 0.95; letter-spacing: -1px; text-transform: uppercase; background: linear-gradient(180deg, #fff 35%, var(--tint, #a9d9ff)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0,0,0,0.75)) drop-shadow(0 0 2px rgba(0,0,0,0.9)); }
.ph-banner .tag { margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,0.72); border: 1.5px solid #ffd84a; font-size: 9.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.ph-banner .price { position: absolute; left: 5%; bottom: 8%; display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; border-radius: 999px; background: #0b0b0e; border: 2px solid #fff; font-weight: 800; font-size: 14px; }
.ph-banner .price .ph-coin { width: 18px; height: 18px; }
.ph-banner .cd { position: absolute; right: 5%; bottom: 8%; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,0.7); border: 1px solid rgba(255,255,255,0.4); font-size: 10px; font-weight: 700; }
.ph-banner .rotag { position: absolute; right: 4%; top: 6%; font-size: 9px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.55); padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25); }
.ph-section { margin: 20px 6px 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,0.12); font-family: var(--mono); font-weight: 700; font-size: 12px; }
.ph-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 6px; }
.ph-pack { position: relative; border-radius: 12px; background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.1); padding: 8px 6px; display: grid; justify-items: center; gap: 3px; min-height: 120px; }
.ph-pack .heapc { width: 100%; height: 56px; display: grid; place-items: end center; }
.ph-pack .heapc i { display: block; width: calc(26px + 30px * var(--fill)); height: calc(16px + 22px * var(--fill)); border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; background: radial-gradient(ellipse at 40% 30%, #ffe9a3, #e8a83a 50%, #8a5810); box-shadow: 0 6px 10px rgba(0,0,0,0.3); }
.ph-pack .amt { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; }
.ph-pack .amt small { font-size: 9px; color: #eddaff; font-weight: 700; }
.ph-pack .pr { font-size: 11px; color: #fff; }
.ph-pack .lbl { font-size: 9px; color: #eddaff; }
.ph-pack .tag { position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 8px; background: rgba(98,245,138,0.2); color: #8ff7ad; font-size: 8.5px; font-weight: 800; }
.ph-foot { margin: 18px 6px 0; font-size: 10px; color: #eddaff; text-align: center; opacity: .8; }
.ph-tabbar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 64px; border-radius: 0 0 38px 38px; background: rgba(48,60,55,0.94); border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-around; align-items: center; padding: 0 12px 10px; z-index: 2; }
.ph-tabbar span { width: 36px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.25); }
.ph-tabbar span.on { background: #fff; }
.ph-home { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 130px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.7); z-index: 4; }
.ph-empty { margin: 14px 6px; padding: 18px; border: 1px dashed rgba(255,255,255,0.3); border-radius: 12px; text-align: center; font-size: 11px; color: #eddaff; }

/* ---------- players ---------- */
.search { display: flex; gap: 8px; max-width: 640px; }
.search input { padding-top: 10px; padding-bottom: 10px; }
.presults { display: grid; gap: 6px; margin-top: 16px; }
.prow { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--s1); text-align: left; color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; width: 100%; }
.prow:hover { border-color: var(--line-2); background: var(--s2); }
.prow.banned { border-color: rgba(242,133,123,0.35); }
.face { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; background: conic-gradient(from 200deg, #5fe38a, #45554f, #eddaff, #ffd27a, #5fe38a); color: #10201a; flex: none; box-shadow: inset 0 0 0 2px rgba(0,0,0,0.15); }
.face.big { width: 64px; height: 64px; font-size: 1.5rem; }
.prow .pn { min-width: 0; }
.prow .pn b { font-family: var(--display); font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pn span { display: block; color: var(--faint); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pm { text-align: right; font-size: 0.78rem; color: var(--faint); white-space: nowrap; }
.prow .pm b { display: block; color: var(--text); font-family: var(--display); font-variant-numeric: tabular-nums; }
.pcard { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pband { padding: 12px 16px; border-radius: var(--r); background: rgba(217,71,59,0.14); border: 1px solid rgba(242,133,123,0.45); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pband b { font-family: var(--display); color: #fff; }
.pband span { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.phead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.phead .pid { flex: 1 1 200px; min-width: 0; }
.phead h2, .phead .pmeta { overflow-wrap: anywhere; }
.phead h2 { font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: -0.8px; line-height: 1.1; }
.phead h2 small { color: var(--faint); font-weight: 500; font-size: 0.82rem; margin-left: 8px; letter-spacing: 0; }
.phead .pmeta { color: var(--muted); font-size: 0.85rem; margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sub-copy { border: 1px solid var(--line); background: var(--s2); color: var(--muted); font: inherit; font-size: 0.72rem; font-family: var(--mono); padding: 2px 8px; border-radius: 6px; cursor: pointer; }
.sub-copy:hover { color: var(--text); border-color: var(--line-2); }
.flags { display: flex; gap: 6px; flex-wrap: wrap; }
.flag { padding: 4px 10px; border-radius: 999px; background: rgba(242,194,91,0.1); border: 1px solid rgba(242,194,91,0.3); color: var(--warn); font-size: 0.76rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px; border-radius: var(--r-lg); border: 1px solid var(--line); background: rgba(31,39,36,0.92); position: sticky; top: calc(var(--topbar-h) + 10px); z-index: 50; backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.actions .sep { flex: 1; }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.console .card { padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); min-width: 0; }
.pgrid .card.wide { grid-column: span 2; }
.console .card-eyebrow { font-family: var(--body); color: var(--faint); letter-spacing: .8px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; margin-bottom: 12px; }
.card-eyebrow.sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-note { margin: -6px 0 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 0.88rem; }
.kv span { color: var(--faint); }
.kv b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; }
.stat b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.4px; }
.stat span { color: var(--faint); font-size: 0.76rem; }
.bigstat { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-family: var(--display); font-weight: 700; font-size: 2.2rem; letter-spacing: -1.2px; line-height: 1; margin-bottom: 14px; }
.bigstat small { font-size: 0.86rem; color: var(--faint); font-weight: 500; letter-spacing: 0; font-family: var(--body); }
.ledger-mini { margin-top: 12px; border-top: 1px solid var(--line); }
.ledger-mini .lr { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.84rem; }
.ledger-mini .lr span { color: var(--faint); font-size: 0.76rem; }
.ledger-mini .lr b { font-variant-numeric: tabular-nums; }
.ledger-mini .lr b.pos { color: var(--good); background: none; width: auto; height: auto; display: inline; border-radius: 0; font-family: inherit; font-weight: 600; font-size: inherit; } .ledger-mini .lr b.neg { color: var(--muted); }
.letter { padding: 16px 18px; border-radius: var(--r); border: 1px solid rgba(237,218,255,0.25); background: rgba(237,218,255,0.05); font-size: 0.92rem; line-height: 1.6; }
.letter b { display: block; font-family: var(--display); margin-bottom: 6px; }
.letter .from { color: var(--faint); font-size: 0.8rem; margin-top: 10px; }
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; font-size: 0.84rem; margin-top: 10px; }
.counts div { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: var(--s2); font-family: var(--mono); }
/* installs on the card */
.installs { display: grid; gap: 8px; }
.inst { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; border-radius: var(--r); background: var(--s2); border: 1px solid var(--line); }
.inst-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); color: var(--accent); }
.inst-main { display: grid; gap: 2px; min-width: 0; font-size: 0.82rem; color: var(--muted); }
.inst-main b { font-family: var(--display); font-weight: 600; color: var(--text); font-size: 0.94rem; }
.inst-main span { overflow-wrap: anywhere; }
.inst-place .ic { width: 14px; height: 14px; margin-right: 4px; color: var(--faint); vertical-align: -2px; }
.inst-place .linkish .ic { color: inherit; margin-right: 2px; }
.inst-when { display: grid; gap: 3px; justify-items: end; text-align: right; font-size: 0.76rem; color: var(--faint); }
.inst-when b { color: var(--text); font-weight: 600; font-size: 0.82rem; }

/* ---------- audit ---------- */
.audit { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--s1); overflow: hidden; }
.arow { display: grid; grid-template-columns: 150px 150px minmax(0, 1fr); gap: 14px; align-items: start; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.arow:last-child { border-bottom: 0; }
.arow:hover { background: rgba(255,255,255,0.02); }
.arow .at { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.arow .at small { display: block; color: var(--faint); }
.arow .what { min-width: 0; overflow-wrap: anywhere; }
.act { display: inline-block; padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: 0.68rem; letter-spacing: .5px; text-transform: uppercase; background: var(--s3); color: var(--text); white-space: nowrap; }
.act.ban, .act.delete, .act.extension\.delete { background: rgba(217,71,59,0.18); color: var(--bad); }
.act.unban, .act.gift, .act.plus, .act.cosmetic, .act.extension\.create, .act.extension { background: rgba(95,227,138,0.12); color: var(--good); }
.act.publish, .act.rollback { background: rgba(242,194,91,0.13); color: var(--warn); }
.act.mail { background: rgba(154,124,240,0.18); color: #c9b8ff; }
.arow .what a { color: var(--accent); }
.arow details { margin-top: 4px; }
.arow summary { cursor: pointer; color: var(--faint); font-size: 0.78rem; }
.arow pre { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,0.3); font-size: 0.74rem; overflow: auto; color: var(--muted); }

/* ---------- KPI tiles (money, analytics, home) ---------- */
.kpis, .mtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi, .mtile { position: relative; padding: 16px 18px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); min-width: 0; display: grid; gap: 4px; align-content: start; }
.kpi-l { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.kpi-l .ic { width: 15px; height: 15px; color: var(--faint); }
.kpi-v, .mtile .v { font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: -0.6px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-s, .mtile .s { color: var(--faint); font-size: 0.76rem; line-height: 1.4; }
.kpi.accent { border-color: rgba(95,227,138,0.28); background: linear-gradient(160deg, rgba(95,227,138,0.08), var(--s1) 55%); }
.kpi.accent .kpi-l .ic { color: var(--accent); }
.kpi.muted-kpi { padding: 0; border: 0; background: none; grid-column: span 2; }
.mtile .l { color: var(--muted); font-size: 0.8rem; order: -1; }
.mtile .v { font-size: clamp(1.15rem, 1.3vw, 1.5rem); font-variant-numeric: tabular-nums; }
.mtile .s { font-family: var(--body); }
.mtile.good { border-color: rgba(95,227,138,0.28); background: linear-gradient(160deg, rgba(95,227,138,0.08), var(--s1) 55%); }
.mtile.good .v { color: var(--text); }
.mtile .s .neg { color: var(--bad); }
.mtiles > .notready, .mtiles > .empty, .mtiles > .skel-tiles { grid-column: 1 / -1; }

/* ---------- money ---------- */
.money-head { margin-bottom: 12px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px; margin-bottom: 18px; padding: 12px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); }
.filters .f.compact { grid-auto-flow: column; align-items: center; gap: 8px; }
.filters .f.compact > span { font-size: 0.78rem; }
.filters .f.compact input { width: 150px; }
.filters .sw { padding: 6px 4px; }
.filters .btn { margin-left: auto; }
.money-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 12px; }
#money-table .tbl-wrap { border: 1px solid var(--line); background: var(--s1); max-height: 70vh; }
#money-table .tbl th { position: sticky; top: 0; background: var(--s1); z-index: 1; }
#money-table .tbl td.k { font-family: var(--mono); font-size: 0.78rem; }
#money-table .tbl td.dim { color: var(--faint); }
#money-table .tbl td.pos { color: var(--good); background: none; width: auto; height: auto; display: table-cell; border-radius: 0; font-family: inherit; font-weight: inherit; font-size: inherit; }
#money-table .tbl tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); border-bottom: 0; background: var(--s2); position: sticky; bottom: 0; }
.money-sum { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; margin-top: 8px; }
.deal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.money-note-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.money-note-form input[type="text"] { flex: 1 1 260px; min-width: 0; }
.money-note-form input[type="datetime-local"] { flex: 0 1 220px; }

/* ---------- ideas ---------- */
.ideas-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 12px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); }
.ideas-add input#ideas-text { flex: 1 1 320px; min-width: 0; }
.ideas-add input#ideas-tag { flex: 0 1 180px; min-width: 0; }
.ideas-filter { margin: 0 0 12px; }
.ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); overflow: hidden; }
.ideas:has(> li > .skel), .ideas:has(> .empty) { border: 0; background: none; }
.idea { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.idea:last-child { border-bottom: 0; }
.idea:hover { background: rgba(255,255,255,0.02); }
.idea label { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; cursor: pointer; line-height: 1.45; font-size: 0.92rem; }
.idea label input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--series-1); }
.idea.done label span { color: var(--faint); text-decoration: line-through; }
.idea-tag { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 9px; flex: none; }
#ideas-note { margin-top: 10px; }

/* ---------- home ---------- */
.hello { margin: 4px 0 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.hello h2 { font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: -0.7px; }
.hello p { color: var(--muted); margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid2 .span2 { grid-column: 1 / -1; }
.panel { min-width: 0; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); display: flex; flex-direction: column; }
.panel-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.panel-h h3 { font-family: var(--display); font-weight: 600; font-size: 0.98rem; letter-spacing: -0.1px; }
.panel-h p { color: var(--faint); font-size: 0.8rem; margin-top: 2px; }
.panel-h p b { color: var(--text); font-weight: 600; }
.panel-tools { display: flex; gap: 8px; align-items: center; flex: none; }
.panel-b { padding: 14px 18px 18px; min-width: 0; flex: 1; }
.store-glance { display: grid; gap: 12px; }
.sg-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sg-list { list-style: none; display: grid; gap: 8px; }
.sg-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 0.84rem; }
.sg-list li.muted { display: block; }
.sg-art { width: 56px; height: 32px; border-radius: 6px; background: var(--s3) center / cover no-repeat; border: 1px solid var(--line); }
.sg-t { display: grid; min-width: 0; }
.sg-t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-t small { color: var(--faint); font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.feed { list-style: none; display: grid; gap: 0; }
.feed li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; min-width: 0; }
.feed li:last-child { border-bottom: 0; }
.feed-t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex: 1; min-width: 0; }
.feed-t > span, .feed-t > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-t a { color: var(--accent); font-family: var(--mono); font-size: 0.82rem; }
.feed-t small { color: var(--faint); font-size: 0.74rem; white-space: nowrap; flex: none; }
.ideas-mini li > .ic { color: var(--warn); width: 16px; height: 16px; }
.more-link { margin-top: 10px; font-size: 0.82rem; }
.more-link .ic { width: 14px; height: 14px; vertical-align: -2px; }
.pending-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: var(--r); background: rgba(242,194,91,0.07); border: 1px solid rgba(242,194,91,0.25); font-size: 0.84rem; }
.pending-note > .ic { color: var(--warn); }
.pending-note span { flex: 1; }
.quick-find { flex: 0 1 420px; min-width: 0; }

/* ---------- analytics ---------- */
#an-body.refetching .panel, #an-body.refetching .kpis { opacity: .55; transition: opacity .2s; }
.chart-host { width: 100%; min-height: 150px; }
.chart { display: block; overflow: visible; font-family: var(--body); }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .lbl { fill: var(--muted); font-size: 11px; font-weight: 600; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .bar { transition: filter .12s; }
.chart .band.hov .bar { filter: brightness(1.35); }
.chart .band.hov .hit { fill: rgba(255,255,255,0.03); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .wash { opacity: .1; }
.chart .dot, .chart .xd { stroke: var(--s1); stroke-width: 2; }
.chart .xd { opacity: 0; pointer-events: none; transition: opacity .08s; }
.chart .xh { stroke: var(--axis); stroke-width: 1; opacity: 0; pointer-events: none; }
.legend { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.lk { width: 14px; height: 2px; border-radius: 1px; display: inline-block; }
.callouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.callouts > div { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; padding: 10px 12px; border-radius: var(--r); background: var(--s2); font-size: 0.8rem; }
.callouts > div > .ic { grid-row: span 2; color: var(--faint); width: 16px; height: 16px; margin-top: 2px; }
.callouts span { color: var(--faint); }
.callouts b { font-weight: 600; }
.barlist { list-style: none; display: grid; gap: 2px; }
.barlist li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(60px, 1fr) auto; gap: 12px; align-items: center; padding: 6px 6px; margin: 0 -6px; border-radius: 7px; font-size: 0.84rem; cursor: default; }
.barlist li.hov, .barlist li:hover { background: rgba(255,255,255,0.03); }
.bl-l { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.bl-l > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-l small { color: var(--faint); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); }
.bl-t { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.04); overflow: hidden; }
.bl-t i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); }
.barlist li.hov .bl-t i { filter: brightness(1.3); }
.bl-v { display: flex; align-items: baseline; gap: 8px; justify-content: flex-end; min-width: 84px; font-variant-numeric: tabular-nums; }
.bl-v b { font-weight: 600; }
.bl-v small { color: var(--faint); font-size: 0.74rem; min-width: 40px; text-align: right; }
.bl-more { margin-top: 6px; }
.bl-more summary { cursor: pointer; color: var(--faint); font-size: 0.8rem; padding: 4px 0; }
.bl-more summary:hover { color: var(--text); }
.mini-h { font-size: 0.7rem; letter-spacing: .7px; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 2px 0 6px; }
.mini-h:not(:first-child) { margin-top: 14px; }
.tbl-toggle { font-size: 0.8rem !important; gap: 6px !important; }
.tbl-toggle .ic { width: 15px; height: 15px; }
.an-foot { margin-top: 16px; display: flex; gap: 8px; align-items: center; color: var(--faint); }
.an-foot .ic { width: 15px; height: 15px; }
.panel .tbl-wrap { max-height: 360px; border: 1px solid var(--line); }
.panel .tbl th { position: sticky; top: 0; background: var(--s1); }

/* ---------- extensions ---------- */
.toolbar { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .qwrap { flex: 0 1 320px; }
.toolbar .chips { margin: 0; flex: 1; min-width: 0; }
.ext-list { display: grid; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); overflow: hidden; }
.ext { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; border-bottom: 1px solid var(--line); transition: background .12s; }
.ext:last-child { border-bottom: 0; }
.ext:hover { background: rgba(255,255,255,0.015); }
.ext.removed, .ext.rejected { opacity: .62; }
.ext-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--slate); color: var(--text); font-family: var(--display); font-weight: 700; font-size: 1.1rem; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.ext-ic img { width: 100%; height: 100%; object-fit: cover; }
.ext-main { min-width: 0; display: grid; gap: 4px; }
.ext-t { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.ext-t b { font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.ext-t .mono { font-size: 0.76rem; }
.ext-main p { color: var(--muted); font-size: 0.86rem; }
.ext-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--faint); font-size: 0.76rem; align-items: center; }
.ext-meta .ic { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; }
.ext-ops { display: flex; align-items: center; gap: 4px; }
.st-sel { position: relative; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line-2); background: var(--s2); padding-left: 10px; }
.st-sel select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.78rem; font-weight: 600; padding: 5px 26px 5px 7px; cursor: pointer; text-transform: capitalize; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.st-sel select:focus { outline: none; }
.st-sel:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.st-sel select option { background: var(--s2); color: var(--text); }
.st-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--faint); flex: none; }
.st-dot.approved { background: var(--good); } .st-dot.pending { background: var(--warn); } .st-dot.hidden { background: var(--series-2); }
.st-dot.removed, .st-dot.rejected { background: var(--bad); }

/* ---------- palette ---------- */
.modal.pal-modal { max-width: 620px; padding: 0; gap: 0; align-self: start; margin-top: 12vh; overflow: hidden; }
.palette { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(560px, 72vh); }
.pal-q { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pal-q > .ic { color: var(--faint); }
.modal .pal-q input { border: 0; background: transparent; padding: 4px 0; font-size: 1rem; box-shadow: none !important; }
.pal-list { list-style: none; overflow-y: auto; padding: 6px; }
.pal-g { padding: 10px 10px 4px; font-size: 0.68rem; letter-spacing: .8px; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.pal-i { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 0.9rem; color: var(--muted); }
.pal-i .ic { color: var(--faint); }
.pal-i.on { background: var(--s3); color: var(--text); }
.pal-i.on .ic { color: var(--accent); }
.pal-l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-h { color: var(--faint); font-size: 0.74rem; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.pal-none { padding: 22px; text-align: center; color: var(--faint); font-size: 0.88rem; }
.pal-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 0.74rem; color: var(--faint); }
.pal-foot span { display: inline-flex; gap: 5px; align-items: center; }
.keys { display: grid; gap: 2px; }
.keys > div { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.keys > div:last-child { border-bottom: 0; }
.keys em { font-style: normal; color: var(--faint); font-size: 0.74rem; margin: 0 2px; }
.keys b { font-weight: 500; color: var(--muted); text-align: right; }

/* ---------- modal ---------- */
.modal-host { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(6,9,8,0.62); backdrop-filter: blur(5px); padding: 16px; animation: fadeIn .16s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px 24px; border-radius: 18px; border: 1px solid var(--line-2); background: #1d2522; box-shadow: 0 40px 120px rgba(0,0,0,0.6); display: grid; gap: 14px; animation: rise .22s cubic-bezier(.16,1,.3,1); }
.modal.wide { max-width: 780px; }
@keyframes rise { from { transform: translateY(12px) scale(.985); opacity: 0; } }
.modal h3 { font-family: var(--display); font-weight: 700; font-size: 1.22rem; letter-spacing: -0.4px; }
.modal h3.danger { color: var(--bad); }
.modal p { color: var(--muted); font-size: 0.9rem; }
.modal .f { gap: 6px; }
.modal .f > span { font-size: 0.8rem; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.modal .msg { margin-top: 0; }
.modal .msg:empty { display: none; }
.modal .msg.bad { color: var(--bad); }

/* ---------- assets ---------- */
.packs-list { display: grid; gap: 14px; }
.pack-f { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); overflow: hidden; transition: border-color .15s, background-color .15s; }
.pack-f.drag { border-color: var(--accent); background-color: rgba(95,227,138,0.05); }
.pack-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pack-head .fold { font-family: var(--display); font-weight: 700; font-size: 1rem; display: inline-flex; align-items: center; gap: 10px; }
.pack-head .fold i { width: 22px; height: 17px; border-radius: 3px 5px 5px 5px; background: linear-gradient(180deg, #ffd27a, #e3a843); position: relative; display: inline-block; }
.pack-head .fold i::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 6px; border-radius: 3px 3px 0 0; background: #e3a843; }
.pack-head .meta { color: var(--faint); font-size: 0.8rem; }
.pack-head .tools { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pack-head .tools input[type=file] { display: none; }
.pack-body { padding: 4px 16px 14px; }
.afile { display: grid; grid-template-columns: 44px minmax(0, 1.4fr) 80px 90px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.afile:last-child { border-bottom: 0; }
.afile .thumb { width: 44px; height: 32px; border-radius: 6px; background: var(--s2) center / cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; font-size: 0.6rem; color: var(--faint); text-transform: uppercase; }
.afile .nm { font-family: var(--mono); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afile .nm small { display: block; color: var(--faint); font-size: 0.72rem; font-family: var(--body); }
.afile .sz, .afile .hs { color: var(--faint); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.afile .hs { font-family: var(--mono); }
.afile .url { display: flex; align-items: center; gap: 6px; min-width: 0; }
.afile .url span { color: var(--faint); font-size: 0.74rem; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afile .ops { display: flex; gap: 2px; }
.afile.bad .thumb { border-color: var(--bad); }
.afile .used { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(95,227,138,0.12); color: var(--good); font-size: 0.66rem; font-weight: 700; }
.drop-hint { padding: 14px; text-align: center; color: var(--faint); font-size: 0.82rem; border: 1px dashed var(--line-2); border-radius: var(--r); margin-top: 10px; }
.upq { display: grid; gap: 4px; margin: 8px 0; }
.upq .u { display: grid; grid-template-columns: 1fr 100px; gap: 10px; align-items: center; font-size: 0.8rem; color: var(--muted); }
.upq .u i { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); overflow: hidden; }
.upq .u i::after { content: ""; display: block; height: 100%; width: var(--w, 0%); background: var(--accent); transition: width .3s; }
.upq .u.done { color: var(--good); } .upq .u.fail { color: var(--bad); }
.sync-list { display: grid; gap: 4px; font-size: 0.84rem; }
.sync-list div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--s2); font-family: var(--mono); }
.sync-list b.bad { color: var(--bad); } .sync-list b.good { color: var(--good); }
.src-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); margin-bottom: 12px; }
.src-tabs button { padding: 5px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.src-tabs button.on { background: var(--s3); color: var(--text); }
.qbox { width: auto; }

/* ---------- videos ---------- */
.vid-settings { display: grid; grid-template-columns: minmax(0, 1fr) 130px 130px; gap: 10px 14px; align-items: start; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); margin-bottom: 12px; }
.vid-settings .ferr { grid-column: 1 / -1; }
.lineup { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: rgba(0,0,0,0.12); margin-bottom: 18px; }
.lineup-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lineup-head h4 { font-size: 0.7rem; letter-spacing: .7px; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.lineup-head b { font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.lineup-head .linkish { font-size: 1rem; padding: 0 6px; }
.lineup .slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.slot { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r); background: var(--s2); border: 1px solid transparent; min-width: 0; }
.slot .n { font-size: 0.64rem; letter-spacing: .7px; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.slot b { font-family: var(--display); font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .s { font-size: 0.74rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.sp { border-color: rgba(242,194,91,0.3); background: rgba(242,194,91,0.06); }
.slot.sp .s { color: var(--warn); }
.slot.none b { color: var(--faint); }
.clips { display: grid; gap: 16px; }
.clip-card { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); overflow: hidden; transition: border-color .2s; box-shadow: var(--shadow); }
.clip-card.dragging { opacity: .45; }
.clip-card.over { border-color: var(--accent); box-shadow: 0 -2px 0 var(--accent); }
.clip-card.inactive { opacity: .62; }
.csp { font-size: 0.7rem; color: var(--muted); white-space: nowrap; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.csp.sp { color: var(--warn); border-color: rgba(242,194,91,0.35); background: rgba(242,194,91,0.07); }
.clip-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; padding: 16px; }
.clip-media { display: grid; gap: 10px; align-content: start; min-width: 0; }
.vprev { aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--line); display: grid; place-items: center; color: var(--faint); font-size: 0.8rem; }
.vprev video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vdrop, .pdrop, .ldrop { position: relative; border-radius: var(--r); border: 1px dashed var(--line-2); color: var(--muted); font-size: 0.78rem; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s, padding .15s; }
.vdrop:hover, .pdrop:hover, .ldrop:hover { border-color: rgba(95,227,138,0.4); }
.vdrop { padding: 12px 14px; line-height: 1.45; }
.vdrop b { color: var(--text); font-weight: 600; }
.pdrop { aspect-ratio: 16 / 9; background: var(--s2) center / cover no-repeat; display: grid; place-items: center; }
.ldrop { height: 72px; background: var(--s2) center / contain no-repeat; display: grid; place-items: center; }
.pdrop.has, .ldrop.has { border-style: solid; border-color: var(--line); color: transparent; }
.vdrop.drag, .pdrop.drag, .ldrop.drag { border-color: var(--accent); background-color: var(--accent-soft); }
.vdrop input[type=file], .pdrop input[type=file], .ldrop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.vprog { position: absolute; left: 10px; right: 10px; bottom: 6px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 0.7rem; color: var(--text); }
.vprog i { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.12); overflow: hidden; }
.vprog i::after { content: ""; display: block; height: 100%; width: var(--w, 0%); background: var(--accent); transition: width .2s; }
.vdrop.busy { padding-bottom: 28px; }
.pdrop.busy, .ldrop.busy { color: transparent; }
.pdrop.busy::before, .ldrop.busy::before { content: ""; position: absolute; inset: 0; background: rgba(15,20,18,0.55); }
.clip-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; min-width: 0; }
.clip-fields .span { grid-column: 1 / -1; }
.clip-fields .f, .clip-media .f, .sponsor .f { align-content: start; }
.sponsor { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(0,0,0,0.12); }
.sponsor.on { border-color: rgba(242,194,91,0.3); background: rgba(242,194,91,0.04); }
.sponsor h4 { grid-column: 1 / -1; font-size: 0.7rem; letter-spacing: .7px; text-transform: uppercase; color: var(--faint); font-weight: 600; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sponsor h4 .sw { font-size: inherit; letter-spacing: inherit; text-transform: inherit; font-family: inherit; font-weight: inherit; }
.cnt { font-style: normal; margin-left: 8px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cnt.over { color: var(--bad); }
.endcard { grid-column: 1 / -1; display: grid; gap: 4px; justify-items: center; }
.endcard > div:first-child { width: 100%; max-width: 300px; }
.ec { position: relative; display: grid; justify-items: center; gap: 6px; padding: 22px 16px 16px; border-radius: 14px; background: radial-gradient(ellipse at 50% 0%, #2c3833, #121715 75%); border: 1px solid rgba(255,255,255,0.08); text-align: center; color: #f2f2f5; }
.ec-close { position: absolute; top: 10px; right: 12px; font-size: 0.7rem; color: var(--faint); }
.ec-logo { width: 56px; height: 56px; border-radius: 14px; background: #fff center / contain no-repeat; display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: #0a0a0c; font-size: 1.4rem; box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.ec-sub { font-size: 0.64rem; color: var(--faint); letter-spacing: .8px; text-transform: uppercase; margin-top: 4px; }
.ec-name { font-family: var(--display); font-weight: 700; font-size: 0.98rem; }
.ec-cta { margin-top: 6px; padding: 8px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700; font-size: 0.8rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-cap { font-size: 0.7rem; color: var(--faint); text-align: center; }
.vid-stats { margin-top: 26px; padding: 16px 18px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); }
.vid-stats h3 { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.3px; }
.vid-stats .tab-head p { max-width: 56ch; }
.vid-stats .tab-tools { align-items: end; }
.vid-stats .f.compact input[type=date] { width: 150px; padding: 7px 9px; font-size: 0.84rem; color-scheme: dark; }
.vid-stats .tbl-wrap { margin: 0; padding: 0; }
.tbl.vstats td b { font-family: var(--display); font-weight: 600; }
.tbl.vstats td small { display: block; font-size: 0.72rem; white-space: nowrap; color: var(--faint); }
.tbl.vstats tfoot td { color: var(--muted); font-size: 0.8rem; border-bottom: 0; border-top: 1px solid var(--line-2); }
.pctbar { display: inline-grid; gap: 3px; min-width: 72px; justify-items: end; font-variant-numeric: tabular-nums; }
.pctbar i { display: block; width: 72px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; }
.pctbar i::after { content: ""; display: block; height: 100%; width: var(--w, 0%); background: var(--series-1); }
.vlib { display: grid; gap: 6px; max-height: 50vh; overflow: auto; padding: 2px; }
.vlib .vfile { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--s2); color: var(--text); font: inherit; cursor: pointer; }
.vlib .vfile.on, .vlib .vfile:hover { border-color: var(--accent); }
.vlib .vfile b { font-family: var(--mono); font-size: 0.86rem; }
.vlib .vfile span { font-size: 0.74rem; color: var(--faint); }
.ph-videos { margin: 18px 6px 8px; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.1); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.ph-videos b { display: block; font-weight: 700; font-size: 14px; }
.ph-videos .d { display: block; margin-top: 3px; font-family: var(--mono); font-size: 10.5px; color: #eddaff; line-height: 1.4; }
.ph-videos .d.sp { color: #ffd27a; margin-top: 1px; }
.ph-watch { padding: 8px 12px; border-radius: 999px; background: #fff; color: #2b3632; font-size: 11px; font-weight: 700; font-family: var(--display); white-space: nowrap; }
.ph-watch.off { opacity: .45; }

/* the chest's scene: knobs on the left, the live paint on the right */
.scene { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; border-top: 1px solid var(--line); padding-top: 14px; }
.scene h4 { margin: 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .7px; color: var(--faint); font-weight: 600; }
.scene-ctl { display: grid; gap: 10px; min-width: 0; }
.scene .colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.scene .colors input[type=color] { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; padding: 3px; cursor: pointer; }
.scene .colors input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.scene .colors input[type=color]::-webkit-color-swatch { border: none; border-radius: 7px; }
.scene .knobs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.swirl-preview { width: 100%; aspect-ratio: 21 / 13; border-radius: 14px; border: 1px solid var(--line); background: #0a0c0b; display: block; }
.swirl-preview.empty { display: grid; place-items: center; color: var(--faint); font-size: .8rem; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .store-body.with-preview { grid-template-columns: 1fr; }
  .preview { position: fixed; inset: 0; top: var(--topbar-h); z-index: 90; background: rgba(16,21,19,0.97); padding: 14px 16px 24px; overflow: auto; display: grid; grid-template-rows: auto auto 1fr; justify-items: center; }
  .preview .preview-head, .preview .scrub { width: 100%; max-width: 390px; }
  .phone-scale { transform: scale(var(--ps, 1)); }
}
@media (max-width: 1180px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .pgrid { grid-template-columns: 1fr 1fr; }
  .pgrid .card.wide { grid-column: span 2; }
  .look { grid-template-columns: 1fr 1fr; }
  .look .tail { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; gap: 14px; }
  .look-more { grid-template-columns: 1fr; }
  .banner-grid { grid-template-columns: 1fr; }
  .banner-grid > div:first-child { max-width: 360px; }
}
/* the sidebar becomes a drawer */
@media (max-width: 1024px) {
  .side { transform: translateX(-102%); transition: transform .24s cubic-bezier(.16,1,.3,1); box-shadow: 20px 0 60px rgba(0,0,0,0.4); width: min(300px, 86vw); }
  body.side-open .side { transform: none; }
  .side .side-close { display: inline-grid; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar-row { padding: 8px 16px; }
  .shell { padding: 16px 16px 88px; }
  .subnav { margin: 0 -16px; padding: 0 16px; }
  .subnav.inline { margin: 4px 0 0; padding: 0; }
}
@media (max-width: 760px) {
  body.console { font-size: 14.5px; }
  body[data-area=store] .motto { padding: 9px 14px; margin-bottom: 14px; align-items: center; background: transparent; }
  body[data-area=store] .motto-sub { display: none; }
  body[data-area=store] .motto-line { font-size: 0.86rem; font-weight: 600; color: var(--muted); }
  body[data-area=store] .motto > .ic { margin-top: 0; width: 16px; height: 16px; }
  .topbar-row { gap: 8px; min-height: 56px; }
  .page-title { font-size: 0.86rem; }
  .page-title .crumb { display: none; }
  .page-title h1 { font-family: var(--display); font-size: 1rem; font-weight: 700; }
  .search-btn { display: inline-grid; }
  .store-actions .btn .lbl { display: none; }
  .store-actions .btn { padding: 8px 10px; }
  .draft-status { padding: 4px 8px; font-size: 0.72rem; }
  .draft-status .txt { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
  .tab-head h2 { font-size: 1.22rem; }
  .motto { padding: 12px 14px; gap: 10px; }
  .motto-sub { font-size: 0.82rem; }
  .kpis, .mtiles, .skel-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi, .mtile { padding: 13px 14px; }
  .kpi-v, .mtile .v { font-size: 1.3rem; }
  .kpi.muted-kpi { grid-column: 1 / -1; }
  .callouts { grid-template-columns: 1fr; }
  .panel-h { padding: 14px 14px 0; flex-wrap: wrap; }
  .panel-b { padding: 12px 14px 14px; }
  .barlist li { grid-template-columns: minmax(0, 1fr) 56px auto; gap: 8px; }
  .bl-v { min-width: 0; }
  .bl-l small { display: none; }
  .gate-card { padding: 28px 18px 24px; }
  .prow { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
  .face { width: 36px; height: 36px; }
  .face.big { width: 54px; height: 54px; }
  .prow .pm { font-size: 0.72rem; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .pgrid .card.wide { grid-column: auto; }
  .handle { display: none; }   /* drag needs a mouse; the arrows do the job here */
  .stats4 { grid-template-columns: repeat(2, 1fr); }
  .bundle { grid-template-columns: 1fr 1fr; }
  .banner-fields { grid-template-columns: 1fr; }
  .banner-grid > div:first-child { max-width: none; }
  .sched, .rot { grid-template-columns: 1fr; }
  .chest-head { grid-template-columns: 1fr 1fr; }
  .ver { grid-template-columns: 56px 1fr; }
  .ver .btn { grid-column: 1 / -1; justify-content: center; }
  .arow { grid-template-columns: 1fr; gap: 6px; }
  .arow .at small { display: inline; margin-left: 6px; }
  .actions { position: static; }
  .actions .sep { display: none; }
  .phead h2 { font-size: 1.36rem; }
  .tbl .w-id { width: 110px; }
  .inst { grid-template-columns: 36px minmax(0, 1fr); }
  .inst-when { grid-column: 2; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; gap: 10px; align-items: center; }
  .ext { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .ext-ic { width: 40px; height: 40px; }
  .ext-ops { grid-column: 2; }
  .toolbar .qwrap { flex: 1 1 100%; }
  .filters { padding: 10px; }
  .filters .seg { width: 100%; }
  .filters .seg button { flex: 1; }
  .filters .f.compact { flex: 1 1 140px; }
  .filters .f.compact input { width: 100%; }
  .filters .btn { margin-left: 0; }
  .tab-tools { width: 100%; }
  .tab-tools .seg { flex: 1; }
  .tab-tools .seg button { flex: 1; padding: 5px 6px; }
  #an-refresh .lbl { display: none; }
  .modal { padding: 18px; border-radius: 18px 18px 14px 14px; align-self: end; max-height: calc(100vh - 16px); }
  .modal.pal-modal { align-self: start; margin-top: 8px; }
  .modal-host { padding: 8px; align-items: end; }
  .toasts { right: 16px; left: 16px; bottom: 16px; width: auto; justify-items: stretch; }
  .sg-list li { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .sg-art { width: 48px; height: 28px; }
}
@media (max-width: 400px) {
  .kpis, .mtiles, .skel-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kpi-s { font-size: 0.72rem; }
  .draft-status { padding: 8px; }
  .draft-status .txt { display: none; }
}
@media (max-width: 900px) {
  .afile { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .afile .sz, .afile .hs, .afile .url { display: none; }
}
@media (max-width: 980px) {
  .clip-grid { grid-template-columns: 1fr; }
  .clip-media { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .clip-media > .vprev { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .vid-settings { grid-template-columns: 1fr 1fr; }
  .vid-settings > .f:first-child { grid-column: 1 / -1; }
  .clip-media { grid-template-columns: 1fr; }
  .clip-fields, .sponsor { grid-template-columns: 1fr; }
  .csp { display: none; }
  .vid-stats .tab-tools { width: 100%; }
  .vid-stats .f.compact { flex: 1; min-width: 120px; }
  .vid-stats .f.compact input[type=date] { width: 100%; }
  .ph-videos { grid-template-columns: 1fr; }
  .ph-watch { justify-self: start; }
  .tbl.vstats th, .tbl.vstats td { padding: 7px 6px; font-size: 0.82rem; }
  .tbl.vstats td small { white-space: normal; }
  .pctbar { min-width: 0; } .pctbar i { display: none; }
}
@media (max-width: 820px) { .scene { grid-template-columns: 1fr; } .scene .knobs { grid-template-columns: repeat(2, 1fr); } }

/* editing tables become cards on phones: each row a small grid with its own labels */
@media (max-width: 720px) {
  .editor > .tbl-wrap { border: 0; background: none; padding: 0; }
  .tbl.packs, .tbl.tiers { display: block; }
  .tbl.packs thead, .tbl.tiers thead { display: none; }
  .tbl.packs tbody, .tbl.tiers tbody { display: grid; gap: 8px; }
  .tbl.packs tr, .tbl.tiers tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 10px; padding: 12px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--s1); }
  .tbl.packs td, .tbl.tiers td { display: block; padding: 0; border: 0; min-width: 0; }
  .tbl.packs td[data-l]::before, .tbl.tiers td[data-l]::before { content: attr(data-l); display: block; font-size: 0.7rem; color: var(--faint); margin-bottom: 4px; letter-spacing: .3px; }
  .tbl.packs .c-ord { grid-column: 1 / 2; align-self: center; }
  .tbl.packs .c-id { grid-column: 2 / 6; }
  .tbl.packs .c-x { grid-column: 6 / 7; justify-self: end; align-self: center; }
  .tbl.packs .c-amt { grid-column: 1 / 3; }
  .tbl.packs .c-price { grid-column: 3 / 5; }
  .tbl.packs .c-money { grid-column: 5 / 7; align-self: end; padding-bottom: 8px; }
  .tbl.packs .c-label { grid-column: 1 / 5; }
  .tbl.packs .c-best { grid-column: 5 / 6; }
  .tbl.packs .c-on { grid-column: 6 / 7; }
  .tbl.packs .c-best .rd, .tbl.packs .c-on .sw { margin-top: 4px; }
  .tbl.packs .ord { flex-direction: row; }
  .tbl.tiers .c-name { grid-column: 1 / 4; width: auto !important; }
  .tbl.tiers .c-chance { grid-column: 4 / 6; }
  .tbl.tiers .c-x { grid-column: 6 / 7; justify-self: end; align-self: end; }
  .tbl.tiers .c-items { grid-column: 1 / 7; }
  .tbl.packs tr.inactive td { opacity: 1; }
  .tbl.packs tr.inactive { opacity: .6; }
  .chest .tbl-wrap { border: 0; background: none; padding: 0; }
  .tbl.tiers tr { background: var(--s2); }
}
@media (prefers-reduced-motion: reduce) {
  .modal, .modal-host, .area, .toast { animation: none; }
  .draft-status.saving i, .skel i, .skel-tiles i, .skel-kpi, .spinner { animation: none; }
  .side { transition: none; }
}

/* money: the revenue columns over the table; seven tiles in one row on a desktop */
.money-chart { margin-bottom: 14px; }
.mtiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 760px) { .mtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
