:root {
  --bg: #0e1120;
  --panel: #171b2e;
  --panel-2: #1f2440;
  --line: #2c3256;
  --text: #eef0fa;
  --muted: #9aa1c4;
  --accent: #ffcb05;
  --accent-ink: #1b1600;
  --blue: #4f7cff;
  --good: #3ddc84;
  --warn: #ff9f43;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 600px at 50% -200px, #1c2350, transparent) var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: inherit; text-decoration: none; }
h1 { margin: 0; font-size: 1.7rem; line-height: 1.2; }
h2 { font-size: 1rem; margin: 0 0 8px; }
h3 { margin: 0; font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--muted); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- chrome ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 17, 32, 0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar nav { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.2px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 5px;
  background:
    linear-gradient(var(--bg), var(--bg)) center / 2px 100% no-repeat,
    linear-gradient(var(--bg), var(--bg)) center / 100% 2px no-repeat,
    var(--accent);
}

main { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; padding: 28px 24px 48px; }
.footer { padding: 18px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; text-align: center; }
.footer a { text-decoration: underline; }
.loading { color: var(--muted); text-align: center; padding: 80px 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.actions { display: flex; gap: 10px; align-items: center; }
.back { color: var(--muted); font-size: 0.85rem; }
.back:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2);
  font-weight: 600;
}
.btn:hover:not(:disabled) { border-color: var(--blue); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: 0.9rem; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-size: inherit; }
.link:hover { text-decoration: underline; }

.search {
  width: 100%; max-width: 340px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
}
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.empty { max-width: 560px; margin: 60px auto; text-align: center; display: grid; gap: 16px; justify-items: center; }
.empty h2 { font-size: 1.5rem; margin: 0; }
.empty p { color: var(--muted); }

/* ---------- account ---------- */
.account { display: flex; align-items: center; gap: 10px; }
.account .email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.85rem; }
.sync { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.sync.saved { color: var(--good); }
.sync.error { color: var(--warn); }
.login { max-width: 420px; margin: 50px auto; display: grid; gap: 14px; }
.login input { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.form-note { min-height: 1.5em; color: var(--good); }
.form-note.error { color: #ff8a8a; }
.summary.notice { margin-bottom: 16px; }
.summary.notice a { color: var(--accent); text-decoration: underline; }
@media (max-width: 640px) {
  .topbar nav > a:first-child, .account .email, .wide-only { display: none; }
  .topbar nav { gap: 10px; }
  /* Sync status shrinks to a coloured dot. */
  .sync { width: 8px; height: 8px; border-radius: 50%; background: currentColor; font-size: 0; }
  .sync:empty { display: none; }
}

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; padding: 24px 0 48px; }
.hero-copy { display: grid; gap: 18px; justify-items: start; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.08; letter-spacing: -0.5px; }
.hero-copy > p { font-size: 1.1rem; color: var(--muted); max-width: 34em; }
.hero-copy > p.small, .small { font-size: 0.85rem; }
.hero-copy > p.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 0.68rem; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.btn.big { padding: 13px 22px; font-size: 1.05rem; }
.games { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.games li { padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); border-left: 3px solid var(--game); background: var(--panel); font-size: 0.82rem; font-weight: 600; }
.demo { justify-self: center; width: 100%; max-width: 400px; display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 30px 80px -30px rgba(79, 124, 255, 0.45); }
.demo[hidden] { display: none; }
.demo-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.demo .meter { padding: 0; border: 0; background: none; }
.demo .page, .demo .page:first-child, .demo .page:last-child { border-radius: var(--radius); box-shadow: none; border-color: var(--line); padding-bottom: 12px; }
.demo .hint { margin: 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-bottom: 48px; }
.feature { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.feature h2 { font-size: 1.1rem; }
.steps { display: grid; gap: 18px; justify-items: center; text-align: center; padding: 36px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.steps h2 { font-size: 1.4rem; margin: 0; }
.steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; }
.steps li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.steps li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.restore { text-align: center; margin-top: 24px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 8px 0 36px; }
}

/* ---------- progress meters ---------- */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 22px; }
.meter { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.meter.active { border-color: var(--accent); }
.meter-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.meter-num { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-track { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: var(--blue); transition: width 0.25s; }
.meter.active .meter-fill { background: var(--accent); }
.meter.done .meter-fill { background: var(--good); }

.value { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin: -8px 0 22px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.value:empty { display: none; }
.value div { display: grid; }
.value small { color: var(--muted); }
.value strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.value p { flex: 1 1 260px; font-size: 0.8rem; }

/* ---------- home tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile {
  position: relative; display: grid; gap: 6px; align-content: start;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.tile:hover { border-color: var(--blue); }
.tile-logo { height: 70px; display: grid; place-items: center; margin-bottom: 6px; font-weight: 700; }
.tile-logo img { max-width: 80%; max-height: 70px; object-fit: contain; }
.tile-progress { margin-top: 8px; }
.tile-progress .meter { padding: 0; border: 0; background: none; font-size: 0.85rem; }
.tile-delete {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
  border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1;
}
.tile-delete:hover { background: var(--panel-2); color: #ff6b6b; }
.tile.game { padding: 26px 20px; border-top: 4px solid var(--game); }
.tile.game h3 { font-size: 1.3rem; }
.tile-new { place-items: center; align-content: center; border-style: dashed; color: var(--muted); min-height: 190px; font-weight: 600; }
.tile-new span { font-size: 2rem; line-height: 1; }

/* ---------- set picker ---------- */
.series { margin: 26px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; }
.sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.set {
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 14px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.set:hover { border-color: var(--accent); transform: translateY(-2px); }
.set-logo { height: 56px; display: grid; place-items: center; font-weight: 700; }
.set-logo img { max-width: 130px; max-height: 56px; object-fit: contain; }

/* ---------- config form ---------- */
.config { max-width: 720px; display: grid; gap: 22px; }
.config-set { display: flex; align-items: center; gap: 12px; }
.config-set img { height: 44px; }
.field { display: grid; gap: 8px; }
.field > span { font-weight: 600; }
.field input[type="text"], .field input[type="number"] {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
}
.field > input[type="number"] { max-width: 200px; }
.field > select { max-width: 280px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.field > .check-label { color: var(--text); }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: grid; gap: 6px; justify-items: center; padding: 12px 16px; min-width: 104px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-weight: 600;
}
.choice.wide { flex: 1 1 200px; justify-items: start; text-align: left; }
.choice small { color: var(--muted); font-weight: 400; }
.choice:hover { border-color: var(--blue); }
.choice.on { border-color: var(--accent); background: var(--panel-2); }
.mini-grid { display: grid; grid-template-columns: repeat(var(--cols), 9px); gap: 2px; }
.mini-grid i { height: 12px; border-radius: 2px; background: var(--muted); }
.choice.on .mini-grid i { background: var(--accent); }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); }
.inline input[type="number"] { width: 64px; }
.check-label { display: flex; align-items: center; gap: 6px; color: var(--text); }
.summary { padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.summary.warn { border-color: var(--warn); color: #ffd9ad; margin-bottom: 16px; }

/* ---------- binder ---------- */
.binder-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }

.spread { display: flex; justify-content: center; }
.page {
  /* width that makes the whole page fit in ~60% of the viewport height */
  flex: 0 1 calc(60vh * var(--cols) * 63 / (var(--rows) * 88));
  min-width: 0;
  padding: 12px 12px 8px;
  background: linear-gradient(#22274a, #1a1e3a);
  border: 1px solid var(--line);
}
.page:first-child { border-radius: var(--radius) 0 0 var(--radius); border-right-color: #0a0c18; }
.page:last-child { border-radius: 0 var(--radius) var(--radius) 0; box-shadow: inset 14px 0 18px -14px rgba(0, 0, 0, 0.7); }
.page.cover { display: grid; place-items: center; color: var(--muted); background: #131629; font-size: 0.85rem; }
.pockets { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px; }
.page-foot { display: flex; justify-content: space-between; padding-top: 8px; color: var(--muted); font-size: 0.8rem; }

.slot {
  position: relative; display: block; padding: 0; aspect-ratio: 63 / 88; overflow: hidden;
  border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04);
}
.slot.blank { border-style: dashed; }
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter 0.15s, opacity 0.15s; }
.slot.missing img { filter: grayscale(1); opacity: 0.3; }
.slot.missing:hover img { opacity: 0.6; }
.slot.owned { border-color: var(--good); }
.slot .noimg { position: absolute; inset: 0; display: grid; place-items: center; padding: 6px; font-size: 0.75rem; color: var(--muted); }
.slot .tag {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 4px;
  padding: 3px 5px; font-size: 0.68rem; line-height: 1.3; text-align: left;
  background: rgba(8, 10, 20, 0.82);
}
.slot .tag em { flex: 1; min-width: 0; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.slot .tick {
  position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%;
  display: none; place-items: center; background: var(--good); color: #04220f; font-size: 0.7rem; font-weight: 800;
}
.slot.owned .tick { display: grid; }
/* In a binder the pocket is a div holding the clickable face and the ✓ badge. */
.slot-hit { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; }
button.tick { border: 0; padding: 0; }
button.tick::after { content: ""; position: absolute; inset: -7px; } /* bigger tap target */
.slot .tick.many { width: auto; min-width: 18px; padding: 0 5px; border-radius: 9px; }
@media (hover: hover) {
  button.tick:not(.many):hover { font-size: 0; }
  button.tick:not(.many):hover::before { content: "+"; font-size: 0.85rem; }
}
.slot .price {
  position: absolute; top: 4px; left: 4px; padding: 1px 5px; border-radius: 4px;
  background: rgba(8, 10, 20, 0.82); font-size: 0.66rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.slot.flash { animation: flash 1.4s ease-out; }
@keyframes flash {
  0%, 60% { box-shadow: 0 0 0 3px var(--accent), 0 0 24px var(--accent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.v { font-style: normal; font-weight: 700; font-size: 0.62rem; padding: 0 4px; border-radius: 4px; background: #3a4170; color: #fff; white-space: nowrap; }
.v.holo { background: #7c4dff; }
.v.reverse { background: #0fa3b1; }
.v.foil { background: #b8860b; }
.v.etched { background: #8d6e63; }
.v.firstEdition { background: #c0392b; }

.touch-only { display: none; }
@media (pointer: coarse) {
  .touch-only { display: inline; }
  .mouse-only { display: none; }
}
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; font-variant-numeric: tabular-nums; }
.hint { text-align: center; font-size: 0.8rem; margin-top: 10px; }

.side { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); position: sticky; top: 76px; }
.side .search { max-width: none; background: var(--bg); }
.side h2 { margin: 0; }
.slot-list { list-style: none; margin: 0; padding: 0; max-height: 58vh; overflow-y: auto; display: grid; gap: 2px; }
.slot-list button {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 6px 8px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: 0.85rem;
}
.slot-list button:hover { background: var(--panel-2); }
.slot-list button.have > span > b::before { content: "✓ "; color: var(--good); }
.slot-list small { color: var(--muted); white-space: nowrap; text-align: right; }
.slot-list small b { display: block; color: var(--text); font-variant-numeric: tabular-nums; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-head h2 { white-space: nowrap; }
.sort { min-width: 0; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-size: 0.8rem; }
.slot-list li.muted { padding: 6px 8px; font-size: 0.85rem; }

@media (max-width: 1000px) {
  .binder-layout { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 640px) {
  main { padding: 20px 14px 40px; }
  .topbar { padding: 10px 14px; }
  .spread { flex-direction: column; align-items: center; gap: 12px; }
  .page, .page:first-child, .page:last-child { flex: none; width: 100%; border-radius: var(--radius); box-shadow: none; border-color: var(--line); }
  .page.cover { display: none; }
  .pockets { gap: 5px; }
  /* Keep the binder near the top of the screen: tighter header and meters. */
  .binder-head { align-items: flex-start; gap: 10px; margin-bottom: 12px; }
  .binder-head > div { min-width: 0; }
  .binder-head h1 { font-size: 1.35rem; }
  .binder-head p { font-size: 0.8rem; }
  .binder-head .btn { padding: 6px 10px; font-size: 0.85rem; white-space: nowrap; }
  .binder-head .actions { flex: 1 1 100%; gap: 6px; }
  .binder-head .actions .btn { flex: 1; padding: 6px 4px; font-size: 0.8rem; }
  .meters { gap: 6px; margin-bottom: 10px; }
  .meter { padding: 8px 12px; }
  .meter-head { margin-bottom: 5px; font-size: 0.9rem; }
  .value { margin: 0 0 12px; padding: 8px 12px; gap: 4px 20px; }
  .value strong { font-size: 1.05rem; }
  .value p { font-size: 0.72rem; }
  .slot .tag { font-size: 0.6rem; }
  .choice { min-width: 0; flex: 1 1 64px; padding: 10px 6px; font-size: 0.8rem; }
  .choice.wide { flex-basis: 100%; padding: 12px 14px; font-size: 1rem; }
  .slot-list { max-height: 70vh; }
}

/* ---------- printable checklist ---------- */
.print-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; max-width: 900px; margin: 0 auto 16px; }
.print-controls .back { margin-right: auto; }
.print-controls label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.print-controls select { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.sheet { max-width: 900px; margin: 0 auto; padding: 36px 40px; border-radius: 6px; background: #fff; color: #111; }
.sheet header { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #111; }
.sheet h1 { font-size: 1.4rem; margin-bottom: 4px; }
.sheet header p { font-size: 0.85rem; color: #444; }
.checklist { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; font-size: 0.8rem; }
.checklist li { display: flex; align-items: baseline; gap: 7px; padding: 3px 0; border-bottom: 1px solid #ddd; break-inside: avoid; }
.checklist .box { flex: none; align-self: center; width: 12px; height: 12px; border: 1.5px solid #111; border-radius: 2px; font-size: 10px; line-height: 10px; text-align: center; font-weight: 800; }
.checklist b { flex: none; font-variant-numeric: tabular-nums; }
.checklist .name { flex: 1; min-width: 0; }
.checklist .name i { color: #555; }
.checklist .cost, .checklist .loc { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.checklist .loc { min-width: 3.6em; text-align: right; color: #555; }
.checklist li.have { color: #888; }
.checklist li.have .box { border-color: #888; }
.sheet .done { padding: 24px 0; font-weight: 600; }
.sheet footer { margin-top: 14px; font-size: 0.72rem; color: #555; }
@media screen and (max-width: 700px) {
  .sheet { padding: 20px 16px; }
  .checklist { columns: 1; }
}
@page { margin: 10mm; }
@media print {
  .topbar, .footer, .no-print { display: none !important; }
  body { display: block; min-height: 0; background: #fff; color: #000; }
  main { max-width: none; padding: 0; }
  .sheet { max-width: none; padding: 0; border-radius: 0; }
  .checklist { font-size: 8.5pt; }
}

/* ---------- sharing ---------- */
.btn.on { border-color: var(--good); color: var(--good); }
.shared-note { margin-top: 4px; font-size: 0.85rem; font-weight: 600; color: var(--accent); }

.dialog { width: min(92vw, 460px); padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); }
.dialog::backdrop { background: rgba(5, 7, 15, 0.7); }
.dialog h2 { font-size: 1.2rem; margin-bottom: 12px; }
.dialog > * + * { margin-top: 12px; }
.dialog > .btn, .dialog > .link { display: flex; width: fit-content; }
.dialog .dialog-close { margin-left: auto; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 0.85rem; }
.link.danger { color: #ff8a8a; }

/* ---------- trade list ---------- */
.sheet section { margin-top: 18px; }
.sheet h2 { font-size: 1rem; margin-bottom: 6px; }
.checklist .qty { flex: none; min-width: 2.2em; font-weight: 700; font-variant-numeric: tabular-nums; }
.dialog textarea { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 0.8rem/1.4 ui-monospace, Menlo, monospace; }

/* ---------- pocket placeholders ---------- */
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tab { padding: 7px 12px; font-size: 0.9rem; font-weight: 600; color: var(--muted); background: var(--panel); }
.tab.on { background: var(--accent); color: var(--accent-ink); }
.sheet.placeholders { max-width: none; padding: 0; background: none; color: inherit; display: grid; gap: 18px; justify-items: center; }
.ph-info { max-width: 640px; color: var(--muted); font-size: 0.9rem; text-align: center; }
/* Real sizes: three 61 x 85 mm slips across, three down, on Letter or A4. */
.ph-page { display: grid; grid-template-columns: repeat(3, 61mm); grid-auto-rows: 85mm; width: fit-content; background: #fff; color: #111; border-top: 0.3mm dashed #888; border-left: 0.3mm dashed #888; }
.ph { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 4mm; border-right: 0.3mm dashed #888; border-bottom: 0.3mm dashed #888; text-align: center; overflow: hidden; }
.ph small { font-size: 7pt; color: #555; }
.ph-main { display: flex; flex-direction: column; align-items: center; gap: 1.6mm; min-height: 0; }
.ph strong { font-size: 20pt; line-height: 1; }
.ph-name { font-size: 11pt; font-weight: 700; line-height: 1.15; }
.ph-meta { font-size: 8pt; color: #333; }
.ph img { max-width: 62%; max-height: 34mm; filter: grayscale(1); opacity: 0.5; }
@media screen and (max-width: 760px) {
  .sheet.placeholders { justify-items: start; overflow-x: auto; }
}
@media print {
  .sheet.placeholders { display: block; }
  .ph-page { margin: 0 auto; break-after: page; break-inside: avoid; }
  .ph-page:last-child { break-after: auto; }
}
