/* HoloGryd: a collector's binder. Cobalt binder cover, cool grey binder sheets,
   clear card pockets, and yellow price stickers. */

:root {
  /* metallic gold: highlights and shadows like foil, used wherever gold is a fill */
  --gold-metal: linear-gradient(135deg, #fbe7a1 0%, #eabb45 26%, #c48a1c 48%, #f0c75a 66%, #fff3c4 80%, #d9a234 100%);
  --cover: #7f1d2d;
  --cover-ink: #fff5ec;
  --sheet: #fbf6ef;
  --pocket: #fffdf9;
  --pocket-edge: #e6dacd;
  --ink: #2a1e1c;
  --ink-soft: #6b5a54;
  --sticker: #e9b73f;
  --sticker-ink: #3a2700;
  --gain: #17784d;
  --loss: #a8372a;
  --focus: #a66f0a;
  --radius-pocket: 10px;
  --radius-ui: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cover: #4f1520;
    --cover-ink: #fbeee4;
    --sheet: #1c1513;
    --pocket: #27201d;
    --pocket-edge: #463a35;
    --ink: #f3ebe6;
    --ink-soft: #b9aaa2;
    --sticker: #e9b73f;
    --gain: #4cc38a;
    --loss: #f07b6b;
    --focus: #ffd766;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Cover (header) ---------------------------------------------------- */
.cover { background: var(--cover); color: var(--cover-ink); }
.cover-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
@font-face {
  font-family: 'Marcellus'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/marcellus.woff2) format('woff2'); /* SIL Open Font License, see /fonts/OFL.txt */
}
/* The logo: the H-grid mark, then HOLO in holo foil and GRYD in gold, with a glint on the Y */
.wordmark {
  display: inline-flex; align-items: center; gap: .32em; font-size: 28px; line-height: 1;
  text-decoration: none; color: var(--cover-ink);
}
.wm-mark { width: 1.45em; height: 1.42em; flex: none; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .3)); }
.wm-text {
  font-family: 'Marcellus', Georgia, serif; font-weight: 400; letter-spacing: .07em; white-space: nowrap;
  color: #f6e2b0;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wm-holo, .wm-gryd, .wm-y { color: transparent; -webkit-background-clip: text; background-clip: text; }
  .wm-holo {
    background-image:
      linear-gradient(105deg, transparent 38%, rgb(255 255 255 / .9) 47%, transparent 56%),
      linear-gradient(100deg, #f7c2ec 0%, #c9b8ff 24%, #a9dcff 46%, #b9f6e2 66%, #f6d8f2 84%, #f7c2ec 100%);
    background-size: 300% 100%, 100% 100%; background-repeat: no-repeat; background-position: 150% 0, 0 0;
    animation: holo-sweep 7s ease-in-out 1.2s infinite;
    filter: drop-shadow(0 1px 0 rgb(0 0 0 / .3));
  }
  .wm-gryd, .wm-y {
    background-image: linear-gradient(180deg, #f8e7bd 0%, #e2bd78 40%, #b0843f 62%, #efd49c 84%, #cfa565 100%);
    filter: drop-shadow(0 1px 0 rgb(0 0 0 / .3));
  }
  .wm-y { filter: none; }
}
.wm-y { position: relative; display: inline-block; }
.wm-glint {
  position: absolute; left: 88%; top: 8%; width: .36em; height: .36em; transform: translate(-50%, -50%);
  fill: #fff; overflow: visible; filter: drop-shadow(0 0 .08em #fff6d6) drop-shadow(0 0 .14em rgb(255 240 200 / .7));
  animation: glint 7s ease-in-out 1.6s infinite;
}
@keyframes glint { 0%, 80%, 100% { opacity: .85; transform: translate(-50%, -50%) scale(1); } 88% { opacity: 1; transform: translate(-50%, -50%) scale(1.35) rotate(20deg); } }
.wm-tag { display: none; }
@keyframes holo-sweep { 0%, 72% { background-position: 150% 0, 0 0; } 100% { background-position: -50% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .wm-holo, .wm-glint { animation: none; } }
@media (max-width: 699px) { .wordmark { font-size: 24px; } }
.search { flex: 1 1 240px; max-width: 420px; }
.search input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--pocket); border: 0; border-radius: var(--radius-ui); padding: 9px 12px;
}
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  text-decoration: none; padding: 7px 12px; border-radius: var(--radius-ui); font-weight: 600; font-size: 15px;
}
.nav a:hover { background: rgb(255 255 255 / 0.1); }
.nav a[aria-current='page'] { background: rgb(255 255 255 / 0.16); }

/* ---- Page ---------------------------------------------------------------- */
.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 20px 56px; }
.page:focus { outline: none; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
.title { font-stretch: 75%; font-weight: 800; font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.01em; }
.subtitle { color: var(--ink-soft); margin: 6px 0 0; }
.back {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px -6px; padding: 6px 12px 6px 8px; border-radius: 999px;
  color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 600; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.back::before { content: '‹'; font-size: 22px; line-height: 1; margin-top: -2px; }
.back:hover { color: var(--ink); background: rgb(127 127 127 / .1); }
.muted { color: var(--ink-soft); }
.notice {
  background: var(--pocket); border: 1px dashed var(--pocket-edge); border-radius: var(--radius-pocket);
  padding: 22px; max-width: 62ch;
}
.notice p { margin: 0 0 10px; }
.notice p:last-child { margin: 0; }
code { font-size: 0.9em; background: rgb(127 127 127 / 0.15); padding: 1px 5px; border-radius: 4px; }

/* ---- Sets list ------------------------------------------------------------ */
.series { margin-top: 36px; }
.series h2 { font-stretch: 75%; font-weight: 700; font-size: 22px; margin-bottom: 10px; }
.set-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.set-tile {
  display: flex; flex-direction: column; height: 100%; text-decoration: none;
  background: var(--pocket); border-radius: var(--radius-pocket); padding: 14px;
  box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
a.set-tile:hover { box-shadow: inset 0 0 0 2px var(--cover); }
.logo-box {
  height: 84px; display: grid; place-items: center; margin-bottom: 12px;
  border-radius: 6px; background: var(--sheet);
}
@media (prefers-color-scheme: dark) { .logo-box { background: #fbf6ef; } }
.set-logo { max-width: 86%; max-height: 66px; object-fit: contain; }
.logo-text { display: none; }
.logo-box.nologo .logo-text {
  display: block; padding: 0 10px; text-align: center; color: var(--ink-soft);
  font-stretch: 62%; font-weight: 800; font-size: 20px; line-height: 1.05;
}
@media (prefers-color-scheme: dark) { .logo-box.nologo { background: var(--sheet); } }
.set-info { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.set-info .symbol { width: 20px; height: 20px; object-fit: contain; grid-row: span 1; }
.set-info .name { font-weight: 700; line-height: 1.25; }
.set-info .symbol + .name { grid-column: 2; }
.set-info .name:first-child { grid-column: 1 / -1; }
.set-info .meta, .set-info .count { grid-column: 1 / -1; color: var(--ink-soft); font-size: 14px; }
.set-info .count { margin-top: 2px; }
.set-tile.locked { opacity: 0.55; }
@media (max-width: 520px) {
  .set-list { grid-template-columns: 1fr 1fr; gap: 10px; }
  .set-tile { padding: 10px; }
  .logo-box { height: 64px; margin-bottom: 8px; }
  .set-logo { max-height: 48px; }
  .logo-box.nologo .logo-text { font-size: 16px; }
  .set-info .name { font-size: 15px; }
  .set-info .meta, .set-info .count { font-size: 13px; }
}

/* ---- Set header ----------------------------------------------------------- */
.set-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.set-head .logo { max-height: 84px; max-width: 220px; object-fit: contain; }
.progress { margin-top: 18px; max-width: 420px; }
.progress-bar { height: 8px; border-radius: 4px; background: var(--pocket-edge); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--cover); }
@media (prefers-color-scheme: dark) { .progress-bar span { background: var(--gold-metal), var(--sticker); } }
.progress p { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }

/* ---- Binder sheet: a grid of card pockets --------------------------------- */
.sheet {
  margin-top: 28px; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.pocket {
  position: relative; display: flex; flex-direction: column; text-decoration: none;
  background: var(--pocket); border-radius: var(--radius-pocket); padding: 10px;
  box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.pocket:hover { box-shadow: inset 0 0 0 2px var(--cover); }
.pocket .art {
  position: relative; aspect-ratio: 245 / 337; border-radius: 6px; overflow: hidden;
  background: repeating-linear-gradient(135deg, transparent 0 8px, rgb(127 127 127 / 0.08) 8px 16px);
}
.pocket .art img { width: 100%; height: 100%; object-fit: cover; }
/* sleeve sheen */
.pocket .art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgb(255 255 255 / 0.22) 0 18%, transparent 34%);
}
.pocket .caption { display: flex; gap: 6px; align-items: baseline; margin-top: 8px; font-size: 14px; min-width: 0; }
.pocket .num { color: var(--ink-soft); flex: none; }
.pocket .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pocket .from-set {
  display: flex; align-items: center; gap: 6px; margin-top: 2px; min-width: 0;
  color: var(--ink-soft); font-size: 13px;
}
.pocket .from-set img { width: 16px; height: 16px; object-fit: contain; flex: none; }
.pocket .from-set .sn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pocket .from-set .yr { flex: none; }
.pocket .from-set .yr::before { content: '\00B7'; margin-right: 6px; }
.pocket .stickers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pocket.unowned .art img { filter: saturate(0.85); }
.owned-tag {
  position: absolute; top: 4px; right: 4px; z-index: 1;
  background: var(--cover); color: var(--cover-ink); font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 2px 8px;
}

/* checklist pockets: the link covers art + name; version chips sit below */
.pocket-link { display: block; text-decoration: none; color: inherit; border-radius: 6px; }
.pocket.ticker:hover { box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.pocket.ticker .pocket-link:hover .nm { text-decoration: underline; }
/* cards you don't own: a light fade, so you can still enjoy the art; full colour on hover or focus */
.pocket.ticker.unowned .art { opacity: 0.55; transition: opacity .15s; }
.pocket.ticker.unowned .art img { filter: none; transition: filter .15s; }
.pocket.ticker.unowned:hover .art, .pocket.ticker.unowned:focus-within .art { opacity: 1; }
.pocket.ticker.unowned:hover .art img, .pocket.ticker.unowned:focus-within .art img { filter: none; }
.vchips { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.vchip { display: flex; gap: 4px; }
.vchip button {
  font: inherit; cursor: pointer; border: 0; border-radius: 5px; color: var(--ink);
  background: var(--sheet); box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.vchip .vadd {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 5px 7px; font-size: 13px; text-align: left;
}
.vchip .vl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vchip .vp { flex: none; font-weight: 700; color: var(--ink-soft); }
.vchip .vn {
  flex: none; min-width: 20px; padding: 1px 6px; border-radius: 999px; text-align: center;
  background: var(--cover); color: var(--cover-ink); font-weight: 800; font-size: 12px;
}
.vchip.has .vadd { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); box-shadow: none; }
.vchip.has .vp { color: var(--sticker-ink); }
.vchip .vsub { flex: none; width: 30px; font-size: 16px; font-weight: 700; line-height: 1; }
.vchip button:hover { box-shadow: inset 0 0 0 2px var(--cover); }
.vchip button[disabled] { opacity: 0.6; cursor: progress; }

/* checklist summary + toolbar */
.checklist-summary { margin-top: 18px; max-width: 640px; }
.checklist-summary .progress { margin-top: 0; max-width: none; }
.summary-stats { display: flex; flex-wrap: wrap; gap: 8px 40px; margin-top: 10px; }
.summary-stats .v { display: block; font-stretch: 75%; font-weight: 800; font-size: 28px; line-height: 1.1; }
.summary-stats small { color: var(--ink-soft); font-size: 14px; }
.small { font-size: 14px; margin: 8px 0 0; }
@media (max-width: 520px) {
  .summary-stats { gap: 6px 24px; }
  .summary-stats .v { font-size: 24px; }
  .summary-stats small { font-size: 13px; }
  .set-head .logo { max-height: 56px; }
  .toolbar { gap: 8px; }
  .toolbar .tool { flex: 1 1 140px; }
  .toolbar .tool.find { flex-basis: 100%; max-width: none; }
  .toolbar .tool select { width: 100%; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
.seg { display: inline-flex; background: var(--pocket); border-radius: var(--radius-ui); box-shadow: inset 0 0 0 1px var(--pocket-edge); padding: 3px; }
.seg button {
  font: inherit; font-size: 14px; font-weight: 600; border: 0; background: transparent; color: var(--ink-soft);
  padding: 6px 12px; border-radius: 4px; cursor: pointer;
}
.seg button[aria-pressed='true'] { background: var(--cover); color: var(--cover-ink); }
.tool select { font-size: 14px; padding: 7px 10px; background: var(--pocket); }
.tool.find { flex: 1 1 220px; max-width: 320px; }
.tool.find input { width: 100%; font-size: 15px; padding: 7px 10px; background: var(--pocket); }
.showing { margin: 14px 0 0; font-size: 14px; min-height: 1em; }
.showing:empty { display: none; }

/* the price sticker */
.sticker {
  display: inline-flex; gap: 5px; align-items: baseline; white-space: nowrap;
  background: var(--gold-metal), var(--sticker); color: var(--sticker-ink);
  font-size: 12px; line-height: 1; padding: 4px 6px; border-radius: 3px;
  transform: rotate(-1.5deg);
}
.sticker b { font-weight: 800; font-size: 13px; }
.sticker.none { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--pocket-edge); transform: none; }

/* ---- Pagination ------------------------------------------------------------ */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 22px 0 0; }
.sheet + .pager { margin-top: 28px; }
.pager .pg {
  min-width: 38px; padding: 7px 10px; text-align: center; border-radius: var(--radius-ui);
  text-decoration: none; font-weight: 600; font-size: 15px;
  background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.pager a.pg:hover { box-shadow: inset 0 0 0 2px var(--cover); }
.pager .current { background: var(--cover); color: var(--cover-ink); box-shadow: none; }
.pager .off { opacity: 0.45; }
.pager .gap { color: var(--ink-soft); padding: 0 2px; }
@media (max-width: 520px) { .pager .pg:not(.step):not(.current) { display: none; } .pager .gap { display: none; } .pager .current::before { content: 'Page '; } .pager .current::after { content: ' of ' attr(data-pages); } }

/* ---- Card page ------------------------------------------------------------ */
.card-layout { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .card-layout { grid-template-columns: 1fr; } .card-layout .big-art { max-width: 320px; } }
.big-art { position: relative; border-radius: 14px; overflow: hidden; background: var(--pocket); aspect-ratio: 600 / 825; box-shadow: 0 12px 30px rgb(20 30 60 / 0.18); }
.big-art img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; color: var(--ink-soft); font-size: 15px; }
.facts a { color: var(--ink); }
.versions { margin-top: 28px; }
.versions h2 { font-stretch: 75%; font-weight: 700; font-size: 24px; }
.versions .hint { margin: 4px 0 14px; color: var(--ink-soft); font-size: 15px; max-width: 62ch; }
.versions .hint.small { margin: 10px 0 0; font-size: 13px; }
.version {
  background: var(--pocket); border-radius: var(--radius-pocket); padding: 14px 16px; margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.version-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; }
.version-name { font-weight: 700; }
.version-name small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.version .price { text-align: right; }
.version .price .big { font-stretch: 75%; font-weight: 800; font-size: 26px; line-height: 1; }
.version .price small { display: block; color: var(--ink-soft); font-size: 13px; }
@media (max-width: 520px) { .version-row { grid-template-columns: 1fr auto; } .version-row .btn { grid-column: 1 / -1; } }

/* ---- Buttons & forms ------------------------------------------------------ */
.btn {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  background: var(--cover); color: var(--cover-ink); border: 0; border-radius: var(--radius-ui);
  padding: 9px 14px; text-decoration: none; display: inline-block;
}
.btn:hover { filter: brightness(1.12); }
.btn.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.btn.danger { background: var(--loss); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.add-form { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--pocket-edge); }
.add-form.open { display: block; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.field span { color: var(--ink-soft); }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--pocket-edge); border-radius: var(--radius-ui); padding: 8px 10px; min-width: 0;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 12px 0; }
.check input { width: 18px; height: 18px; }
.form-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.error { color: var(--loss); font-size: 14px; margin: 8px 0 0; }

.auth { max-width: 420px; }
.auth form { background: var(--pocket); border-radius: var(--radius-pocket); padding: 22px; margin-top: 20px; box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.auth .field { margin-bottom: 12px; }

/* ---- My binder ------------------------------------------------------------ */
.totals { display: flex; flex-wrap: wrap; gap: 14px 44px; align-items: flex-end; margin: 26px 0 8px; }
.total-value .big { font-stretch: 62%; font-weight: 800; font-size: clamp(56px, 9vw, 92px); line-height: 0.9; letter-spacing: -0.01em; }
.total-value small, .stat small { display: block; color: var(--ink-soft); font-size: 14px; }
.stat .v { font-stretch: 75%; font-weight: 700; font-size: 26px; line-height: 1.1; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.unpriced-note { color: var(--ink-soft); font-size: 15px; max-width: 70ch; margin: 10px 0 0; }

.items { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: 15px; }
.items th { text-align: left; font-weight: 600; color: var(--ink-soft); font-size: 13px; padding: 0 10px 8px; }
.items td { background: var(--pocket); padding: 10px; vertical-align: middle; border-top: 4px solid var(--sheet); }
.items td:first-child { border-radius: var(--radius-ui) 0 0 var(--radius-ui); width: 56px; }
.items td:last-child { border-radius: 0 var(--radius-ui) var(--radius-ui) 0; text-align: right; }
.items .thumb { width: 44px; aspect-ratio: 245 / 337; border-radius: 3px; background: var(--sheet); object-fit: cover; }
.items .card-name { font-weight: 700; text-decoration: none; }
.items .card-name:hover { text-decoration: underline; }
.items .sub { color: var(--ink-soft); font-size: 13px; }
.items .num { text-align: right; white-space: nowrap; }
.items input[type=number] { width: 64px; padding: 5px 6px; }
.status { font-size: 13px; color: var(--ink-soft); }
@media (max-width: 760px) {
  .items thead { display: none; }
  .items, .items tbody { display: block; width: 100%; }
  .items tr {
    display: grid; grid-template-columns: 48px 1fr auto; gap: 2px 12px; align-items: start;
    grid-template-areas: "thumb card val" "thumb ver val" "thumb qty act";
    background: var(--pocket); border-radius: var(--radius-pocket); margin-bottom: 10px; padding: 12px;
  }
  .items td { display: block; background: none; border: 0; padding: 0; border-radius: 0 !important; width: auto !important; text-align: left !important; }
  .items .c-thumb { grid-area: thumb; }
  .items .c-card { grid-area: card; }
  .items .c-ver { grid-area: ver; font-size: 14px; }
  .items .c-val { grid-area: val; text-align: right !important; }
  .items .c-qty { grid-area: qty; margin-top: 8px; }
  .items .c-act { grid-area: act; margin-top: 8px; text-align: right !important; }
}

/* ---- Toast ---------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--sheet); padding: 10px 16px; border-radius: var(--radius-ui);
  font-weight: 600; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer { max-width: 1180px; margin: 0 auto; padding: 0 20px 32px; color: var(--ink-soft); font-size: 13px; width: 100%; }
.footer p { margin: 0 0 4px; max-width: 90ch; }

@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* =========================================================================
   Binders
   ========================================================================= */
.cover-cobalt   { --bc: #2b3a67; --bc-ink: #f3f5fb; }
.cover-crimson  { --bc: #8b2635; --bc-ink: #fbf1f2; }
.cover-forest   { --bc: #2d5a46; --bc-ink: #eef7f2; }
.cover-plum     { --bc: #5a3767; --bc-ink: #f6eff8; }
.cover-charcoal { --bc: #30343b; --bc-ink: #eef0f3; }
.cover-sunflower{ --bc: #d4a21f; --bc-ink: #2a2000; }

/* ---- shelf ---- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; margin-top: 24px; }
.binder-cover {
  position: relative; aspect-ratio: 4 / 5; border-radius: 6px 12px 12px 6px; padding: 18px 16px 16px 30px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; text-decoration: none;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.12), transparent 45%), var(--bc); color: var(--bc-ink);
  box-shadow: 0 10px 24px rgb(20 30 60 / 0.22), inset -3px 0 0 rgb(0 0 0 / 0.15);
}
.binder-cover::before { /* spine */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 16px; border-radius: 6px 0 0 6px;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.28), rgb(0 0 0 / 0.08));
}
a.binder-cover:hover { transform: translateY(-2px); }
.cover-name { font-stretch: 62%; font-weight: 800; font-size: 26px; line-height: 1; overflow-wrap: anywhere; }
.cover-meta { font-size: 13px; opacity: 0.85; line-height: 1.35; }
.binder-cover.new {
  font: inherit; cursor: pointer; align-items: center; justify-content: center; padding: 16px;
  background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 2px var(--pocket-edge); border: 0;
  border-radius: 12px; font-weight: 700;
}
.binder-cover.new::before { display: none; }
.binder-cover.new .plus { font-size: 40px; line-height: 1; font-weight: 400; }
.binder-cover.new:hover { box-shadow: inset 0 0 0 2px var(--cover); color: var(--ink); }

/* ---- forms / panels ---- */
.panel {
  background: var(--pocket); border-radius: var(--radius-pocket); padding: 20px; margin-top: 20px; max-width: 760px;
  box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.panel h2 { font-stretch: 75%; font-weight: 800; font-size: 24px; margin-bottom: 12px; }
.panel .field { margin-bottom: 14px; max-width: 420px; }
.panel .field.narrow { max-width: 180px; }
.panel fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.panel legend { font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; }
.panel > input[type=search] { width: 100%; max-width: 420px; }
.layout-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.layout-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.layout-opt input { position: absolute; opacity: 0; pointer-events: none; }
.layout-opt .mini {
  display: grid; gap: 2px; width: 46px; aspect-ratio: 46 / 60; padding: 4px; border-radius: 4px;
  background: #23272f; box-shadow: 0 0 0 2px transparent;
}
.layout-opt .mini i { background: #4a5162; border-radius: 1px; }
.mini.l4 { grid-template-columns: repeat(2, 1fr); } .mini.l9, .mini.l12 { grid-template-columns: repeat(3, 1fr); } .mini.l16 { grid-template-columns: repeat(4, 1fr); }
.layout-opt input:checked + .mini { box-shadow: 0 0 0 3px var(--cover); }
.layout-opt input:checked + .mini i { background: var(--gold-metal), var(--sticker); }
.layout-opt input:focus-visible + .mini { outline: 3px solid var(--focus); outline-offset: 3px; }
.cover-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--bc); cursor: pointer; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.25); }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--sheet), 0 0 0 5px var(--ink); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; }
.fill-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 340px; overflow: auto; }
.fill-list button {
  width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; font: inherit; cursor: pointer; color: var(--ink);
  background: var(--sheet); border: 0; border-radius: var(--radius-ui); padding: 8px 10px; box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.fill-list button:hover { box-shadow: inset 0 0 0 2px var(--cover); }
.fill-list .symbol { width: 22px; height: 22px; object-fit: contain; flex: none; }
.fill-list small { display: block; color: var(--ink-soft); font-size: 12px; }
.danger-outline { color: var(--loss); box-shadow: inset 0 0 0 1px var(--loss); margin-left: auto; }
.danger-text { color: var(--loss) !important; }
.linkish { font: inherit; background: none; border: 0; padding: 2px 4px; cursor: pointer; color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---- binder page header + bar ---- */
.binder-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; }
.binder-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.binder-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 20px 0 14px; }
.page-count { font-weight: 700; min-width: 9em; text-align: center; }
.jump { position: relative; flex: 1 1 240px; max-width: 420px; }
.jump input { width: 100%; }
.jump-results {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; list-style: none; margin: 0; padding: 6px;
  background: var(--pocket); border-radius: var(--radius-ui); box-shadow: 0 10px 30px rgb(10 20 40 / 0.25), inset 0 0 0 1px var(--pocket-edge);
  max-height: 320px; overflow: auto;
}
.jump-results button { width: 100%; text-align: left; font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; padding: 7px 8px; border-radius: 4px; cursor: pointer; }
.jump-results button:hover, .jump-results button:focus-visible { background: var(--sheet); }
.jump-results li.muted { padding: 7px 8px; }
.small-check { margin: 0; font-size: 14px; }
.pick-banner {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); border-radius: var(--radius-ui); padding: 8px 8px 8px 14px; margin-bottom: 12px;
}
.pick-banner .btn.quiet { color: var(--sticker-ink); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.35); }

/* ---- the open binder ---- */
.binder-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .binder-wrap { grid-template-columns: 1fr; } }
.book {
  touch-action: pan-y pinch-zoom; /* sideways swipes turn pages; up and down still scrolls */
  background: linear-gradient(135deg, rgb(255 255 255 / 0.08), transparent 40%), var(--bc);
  border-radius: 16px; padding: 14px; box-shadow: 0 16px 40px rgb(15 20 35 / 0.28);
}
.spread { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); perspective: 2400px; }
.book.single .spread { grid-template-columns: minmax(0, 1fr); }
.rings { display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; }
.rings i {
  width: 22px; height: 34px; border-radius: 11px; border: 4px solid #c7ccd6;
  background: transparent; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.25), 0 2px 3px rgb(0 0 0 / 0.35);
}
.bpage {
  position: relative; background: #1e2229; border-radius: 6px; padding: 10px 10px 8px; color: #dfe3ea;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.bpage.blank { background: rgb(0 0 0 / 0.18); }
.bpage-title {
  width: 100%; font: inherit; font-stretch: 75%; font-weight: 800; font-size: 18px; color: #f1f3f7;
  background: transparent; border: 0; border-bottom: 1px dashed transparent; border-radius: 0; padding: 2px 2px 3px;
}
.bpage-title::placeholder { color: #6f7788; font-weight: 600; }
.bpage-title:hover, .bpage-title:focus { border-bottom-color: #59617a; }
.pockets { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 6px; }
.pocket-slot {
  position: relative; aspect-ratio: 63 / 88; border: 0; padding: 0; border-radius: 4px; cursor: pointer; overflow: hidden;
  background: #2a303b; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06); color: inherit; font: inherit;
}
.pocket-slot::after { /* sleeve sheen */
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgb(255 255 255 / 0.14) 0 14%, transparent 30%);
}
.pocket-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pocket-slot.empty { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); }
.pocket-slot.empty:hover { box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.35); }
.pocket-slot.ghost img { opacity: 0.26; filter: grayscale(0.85); }
.pocket-slot.ghost:hover img { opacity: 0.45; }
.pocket-slot .need {
  position: absolute; left: 4px; right: 4px; bottom: 4px; font-size: 11px; font-weight: 700; text-align: center;
  color: #d7dbe4; background: rgb(15 18 24 / 0.75); border-radius: 3px; padding: 2px 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pocket-slot .ptag {
  position: absolute; left: 3px; top: 3px; max-width: calc(100% - 6px); font-size: 10px; font-weight: 700;
  background: rgb(15 18 24 / 0.82); color: #fff; border-radius: 3px; padding: 1px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pocket-slot .pval {
  position: absolute; right: 3px; bottom: 3px; font-size: 11px; font-weight: 800; line-height: 1;
  background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); border-radius: 2px; padding: 3px 4px; transform: rotate(-2deg);
}
.pocket-slot:hover { box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.5); }
.pocket-slot.picked { outline: 3px solid var(--sticker); outline-offset: -3px; }
.pocket-slot.targeted { outline: 3px dashed var(--sticker); outline-offset: -3px; }
.pocket-slot.drop-over { outline: 3px solid #7aa2ff; outline-offset: -3px; }
.pocket-slot.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 40% { outline: 4px solid var(--sticker); outline-offset: -4px; } 100% { outline: 0 solid transparent; } }
.pocket-slot:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.bpage-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: #8d95a6; flex-wrap: wrap; }
.page-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.page-tools .linkish { color: #aab2c2; font-size: 12px; }

/* page turn */
.leaf, .under { position: absolute; top: 0; bottom: 0; width: calc(50% - 14px); z-index: 6; }
.leaf { transform-style: preserve-3d; animation: 620ms cubic-bezier(.45,.05,.3,1) forwards; pointer-events: none; }
.leaf .face { position: absolute; inset: 0; backface-visibility: hidden; display: flex; }
.leaf .face > .bpage { flex: 1; box-shadow: 0 0 30px rgb(0 0 0 / 0.35); }
.leaf .face.back { transform: rotateY(180deg); }
.leaf.next { left: calc(50% + 14px); transform-origin: -14px 50%; animation-name: turn-next; }
.leaf.prev { left: 0; transform-origin: calc(100% + 14px) 50%; animation-name: turn-prev; }
.under { z-index: 5; display: flex; pointer-events: none; }
.under > .bpage { flex: 1; }
.under.left { left: 0; }
.under.right { left: calc(50% + 14px); }
@keyframes turn-next { from { transform: rotateY(0); } to { transform: rotateY(-180deg); } }
@keyframes turn-prev { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
.leaf.single { width: 100%; left: 0; transform-origin: 0 50%; animation-duration: 480ms; }
.leaf.single.next { animation-name: turn-single-next; }
.leaf.single.prev { transform-origin: 100% 50%; animation-name: turn-single-prev; }
@keyframes turn-single-next { to { transform: rotateY(-100deg); opacity: 0; } }
@keyframes turn-single-prev { to { transform: rotateY(100deg); opacity: 0; } }

/* pocket menu */
.pocket-menu {
  position: absolute; z-index: 30; width: 200px; padding: 6px; border-radius: var(--radius-ui);
  background: var(--pocket); color: var(--ink); box-shadow: 0 12px 30px rgb(0 0 0 / 0.35), inset 0 0 0 1px var(--pocket-edge);
  display: flex; flex-direction: column;
}
.pocket-menu .pm-title { margin: 4px 6px 6px; font-weight: 700; font-size: 14px; line-height: 1.25; }
.pocket-menu .pm-title small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 12px; }
.pocket-menu a, .pocket-menu button {
  font: inherit; font-size: 14px; text-align: left; background: none; border: 0; color: inherit; cursor: pointer;
  padding: 7px 8px; border-radius: 4px; text-decoration: none;
}
.pocket-menu a:hover, .pocket-menu button:hover, .pocket-menu a:focus-visible, .pocket-menu button:focus-visible { background: var(--sheet); }

/* tray */
.tray {
  position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto;
  background: var(--pocket); border-radius: var(--radius-pocket); padding: 14px; box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
@media (max-width: 1100px) { .tray { position: static; max-height: none; } }
.tray h2 { font-stretch: 75%; font-weight: 800; font-size: 20px; margin-bottom: 10px; }
.tray input[type=search] { width: 100%; margin-bottom: 10px; }
.tray-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tray-card {
  width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  font: inherit; text-align: left; color: var(--ink); cursor: grab; background: var(--sheet); border: 0;
  border-radius: var(--radius-ui); padding: 6px 8px 6px 6px; box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.tray-card:hover { box-shadow: inset 0 0 0 2px var(--cover); }
.tray-card.picked { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); box-shadow: none; }
.tray-card img { width: 38px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 2px; }
.tc-text b { display: block; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-text small { display: block; font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-card.picked .tc-text small { color: var(--sticker-ink); }
.tc-count { font-weight: 800; font-size: 13px; text-align: right; }
.tc-count small { display: block; font-weight: 600; color: var(--ink-soft); font-size: 12px; }

@media (max-width: 899px) {
  .book { padding: 8px; border-radius: 12px; }
  .bpage { padding: 8px 6px 6px; }
  .pockets { gap: 4px; }
  .page-count { min-width: 0; }
  .binder-bar .jump { order: 5; flex-basis: 100%; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .leaf, .under { display: none; } a.binder-cover:hover { transform: none; } }

/* =========================================================================
   Sticky header + bars
   ========================================================================= */
:root { --header-h: 0px; }
.cover { position: sticky; top: 0; z-index: 40; }
.sticky-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  background: var(--sheet); margin: 0 -20px; padding: 10px 20px 2px;
}
.sticky-bar::after { /* soft edge so cards slide under it */
  content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; pointer-events: none;
  background: linear-gradient(var(--sheet), transparent);
}
.sticky-bar .toolbar { margin-top: 12px; }
.sticky-bar .binder-bar { margin: 10px 0 10px; }
.sticky-bar .pick-banner { margin-bottom: 8px; }
.filters-toggle { display: none; }

@media (max-width: 699px) {
  .cover-inner { padding: 10px 16px; gap: 10px 16px; }
  /* scrolled down: only the search box stays */
  .cover.compact .wordmark, .cover.compact .nav { display: none; }
  .cover.compact .search { max-width: none; }
  .sticky-bar { margin: 0 -20px; padding: 8px 20px 2px; }
  /* set page: the find box and a Filters button stick; the filters fold away */
  .sticky-bar .toolbar { flex-wrap: wrap; }
  .sticky-bar .toolbar .tool.find { flex: 1 1 0; min-width: 0; }
  .filters-toggle { display: inline-block; flex: none; padding: 7px 12px; font-size: 14px; }
  .sticky-bar .toolbar:not(.open) > :not(.find):not(.filters-toggle) { display: none; }
  .sticky-bar .toolbar.open > :not(.find):not(.filters-toggle) { flex-basis: 100%; }
  .sticky-bar .toolbar.open .seg { display: flex; }
  .sticky-bar .toolbar.open .seg button { flex: 1; }
}

/* =========================================================================
   Loading feedback
   ========================================================================= */
.loadbar {
  position: fixed; left: 0; right: 0; top: var(--header-h); height: 4px; z-index: 60; overflow: hidden;
  background: rgb(127 127 127 / 0.15); pointer-events: none;
}
.loadbar::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 45%; left: -45%;
  /* the same holo foil as HOLO in the logo, sliding across like light over a card */
  background:
    linear-gradient(180deg, rgb(255 255 255 / .85) 0%, rgb(255 255 255 / .15) 40%, rgb(0 0 0 / .05) 60%, rgb(0 0 0 / .32) 100%), /* metal: bright top edge, shaded bottom */
    radial-gradient(closest-side, rgb(255 255 255 / .95), rgb(255 255 255 / 0)) 50% 50% / 18% 100% no-repeat,           /* specular hot spot */
    linear-gradient(90deg, transparent, #e88ac8 12%, #a294e6 28%, #c9d3e6 40%, #6fb4e8 52%, #5fcfb0 66%, #e3c56a 82%, transparent); /* holo */
  box-shadow: 0 0 6px rgb(169 139 255 / .5), 0 1px 1px rgb(0 0 0 / .2);
  animation: loadbar 1.1s ease-in-out infinite;
}
@keyframes loadbar { to { left: 100%; } }

@keyframes spin { to { transform: rotate(360deg); } }
.is-busy { cursor: progress !important; }
.btn.is-busy, .linkish.is-busy, .fill-list button.is-busy { display: inline-flex; align-items: center; gap: 8px; opacity: 1; }
.btn.is-busy::before, .linkish.is-busy::before, .fill-list button.is-busy::before {
  content: ''; width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite;
}
.pocket-slot.is-busy::before, .vchip .is-busy::before {
  content: ''; position: absolute; z-index: 2; width: 22px; height: 22px; left: calc(50% - 11px); top: calc(50% - 11px);
  border-radius: 50%; border: 3px solid #fff; border-right-color: transparent; animation: spin 0.7s linear infinite;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.6));
}
.vchip .is-busy { position: relative; }
.vchip .is-busy::before { width: 14px; height: 14px; left: auto; right: 8px; top: calc(50% - 7px); border-width: 2px; border-color: currentColor; border-right-color: transparent; filter: none; }
.pocket-slot.is-busy img { opacity: 0.5; }
input.is-busy { background-image: linear-gradient(90deg, transparent, rgb(255 210 63 / 0.25), transparent); background-size: 200% 100%; animation: shimmer 1s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.book.working .spread { cursor: progress; }
.book.working .pocket-slot:not(.is-busy) { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .loadbar::before { animation: none; left: 0; width: 100%; opacity: 0.6; }
  .btn.is-busy::before, .linkish.is-busy::before, .fill-list button.is-busy::before,
  .pocket-slot.is-busy::before, .vchip .is-busy::before { animation-duration: 2s; }
  input.is-busy { animation: none; }
}

/* =========================================================================
   Sharing
   ========================================================================= */
.binder-wrap.ro { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.bpage-title.ro { margin: 0; font-size: 18px; line-height: 1.3; border: 0; padding: 2px 2px 3px; min-height: 1.6em; }
a.pocket-slot { display: block; }
.vis-badge {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  vertical-align: 2px; box-shadow: inset 0 0 0 1px var(--pocket-edge); color: var(--ink-soft);
}
.vis-badge.vis-unlisted, .vis-badge.vis-public { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); box-shadow: none; }
.cover-flag {
  position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
  background: var(--gold-metal), var(--sticker); color: var(--sticker-ink);
}
.share-panel fieldset { display: grid; gap: 8px; margin-bottom: 16px; }
.share-opt {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 10px 12px; border-radius: var(--radius-ui);
  background: var(--sheet); box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.share-opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--cover); }
.share-opt input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.share-opt b { display: block; }
.share-opt small { color: var(--ink-soft); font-size: 13px; }
.share-opt.is-busy { opacity: 0.7; }
.share-link { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.share-link input { flex: 1 1 260px; min-width: 0; font-size: 14px; }
.share-panel .field { margin-top: 12px; }
label.check.is-busy { opacity: 0.7; }

/* explore */
.explore { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; margin-top: 24px; }
@media (max-width: 520px) { .explore { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.explore-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.explore-card:hover .ex-text b { text-decoration: underline; }
.mini-cover { display: block; aspect-ratio: 2 / 3; padding: 0; overflow: hidden; } /* the front cover's shape */
.fan { position: absolute; inset: 31% 16% 31% 22%; display: flex; justify-content: center; align-items: stretch; }
.fan img {
  height: 100%; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 4px; box-shadow: 0 4px 10px rgb(0 0 0 / 0.35);
  margin: 0 -14%; background: #2a303b;
}
.fan img:nth-child(1) { transform: rotate(-8deg); }
.fan img:nth-child(2) { transform: translateY(-4%); z-index: 1; }
.fan img:nth-child(3) { transform: rotate(8deg); }
.fan img:only-child { transform: none; margin: 0; }
.ex-text b { display: block; font-size: 16px; }
.ex-text small { color: var(--ink-soft); font-size: 13px; }

/* =========================================================================
   Card details dialog, notes, chips' details button
   ========================================================================= */
.details-dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 12px;
  background: var(--pocket); color: var(--ink); box-shadow: 0 24px 60px rgb(10 15 30 / 0.45);
}
.details-dialog::backdrop { background: rgb(12 16 28 / 0.55); }
.dd { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.dd-head { display: flex; gap: 14px; align-items: center; }
.dd-head img { width: 56px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 4px; background: var(--sheet); flex: none; }
.dd-head h2 { font-stretch: 75%; font-weight: 800; font-size: 24px; }
.dd-head p { margin: 2px 0 0; font-size: 15px; line-height: 1.35; }
.dd-head small { color: var(--ink-soft); }
.dd-scope { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.dd-scope legend { font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; width: 100%; }
.dd-scope label { display: flex; align-items: center; gap: 6px; font-size: 15px; cursor: pointer; }
.dd .check { margin: 0; }
.dd-notes textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--sheet); width: 100%; resize: vertical;
  border: 1px solid var(--pocket-edge); border-radius: var(--radius-ui); padding: 8px 10px;
}
.dd .form-actions { margin-top: 4px; }
.dd [hidden] { display: none !important; }
@media (max-width: 520px) {
  .details-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .dd { padding: 16px; }
}

.vchip .vmore { flex: none; width: 28px; font-size: 15px; font-weight: 800; line-height: 1; color: var(--ink-soft); }
.vchip .vmore:hover { color: var(--ink); }
.vchip .vmore.is-busy::before { display: none; }

.toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; }
.toast-action {
  font: inherit; font-weight: 800; background: none; border: 0; color: var(--sticker); cursor: pointer; padding: 4px 2px;
  text-decoration: underline; text-underline-offset: 3px;
}

.copies { margin-top: 24px; }
.copies h2 { font-stretch: 75%; font-weight: 700; font-size: 24px; margin-bottom: 8px; }
.copies ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.copy {
  display: flex; gap: 12px; justify-content: space-between; align-items: flex-start;
  background: var(--pocket); border-radius: var(--radius-pocket); padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.copy b { display: block; }
.copy small { display: block; color: var(--ink-soft); font-size: 13px; }
.copy-note { margin: 6px 0 0; font-size: 14px; white-space: pre-wrap; max-width: 60ch; }
.items .note { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: italic; }
.items .c-act { white-space: nowrap; }
.items .c-act .btn { margin-left: 4px; }

.pocket-slot .pnote {
  position: absolute; right: 0; top: 0; width: 0; height: 0; z-index: 1;
  border-style: solid; border-width: 0 14px 14px 0; border-color: transparent var(--sticker) transparent transparent;
}

/* drag a card from the binder onto Cards to place */
.drop-hint { display: none; margin: 0 0 10px; padding: 14px; border-radius: var(--radius-ui); text-align: center; font-weight: 700; font-size: 14px;
  color: var(--ink-soft); box-shadow: inset 0 0 0 2px var(--pocket-edge); background: var(--sheet); border: 2px dashed var(--pocket-edge); }
.tray.drop-ready .drop-hint { display: block; }
.tray.drop-over { box-shadow: inset 0 0 0 3px var(--cover); }
.tray.drop-over .drop-hint { color: var(--ink); border-color: var(--cover); }

/* =========================================================================
   Listings: for sale, for trade, not for sale
   ========================================================================= */
.lbadge {
  display: inline-flex; align-items: baseline; gap: 1px; padding: 1px 7px; border-radius: 999px;
  font-size: 12px; font-weight: 800; line-height: 1.5; letter-spacing: .01em; white-space: nowrap; vertical-align: 1px;
}
.lbadge i { font-style: normal; font-weight: 700; opacity: .8; }
.l-sale { background: #1d7a4a; color: #fff; }
.l-trade { background: #2f5fb3; color: #fff; }
.l-nfs { background: #4a4f5c; color: #fff; }
.pocket-slot .lbadge { position: absolute; right: 3px; bottom: 3px; font-size: 11px; box-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.pocket-slot.dim { opacity: .28; filter: grayscale(.7); }
.pocket-slot.wanted { outline: 3px solid #1d7a4a; outline-offset: 1px; }
.pwant {
  position: absolute; top: 4px; right: 4px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: #1d7a4a; color: #fff; font-size: 13px; font-weight: 800;
}
.binder-wrap.ro .pocket-slot.filled { cursor: pointer; }
.dd-listing { border: 0; padding: 0; margin: 14px 0 4px; }
.dd-listing legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.dd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-opt {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--pocket-edge); font-size: 14px; font-weight: 600;
}
.tag-opt input { margin: 0; accent-color: currentColor; }
.tag-opt:has(input:checked) { box-shadow: inset 0 0 0 2px currentColor; }
.tag-opt.tag-sale:has(input:checked) { color: #1d7a4a; }
.tag-opt.tag-trade:has(input:checked) { color: #2f5fb3; }
.tag-opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.dd-ask { margin-top: 10px; max-width: 260px; }
.listing-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 12px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip {
  border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.fchip span { opacity: .7; font-weight: 700; }
.fchip.on { background: var(--ink); color: var(--pocket); box-shadow: none; }
.fchip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.listing-bar .contact { font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.binder-wrap.ro.with-list { grid-template-columns: minmax(0, 1fr) 300px; max-width: 1300px; }
@media (max-width: 1100px) { .binder-wrap.ro.with-list { grid-template-columns: minmax(0, 1fr); } }
.interest .ilist { cursor: default; }
.interest .tc-count { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.itotal { margin: 10px 0 0; font-size: 15px; }
.pocket-menu.visitor { width: 220px; }
.pocket-menu .pm-title small + small { margin-top: 2px; }
.pm-ask { margin: 0 6px 6px; font-size: 14px; }
.pm-ask b { color: #1d7a4a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pm-ask b, :root:not([data-theme="light"]) .tag-opt.tag-sale:has(input:checked) { color: #4cc38a; }
  :root:not([data-theme="light"]) .tag-opt.tag-trade:has(input:checked) { color: #7aa7f0; }
}

/* =========================================================================
   Inbox and offers
   ========================================================================= */
.nav a { position: relative; }
.nbadge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px;
  border-radius: 999px; background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); font-size: 11px; font-weight: 800; vertical-align: 1px;
}
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.inbox-list .title { margin-bottom: 12px; }
.convs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.conv {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-pocket);
  background: var(--pocket); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px transparent;
}
.conv:hover { box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.conv.on { box-shadow: inset 0 0 0 2px var(--cover); }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-top time { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.conv-prev { font-size: 14px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .conv-top b::before {
  content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cover); margin-right: 6px; vertical-align: 1px;
}
.conv.unread .conv-prev { color: var(--ink); font-weight: 600; }
.conv-wait { align-self: flex-start; font-size: 12px; font-weight: 700; background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); border-radius: 999px; padding: 1px 8px; margin-top: 3px; }
.convs-empty { background: var(--pocket); border-radius: var(--radius-pocket); padding: 16px; }
.convs-empty p { margin: 0 0 8px; }

.thread {
  background: var(--pocket); border-radius: var(--radius-pocket); display: flex; flex-direction: column;
  height: calc(100vh - var(--header-h, 70px) - 40px); min-height: 420px; position: sticky; top: calc(var(--header-h, 70px) + 16px);
}
.thread-empty { margin: auto; text-align: center; padding: 30px; color: var(--ink-soft); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--pocket-edge); }
.thread-head h2 { margin: 0; font-size: 20px; font-stretch: 75%; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-back { display: none; margin: 0; }
.msgs { list-style: none; margin: 0; padding: 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { display: flex; flex-direction: column; max-width: min(78%, 460px); }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }
.msg.is-event { align-self: center; max-width: 90%; }
.msg time { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
.bubble { margin: 0; padding: 8px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.msg.theirs .bubble { background: var(--sheet); border-bottom-left-radius: 4px; }
.msg.mine .bubble { background: var(--cover); color: var(--cover-ink); border-bottom-right-radius: 4px; }
.event { margin: 4px 0; font-size: 13px; text-align: center; color: var(--ink-soft); }
.event.ev-accepted { color: var(--gain); font-weight: 700; }
.blocked-note { margin: 0; padding: 10px 16px; font-size: 14px; color: var(--ink-soft); border-top: 1px solid var(--pocket-edge); }
.composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--pocket-edge); align-items: flex-end; }
.composer textarea {
  flex: 1; resize: none; font: inherit; border: 1px solid var(--pocket-edge); border-radius: var(--radius-ui);
  padding: 8px 10px; background: var(--pocket); color: var(--ink); min-height: 42px; max-height: 160px;
}
.thread-foot { margin: 0; padding: 0 16px 12px; }

.offer {
  width: min(420px, 100%); background: var(--pocket); border-radius: 12px; padding: 12px 14px;
  box-shadow: inset 0 0 0 1px var(--pocket-edge); display: flex; flex-direction: column; gap: 8px;
}
.msg.mine .offer { box-shadow: inset 0 0 0 2px var(--cover); }
.offer-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.offer-kind { font-weight: 700; color: var(--ink-soft); }
.offer-status { font-weight: 700; border-radius: 999px; padding: 0 8px; background: var(--sheet); white-space: nowrap; }
.st-pending .offer-status { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); }
.st-accepted .offer-status { background: #1d7a4a; color: #fff; }
.st-declined, .st-withdrawn, .st-countered { opacity: .72; }
.offer-amount { margin: 0; font-size: 26px; font-weight: 800; font-stretch: 85%; line-height: 1.1; }
.offer-amount small { display: block; font-size: 13px; font-weight: 500; font-stretch: 100%; color: var(--ink-soft); }
.st-countered .offer-amount, .st-declined .offer-amount, .st-withdrawn .offer-amount { text-decoration: line-through; text-decoration-thickness: 2px; }
.offer-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.offer-cards li { display: flex; align-items: center; gap: 10px; }
.offer-cards img { width: 36px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 3px; background: var(--sheet); flex: none; }
.offer-cards span:not(.lbadge) { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.offer-cards span:not(.lbadge) small { color: var(--ink-soft); font-size: 12px; }
.offer-from, .offer-note { margin: 0; }
.offer-note { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; border-left: 3px solid var(--pocket-edge); padding-left: 10px; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.counter { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--pocket-edge); padding-top: 10px; }
.counter textarea { font: inherit; }
.offer-dialog .dd { max-width: 520px; }
.of-title { margin: 0; font-stretch: 75%; font-weight: 800; font-size: 24px; }
.offer-dialog header p { margin: 4px 0 0; }
.offer-dialog .offer-cards { max-height: 240px; overflow-y: auto; }
.of-asking { margin: 0; }
.money-in { display: flex; align-items: center; gap: 6px; }
.money-in i { font-style: normal; font-weight: 700; font-size: 18px; color: var(--ink-soft); }
.money-in input { font-size: 20px; font-weight: 700; max-width: 200px; }
.of-vs { min-height: 1.2em; }
.binder-head .binder-actions { flex-wrap: wrap; }

@media (max-width: 820px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox:not(.has-thread) .thread { display: none; }
  .thread { position: static; height: calc(100dvh - var(--header-h, 60px) - 24px); min-height: 360px; }
  .thread-back { display: inline-block; }
  .thread-head { padding: 10px 12px; }
  .msgs { padding: 12px; }
  .msg { max-width: 88%; }
  .composer { padding: 10px 12px; }
  .thread-foot { display: none; }
}
textarea { font: inherit; }
.offer-cards .lbadge { flex: none; }
@media (max-width: 699px) {
}
@media (max-width: 820px) { .thread { margin: 0; } }
.l-pending { background: #b45f06; color: #fff; }
.st-accepted .offer-status { background: #b45f06; color: #fff; }
.st-completed .offer-status { background: #1d7a4a; color: #fff; }
.st-cancelled { opacity: .72; }
.st-cancelled .offer-amount { text-decoration: line-through; text-decoration-thickness: 2px; }
.offer-sale { border-top: 1px dashed var(--pocket-edge); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.offer-sale p { margin: 0; }
.event.ev-completed { color: var(--gain); font-weight: 700; }
.conv-about { font-size: 12px; color: var(--ink-soft); }
.dd-pending { margin: 4px 0 0; font-size: 14px; }
.own-note { align-self: center; }

/* =========================================================================
   Profiles, avatars, sign-in
   ========================================================================= */
.ava {
  width: var(--s); height: var(--s); border-radius: 50%; object-fit: cover; flex: none; display: inline-block;
  vertical-align: middle; background: var(--sheet);
}
.ava-letter {
  display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: calc(var(--s) * 0.45);
  background: hsl(var(--h) 45% 42%); line-height: 1; user-select: none;
}
.account-link { display: inline-flex; align-items: center; gap: 6px; }
.account-link .ava { box-shadow: 0 0 0 2px rgb(255 255 255 / .5); }

.auth { max-width: 420px; }
.auth-tabs { margin-bottom: 18px; }
.auth-tabs a { padding: 6px 14px; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.auth-tabs a[aria-current] { background: var(--cover); color: var(--cover-ink); }
.auth form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.auth .form-actions { align-items: center; }
.pw { display: flex; align-items: center; gap: 8px; }
.pw input { flex: 1; }
.auth-switch { margin-top: 20px; color: var(--ink-soft); }
.join-notice { margin-top: 20px; }
.join-notice .btn + .btn { margin-left: 6px; }
.join-dialog .dd { max-width: 440px; }
.join-dialog p { margin: 0; }

.profile-edit { max-width: 620px; }
.pe-photo { display: flex; align-items: center; gap: 18px; margin: 20px 0 8px; }
.pe-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pe-photo-actions p { flex-basis: 100%; margin: 0; }
.pe-form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.pe-user { display: flex; align-items: center; gap: 4px; }
.pe-user input { flex: 1; min-width: 0; }
#pe-user-note.ok { color: var(--gain); }
#pe-user-note.bad { color: #b3261e; }
.pe-account { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--pocket-edge); }
.pe-account h2 { font-size: 18px; margin: 0 0 4px; }
label.btn.is-busy { pointer-events: none; opacity: .7; }
label.btn:has(+ input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

.profile-head { display: flex; gap: 24px; align-items: flex-start; margin: 8px 0 28px; }
.ph-text { min-width: 0; }
.ph-text .title { margin: 0; overflow-wrap: anywhere; }
.ph-handle { margin: 2px 0 0; color: var(--ink-soft); font-weight: 600; }
.ph-bio { margin: 10px 0 0; max-width: 60ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.ph-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
.ph-sales { font-weight: 700; color: var(--gain); }
.ph-contact { margin: 8px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ph-binders h2 { font-size: 20px; margin: 0 0 12px; }
.ex-text small .ava { margin-right: 2px; vertical-align: -4px; }
#b-stats .ava { vertical-align: -5px; }
.share-who { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.share-who div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.share-who small { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.conv { flex-direction: row; align-items: flex-start; gap: 10px; }
.conv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.thread-who h2 { flex: initial; }
a.thread-who:hover h2 { text-decoration: underline; }

@media (max-width: 699px) {
  .profile-head { flex-direction: column; gap: 14px; }
}

/* Follow */
.follow-btn.is-following::before { content: '✓ '; }
.ph-follows { display: flex; gap: 14px; margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.ph-follows b { color: var(--ink); }
.explore-tabs { margin: 4px 0 16px; }
.explore-tabs a { padding: 6px 14px; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.explore-tabs a[aria-current] { background: var(--cover); color: var(--cover-ink); }
.following-row ul { list-style: none; margin: 0 0 18px; padding: 2px 0 6px; display: flex; gap: 14px; overflow-x: auto; }
.following-row a { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; text-decoration: none; color: var(--ink); font-size: 12px; text-align: center; }
.following-row a > span:not(.ava) { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explore-card { position: relative; }
.ex-new {
  position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--gold-metal), var(--sticker); color: var(--sticker-ink);
  font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px;
}

/* Reports, admin, legal, account */
.rp-reasons { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rp-reasons legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.rp-reason { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-ui); box-shadow: inset 0 0 0 1px var(--pocket-edge); cursor: pointer; }
.rp-reason:has(input:checked) { box-shadow: inset 0 0 0 2px var(--cover); }
.rp-reason input { margin-top: 3px; }
.rp-reason span { display: flex; flex-direction: column; font-size: 15px; }
.rp-reason small { color: var(--ink-soft); font-size: 13px; }
.report-line { margin: 18px 0 0; text-align: center; font-size: 13px; }
.report-line .linkish, .ph-report, #report { color: var(--ink-soft); font-size: 13px; }
.thread-head #report { margin-left: auto; }
.report-card { background: var(--pocket); border-radius: var(--radius-pocket); padding: 14px 16px; margin: 0 0 12px; }
.report-card header { font-size: 14px; color: var(--ink-soft); }
.report-card header b { color: var(--ink); }
.report-card blockquote { margin: 8px 0; padding-left: 10px; border-left: 3px solid var(--pocket-edge); white-space: pre-wrap; }
.am-msgs { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; max-height: 360px; overflow-y: auto; }
.am-msgs li { padding: 6px 10px; border-radius: 8px; background: var(--sheet); white-space: pre-wrap; overflow-wrap: anywhere; }
.am-msgs li.am-reported { box-shadow: inset 3px 0 0 #b3261e; }
.am-msgs time { color: var(--ink-soft); font-size: 12px; }
.am-note { flex: 1; min-width: 160px; }
.legal { max-width: 70ch; line-height: 1.6; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal li { margin: 0 0 6px; }
.pe-delete { margin-top: 18px; }
.pe-delete summary { cursor: pointer; color: #b3261e; font-weight: 600; font-size: 14px; }
.pe-delete p { font-size: 14px; }
.btn.danger { background: #b3261e; color: #fff; }
.btn.danger:disabled { opacity: .45; }
.suspended-note { border-color: #b3261e; margin-bottom: 16px; }

/* Reports, admin, legal, account */
.rp-reasons { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rp-reasons legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.rp-reason { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-ui); box-shadow: inset 0 0 0 1px var(--pocket-edge); cursor: pointer; }
.rp-reason:has(input:checked) { box-shadow: inset 0 0 0 2px var(--cover); }
.rp-reason input { margin-top: 3px; }
.rp-reason span { display: flex; flex-direction: column; font-size: 15px; }
.rp-reason small { color: var(--ink-soft); font-size: 13px; }
.report-line { margin: 18px 0 0; text-align: center; font-size: 13px; }
.report-line .linkish, .ph-report, #report { color: var(--ink-soft); font-size: 13px; }
.thread-head #report { margin-left: auto; }
.report-card { background: var(--pocket); border-radius: var(--radius-pocket); padding: 14px 16px; margin: 0 0 12px; }
.report-card header { font-size: 14px; color: var(--ink-soft); }
.report-card header b { color: var(--ink); }
.report-card blockquote { margin: 8px 0; padding-left: 10px; border-left: 3px solid var(--pocket-edge); white-space: pre-wrap; }
.am-msgs { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; max-height: 360px; overflow-y: auto; }
.am-msgs li { padding: 6px 10px; border-radius: 8px; background: var(--sheet); white-space: pre-wrap; overflow-wrap: anywhere; }
.am-msgs li.am-reported { box-shadow: inset 3px 0 0 #b3261e; }
.am-msgs time { color: var(--ink-soft); font-size: 12px; }
.am-note { flex: 1; min-width: 160px; }
.legal { max-width: 70ch; line-height: 1.6; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal li { margin: 0 0 6px; }
.pe-delete { margin-top: 18px; }
.pe-delete summary { cursor: pointer; color: #b3261e; font-weight: 600; font-size: 14px; }
.pe-delete p { font-size: 14px; }
.btn.danger { background: #b3261e; color: #fff; }
.btn.danger:disabled { opacity: .45; }
.suspended-note { border-color: #b3261e; margin-bottom: 16px; }

/* Price history chart (line colors validated for each surface: see the dataviz check in the README) */
:root { --chart-line: #2a78d6; }
@media (prefers-color-scheme: dark) { :root { --chart-line: #3987e5; } }
.price-history { margin-top: 28px; }
.price-history h2 { margin: 0 0 10px; }
.ph-controls { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.ph-controls .seg button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.ph-summary { margin: 0 0 8px; font-size: 15px; min-height: 1.4em; }
.ph-plot { position: relative; background: var(--pocket); border-radius: var(--radius-pocket); padding: 6px 0; min-height: 120px; }
.ph-plot.is-loading { opacity: .5; }
.ph-frame { position: relative; outline-offset: 2px; touch-action: pan-y; }
.ph-frame:focus-visible { outline: 2px solid var(--focus, #2a78d6); border-radius: 6px; }
.ph-frame svg { display: block; max-width: 100%; }
.ph-grid { stroke: var(--pocket-edge); stroke-width: 1; shape-rendering: crispEdges; }
.ph-axis { fill: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.ph-end { fill: var(--ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ph-line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ph-dot { fill: var(--chart-line); stroke: var(--pocket); stroke-width: 2; }
.ph-cross { stroke: var(--ink-soft); stroke-width: 1; shape-rendering: crispEdges; }
.ph-hit { fill: transparent; cursor: crosshair; }
.ph-tip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--sheet); border-radius: 6px;
  padding: 5px 9px; font-size: 13px; line-height: 1.3; white-space: nowrap; display: flex; flex-direction: column;
  box-shadow: 0 2px 8px rgb(0 0 0 / .2);
}
.ph-tip strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.ph-empty { padding: 16px; margin: 0; }
.ph-table { margin-top: 8px; font-size: 14px; }
.ph-table summary { cursor: pointer; color: var(--ink-soft); }
.ph-table > div { max-height: 280px; overflow-y: auto; margin-top: 6px; }
.ph-table table { border-collapse: collapse; width: 100%; max-width: 480px; font-variant-numeric: tabular-nums; }
.ph-table th, .ph-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--pocket-edge); }
.version-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Server-rendered card and set pages, before the app takes over (and for search engines) */
.crumbs { font-size: 14px; color: var(--ink-soft); margin: 0 0 8px; }
.ssr-prices { border-collapse: collapse; margin: 8px 0; }
.ssr-prices th, .ssr-prices td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--pocket-edge); }
.ssr-cards { columns: 2 260px; padding-left: 1.4em; }
.ssr-cards li { margin: 0 0 4px; break-inside: avoid; }

/* Collection charts (Pro) */
.insights { margin: 18px 0 24px; }
.ins-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.ins-head h2 { margin: 0; }
.ins-head .seg button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.pro-badge { display: inline-block; vertical-align: 3px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); }
#imp-pro { margin-top: 16px; }
.btn .pro-badge { vertical-align: 1px; font-size: 10px; padding: 1px 6px; margin-left: 4px; }
.ins-note { margin: 6px 0 0; }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 28px; margin-top: 18px; }
.ins-grid h3 { font-size: 17px; margin: 0 0 8px; }
.ins-grid h4 { font-size: 13px; margin: 10px 0 6px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.movers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.movers li { display: flex; align-items: center; gap: 10px; background: var(--pocket); border-radius: 8px; padding: 6px 10px; }
.movers img { width: 34px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 3px; background: var(--sheet); flex: none; }
.mv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.mv-text a { font-weight: 700; color: var(--ink); }
.mv-text small { color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.mv-change { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; flex-direction: column; }
.mv-change small { font-weight: 500; font-size: 12px; }
.set-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.set-bars li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 1.2fr) auto; align-items: center; gap: 10px; padding: 5px 0; }
.sb-name { display: flex; flex-direction: column; font-size: 14px; line-height: 1.25; min-width: 0; }
.sb-name a { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-name small { color: var(--ink-soft); font-size: 12px; }
.sb-track { height: 16px; display: flex; }
.sb-bar { height: 100%; background: var(--chart-line); border-radius: 0 4px 4px 0; min-width: 2px; }
.sb-value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.pro-teaser { display: flex; gap: 20px; align-items: center; background: var(--pocket); border-radius: var(--radius-pocket); padding: 18px 20px;
  box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.pro-teaser h2 { margin: 0 0 6px; font-size: 20px; }
.pro-teaser ul { margin: 0 0 8px; padding-left: 1.2em; }
.pro-teaser p { margin: 0 0 10px; }
.pt-example { flex: 0 0 240px; height: 110px; opacity: .55; filter: blur(.4px); }
.pt-example polyline { fill: none; stroke: var(--chart-line); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
@media (max-width: 640px) { .pro-teaser { flex-direction: column; align-items: stretch; } .pt-example { flex-basis: auto; width: 100%; height: 80px; } }
.admin-pro { background: var(--pocket); border-radius: var(--radius-pocket); padding: 12px 16px; margin: 0 0 16px; }
.admin-pro h2 { font-size: 18px; margin: 0 0 8px; }
.ap-form { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-form input { flex: 1; min-width: 160px; max-width: 260px; }
.ph-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 6px 0 0; }
.ph-more { font-weight: 600; }
.ph-ranges[hidden], .ins-ranges[hidden] { display: none; }

/* Import */
.coll-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.coll-actions { display: flex; gap: 8px; }
.imp-steps { padding-left: 1.3em; max-width: 70ch; line-height: 1.5; }
.imp-steps li { margin-bottom: 8px; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; margin: 12px 0;
  border: 2px dashed var(--pocket-edge); border-radius: var(--radius-pocket); background: var(--pocket); cursor: pointer; text-align: center; }
.imp-drop:hover, .imp-drop.over { border-color: var(--cover); }
.imp-drop:focus-within { outline: 2px solid var(--focus, #2a78d6); outline-offset: 2px; }
.imp-drop.is-busy { opacity: .6; pointer-events: none; }
.imp-drop-main { font-weight: 700; font-size: 17px; }
.imp-summary { background: var(--pocket); border-radius: var(--radius-pocket); padding: 12px 16px; margin: 8px 0 18px; }
.imp-summary p { margin: 0 0 6px; }
.imp-counts { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.imp-counts .ok b { color: var(--gain); } .imp-counts .bad b { color: var(--loss); } .imp-counts .warn b { color: #b45f06; }
.imp-group { margin: 0 0 22px; }
.imp-group h2 { font-size: 19px; margin: 0 0 6px; }
.imp-skipped summary h2 { display: inline; }
.imp-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.imp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--pocket); border-radius: 8px; padding: 7px 10px; }
.imp-row.off { opacity: .5; }
.imp-row > img { width: 34px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 3px; background: var(--sheet); flex: none; }
.imp-card, .imp-in { flex: 1; min-width: 180px; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.imp-card small, .imp-in small { color: var(--ink-soft); font-size: 12px; }
.imp-row select { flex: 1 1 260px; min-width: 0; max-width: 100%; }
.imp-det { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.imp-owned { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--sheet); color: var(--ink-soft); }
.imp-find { flex-basis: 100%; }
.imp-find input { width: 100%; }
.imp-found { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.imp-found li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.imp-found img { width: 30px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 3px; }
.imp-vers { display: flex; flex-wrap: wrap; gap: 6px; }
.imp-vers .btn { padding: 4px 10px; font-size: 13px; }
.imp-more { list-style: none; }
.imp-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--sheet); padding: 12px 0; border-top: 1px solid var(--pocket-edge); margin-top: 8px; z-index: 5; }
.imp-bar #imp-total { font-weight: 700; }
.imp-done { margin-top: 12px; }

/* =========================================================================
   Want lists, and Explore's For sale / Wanted tabs
   ========================================================================= */
.explore-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.explore-top { display: flex; gap: 4px; margin: 14px 0 6px; border-bottom: 1px solid var(--pocket-edge); overflow-x: auto; }
.explore-top a { padding: 10px 14px; text-decoration: none; font-weight: 700; color: var(--ink-soft); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.explore-top a:hover { color: var(--ink); }
.explore-top a[aria-current] { color: var(--ink); border-bottom-color: var(--cover); }
@media (prefers-color-scheme: dark) { .explore-top a[aria-current] { border-bottom-color: var(--focus); } }
.explore-top + .seg.explore-tabs { margin-top: 14px; }

.mk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0 8px; }
.mk-filters input[type=search] { flex: 1 1 220px; max-width: 360px; font: inherit; padding: 8px 12px; border-radius: var(--radius-ui);
  border: 1px solid var(--pocket-edge); background: var(--pocket); color: var(--ink); }
.mk-filters .seg button { font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; }
.mk-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; cursor: pointer; }
.mk-check input { width: 18px; height: 18px; accent-color: var(--cover); margin: 0; }
.mk-chip-row { margin: 4px 0 0; }
.mk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.mk-chip .linkish { text-decoration: none; padding: 2px 8px; }
#mk-list.is-loading { opacity: .5; transition: opacity .15s; }
.mk-grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mk-tile { display: grid; grid-template-columns: 104px 1fr; gap: 14px; padding: 12px; border-radius: var(--radius-pocket);
  background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.mk-tile.match { box-shadow: inset 0 0 0 2px var(--sticker); }
.mk-art { position: relative; display: block; align-self: start; }
.mk-art img { display: block; width: 100%; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 5px; background: #2a303b; }
.mk-art .lbadge { position: absolute; left: 50%; transform: translateX(-50%); bottom: -6px; box-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.mk-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mk-name { font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.mk-name:hover { text-decoration: underline; }
.mk-body small, .mk-meta { color: var(--ink-soft); font-size: 13px; }
.mk-note { font-size: 13px; font-style: italic; overflow-wrap: anywhere; }
.mk-who { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 4px; min-width: 0; }
.mk-who a { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-act { margin-top: 8px; align-self: flex-start; font-size: 14px; padding: 6px 12px; }
.mk-flag { align-self: flex-start; display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); }
.mk-more { text-align: center; margin: 22px 0 0; }
.mk-empty { margin-top: 18px; }
.l-want { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); }
@media (max-width: 520px) { .mk-grid { grid-template-columns: 1fr; } .mk-tile { grid-template-columns: 88px 1fr; } }

/* card page: who wants it, what's listed, and the Want buttons */
.card-market { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 12px 0 0; font-size: 15px; }
.card-market .cm-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.card-market a { color: var(--ink); }
.versions-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.want-btn[aria-pressed=true] { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); box-shadow: none; }

/* #/wants */
.wl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 18px 0 0; padding: 12px 14px;
  border-radius: var(--radius-pocket); background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.wl-switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.wl-switch input { width: 20px; height: 20px; accent-color: var(--cover); margin: 0; flex: none; }
.wl-count { margin: 20px 0 8px; }
.wl-count a { color: var(--ink); }
.wl-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wl-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) 130px minmax(140px, 220px) auto; gap: 14px; align-items: center;
  padding: 10px 12px; border-radius: var(--radius-pocket); background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.wl-art img { display: block; width: 64px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 4px; background: #2a303b; }
.wl-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wl-main small { color: var(--ink-soft); font-size: 13px; }
.wl-match { align-self: flex-start; margin-top: 4px; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  background: #1d7a4a; color: #fff; text-decoration: none; }
.wl-match:hover { text-decoration: underline; }
.wl-item .field input { font: inherit; padding: 6px 8px; border-radius: var(--radius-ui); border: 1px solid var(--pocket-edge);
  background: var(--sheet); color: var(--ink); width: 100%; }
.wl-item .field span { font-size: 12px; }
@media (max-width: 760px) {
  .wl-item { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .wl-art img { width: 56px; }
  .wl-max { grid-column: 2; } .wl-note { grid-column: 2 / -1; } .wl-max + .wl-note { grid-row: 3; }
  .wl-item [data-remove] { grid-column: 3; grid-row: 1; align-self: start; }
}

/* profile: their want list */
.ph-wants-sec { margin-top: 32px; }
.ph-wants-sec h2 { font-size: 20px; margin: 0 0 12px; }
.ph-have { margin: -4px 0 12px; }
.ph-wants { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ph-wants a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: var(--radius-pocket); text-decoration: none; color: var(--ink);
  background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.ph-wants li.match a { box-shadow: inset 0 0 0 2px var(--sticker); }
.ph-wants img { width: 48px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 3px; flex: none; background: #2a303b; }
.ph-wants span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ph-wants small { color: var(--ink-soft); font-size: 12px; }
.ph-wants small.mk-flag { color: var(--sticker-ink); margin-top: 2px; }

/* a shared binder opened from For sale: the card it came from */
.pocket-slot.spot { outline: 3px solid var(--sticker); outline-offset: 2px; }

/* ☆ on search results: add to want list */
.want-star {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 19px; line-height: 1; padding: 0 0 2px;
  background: rgb(20 26 41 / .72); color: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .35);
}
.want-star:hover { background: rgb(20 26 41 / .9); }
.want-star[aria-pressed=true] { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); }
.want-menu {
  position: absolute; top: 52px; right: 10px; z-index: 5; min-width: 190px; max-width: calc(100vw - 16px); padding: 6px;
  display: flex; flex-direction: column; border-radius: 8px; background: var(--pocket); color: var(--ink);
  box-shadow: 0 8px 24px rgb(0 0 0 / .25), inset 0 0 0 1px var(--pocket-edge);
}
.want-menu .wm-title { margin: 4px 8px 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.want-menu button, .want-menu a {
  display: flex; align-items: center; gap: 8px; text-align: left; font: inherit; font-size: 14px; padding: 8px; border: 0; border-radius: 5px;
  background: none; color: inherit; cursor: pointer; text-decoration: none;
}
.want-menu button:hover, .want-menu a:hover, .want-menu :focus-visible { background: var(--sheet); }
.want-menu a { color: var(--ink-soft); font-size: 13px; border-top: 1px solid var(--pocket-edge); border-radius: 0 0 5px 5px; margin-top: 4px; padding-left: 32px; }
.wm-check { flex: none; width: 16px; font-weight: 800; color: var(--gain); }

/* search results: sort and filters */
.search-tools { margin: 14px 0 0; }
.search-tools .tool { display: inline-flex; align-items: center; gap: 8px; }
.search-tools .tool-label { font-size: 14px; color: var(--ink-soft); }
.search-tools .linkish { font-size: 14px; color: var(--ink-soft); }
@media (max-width: 520px) { .search-tools .tool { flex: 1 1 140px; } .search-tools .tool select { flex: 1; min-width: 0; } }
/* "My Collection" / "My Binders" are longer: tighter spacing so the menu still fits on phones */

/* Installed app (home screen): the status bar sits over the cobalt header, and nothing hides
   behind the notch or the home indicator. */
.cover { padding-top: env(safe-area-inset-top); }
@media (display-mode: standalone) {
  .cover-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
.imp-bar { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
body { padding-bottom: env(safe-area-inset-bottom); }
.toast { bottom: calc(24px + env(safe-area-inset-bottom)); }

/* "Get the app" banner */
.install-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 12px;
  background: var(--cover); color: var(--cover-ink); box-shadow: 0 10px 30px rgb(0 0 0 / .3);
  max-width: 520px; margin: 0 auto;
}
.install-bar img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.install-bar .ib-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.install-bar .ib-title { display: block; font-weight: 800; font-size: 15px; }
.install-bar .ib-why, .install-bar .ib-how { display: block; }
.install-bar .ib-how { margin-top: 4px; }
.install-bar img { box-shadow: 0 0 0 1px rgb(255 255 255 / .25); }
.install-bar .btn { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); flex: none; padding: 8px 14px; }
.install-bar .ib-close { background: none; border: 0; color: inherit; opacity: .75; font-size: 20px; line-height: 1; padding: 6px; cursor: pointer; flex: none; }
.ib-share { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }

/* admin: users */
.admin-tabs { margin-bottom: 14px; }
.au-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 12px 0 6px; }
.au-tools input[type=search] { flex: 1 1 220px; max-width: 340px; font: inherit; padding: 8px 12px; border-radius: var(--radius-ui);
  border: 1px solid var(--pocket-edge); background: var(--pocket); color: var(--ink); }
.au-filter { flex-wrap: wrap; }
.au-filter button { font-size: 14px; }
.au-filter button[aria-pressed=true] .muted { color: inherit; opacity: .75; }
.au-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.au-list.is-loading { opacity: .5; }
.au-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px;
  border-radius: var(--radius-pocket); background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.au-row.is-suspended { opacity: .7; }
.au-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.au-name { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.au-who small { color: var(--ink-soft); font-size: 13px; overflow-wrap: anywhere; }
.au-who small a { color: inherit; }
.au-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.au-acts .btn { font-size: 13px; padding: 6px 10px; }
.au-danger { color: var(--loss); }
.au-rep { background: var(--loss); color: #fff; }
@media (max-width: 640px) { .au-row { grid-template-columns: 40px minmax(0, 1fr); } .au-acts { grid-column: 1 / -1; justify-content: flex-start; } }
/* on phones the Admin link lives on the Profile page instead, so the menu keeps "My Collection" and "My Binders" */
@media (max-width: 520px) { #admin-link { display: none !important; } }

/* =========================================================================
   Binder customization: page backgrounds, cover photos
   ========================================================================= */
.bpage.has-bg { background-color: #1e2229; }
.bpage.has-bg .bpage-title, .bpage.has-bg .bpage-foot { text-shadow: 0 1px 3px rgb(0 0 0 / .75); }
.bpage.has-bg .bpage-foot, .bpage.has-bg .bpage-foot .linkish { color: #e4e8ef; }
.bpage.has-bg .bpage-title::placeholder { color: #c9cfda; }
.bpage.has-bg .pocket-slot.empty, .bpage.has-bg .pocket-slot.ghost { background: rgb(0 0 0 / .3); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); }
/* an uploaded picture, dimmed a little so cards and titles stand out */
.bpage.has-photo:not(.bcover)::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(rgb(10 12 18 / .32), rgb(10 12 18 / .5)), var(--page-photo) center / cover no-repeat;
}
.bpage.has-photo:not(.bcover) > :not(.pocket-menu):not(.bg-picker) { position: relative; z-index: 1; }

.bg-picker {
  position: absolute; z-index: 30; left: 8px; right: 8px; top: 40px; max-height: calc(100% - 48px); overflow: auto;
  background: var(--pocket); color: var(--ink); border-radius: 10px; padding: 10px; text-shadow: none;
  box-shadow: 0 14px 40px rgb(0 0 0 / .45), inset 0 0 0 1px var(--pocket-edge);
}
.bgp-head { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 8px; }
.bgp-x { background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; padding: 2px 6px; }
.bgp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.bgp-sw {
  position: relative; aspect-ratio: 3 / 4; border: 0; border-radius: 6px; cursor: pointer; padding: 0; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center; font: inherit; color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15);
}
.bgp-sw span { font-size: 12px; font-weight: 700; padding: 0 2px 6px; text-shadow: 0 1px 3px rgb(0 0 0 / .8); }
.bgp-sw .pro-badge { position: absolute; top: 5px; right: 5px; font-size: 9px; padding: 1px 5px; font-style: normal; }
.bgp-sw[aria-pressed=true] { outline: 3px solid var(--sticker); outline-offset: 1px; }
.bgp-sw:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.bgp-none { background: #1e2229; }
.bgp-upload { width: 100%; margin-top: 10px; }
.bgp-note { margin: 8px 2px 0; }

/* cover photos: shelf, Explore, the banner over a binder */
.binder-cover.has-photo {
  background-size: cover; background-repeat: no-repeat; color: #fff;
  box-shadow: inset 0 -120px 80px -40px rgb(0 0 0 / .75), 0 10px 24px rgb(20 30 60 / 0.22);
}
.binder-cover.has-photo .cover-name, .binder-cover.has-photo .cover-meta { text-shadow: 0 1px 4px rgb(0 0 0 / .6); }
.mini-cover.has-photo { box-shadow: 0 10px 24px rgb(20 30 60 / 0.22); }
.b-banner {
  height: clamp(120px, 24vw, 230px); border-radius: 14px; margin: 4px 0 14px;
  background-size: cover; background-repeat: no-repeat; box-shadow: 0 10px 28px rgb(15 20 35 / .2);
}
.cover-photo { display: grid; gap: 8px; }
.cp-preview { height: 110px; border-radius: 8px; background-size: cover; background-repeat: no-repeat; box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.cover-photo input[type=range] { width: 100%; accent-color: var(--cover); }

/* "A new version is ready" */
.update-bar {
  position: fixed; left: 12px; right: 12px; margin: 0 auto; width: fit-content; top: calc(10px + env(safe-area-inset-top)); z-index: 70;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px; white-space: nowrap;
  background: var(--cover); color: var(--cover-ink); box-shadow: 0 10px 30px rgb(0 0 0 / .3); font-size: 14px; font-weight: 600;
}
.update-bar .btn { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); padding: 6px 14px; border-radius: 999px; }
.update-bar .ib-close { background: none; border: 0; color: inherit; opacity: .75; font-size: 18px; padding: 4px 8px; cursor: pointer; }

/* pull to refresh (installed app) */
.ptr {
  position: fixed; left: 50%; top: env(safe-area-inset-top); z-index: 80; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pocket); color: var(--ink-soft); pointer-events: none;
  box-shadow: 0 4px 14px rgb(0 0 0 / .25); transform: translate(-50%, -56px); opacity: 0; transition: opacity .15s;
}
.ptr.show { transition: none; }
.ptr.ready { color: var(--cover); background: var(--gold-metal), var(--sticker); }
.ptr.spinning svg { animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ptr.spinning svg { animation: none; } }

/* =========================================================================
   Binder full screen
   ========================================================================= */
/* the full screen button: a small icon on the binder's top-right corner */
.book { position: relative; }
.fs-open {
  position: absolute; top: 18px; right: 18px; z-index: 5; width: 34px; height: 34px; border-radius: 8px; padding: 0;
  display: grid; place-items: center; cursor: pointer; border: 1px solid rgb(255 255 255 / .35);
  background: rgb(8 10 16 / .55); color: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .35); backdrop-filter: blur(3px);
}
.fs-open:hover { background: rgb(8 10 16 / .75); }
.fs-open:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#binder-wrap.fs .fs-open { display: none; }
body.binder-fs-on { overflow: hidden; }
#binder-wrap.fs {
  max-width: none; margin: 0;
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; gap: 0;
  padding: calc(52px + env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: radial-gradient(120% 90% at 50% 0%, #1d2436, #0b0e15 70%);
}
#binder-wrap.fs .tray { display: none !important; }
#binder-wrap.fs .book { flex: none; margin: 0; max-width: 100%; box-shadow: 0 24px 60px rgb(0 0 0 / .55); }
.fs-bar {
  position: absolute; top: env(safe-area-inset-top); left: 0; right: 0; height: 52px; z-index: 2;
  display: flex; align-items: center; gap: 12px; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  color: #e7ebf3;
}
.fs-name { font-weight: 800; font-stretch: 75%; font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.fs-count { font-size: 13px; color: #aeb6c6; white-space: nowrap; }
.fs-pages { background: rgb(255 255 255 / .08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15); }
.fs-pages button { color: #cfd5e1; font-size: 13px; padding: 5px 10px; }
.fs-pages button[aria-pressed='true'] { background: #e7ebf3; color: #141a29; }
.fs-close { background: rgb(255 255 255 / .1); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 17px; cursor: pointer; flex: none; }
.fs-close:hover { background: rgb(255 255 255 / .2); }
.fs-arrow {
  flex: none; width: 48px; height: 96px; margin: 0 4px; border: 0; border-radius: 12px; cursor: pointer; z-index: 2;
  background: rgb(255 255 255 / .08); color: #fff; font-size: 44px; line-height: 1; padding-bottom: 6px;
}
.fs-arrow:hover:not(:disabled) { background: rgb(255 255 255 / .16); }
.fs-arrow:disabled { opacity: .2; cursor: default; }
.fs-arrow[hidden] { display: none; }
/* phones: the arrows sit over the edges of the book; swipe works too */
@media (max-width: 699px) {
  .fs-arrow { position: absolute; bottom: max(12px, env(safe-area-inset-bottom)); width: 64px; height: 48px; font-size: 32px; background: rgb(255 255 255 / .1); }
  .fs-prev { left: calc(50% - 76px); }
  .fs-next { right: calc(50% - 76px); }
  .fs-count { display: none; }
  .fs-pages button { padding: 5px 8px; }
}
/* phone held sideways: very little height, so a slimmer top bar */
@media (max-height: 500px) {
  #binder-wrap.fs { padding-top: calc(40px + env(safe-area-inset-top)); }
  .fs-bar { height: 40px; }
  .fs-close { width: 30px; height: 30px; font-size: 14px; }
}
.pocket .by-artist { margin-top: 2px; color: var(--ink-soft); font-size: 12px; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* search as you type */
.search { position: relative; }
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; overflow: auto;
  max-height: min(70vh, 560px); padding: 6px; border-radius: 10px;
  background: var(--pocket); color: var(--ink); box-shadow: 0 16px 40px rgb(0 0 0 / .28), inset 0 0 0 1px var(--pocket-edge);
}
.sg-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 7px; text-decoration: none; color: inherit; }
.sg-item img { width: 40px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 3px; background: #2a303b; }
.sg-text { display: flex; flex-direction: column; min-width: 0; }
.sg-text b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-text small { color: var(--ink-soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.sg-item:hover, .sg-item[aria-selected=true], .sg-all:hover, .sg-all[aria-selected=true] { background: var(--sheet); }
.sg-all { display: block; margin-top: 4px; padding: 10px 8px; border-radius: 7px; border-top: 1px solid var(--pocket-edge);
  font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; }
.sg-none { margin: 0; padding: 10px; color: var(--ink-soft); font-size: 14px; }
/* phones: the list uses the full width under the header */
@media (max-width: 760px) {
  .suggest { position: fixed; left: 8px; right: 8px; top: calc(var(--header-h, 120px) + 4px); max-height: calc(100dvh - var(--header-h, 120px) - 16px); }
}

/* binder tray: sort and type filter */
.tray-tools { display: flex; align-items: center; gap: 10px; margin: -2px 0 8px; flex-wrap: wrap; }
.tray-tools select { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: var(--radius-ui); border: 1px solid var(--pocket-edge); background: var(--pocket); color: var(--ink); }
.tray-tools .linkish { font-size: 13px; color: var(--ink-soft); }
.type-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.type-chip {
  display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 3px 9px 3px 6px; border-radius: 999px; border: 1px solid var(--pocket-edge); background: var(--pocket); color: var(--ink);
}
.type-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); flex: none; }
.type-chip[aria-pressed=true] { background: var(--tc); border-color: var(--tc); color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.type-chip[aria-pressed=true] i { background: #fff; }

/* Pro: price ranges */
.ins-dist { grid-column: 1 / -1; }
.pd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.pd-head h3 { margin: 0; }
.pd-mode button { font-size: 13px; padding: 5px 12px; }
.pd-note { margin: 4px 0 8px; }
.pd-bars .sb-name b { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.pd-bars .sb-value { font-variant-numeric: tabular-nums; text-align: right; min-width: 92px; }
.pd-bars .sb-value small { color: var(--ink-soft); margin-left: 4px; }
.pd-bars li { grid-template-columns: 110px minmax(60px, 1fr) auto; }
.pd-foot { margin-top: 6px; }

/* =========================================================================
   The binder's front cover (before page 1)
   ========================================================================= */
.book.on-cover { background: transparent; box-shadow: none; }
.book.on-cover .spread { display: block; }
.book.on-cover:not(.single) .spread { width: calc((100% - 28px) / 2); margin: 0 auto; }
.bcover { background: transparent; padding: 10px 10px 8px; }
.bcover > :not(.bc-face) { visibility: hidden; } /* an invisible page underneath keeps the cover page-sized */
.bc-face {
  position: absolute; inset: 0; border: 0; padding: 22px 20px 22px 40px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; font: inherit; color: var(--bc-ink);
  border-radius: 6px 16px 16px 6px; overflow: hidden;
  background: linear-gradient(135deg, rgb(255 255 255 / .14), transparent 45%), var(--bc);
  background-size: cover; background-position: center;
  box-shadow: 0 18px 40px rgb(15 20 35 / .35), inset -4px 0 0 rgb(0 0 0 / .18);
}
.bc-face::before { /* spine */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 22px;
  background: linear-gradient(90deg, rgb(0 0 0 / .3), rgb(0 0 0 / .08));
}
.bcover.has-photo .bc-face { color: #fff; box-shadow: inset 0 -160px 110px -50px rgb(0 0 0 / .75), 0 18px 40px rgb(15 20 35 / .35); }
.bc-name { font-stretch: 62%; font-weight: 800; font-size: clamp(28px, 6vw, 46px); line-height: 1; overflow-wrap: anywhere; text-shadow: 0 2px 8px rgb(0 0 0 / .35); }
.bc-by { font-size: 15px; font-weight: 700; opacity: .92; }
.bc-meta { font-size: 14px; opacity: .85; }
.bc-open {
  align-self: flex-end; margin-top: 10px; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 14px;
  background: rgb(255 255 255 / .9); color: #1c2433; box-shadow: 0 2px 8px rgb(0 0 0 / .25);
}
.bc-face:hover .bc-open { background: #fff; }
.bc-face:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* opening the cover: page 1 eases in */
.spread.opening > .bpage { animation: cover-open .35s ease-out; }
@keyframes cover-open { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .spread.opening > .bpage { animation: none; } }

/* Appearance (Profile) */
.appearance { border: 0; padding: 0; margin: 0 0 14px; }
.appearance legend { padding: 0; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.appearance .seg { display: inline-flex; flex-wrap: wrap; }
.appearance p { margin: 6px 0 0; }

/* Opening: the wordmark in the middle of the screen, a holo shine, then the site. Once per visit.
   theme.js adds .splash-on; the splash fades itself out even if no script runs after that. */
.splash { display: none; }
html.splash-on body { overflow: hidden; }
html.splash-on .splash {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000; cursor: pointer;
  background: radial-gradient(60% 45% at 50% 50%, rgb(255 205 110 / .16), transparent 70%), var(--cover);
  animation: splash-out .5s ease 2s forwards;
}
.splash .splash-mark {
  flex-direction: column; gap: .3em; font-size: clamp(34px, 11vw, 76px);
  animation: splash-in .8s cubic-bezier(.2, .7, .2, 1) both;
}
.splash .wm-mark { width: 2.6em; height: 2.56em; }
.splash .wm-holo { animation: holo-once 1.2s ease-in-out .6s both; }
.splash .wm-tag {
  display: block; font-size: .3em; font-weight: 600; letter-spacing: .18em; color: #e9c98a; margin-top: .2em;
}
@keyframes splash-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes holo-once { from { background-position: 150% 0, 0 0; } to { background-position: -50% 0, 0 0; } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

/* ---- Menu: across the top on bigger screens, a tab bar along the bottom on phones ---- */
.nav-ico { display: none; }
@media (max-width: 699px) {
  :root { --tabbar-h: calc(60px + env(safe-area-inset-bottom)); }
  body { padding-bottom: var(--tabbar-h); }
  .nav, .cover.compact .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; width: auto;
    display: flex; justify-content: space-around; gap: 2px;
    padding: 5px max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left));
    background: var(--cover); box-shadow: 0 -1px 0 rgb(255 255 255 / .08), 0 -8px 22px rgb(0 0 0 / .18);
  }
  .nav a {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 5px 2px 6px; border-radius: 12px; font-size: 11px; font-weight: 700; letter-spacing: .01em;
    color: var(--cover-ink); opacity: .72; text-decoration: none;
  }
  .nav a[aria-current] { opacity: 1; color: var(--sticker); background: rgb(255 255 255 / .1); }
  .nav a:hover { background: rgb(255 255 255 / .08); }
  .nav-ico { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .nav-my { display: none; }
  .nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-link { gap: 3px; }
  .account-link .ava { width: 24px; height: 24px; }
  .nav a[aria-current] .ava { box-shadow: 0 0 0 2px var(--sticker); }
  #admin-link, .nav a[hidden] { display: none; } /* on phones the Admin page opens from Profile */
  .nbadge { position: absolute; top: 2px; left: 50%; margin-left: 5px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; }
  .toast { bottom: calc(var(--tabbar-h) + 14px); }
  .install-bar { bottom: calc(var(--tabbar-h) + 10px); }
  .thread { height: calc(100dvh - var(--header-h, 60px) - var(--tabbar-h) - 24px); }
}

/* Price ranges: each bar is a button that filters the card list */
.pd-bars li { display: block; padding: 0; }
.pd-pick {
  display: grid; grid-template-columns: 110px minmax(60px, 1fr) auto; align-items: center; gap: 10px;
  padding: 5px 6px; margin: 0 -6px; width: calc(100% + 12px); border: 0; border-radius: 8px; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.pd-pick:hover:not(:disabled) { background: rgb(127 127 127 / .1); }
.pd-pick[aria-pressed=true] { background: rgb(127 29 45 / .1); box-shadow: inset 0 0 0 1.5px var(--cover); }
.pd-pick[aria-pressed=true] .sb-name b { color: var(--cover); }
@media (prefers-color-scheme: dark) { .pd-pick[aria-pressed=true] { background: rgb(233 183 63 / .12); box-shadow: inset 0 0 0 1.5px var(--sticker); } .pd-pick[aria-pressed=true] .sb-name b { color: var(--sticker); } }
.pd-pick:disabled { cursor: default; }
.range-filter {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 18px 0 8px; padding: 10px 12px 10px 16px; border-radius: 10px; background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge);
  scroll-margin-top: calc(var(--header-h, 70px) + 12px);
}
.range-filter[hidden] { display: none; }
.items tr[hidden] { display: none; }

/* ---- Your table: sale binders by price ---- */
.table-sec { margin-top: 40px; }
.table-promo {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 22px; border-radius: 16px;
  background: linear-gradient(135deg, rgb(127 29 45 / .07), rgb(233 183 63 / .12)); box-shadow: inset 0 0 0 1px var(--pocket-edge);
}
.table-promo h2 { margin: 0 0 6px; }
.table-promo p { margin: 0 0 10px; max-width: 62ch; }
.tp-text { flex: 1 1 320px; }
.tp-art { display: flex; gap: 6px; flex: none; }
.tp-b {
  display: grid; place-items: center; width: 46px; height: 62px; border-radius: 4px 8px 8px 4px; font-weight: 800; font-size: 15px;
  color: #fff; box-shadow: inset 5px 0 0 rgb(0 0 0 / .2), 0 6px 14px rgb(0 0 0 / .15);
}
.tp-b.b1 { background: #d4a21f; color: #2a2000; } .tp-b.b2 { background: #2d5a46; } .tp-b.b3 { background: #2b3a67; }
.tp-b.b4 { background: var(--gold-metal), var(--cover); color: var(--sticker-ink); }
.table-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.table-head h2 { margin: 0 0 4px; }
.table-head p { margin: 0; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.auto-flag { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); }
.table-form .tf-breaks { border: 0; padding: 0; margin: 0 0 12px; }
.table-form legend { font-weight: 700; margin-bottom: 6px; }
.tf-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.tf-row.locked, .check.locked { opacity: .55; }
.tf-price { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.tf-price input { width: 90px; }
.danger-text { color: var(--loss); }
.pqty {
  position: absolute; top: 6px; right: 6px; z-index: 2; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: rgb(0 0 0 / .72); color: #fff;
}
.auto-info h2 { margin-top: 0; }
.auto-info .field { margin: 10px 0; }
.auto-badge { background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); }
.table-hero { display: flex; gap: 16px; align-items: flex-start; margin: 8px 0 20px; }
.table-hero .title { margin: 0; }
.table-hero .subtitle { margin: 6px 0 10px; }
.tier-chip {
  display: block; width: fit-content; margin: 4px 0 2px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--gold-metal), var(--sticker); color: var(--sticker-ink);
}
.ph-table { margin-bottom: 28px; }
.price-form .pf-apply { border: 0; padding: 0; margin: 8px 0; }
.price-form .pf-apply legend { font-weight: 700; margin-bottom: 4px; }
.price-form input[name=percent] { width: 80px; }
.pf-example { margin-left: 6px; }
/* QR code for card shows */
.qr-dialog { width: min(420px, 92vw); }
.qr-dialog .dd { max-width: none; margin: 0 auto; text-align: center; }
.qr-brand { margin: 0; font-stretch: 62%; font-weight: 800; font-size: 20px; color: var(--cover); letter-spacing: .02em; }
.qr-sub { margin: 4px 0 14px; color: var(--ink-soft); }
.qr-img { display: block; width: min(280px, 70vw); height: auto; margin: 0 auto; border-radius: 12px; background: #fff; padding: 8px; box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.qr-url { margin: 10px 0 0; font-weight: 700; word-break: break-all; }
.qr-actions { justify-content: center; }
@media print {
  body.print-qr > :not(dialog) { display: none !important; }
  body.print-qr .qr-dialog { position: static; border: 0; box-shadow: none; max-width: none; margin: 40px auto; }
  body.print-qr .qr-dialog::backdrop { background: none; }
  body.print-qr .qr-img { width: 9cm; box-shadow: none; }
  body.print-qr .qr-actions { display: none; }
  body.print-qr .of-title { font-size: 34px; }
}
/* Explore > Tables */
.tables-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.table-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge), 0 8px 22px rgb(20 10 10 / .06); }
.tc-art {
  display: flex; justify-content: center; align-items: center; gap: 6px; padding: 18px 12px; min-height: 150px;
  background: radial-gradient(90% 80% at 50% 0%, rgb(255 205 110 / .2), transparent 70%), var(--cover);
}
.tc-art img { width: 23%; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 5px; box-shadow: 0 6px 14px rgb(0 0 0 / .35); background: #2a1e1c; }
.tc-art img:nth-child(2) { transform: translateY(-6px); }
.tc-art img:nth-child(3) { transform: translateY(-3px); }
.tc-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.tc-who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 16px; }
.tc-who:hover b { text-decoration: underline; }
.tc-tiers { display: flex; flex-wrap: wrap; gap: 5px; }
.tc-tiers .tier-chip { display: inline-block; margin: 0; text-decoration: none; }
.tc-tiers .tier-chip small { opacity: .7; margin-left: 2px; }
.tc-go { align-self: flex-start; margin-top: 4px; }
/* My Collection: search, tag and sort */
.coll-tools {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 28px -10px 0; padding: 8px 10px;
  position: sticky; top: var(--header-h, 70px); z-index: 20; background: var(--sheet); /* stays in reach while you scroll */
}
.coll-tools input[type=search] { flex: 1 1 260px; min-width: 0; }
.coll-tools select { flex: 0 1 auto; }
.coll-count { margin: 10px 0 0; color: var(--ink-soft); font-size: 14px; min-height: 1px; }
.coll-count:empty { margin: 0; }
.coll-tools + .coll-count + .range-filter + .items, .coll-tools ~ .items { margin-top: 12px; }
@media (max-width: 699px) {
  .coll-tools { margin: 20px -16px 0; padding: 8px 16px; }
  .coll-tools select { flex: 1 1 40%; }
}
.ins-wrap { margin-top: 36px; scroll-margin-top: calc(var(--header-h, 70px) + 12px); }
.ins-wrap > summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; list-style: none;
  padding: 12px 14px; border-radius: 10px; background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge);
  font-weight: 800; font-size: 18px;
}
.ins-wrap > summary::-webkit-details-marker { display: none; }
.ins-wrap > summary::before { content: '▸'; color: var(--ink-soft); transition: transform .15s; }
.ins-wrap[open] > summary::before { transform: rotate(90deg); }
.ins-hint { font-weight: 400; }
.ins-wrap[open] > summary { margin-bottom: 8px; }


/* First-time hints: a small bubble over the thing it explains, shown once per device */
.tip-bubble {
  position: absolute; z-index: 45; left: 50%; top: 70px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(330px, 90%); padding: 12px 12px 12px 14px; border-radius: 14px;
  background: rgb(26 18 16 / .9); color: #fff; box-shadow: 0 12px 30px rgb(0 0 0 / .35); font-size: 15px; font-weight: 600; line-height: 1.3;
  animation: hint-in .3s ease both;
}
.tip-bubble button { flex: none; border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer;
  background: var(--gold-metal), var(--sticker); color: var(--sticker-ink); }
.hint-ico { flex: none; width: 34px; height: 34px; }
.hint-ico.swipe { animation: hint-swipe 1.6s ease-in-out infinite; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes hint-swipe { 0%, 100% { transform: translateX(8px); } 50% { transform: translateX(-8px); } }
@media (prefers-reduced-motion: reduce) { .tip-bubble, .hint-ico.swipe { animation: none; } }
/* My Collection: what's listed for sale or trade, as part of the whole */
.lmix { margin: 22px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--pocket); box-shadow: inset 0 0 0 1px var(--pocket-edge); }
.lmix-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.lmix-head h2 { margin: 0; font-size: 18px; }
.lmix-bar { display: flex; gap: 2px; height: 16px; margin: 12px 0 10px; border-radius: 6px; overflow: hidden; }
.lmix-seg { min-width: 4px; }
.lmix-sale { background: #1d7a4a; }
.lmix-trade { background: #2f5fb3; }
.lmix-unlisted { background: #b9aaa2; }
@media (prefers-color-scheme: dark) { .lmix-sale { background: #3fae74; } .lmix-trade { background: #5b8be0; } .lmix-unlisted { background: #6b5a54; } }
.lmix-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lmix-legend button {
  width: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 7px; text-align: left; cursor: pointer;
  padding: 7px 8px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit;
}
.lmix-legend button:hover { background: rgb(127 127 127 / .1); }
.lmix-legend button[aria-pressed=true] { background: rgb(127 127 127 / .14); box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.lmix-sw { width: 12px; height: 12px; border-radius: 3px; grid-row: span 3; align-self: start; margin-top: 4px; }
.lmix-legend span { font-size: 13px; color: var(--ink-soft); }
.lmix-legend b { font-size: 16px; font-variant-numeric: tabular-nums; }
.lmix-legend small { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) { .lmix-legend button { padding: 6px 4px; gap: 0 5px; } .lmix-legend small { font-size: 11px; } }
.cover-flag-left { left: 26px; right: auto; }
/* phones: while typing, the tab bar steps aside so it doesn't ride on top of the keyboard */
@media (max-width: 699px) {
  body.typing .nav, body.typing .cover.compact .nav { display: none; }
}
/* Sets page: find a set */
.sets-find { position: sticky; top: var(--header-h, 70px); z-index: 20; background: var(--sheet); margin: 18px -10px 0; padding: 8px 10px; }
.sets-find input { width: 100%; }
@media (max-width: 699px) { .sets-find { margin: 14px -16px 0; padding: 8px 16px; } }
.series[hidden], .set-list li[hidden] { display: none; }
