/* Upsleeve on the web (the signed-in pages: /collection/, /vendor/ and the
   customer screen), in the app's Holo look like the home page: ink-indigo
   ground, raised panels, the foil gradient. Poppins (SIL Open Font License,
   /assets/site/fonts/OFL.txt) is the home page's subset. */

@font-face {
  font-family: "Poppins";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/site/fonts/poppins-regular.woff") format("woff");
}

@font-face {
  font-family: "Poppins";
  font-weight: 600;
  font-display: swap;
  src: url("/assets/site/fonts/poppins-semibold.woff") format("woff");
}

@font-face {
  font-family: "Poppins";
  font-weight: 800;
  font-display: swap;
  src: url("/assets/site/fonts/poppins-extrabold.woff") format("woff");
}

:root {
  --bg: #0b0a1c;
  --glow: #241d66;
  --panel: #16143a;
  --panel-2: #1f1b50;
  --panel-3: #2a2566;
  --line: #2b2852;
  --ink: #f6f4ff;
  --dim: #aba6d6;
  --violet: #8c7bff;
  --aqua: #6ef2e0;
  --gold: #ffd43b;
  --gold-ink: #1c1500;
  --up: #5be39b;
  --down: #ff7a8f;
  --foil: linear-gradient(115deg, #6ef2e0, #8c7bff, #ff86d1, #ffd46a);
  --gutter: 20px;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(90% 50% at 70% 0%, var(--glow), transparent 70%) no-repeat, var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: rgba(246, 244, 255, 0.35); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

h1, h2, h3 { text-wrap: balance; margin: 0; }
h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 13px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

@media (max-width: 600px) {
  :root { --gutter: 16px; }
}

.noscript { padding: 40px 20px; text-align: center; color: var(--dim); }

.skip {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--panel);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.foil-bar { height: 4px; background: var(--foil); }

.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.up { color: var(--up); }
.down { color: var(--down); }
.gold { color: var(--gold); }
.eyebrow { margin: 0 0 6px; color: var(--dim); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lede { margin: 12px 0 0; color: var(--dim); font-size: 16px; max-width: 620px; }
.fine { margin: 16px 0 0; color: var(--dim); font-size: 12.5px; }
.problem { margin: 16px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 122, 143, 0.12); color: var(--down); }
.loading { padding: 80px 0; text-align: center; color: var(--dim); }
.empty { padding: 28px 8px; text-align: center; }
.count { margin: 4px 0 14px; font-size: 13px; }

/* Header */

.top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo { display: block; flex-shrink: 0; }
.logo img { display: block; width: auto; height: 32px; }

.top nav { display: flex; gap: 6px; margin-right: auto; }
.top nav a {
  padding: 7px 12px;
  border-radius: 12px;
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current="page"] { background: var(--panel-2); color: var(--ink); }

@media (max-width: 600px) {
  .top { gap: 10px; flex-wrap: wrap; }
  .logo img { height: 26px; }
  .top nav { order: 3; width: 100%; }
  .top nav a { flex: 1; text-align: center; }
}

.account { position: relative; margin-left: auto; }
.account summary { list-style: none; cursor: pointer; border-radius: 50%; }
.account summary::-webkit-details-marker { display: none; }
.account .menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.who { display: grid; margin: 4px 8px 10px; }
.who span { color: var(--dim); font-size: 13px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.menu-item:hover { background: var(--panel-2); }

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--foil);
  color: var(--bg);
  font-size: 13px;
  font-weight: 800;
}

/* Panels and buttons */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.gate { max-width: 680px; margin: 48px auto; padding: clamp(24px, 5vw, 44px); }
.gate .button { margin-top: 24px; }

.button, .way-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--foil);
  color: var(--bg);
  font: 600 15px/1.2 "Poppins", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.button.quiet { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); }
.button.quiet:hover { background: var(--panel-3); }
.button.small { min-height: 36px; padding: 7px 14px; font-size: 13.5px; border-radius: 12px; }
.button:disabled { opacity: 0.5; cursor: default; }

/* The ways to sign in, each white on the dark page (Apple's, Google's and
   Microsoft's button rules all allow it), one under the other. */
.ways { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 24px; }
.way-button { background: #fff; color: #000; min-width: 260px; font-weight: 600; font-size: 16px; }
.way-button svg { flex-shrink: 0; }
.way-button .apple { fill: currentColor; margin-top: -3px; }
.way-button:disabled { opacity: 0.6; cursor: progress; }

/* Email and a password, under the buttons. */
.or { margin: 22px 0 0; color: var(--dim); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.email-form { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 12px; }
.email-form input {
  width: min(100%, 320px);
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  font: 400 15px/1.2 "Poppins", system-ui, sans-serif;
}
.email-form .button { margin-top: 2px; }
.email-links { display: flex; gap: 18px; margin: 4px 0 0; }
.text-button { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; cursor: pointer; }
.text-button:disabled { opacity: 0.5; cursor: default; }
.problem.good { background: rgba(110, 242, 224, 0.12); color: var(--ink); }
.button.danger { background: var(--down); color: var(--bg); }
.removal { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--line); }
.removal:empty { display: none; }
.removal-buttons { display: flex; gap: 10px; margin: 0; }
.gate .removal-buttons .button { margin-top: 12px; }

.icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--dim);
  cursor: pointer;
}
.icon-button:hover { color: var(--ink); background: var(--panel-3); }

.link { padding: 0; border: 0; background: none; color: var(--aqua); font: inherit; cursor: pointer; text-decoration: underline; }

/* Fields */

input, select, textarea { font: inherit; color: var(--ink); }

input[type="search"], input[type="text"], input[type="number"], select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

select { padding-right: 30px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 12px; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 0;
  padding-left: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--dim);
}
.search input { flex: 1; min-width: 0; border: 0; background: none; padding-left: 0; }
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--violet); outline-offset: 1px; }
.search.big { min-height: 52px; border-radius: 16px; }
.search.big input { font-size: 16px; }

.field { display: grid; gap: 4px; font-size: 12px; color: var(--dim); }
.field select, .field input { color: var(--ink); font-size: 14px; }

.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }

/* Tabs */

.tabs {
  display: flex;
  gap: 4px;
  margin: 24px 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab {
  flex: 1 0 auto;
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--dim);
  font: 600 14px/1 "Poppins", system-ui, sans-serif;
  cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--panel-3); color: var(--ink); }

/* The value */

.hero-panel {
  display: grid;
  gap: 20px;
  margin-top: 8px;
  padding: clamp(18px, 3vw, 28px);
}
@media (min-width: 900px) {
  .hero-panel { grid-template-columns: 0.9fr 1.1fr; align-items: center; }
  .hero-panel .tiles { grid-column: 1 / -1; }
}
.headline .big { margin: 0; font-size: clamp(36px, 5vw, 52px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.headline .change { margin: 6px 0 0; font-weight: 600; }
.headline .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.tile-stat { padding: 12px 14px; border-radius: 14px; background: rgba(11, 10, 28, 0.45); }
.tile-stat dt { color: var(--dim); font-size: 12px; }
.tile-stat dd { margin: 2px 0 0; font-weight: 800; font-size: 17px; }

.chart { position: relative; min-width: 0; }
.line-chart { display: block; width: 100%; height: auto; touch-action: pan-y; }
.line-chart .stroke { fill: none; stroke: var(--aqua); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .fade-top { stop-color: #6ef2e0; stop-opacity: 0.32; }
.line-chart .fade-bottom { stop-color: #6ef2e0; stop-opacity: 0; }
.line-chart .axis { fill: var(--dim); font-size: 12px; }
.line-chart .axis.end { text-anchor: end; }
.line-chart .marker { fill: var(--bg); stroke: var(--aqua); stroke-width: 2.5; }
.line-chart .guide { stroke: rgba(246, 244, 255, 0.25); stroke-dasharray: 3 4; }
.chart .readout { position: absolute; top: -4px; left: 8px; font-size: 13px; color: var(--dim); opacity: 0; transition: opacity 0.15s; }
.chart .readout strong { color: var(--ink); }
.chart.reading .readout { opacity: 1; }
.chart:not(.reading) .marker, .chart:not(.reading) .guide { visibility: hidden; }

/* Cards */

.art {
  position: relative;
  aspect-ratio: 63 / 88;
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel-2);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}
.art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.art .back {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  border: 3px solid transparent;
  border-image: var(--foil) 1;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 14px; }
@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
}

.tile {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tile:hover .art { transform: translateY(-2px); }
.tile .art { transition: transform 0.15s; }
.tile.sold .art { opacity: 0.55; }
.art-wrap { position: relative; }
.sticker {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--bg);
  font-size: 10.5px;
  font-weight: 800;
}
.sticker.graded { background: var(--gold); color: var(--gold-ink); }
.fav, .has-photo {
  position: absolute;
  left: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(11, 10, 28, 0.75);
  color: var(--gold);
}
.fav { top: 6px; }
.has-photo { bottom: 6px; color: var(--aqua); }
.caption { display: grid; gap: 1px; min-width: 0; font-size: 12.5px; }
.caption strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; }
.caption .value { font-weight: 800; }
.more { display: grid; place-items: center; margin: 24px 0; }

/* A card's details */

dialog.sheet {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
dialog.sheet.wide { width: min(940px, calc(100vw - 24px)); }
dialog.sheet::backdrop { background: rgba(5, 4, 16, 0.72); }
dialog.sheet > .close { position: absolute; top: 12px; right: 12px; z-index: 1; }

.detail { display: grid; gap: 24px; }
@media (min-width: 720px) {
  .detail { grid-template-columns: 300px 1fr; }
}
.detail-art { display: grid; gap: 14px; align-content: start; }
.detail-art .art { max-width: 300px; }
.photo img { display: block; width: 100%; max-width: 300px; border-radius: 10px; }
.detail-text { display: grid; gap: 8px; align-content: start; min-width: 0; }
.detail-text h2 { font-size: 26px; padding-right: 30px; }
.detail-text p { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--panel-3);
  font-size: 12.5px;
  font-weight: 600;
}
.chip.gold { background: var(--gold); color: var(--gold-ink); }
.chip.tag { background: rgba(110, 242, 224, 0.14); color: var(--aqua); }
.facts { display: grid; gap: 1px; margin: 8px 0; border-radius: 14px; overflow: hidden; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 14px; background: var(--panel-2); }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.notes p { white-space: pre-wrap; overflow-wrap: anywhere; }
.notes, .card-ledger { display: grid; gap: 6px; margin-top: 8px; }
.card-ledger ul { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; border-radius: 12px; overflow: hidden; }
.card-ledger li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--panel-2); font-size: 13.5px; }

/* Filters: the app's filter sheet as a panel under the toolbar */

.filter-button { position: relative; }
.filter-button.active { border-color: var(--violet); color: var(--ink); }

.chip-group { display: grid; gap: 6px; }
.chip-label { color: var(--dim); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-toggle {
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--dim);
  font: 600 13px/1.2 "Poppins", system-ui, sans-serif;
  cursor: pointer;
}
.chip-toggle:hover { color: var(--ink); }
.chip-toggle[aria-pressed="true"] { border-color: transparent; background: var(--panel-3); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--violet); }

.chip-group.languages { margin: 0 0 12px; }

.filter-panel { display: grid; gap: 16px; margin: 0 0 14px; padding: 16px 18px; }
.filter-extras { align-items: center; gap: 12px 18px; }
.clear-filters { margin-left: auto; }

/* Goals: the chase, each goal, set completion */

.section-title { margin: 26px 0 10px; font-size: 18px; }

.chase { display: grid; gap: 4px; padding: 20px 22px; }
.chase-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chase .big { margin: 0; font-size: clamp(36px, 5vw, 48px); font-weight: 800; line-height: 1.05; }
.chase .dim { margin: 0 0 8px; }
.pill { padding: 3px 10px; border-radius: 999px; background: var(--panel-3); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }

.goal-list, .set-list { display: grid; gap: 8px; }
.goal, .set-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  width: 100%;
  padding: 14px 16px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.goal:disabled, .set-row:disabled { cursor: default; }
.set-row[aria-busy="true"] { cursor: progress; opacity: 0.7; }
.goal:not(:disabled):hover, .set-row:not(:disabled):hover { border-color: var(--violet); }
.goal-text { display: grid; gap: 1px; min-width: 0; }
.goal-text strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.goal-percent { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.goal.complete .goal-percent { color: var(--up); }
.goal .bar, .set-row .bar { grid-column: 1 / -1; }

.bar { display: block; height: 8px; border-radius: 999px; background: rgba(11, 10, 28, 0.6); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--foil); }

/* A goal's or a set's checklist */

.checklist-sheet { display: grid; gap: 10px; }
.checklist-sheet h2 { padding-right: 30px; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 16px 12px; margin-top: 6px; }
.checklist figure { margin: 0; display: grid; gap: 6px; }
.checklist figcaption { display: grid; font-size: 12px; min-width: 0; }
.checklist figcaption strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.checklist .need .art { opacity: 0.35; filter: grayscale(0.7); }
/* A sealed goal's products: pictures of boxes, fitted in a square. */
.sealed-checklist .art { aspect-ratio: 1; }
.sealed-checklist .art img { padding: 6px; object-fit: contain; }
.sealed-checklist figcaption strong { white-space: normal; overflow-wrap: anywhere; }
.pill.sealed-pill {
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-size: 10px;
  text-transform: uppercase;
  vertical-align: 1px;
}
.checklist .check {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--up);
  color: var(--bg);
  font-size: 13px;
  font-weight: 800;
}

/* The ledger */

.ledger { display: grid; gap: 1px; border-radius: 16px; overflow: hidden; }
.entry {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--panel);
}
.entry .what, .entry .amount { display: grid; min-width: 0; }
.entry .what strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.entry .what .dim, .entry .amount .dim { font-size: 12.5px; }
.entry .amount { text-align: right; }
.kind {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 9px;
  background: var(--panel-3);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kind.sale { background: rgba(91, 227, 155, 0.16); color: var(--up); }
.kind.purchase, .kind.buy { background: rgba(140, 123, 255, 0.2); color: #c3b9ff; }
.kind.trade { background: rgba(110, 242, 224, 0.15); color: var(--aqua); }
.kind.gift { background: rgba(255, 212, 59, 0.15); color: var(--gold); }
@media (max-width: 560px) {
  .entry { grid-template-columns: 1fr auto; }
  .entry .kind { grid-column: 1 / -1; justify-self: start; }
}

/* Sealed products over the cards */

.sealed-held { margin: 0 0 22px; }
.sealed-held .section-title { margin-top: 4px; }
.sealed-entry { grid-template-columns: 52px minmax(0, 1fr) auto; }
.sealed-art { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--panel-3); }
.sealed-art img { display: block; width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.sealed-entry .what strong { white-space: normal; overflow-wrap: anywhere; }
.sealed-entry .amount strong { white-space: nowrap; }
@media (max-width: 560px) {
  .sealed-entry { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .sealed-art { width: 44px; height: 44px; }
}

/* Vendor Mode: the day */

.day-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 8px;
  padding: 16px 20px;
}
.day-figures dl { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; }
.day-figures dt { color: var(--dim); font-size: 12px; }
.day-figures dd { margin: 0; font-size: 20px; font-weight: 800; }
.day-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.day-note { flex-basis: 100%; margin: 0; }

.tab-intro { margin-bottom: 14px; }
.tab-intro p { margin: 4px 0 0; }

/* Catalog search */

.catalog-search { position: relative; margin-bottom: 14px; }
.results {
  position: absolute;
  z-index: 15;
  left: 0;
  right: 0;
  top: 58px;
  max-height: min(460px, 60vh);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  list-style: none;
}
.results li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.results li.active, .results li:hover { background: var(--panel-3); }
.results li > span { display: grid; min-width: 0; }
.results li strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.results li .dim { font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.results .art { width: 36px; border-radius: 3px; box-shadow: none; }
.results .rarity { max-width: 140px; text-align: right; }
.search-status { min-height: 18px; margin: 6px 4px 0; }

/* Vendor Mode: lists */

.lines { display: grid; gap: 8px; }
.line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
}
.line > .art { width: 56px; border-radius: 4px; }
.line-main { display: grid; gap: 2px; min-width: 0; }
.line-main strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.line-main > .dim { font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.line-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.line-controls select { min-height: 34px; padding: 4px 28px 4px 10px; font-size: 13px; }
.line-figure { display: grid; justify-items: end; gap: 1px; min-width: 96px; }
.line-figure .label { color: var(--dim); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.line-figure strong { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.money-input {
  width: 108px;
  min-height: 38px;
  text-align: right;
  font-weight: 800;
  font-size: 17px;
  color: var(--gold) !important;
  font-variant-numeric: tabular-nums;
}
.money-input::placeholder { color: var(--gold); opacity: 0.85; }
.offer .money-input:placeholder-shown { border-style: dashed; }

@media (max-width: 760px) {
  .line { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; }
  .line > .art { width: 48px; grid-row: 1 / span 2; align-self: start; }
  .line-figure { grid-column: 2; justify-items: start; }
  .line-figure.offer { grid-column: 3; grid-row: 2; justify-items: end; }
  .line > .icon-button { grid-column: 3; grid-row: 1; align-self: start; }
}

.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.stepper button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 10px; background: none; color: var(--ink); cursor: pointer; }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper span { min-width: 30px; text-align: center; font-weight: 600; font-size: 13.5px; }

.list-footer {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
@media (max-width: 760px) {
  /* On a phone the totals follow the list instead of covering it. */
  .list-footer { position: static; box-shadow: none; }
  /* A second display is for a laptop at the table. */
  .day-actions .screen-button { display: none; }
}
.totals { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.totals > div { display: grid; }
.totals .label { color: var(--dim); font-size: 12px; font-weight: 600; }
.totals strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.offer-total { display: flex !important; align-items: center; gap: 14px; }
.segments { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.segment { min-height: 32px; padding: 4px 12px; border: 0; border-radius: 9px; background: none; color: var(--dim); font: 600 13px/1 "Poppins", system-ui, sans-serif; cursor: pointer; }
.segment.on { background: var(--panel-3); color: var(--ink); }

.trade-sides { display: grid; gap: 22px; }
@media (min-width: 1000px) {
  .trade-sides { grid-template-columns: 1fr 1fr; }
  .trade-sides .line { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .trade-sides .line > .art { width: 48px; }
  .trade-sides .line-figure { grid-column: 2; justify-items: start; }
  .trade-sides .line-figure.offer { grid-column: 3; grid-row: 2; justify-items: end; }
  .trade-sides .line > .icon-button { grid-column: 3; grid-row: 1; align-self: start; }
}
.trade-sides h2 { margin-bottom: 10px; }

/* Stock */

.stock { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
.stock table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stock th { padding: 10px 12px; background: var(--panel-2); color: var(--dim); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.stock td { padding: 8px 12px; border-top: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.stock .num { text-align: right; font-variant-numeric: tabular-nums; }
.stock-card { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.stock-card .art { width: 30px; flex-shrink: 0; border-radius: 3px; box-shadow: none; }
.stock-card span { display: grid; }
.stock-card .dim { font-size: 12px; }
.stock .rule-price { opacity: 0.7; }
.stock .flag { display: block; margin-top: 2px; color: var(--dim); font-size: 11.5px; font-weight: 600; }
.stock .flag.low { color: var(--up, #54d6a0); }
.stock .flag.high { color: var(--down, #ff8f8f); }
.count .stale { color: var(--gold); font-weight: 600; }
.band { border-bottom: 1px solid var(--line); }
.band .setting { border-bottom: 0; }
.band-fields { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 0 0 14px; }
.band-field { display: grid; gap: 4px; }
.band-field input[type="number"] { width: 84px; text-align: right; }

/* Shows */

.shows { display: grid; gap: 10px; margin-top: 16px; }
.show summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.show summary::-webkit-details-marker { display: none; }
.show-title { display: grid; }
.show-title .dim { font-size: 13px; }
.show-figures { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; font-size: 14px; }
.show-figures strong { font-size: 18px; }
.deals { display: grid; gap: 1px; margin: 0; padding: 0 0 12px; list-style: none; }
.deals > li { padding: 10px 18px; border-top: 1px solid var(--line); }
.deal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.deal-head > strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.deal-head .dim { font-size: 13px; }
.deal-cards { display: grid; gap: 2px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.deal-cards li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; }
.section-head { margin: 28px 0 0; font-size: 16px; }
.book { display: grid; gap: 6px; padding: 4px 18px 14px; font-size: 14px; }
.book-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.book-line .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.book-line.total { margin: 4px 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 700; }
.book-line.total strong { font-size: 17px; }

/* Settings */

.settings { display: grid; gap: 4px; max-width: 680px; padding: 12px 20px 20px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting > span:first-child { display: grid; }
.setting input[type="number"] { width: 84px; text-align: right; }
.setting input[type="text"] { width: min(260px, 45vw); }
.setting input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--violet); }
.percent { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }

.slab-form { display: grid; gap: 18px; }

/* The customer's side */

.customer { display: grid; gap: 18px; }
.customer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px 18px; }
.customer-grid figure { margin: 0; display: grid; gap: 10px; }
.customer-grid figcaption { display: grid; gap: 2px; }
.customer-grid strong { font-size: 16px; }
.customer-grid .amount { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.customer-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 18px; }
.customer-total strong { font-size: 34px; font-weight: 800; }
.waiting { padding: 40px 0; text-align: center; font-size: 18px; }

.screen-page { overflow-x: hidden; }
.screen-main { max-width: 1400px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px) 40px; }
.screen-brand { margin: 0 0 24px; }
.screen-brand img { height: 40px; width: auto; display: block; }
.screen-main .customer-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.screen-main .customer-grid .amount { font-size: 34px; }
.screen-main .eyebrow { font-size: 15px; }
.screen-hint { position: fixed; right: 20px; top: 34px; margin: 0; }

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  transform: translateX(-50%);
  transition: opacity 0.4s;
}
.toast.gone { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .tile .art, .toast, .chart .readout { transition: none; }
}

/* A card's market (card-market.js): under a card's details on the
   Collection tab and on a card opened in Vendor Mode. Store colors are the
   app's chart colors. */

.detail > .market { grid-column: 1 / -1; }
.market { display: grid; gap: 16px; min-width: 0; padding-top: 18px; border-top: 1px solid var(--line); }
/* Nothing in it sets its width: the grader tabs and the tables scroll in place. */
.market > *, .market-block > *, .market-chart > *, .market-sales > * { min-width: 0; max-width: 100%; }
.market-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.market-block { display: grid; gap: 8px; min-width: 0; }
.market-block > p { margin: 0; }
.market p { margin: 0; }

.market-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-radius: 14px; overflow: hidden; }
@media (max-width: 760px) {
  .market-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The highs under a card's chart: one tile, or two side by side. */
.market-stats.market-highs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.market-stat { display: grid; align-content: start; gap: 4px; padding: 12px 14px; background: var(--panel-2); min-width: 0; }
.market-stat .label, .store-figure .label {
  color: var(--dim); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.market-stat strong { font-size: 20px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.market-stat.big strong { font-size: 24px; color: var(--gold); }
.market-stat .small { line-height: 1.35; }
.market-links { display: flex; flex-wrap: wrap; gap: 8px; }
.market-links .disclosure { flex-basis: 100%; margin: 0; }
/* A figure's day; more than a week old, in amber. */
.dated { color: var(--dim); }
.market-stat .dated { display: block; line-height: 1.35; }
.dated.old, .store-figure strong.old { color: #f5b14c; }
.market-links:empty { display: none; }

.market-groups { margin: 0 0 10px; }
.market-groups .tab { flex: 0 0 auto; }
.market-tabs .chip-toggle strong { font-variant-numeric: tabular-nums; }

.dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--dim); vertical-align: 0.05em; }
.dot.tcgplayer { background: #82c8f2; }
.dot.ebay { background: #e8834a; }
.dot.cardmarket { background: #ffd43b; }
.dot.cardmarket_unsold { background: #ff86d1; }
.dot.tier.raw { background: var(--up); }
.dot.tier.graded { background: var(--violet); }

.market-stores { display: grid; gap: 1px; border-radius: 14px; overflow: hidden; }
.store-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(6, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--panel-2);
}
.store-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.store-name .chip { font-size: 11px; padding: 1px 8px; }
.store-figure { display: grid; gap: 1px; min-width: 0; }
.store-figure strong { font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .store-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .store-name { grid-column: 1 / -1; }
  .store-row > .button, .store-row > span:last-child { grid-column: 1 / -1; justify-self: start; }
}

.market-chart { display: grid; gap: 10px; min-width: 0; }
.chart-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.store-chart .grid { stroke: var(--line); stroke-width: 1; }
.store-chart .axis { font-size: 11px; }
.store-chart .store-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.store-chart circle.store-line { stroke-width: 2; }
.store-chart .store-line.tail { stroke-width: 2; stroke-dasharray: 5 6; opacity: 0.85; }
.store-chart .store-line.tcgplayer, .store-chart .marker.tcgplayer { stroke: #82c8f2; }
.store-chart .store-line.ebay, .store-chart .marker.ebay { stroke: #e8834a; }
.store-chart .store-line.cardmarket, .store-chart .marker.cardmarket { stroke: #ffd43b; }
.store-chart .store-line.cardmarket_unsold, .store-chart .marker.cardmarket_unsold { stroke: #ff86d1; }
.market-chart .readout { display: flex; flex-wrap: wrap; gap: 4px 12px; top: -6px; left: 62px; }

.scroll-x { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.market-grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.market-grid th { padding: 8px 12px; color: var(--dim); font-size: 11px; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; background: var(--panel); }
.market-grid td { padding: 8px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
.market-grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.market-grid th:nth-child(n+3) { text-align: right; }
.market-grid tr.chosen td { background: var(--panel-3); }
@media (max-width: 600px) {
  .market-grid th, .market-grid td { padding: 7px 8px; }
}
.market-table-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.market-search { width: min(320px, 100%); }
.link-plain { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.link-plain:hover strong { text-decoration: underline; text-underline-offset: 3px; }

.market-sales { display: grid; gap: 10px; justify-items: start; }
.sales-list { display: grid; gap: 1px; width: 100%; margin: 0; padding: 0; list-style: none; border-radius: 14px; overflow: hidden; }
.sales-list li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: var(--panel-2);
  font-size: 13.5px;
}
.sale-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale-title .chip { margin-left: 6px; }
.chip.flag { background: rgba(255, 122, 143, 0.16); color: var(--down); font-size: 11px; }
.sales-list .num { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .sales-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .sale-date { grid-column: 1 / -1; }
}

/* A card's name or picture in Vendor Mode opens the card. */
.card-name {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 15px/1.4 "Poppins", system-ui, sans-serif;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}
.card-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.art.opens { cursor: pointer; }

/* Price tags: printed on their own, 30 to a US Letter page (the common
   1" × 2⅝" address-label sheet), everything else hidden. */

.tag-sheet { display: none; }

@media print {
  @page { size: letter; margin: 0.5in 0.1875in; }
  body.printing-tags { background: #fff; color: #000; }
  body.printing-tags > :not(.tag-sheet) { display: none !important; }
  body.printing-tags .tag-sheet {
    display: grid;
    grid-template-columns: repeat(3, 2.625in);
    grid-auto-rows: 1in;
    column-gap: 0.125in;
  }
  .price-tag {
    display: grid;
    grid-template-rows: auto auto 1fr;
    padding: 0.08in 0.14in;
    overflow: hidden;
    break-inside: avoid;
    font: 9pt/1.2 "Poppins", system-ui, sans-serif;
    color: #000;
  }
  .tag-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
  .tag-detail { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 7.5pt; color: #444; }
  .tag-price { align-self: end; font-size: 20pt; font-weight: 800; line-height: 1; }
}
