/* Counterslip · Light glass (2026-11-09).
   Loaded after the inline stylesheet in index.html and wins on order.
   Kraft paper ground with three soft colour washes behind everything: the store's
   colour top-right, cash green bottom-left, credit rust low-centre. Every card is a
   translucent white pane with a lit top edge; the offer sits on the deeper pane.
   The header is a translucent band of the store's colour with the wordmark on its
   white plate. Sections are a glass sidebar from 900px up and a glass tab bar on
   phones, where the offer is pinned above it.
   The store's colour (--band, set by paintBrand()) carries the band, the wash and
   the Accept button and never a payout. Text on the solid colour is --on-band and
   text on the translucent band is --on-glass; lib/theme.js picks ink or white for
   each at 4.5:1. Cash green and credit rust are the paper pair from the brand and
   never move: on a glass pane over kraft cash is 6.6:1 and credit 5.4:1.
   Red-green colour blindness: cash (cool, dark) and credit (warm) stay apart; a
   magenta or orange store colour drifts toward the rust, so nothing read at the
   counter depends on the store colour alone. Every payout keeps its word and tick,
   the mix bar keeps its key. One scheme only: light. */

:root:root, :root[data-theme="light"], :root[data-theme="dark"] {
  --paper:#EFE6D6; --card:#FFFFFF; --sunk:#E6DCC9; --ink:#1C1610; --muted:#6E6356;
  --line:#D9CDB8;
  --cash:#0F5F4A;   --cash-soft:#DCEFE7;
  --credit:#A3420E; --credit-soft:#F6E3D4;
  --warn:#8A4A12; --warn-soft:#F8ECDE; --ok:#0F5F4A; color-scheme:light;

  --tint: var(--band);
  --band-tint: var(--band);          /* paintBrand() darkens this only when no text reads on the glass band */
  --on-glass: var(--ink);
  --slip:#FFFDF7;
  --g-pane: rgba(255,255,255,.55);
  --g-deep: rgba(255,255,255,.72);
  --g-sub: rgba(255,255,255,.38);
  --g-pane-2: rgba(255,255,255,.5);
  --g-line: rgba(255,255,255,.85);
  --g-line-2: rgba(28,22,16,.18);
  --g-edge: rgba(255,255,255,.95);
  --g-rule: rgba(28,22,16,.08);
  --g-well: rgba(28,22,16,.07);
  --g-shadow: 0 12px 32px rgba(28,22,16,.08);
  --g-blur: blur(24px) saturate(170%);
  --g-key: var(--band);
  --g-glow: color-mix(in srgb, var(--band) 38%, transparent);
  --side-w: 230px;
  --tabbar-h: 62px;
}

/* ------------------------------------------------------------------ ground */
html { background: var(--paper); }
body { color: var(--ink); background: var(--paper); position: relative; isolation: isolate; }
/* --bg (the store's backdrop pattern) is for printed slips and the counter card;
   on screen the ground is always kraft with the washes. */
.wash { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.wash i { position: absolute; display: block; border-radius: 50%; filter: blur(80px); }
.wash .w-tint { width: 45vw; height: 45vw; right: -12vw; top: -18vw; background: var(--tint); opacity: .28; }
.wash .w-cash { width: 40vw; height: 40vw; left: -12vw; bottom: -15vw; background: #5FD4B0; opacity: .45; }
.wash .w-credit { width: 25vw; height: 25vw; left: 45vw; bottom: -10vw; background: #F39A52; opacity: .35; }
@media (max-width:899px) {
  .wash i { filter: blur(56px); }
  .wash .w-tint { width: 60vw; height: 60vw; right: -16vw; top: -22vw; }
  .wash .w-cash { width: 54vw; height: 54vw; left: -16vw; bottom: -18vw; }
  .wash .w-credit { width: 34vw; height: 34vw; left: 44vw; bottom: -12vw; }
}

/* ------------------------------------------------------------------ band */
.topbar {
  background: color-mix(in srgb, var(--band-tint) 62%, rgba(255,255,255,.3));
  color: var(--on-glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border: 0; border-bottom: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.topbar-in { flex-wrap: nowrap; min-height: 104px; padding: 10px 22px; }
.brand { flex: 1 1 auto; }
.plate { border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 8px rgba(28,22,16,.08); }
.brand-div { background: var(--on-glass); opacity: .25; height: 28px; }
.storename, .storesub, .monogram { color: var(--on-glass); }
.storesub { opacity: .72; letter-spacing: .01em; }
.monogram { border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.38); color: var(--on-glass); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.monogram.template { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--on-glass) 55%, transparent); color: var(--on-glass); font: 600 10px/1 "IBM Plex Mono", monospace; letter-spacing: .06em; box-shadow: none; }
.storelogo { box-shadow: 0 2px 8px rgba(28,22,16,.08); }
.chip { flex: none; color: var(--ink); border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 #fff;
  letter-spacing: .06em; text-transform: uppercase; font-size: 10.5px; font-weight: 600; padding: 4px 10px 4px 8px; }
.chip i { background: var(--muted); opacity: 1; }
.chip.on i { background: var(--cash); }
.chip.warn i { background: var(--credit); }
.col-side { top: calc(env(safe-area-inset-top,0px) + 140px); }

/* ------------------------------------------------------------------ sections: sidebar and tab bar */
.sidenav { position: fixed; z-index: 30; display: flex;
  background: var(--g-pane); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
  border: 1px solid var(--g-line); box-shadow: inset 0 1px 0 var(--g-edge), var(--g-shadow); }
.side-head .wordmark { font-size: 20px; }
.side-head .wordmark .mark { width: 26px; height: 26px; margin-right: 5px; }
.side-tag { font: 600 10px/1.4 "IBM Plex Sans", sans-serif; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; }
.tabs { gap: 4px; padding: 0; border-radius: 0; background: none; }
.tabs button { display: flex; align-items: center; border: 0; background: none; box-shadow: none; color: var(--ink); cursor: pointer;
  font: 500 14px/1.2 "IBM Plex Sans", sans-serif; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.tabs button:hover { background: rgba(255,255,255,.4); border-color: transparent; }
.tabs button svg { flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-selected="true"] { background: rgba(255,255,255,.75); color: var(--ink); border-color: transparent; font-weight: 600;
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(28,22,16,.06); }
.tabs button.alert::after { background: var(--credit); }
/* Rate cards opens Settings on its Pricing page; it is the lit row while that page shows. */
html[data-view="settings"][data-setpage="pricing"] #navRates { background: rgba(255,255,255,.75); font-weight: 600; box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(28,22,16,.06); }
html[data-view="settings"][data-setpage="pricing"] #tabSettings { background: none; font-weight: 500; box-shadow: none; }
.side-foot { font-size: 12px; color: var(--muted); }
.navsync { display: flex; align-items: center; gap: 8px; }
.navsync i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; display: block; }
.navsync.on i { background: var(--cash); }
.navsync.warn i { background: var(--credit); }
.navwho { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; min-width: 0; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.85); }
.navwho-role { font: 600 10px/1.3 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.navwho-mail { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; word-break: break-all; line-height: 1.3; }
.navwho-plan { color: var(--muted); }
.navacct { display: block; width: 100%; margin-top: 10px; min-height: 40px; padding: 0 12px; border: 1px solid rgba(28,22,16,.14); border-radius: 12px; background: rgba(255,255,255,.7); color: var(--ink); font: 600 13px "IBM Plex Sans", -apple-system, sans-serif; cursor: pointer; text-align: center; }
.navacct:hover { background: #fff; }
.navacct.primary { background: var(--ink); color: #fff; border-color: transparent; }
#syncChip { cursor: pointer; }

@media (min-width:900px) {
  body { padding-left: calc(var(--side-w) + 40px); padding-right: 20px; }
  .sidenav { left: 20px; top: calc(env(safe-area-inset-top,0px) + 20px); bottom: calc(env(safe-area-inset-bottom,0px) + 20px); width: var(--side-w);
    flex-direction: column; gap: 6px; padding: 22px 16px; border-radius: 22px; }
  .side-head { padding: 6px 8px 4px; margin-bottom: 14px; }
  .tabs { flex-direction: column; }
  .tabs button { gap: 12px; padding: 11px 12px; border-radius: 12px; min-height: 44px; text-align: left; }
  .tabs button svg { width: 18px; height: 18px; }
  .tabs button .short { display: none; }
  .side-foot { margin-top: auto; padding: 14px 10px 4px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .topbar { top: calc(env(safe-area-inset-top,0px) + 12px); margin-top: 20px; border-radius: 18px; border: 1px solid rgba(255,255,255,.8);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), var(--g-shadow); }
  .topbar .chip { display: none; }   /* the sidebar foot carries it */
  .wrap { padding-inline: 0; padding-block: 18px 40px; max-width: none; }
  .topbar-in { max-width: none; }
}
@media (max-width:899px) {
  .sidenav { left: 14px; right: 14px; bottom: calc(env(safe-area-inset-bottom,0px) + 12px); height: var(--tabbar-h); padding: 6px; border-radius: 999px;
    background: rgba(255,255,255,.66); }
  .side-head, .side-foot { display: none; }
  .tabs { flex: 1; justify-content: space-around; align-items: stretch; }
  .tabs button { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 4px 2px; border-radius: 999px;
    font-size: 10px; font-weight: 500; color: var(--muted); min-height: 0; position: relative; }
  .tabs button svg { width: 20px; height: 20px; }
  .tabs button .long { display: none; }
  .tabs button[aria-selected="true"] { background: rgba(255,255,255,.85); box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(28,22,16,.08); }
  .tabs button.alert::after { position: absolute; top: 6px; right: 22%; margin: 0; }
  html[data-view="settings"][data-setpage="pricing"] #navRates { color: var(--ink); }
  html[data-view="settings"][data-setpage="pricing"] #tabSettings { color: var(--muted); }
  .topbar-in { padding: 8px 14px; gap: 10px; min-height: 72px; }
  .wordmark { font-size: 15px; } .plate .mark { width: 17px; height: 17px; }
  .wrap { padding-bottom: calc(var(--tabbar-h) + 44px); }
  /* the offer is pinned above the tab bar */
  .col-side { bottom: calc(env(safe-area-inset-bottom,0px) + var(--tabbar-h) + 22px); }
}
@media (max-width:420px) { .topbar .chip { display: none; } }

/* ------------------------------------------------------------------ view heading */
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; }
.view-head .eyebrow { font: 600 10px/1.4 "IBM Plex Sans", sans-serif; letter-spacing: 1.8px; }
.view-title { margin: 4px 0 0; font: 700 34px/1.05 Antonio, Impact, sans-serif; letter-spacing: .2px; }
.view-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width:899px) { .view-title { font-size: 26px; } .view-sub { display: none; } }

/* ------------------------------------------------------------------ panes */
.panel, .plan, .raised, .hint, .qrow, .custbar, .results, .rate-dialog, .ghostfile, .hist-side {
  background: var(--g-pane); border: 1px solid var(--g-line); box-shadow: inset 0 1px 0 var(--g-edge), var(--g-shadow);
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
}
.panel, .raised, .rate-dialog, .hist-side { border-radius: 20px; }
.panel { padding: 16px; }
.plan { border-radius: 20px; background: var(--g-deep); }
/* rows are sub-panes: no blur of their own, so a long list stays cheap to paint */
.line, .qrow, .propresult, .empty {
  background: var(--g-sub); border: 1px solid rgba(255,255,255,.8); box-shadow: inset 0 1px 0 #fff; border-radius: 14px;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.line.out { opacity: .5; box-shadow: none; border-color: rgba(255,255,255,.6); }
.empty { border: 1px dashed var(--g-line-2); color: var(--muted); box-shadow: none; }
.results { background: rgba(255,255,255,.94); border-radius: 14px; box-shadow: 0 14px 30px rgba(28,22,16,.14); }
.result { border-bottom-color: var(--g-rule); }
.result:hover { background: rgba(28,22,16,.05); }
.rate-dialog, html dialog.ccdlg { background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.95); border-radius: 20px;
  box-shadow: inset 0 1px 0 #fff, 0 30px 80px rgba(28,22,16,.28); color: var(--ink); }
.rate-dialog::backdrop, html dialog.ccdlg::backdrop { background: rgba(28,22,16,.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html dialog.ccdlg button.danger { background: var(--ink); border-color: var(--ink); color: #F3EDE2; box-shadow: none; }
.plan-side { background: rgba(255,255,255,.38); border-top: 1px solid var(--g-rule); }
.tierrow { border-radius: 8px; background: var(--g-well); }
.eyebrow { color: var(--muted); }

/* ------------------------------------------------------------------ controls */
button {
  border: 1px solid rgba(255,255,255,.9); border-radius: 14px; color: var(--ink);
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 #fff, 0 6px 16px rgba(28,22,16,.07);
}
button:hover { background: rgba(255,255,255,.78); }
button.ghost { background: rgba(255,255,255,.5); border-color: rgba(255,255,255,.9); color: var(--ink); box-shadow: inset 0 1px 0 #fff, 0 4px 14px rgba(28,22,16,.06); }
button.ghost:hover { background: rgba(255,255,255,.78); border-color: rgba(255,255,255,.9); }
/* the actions over the list are pills; the first one is the ink pill */
.cols .actions > button { border-radius: 999px; min-height: 44px; }
.cols .actions > button:not(.ghost), #btnAddConfirm, #btnImportConfirm {
  background: var(--ink); color: #F3EDE2; border-color: var(--ink); box-shadow: 0 6px 16px rgba(28,22,16,.16);
}
.cols .actions > button:not(.ghost):hover, #btnAddConfirm:hover, #btnImportConfirm:hover { background: #2E261D; }
/* Accept trade: the store's colour, readable text from lib/theme.js */
button.primary {
  background: var(--g-key); color: var(--on-band); border-color: transparent; border-radius: 14px; min-height: 52px; font-size: 20px;
  box-shadow: 0 10px 24px var(--g-glow), inset 0 1px 0 rgba(255,255,255,.55);
}
button.primary:hover { background: var(--g-key); filter: brightness(1.04); }
button.primary:disabled { box-shadow: none; filter: none; }
html dialog.ccdlg button.primary { min-height: 44px; font: 600 14px "IBM Plex Sans", sans-serif; text-transform: none; letter-spacing: 0; }
button.small { border-radius: 10px; }
.kill, .kill:hover { background: none; border: 0; box-shadow: none; }
.kill { color: var(--muted); }
.kill:hover { color: var(--credit); background: var(--credit-soft); }
button.preset { background: rgba(255,255,255,.5); box-shadow: none; border-color: var(--g-line-2); }
button.preset.on { background: var(--credit-soft); border-color: var(--credit); color: var(--credit); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

input, select, textarea, .qty {
  background: rgba(255,255,255,.82); color: var(--ink); border: 1px solid var(--g-line-2); border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(28,22,16,.06);
}
input::placeholder, textarea::placeholder { color: #8A7F71; }
select { color-scheme: light; }
label { color: var(--muted); }
.ghostfile { border-radius: 12px; color: var(--ink); }

/* ------------------------------------------------------------------ line rows */
.lines { gap: 8px; }
@media (max-width:679px) { .lpay { grid-column: 1 / -1; } }
.inc { border: 1.5px solid rgba(28,22,16,.35); background: transparent; color: transparent; box-shadow: none; border-radius: 6px; }
.inc.on { background: var(--cash); border-color: var(--cash); color: #fff; }
.pill { background: var(--sunk); color: var(--muted); }
.pill.bulk { background: var(--warn-soft); color: var(--warn); }
.pill.src { background: transparent; border: 1px solid var(--g-line-2); }
.pill.cat { background: rgba(255,255,255,.7); color: var(--ink); }
/* a payout: glass until picked, then solid — never colour alone, each keeps its word */
.pay { border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.5); color: var(--muted); border-radius: 12px; box-shadow: inset 0 1px 0 #fff; }
.pay:hover { background: rgba(255,255,255,.8); }
.pay.cash b { color: var(--cash); } .pay.credit b { color: var(--credit); }
.pay.cash.on { background: var(--cash); border-color: var(--cash); color: #fff; box-shadow: 0 6px 14px rgba(15,95,74,.22); }
.pay.credit.on { background: var(--credit); border-color: var(--credit); color: #fff; box-shadow: 0 6px 14px rgba(163,66,14,.22); }
.pay.cash.on b, .pay.credit.on b { color: #fff; }
.sthumb { border: 1px solid rgba(255,255,255,.9); background: var(--sunk); }
.flag { background: var(--credit-soft); color: #6B2C09; border: 1px solid color-mix(in srgb, var(--credit) 35%, transparent); border-radius: 14px; }

/* ------------------------------------------------------------------ the offer */
.plan-v { color: var(--ink); font-family: Antonio, Impact, sans-serif; font-weight: 700; font-size: clamp(40px, 9vw, 56px); letter-spacing: 0; line-height: 1.12; padding-bottom: .04em; }
.plan-split { color: var(--muted); }
.mix { height: 8px; background: var(--g-well); border-radius: 4px; margin: 0 16px; overflow: hidden; }
.mixkey { letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px; }
.whole button { border: 1px solid rgba(255,255,255,.8); background: var(--g-sub); color: var(--muted); border-radius: 14px; box-shadow: inset 0 1px 0 #fff; }
.whole button.cash { border-color: rgba(255,255,255,.8); background: var(--g-sub); color: var(--cash); }
.whole button.credit { border-color: rgba(255,255,255,.8); background: var(--g-sub); color: var(--credit); }
.whole button:hover { background: rgba(255,255,255,.7); }
.whole button small { color: inherit; }
.side .v { color: var(--ink); }
.plan-accept { border-top-color: var(--g-rule) !important; border-top-style: solid !important; border-top-width: 1px !important; }

/* ------------------------------------------------------------------ history, status, misc */
.status { background: var(--sunk); color: var(--muted); }
.status.offered { background: var(--cash-soft); color: var(--cash); }
.note code { background: var(--g-well); color: var(--ink); }
.custbar { background: color-mix(in srgb, var(--cash-soft) 80%, transparent); border-color: rgba(255,255,255,.85); color: var(--ink); border-radius: 14px; }
.qrbox { border: 0; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 12px 30px rgba(28,22,16,.13); }
.catrow, .gamerow, .propitem { border-bottom-color: var(--g-rule); }
.gamerow.unmatched select { border-color: var(--credit); }
.empty-thumb { color: var(--muted); }
#settingsMount h2, .proposal h3 { color: var(--ink); }
.hint-text b { color: var(--ink); }
.glyph { color: var(--ink); }
.steps { color: var(--ink); }
a { color: var(--cash); }
a:hover { color: var(--ink); }

/* phone: the offer is a deep-glass bar pinned above the tab bar */
@media (max-width:899px) {
  .plan { background: rgba(255,255,255,.8); border-radius: 20px; box-shadow: inset 0 1px 0 var(--g-edge), 0 -6px 30px rgba(28,22,16,.12), 0 12px 32px rgba(28,22,16,.1); }
  .plan-main .plan-v { font-size: 34px; }
  .plan-accept button.primary { min-height: 48px; }
}
@media print {
  html, body { background: #fff !important; color: #1C1610 !important; padding: 0 !important; }
  .wash, .sidenav { display: none !important; }
  .topbar, .plan, .line, .panel { background: #fff !important; color: #1C1610 !important; border-color: #1C1610 !important; box-shadow: none !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

/* ------------------------------------------------------------------ settings controls */
/* Native controls default to Chrome blue and a grey file button; bring them onto the glass. */
#settingsMount input[type=checkbox], #settingsMount input[type=radio], #settingsMount input[type=range] { accent-color: var(--ink); box-shadow: none; }
#settingsMount input[type=range] { background: none; border: 0; }
#settingsMount input[type=checkbox] { width: 22px; height: 22px; min-height: 22px; }
#settingsMount input[type=file]::file-selector-button {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
  background: rgba(255,255,255,.7); border: 1px solid var(--g-line-2); border-radius: 10px;
  padding: 8px 12px; margin-right: 10px;
}
#settingsMount input[type=file]::file-selector-button:hover { background: #fff; }
#settingsMount > section { background: var(--g-pane); border: 1px solid var(--g-line); box-shadow: inset 0 1px 0 var(--g-edge), var(--g-shadow);
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border-radius: 20px; padding: 18px; margin-bottom: 0; }
#settingsMount > section .panel { background: var(--g-sub); box-shadow: inset 0 1px 0 #fff; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 14px; }
.saved-note { align-self: center; font-size: 12.5px; font-weight: 600; color: var(--ok); margin-left: 4px; }
.saved-note::before { content: "\2713  "; }

/* ------------------------------------------------------------------ segmented control */
/* A sunk track, one raised thumb that slides to the selected item. */
.seg { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--g-well); box-shadow: inset 0 1px 3px rgba(28,22,16,.1); }
.seg > button, .seg > a { position: relative; z-index: 1; border: 0; background: none; box-shadow: none; cursor: pointer;
  min-height: 38px; padding: 0 16px; border-radius: 999px; color: var(--muted); font: 600 13px/1 "IBM Plex Sans", sans-serif;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; transition: color .2s; }
.seg > button:hover { color: var(--ink); background: none; }
.seg > button[aria-selected="true"] { color: #F3EDE2; background: none; box-shadow: none; }
.seg-thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: 0; border-radius: 999px;
  background: var(--ink); box-shadow: 0 2px 8px rgba(28,22,16,.2);
  transition: left .28s cubic-bezier(.4,0,.2,1), width .28s cubic-bezier(.4,0,.2,1); }
@media (prefers-reduced-motion: reduce) { .seg-thumb { transition: none; } }

/* Settings pages */
/* The Store / Pricing / Account switch stays put under the band. A veil of the page's own
   ground behind it, feathered at the bottom, fades content out as it scrolls under, so the
   switch never sits on top of busy text. */
.set-nav { display: flex; justify-content: center; position: sticky; top: calc(env(safe-area-inset-top,0px) + 128px); z-index: 5; padding: 10px 0 22px; margin: -10px 0 -12px; isolation: isolate; }
.set-nav::before { content: ""; position: absolute; z-index: -1; inset: -56px -8% -6px;
  /* No fill of its own: it blurs whatever is behind it, so the page's gradient shows through
     unchanged and there is no edge to match. Feathered on every side by an elliptical mask. */
  -webkit-backdrop-filter: blur(14px) saturate(110%); backdrop-filter: blur(14px) saturate(110%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%); pointer-events: none; }
.set-nav .seg { background: rgba(255,255,255,.7); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border: 1px solid rgba(255,255,255,.9); box-shadow: inset 0 1px 0 #fff, 0 6px 16px rgba(28,22,16,.08); }
.set-nav .seg > button { text-transform: none; letter-spacing: .01em; font-size: 14px; padding: 0 18px; min-height: 42px; }
@media (max-width:899px) { .set-nav { top: calc(env(safe-area-inset-top,0px) + 86px); } }
@media (max-width:560px) { .set-nav .seg { width: 100%; } .set-nav .seg > button { flex: 1; padding: 0 6px; font-size: 13px; } }
#settingsMount > section[hidden] { display: none !important; }

/* Install: a small strip at the bottom of Trade and Swap */
.hint { padding: 10px 12px; border-radius: 14px; gap: 8px 10px; }
.hint .hint-icon { width: 28px; height: 28px; border-radius: 7px; }
.hint .hint-text { font-size: 12.5px; }
.hint .hint-text b { display: inline; font-size: 13px; margin-right: 6px; }

/* History: folders on the left, list on the right, not full width */
.hist { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; max-width: 1100px; width: 100%; margin: 0 auto; align-items: start; }
.hist-side { position: sticky; top: calc(env(safe-area-inset-top,0px) + 96px); display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.hist-side .eyebrow { margin-top: 6px; }
.hist-folders { display: flex; flex-direction: column; gap: 2px; }
.hist-folders button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 38px; padding: 0 10px;
  border: 0; border-radius: 10px; background: none; box-shadow: none; color: var(--ink); font: 500 14px/1.2 "IBM Plex Sans", sans-serif; text-align: left; cursor: pointer; }
.hist-folders button:hover { background: rgba(255,255,255,.5); }
.hist-folders button[aria-current="true"] { background: rgba(255,255,255,.8); font-weight: 600; box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(28,22,16,.06); }
.hist-folders button span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-folders .n { font: 500 12px "IBM Plex Mono", monospace; color: var(--muted); }
.hist-folders .none { font-size: 12.5px; color: var(--muted); padding: 4px 10px; }
.hist-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hist-bar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.hist-title { margin: 0 auto 0 0; font: 700 34px/1.05 Antonio, Impact, sans-serif; color: var(--ink); text-transform: none; letter-spacing: .2px; }
.hist-sort { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 0; }
.hist-sort select { width: auto; min-height: 38px; }
.qrow { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 14px; align-items: center; cursor: pointer; }
.qrow:hover { background: rgba(255,255,255,.6); }
.qrow .who { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .meta { font-size: 12.5px; color: var(--muted); }
.qrow .right { display: flex; align-items: center; gap: 10px; }
.qrow .amt { font-size: 17px; color: var(--ink); }
.qrow .folder-tag { font-size: 11px; color: var(--muted); border: 1px solid var(--g-line-2); border-radius: 999px; padding: 2px 8px; }
@media (max-width:760px) {
  .hist { grid-template-columns: 1fr; }
  .hist-side { position: static; }
  .hist-folders { flex-direction: row; flex-wrap: wrap; }
  .hist-folders button { width: auto; }
  .hist-title { font-size: 26px; }
}

/* Template store: a setup banner on Trade and a dashed logo slot in the band */
.template-banner { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--credit-soft) 78%, transparent); border: 1px dashed color-mix(in srgb, var(--credit) 55%, transparent); color: var(--ink); font-size: 14px; }
.template-banner > div { flex: 1 1 260px; }
.template-banner b { color: var(--ink); }

/* Settings > Plan */
.plan-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.plan-col { border: 1px solid rgba(255,255,255,.8); border-radius: 14px; padding: 12px 14px; background: var(--g-sub); box-shadow: inset 0 1px 0 #fff; }
.plan-col.on { border-color: var(--cash); box-shadow: inset 0 0 0 1px var(--cash); }
.plan-col .plan-price { font: 700 24px/1.2 Antonio, Impact, sans-serif; color: var(--ink); margin: 4px 0 6px; }
.plan-col ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink); display: flex; flex-direction: column; gap: 3px; }

/* Condition, notes and photos on a line */
select.cond { width: auto; min-height: 30px; padding: 2px 8px; font: 600 11.5px "IBM Plex Mono", monospace; border-radius: 999px; }
.notebtn { min-height: 30px; padding: 0 10px; font-size: 12px; border-radius: 999px; background: none; border: 1px solid var(--g-line-2); color: var(--ink); cursor: pointer; box-shadow: none; }
.lnote { font-size: 12.5px; color: var(--ink); margin: 2px 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lthumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 1px solid var(--g-line-2); }
.note-dialog textarea { width: 100%; box-sizing: border-box; font: inherit; }
.note-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.note-photos figure { position: relative; margin: 0; }
.note-photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; display: block; }
.note-photos button { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%; background: #fff; }
/* Price labels list */
.lb-list { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.lb-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--g-rule); }
.lb-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refresh-steps { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--g-sub); border: 1px solid rgba(255,255,255,.8); box-shadow: inset 0 1px 0 #fff; }
.refresh-steps ol { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.refresh-steps .btn-link { color: var(--cash); font-weight: 600; }

/* ================================================================== editorial accents (2026-11-10)
   The landing page's voice carried onto the counter (spec: editorial-mix.md in the
   project docs): mono eyebrows with a rust dot, a capital title, the trade list on one
   slip of paper, the offer in receipt type. Nothing moves; staff screens stay still.
   Colours are unchanged. Under red-green colour blindness cash green and credit rust
   drift together in hue: All cash is filled and All credit is outlined, and both keep
   their word. */
.side-tag { font: 400 9.5px/1.5 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .14em; }
.view-head .eyebrow { display: flex; align-items: center; gap: 10px; font: 400 11px/1.4 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .18em; color: var(--ink); }
.view-head .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--credit); flex: none; }
.view-title { margin-top: 8px; font-size: clamp(40px, 4.6vw, 56px); line-height: .98; letter-spacing: 0; text-transform: uppercase; }
.view-sub { margin-top: 14px; font: 400 13px/1.5 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: -.01em; color: var(--ink); }
@media (max-width:899px) { .view-title { font-size: 32px; } }

/* the trade list: one slip, a dotted rule between items */
#lines { position: relative; margin: 5px 0; padding: 2px 16px; gap: 0; background: var(--slip); box-shadow: 0 14px 30px rgba(28,22,16,.13); }
#lines:empty { display: none; }
#lines::before, #lines::after { content: ""; position: absolute; left: 0; right: 0; height: 5px; background-size: 10px 5px; background-repeat: repeat-x; }
#lines::before { top: -5px; background-image: linear-gradient(-45deg, var(--slip) 3.6px, transparent 0), linear-gradient(45deg, var(--slip) 3.6px, transparent 0); background-position: left bottom; }
#lines::after { bottom: -5px; background-image: linear-gradient(-135deg, var(--slip) 3.6px, transparent 0), linear-gradient(135deg, var(--slip) 3.6px, transparent 0); background-position: left top; }
#lines .line { background: none; border: 0; border-bottom: 1px dotted rgba(28,22,16,.3); border-radius: 0; box-shadow: none; padding-left: 0; padding-right: 0; }
#lines .line:last-child { border-bottom: 0; }
#lines .pay { background: #fff; border-color: var(--line); box-shadow: none; }
#lines .pay.cash.on { background: var(--cash); border-color: var(--cash); }
#lines .pay.credit.on { background: var(--credit); border-color: var(--credit); }

/* the offer: receipt type */
.plan-k { font: 400 10px/1.4 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .18em; }
.plan-v { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; font-variant-numeric: tabular-nums; font-size: clamp(34px, 3.6vw, 46px); letter-spacing: -.03em; line-height: 1.15; }
.whole button.cash { background: var(--cash-soft); border: 1.5px solid var(--cash); }
.whole button.credit { background: rgba(255,255,255,.6); border: 1.5px solid var(--credit); }
.plan-side { flex-direction: column; flex-wrap: nowrap; gap: 0; padding-top: 4px; padding-bottom: 4px; }
.plan-side .side { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; min-width: 0; padding: 8px 0; border-bottom: 1px dotted rgba(28,22,16,.3); }
.plan-side .side:last-child { border-bottom: 0; }
.plan-side .side .k { font: 400 11px/1.4 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .06em; }
.plan-side .side .v { text-align: right; }
.plan-side .side:last-child { flex-direction: column; align-items: flex-start; gap: 2px; } .plan-side .side:last-child .v { text-align: left; }
@media (max-width:679px) { #lines { padding-left: 12px; padding-right: 12px; } }
@media print { #lines { box-shadow: none !important; margin: 0; padding: 0; } #lines::before, #lines::after { display: none; } }

/* Trade-in hours reminder at the counter: neutral ink, not the rust used for credit. */
.template-banner.hours-banner { border-color: color-mix(in srgb, var(--ink) 35%, transparent); background: rgba(255,255,255,.55); }

/* ------------------------------------------------------------------ settings: titles, tabs, explainers */
#settingsMount > section > h2 { text-transform: uppercase; letter-spacing: .04em; font-size: 20px; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.subtabs > button { border: 1px solid var(--g-line-2); background: rgba(255,255,255,.55); color: var(--ink); border-radius: 999px; min-height: 36px; padding: 0 14px;
  font: 600 13px "IBM Plex Sans", sans-serif; text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer; }
.subtabs > button[aria-selected="true"] { background: var(--ink); color: #F3EDE2; border-color: var(--ink); }
.subtabs > button.subtab-add { border-style: dashed; background: transparent; color: var(--muted); }
.howto { margin: 0 0 10px; font-size: 13px; color: var(--ink); }
.howto > summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.howto ol { margin: 8px 0 0 18px; padding: 0; } .howto li { margin: 4px 0; line-height: 1.45; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }

/* price labels: fields left, the label as it prints on the right */
.lb-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 760px) { .lb-wrap { grid-template-columns: 1fr; } }
.lb-mon { background: #fff; border: 1px solid var(--g-line-2); border-radius: 14px; padding: 14px; box-shadow: inset 0 1px 0 #fff; position: sticky; top: 8px; }
.lb-mon-label { display: flex; align-items: center; gap: 8px; width: 2.625in; height: 1in; max-width: 100%; margin: 0 auto; padding: 0.06in 0.1in; box-sizing: border-box; outline: 1px dashed #ccc; border-radius: 4px; overflow: hidden; font: 9pt/1.15 "IBM Plex Sans", Arial, sans-serif; color: #1C1610; }
.lb-mon-label .q { width: 0.84in; height: 0.84in; flex: none; } .lb-mon-label .q svg { width: 100%; height: 100%; display: block; }
.lb-mon-label .t { min-width: 0; } .lb-mon-label .n { font-weight: 600; max-height: 2.3em; overflow: hidden; }
.lb-mon-label .p { font: 600 13pt "IBM Plex Mono", monospace; margin-top: 2px; } .lb-mon-label .m { font-size: 7pt; color: #6E6356; }
.req { color: var(--credit); font-weight: 700; }

/* Offer screen: counterfeit terms and game notices above Accept trade. Ink only; cash green and credit rust keep their meaning. */
.plan-terms { display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 1.4; color: var(--ink); }
.plan-terms .terms-line b { font-weight: 600; }
.plan-terms .terms-seen { color: var(--muted); font-size: 11.5px; }
.hours-note.notice { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.55); border: 1px dashed color-mix(in srgb, var(--ink) 35%, transparent); }
