:root { --fg: #1d1d1f; --muted: #6b6b70; --bg: #fafaf7; --accent: #0f6b6b; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, sans-serif; color: var(--fg); background: var(--bg); }
.site-header, main, .site-footer { max-width: 72rem; margin: 0 auto; padding: 1rem; }
.site-header { display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 700; color: var(--accent); text-decoration: none; font-size: 1.25rem; display: inline-flex; align-items: center; gap: .6rem; }
.brand-logo { height: 3rem; width: auto; }
.who { color: var(--muted); font-size: .9rem; }
.site-footer { color: var(--muted); font-size: .8rem; border-top: 1px solid #ddd; margin-top: 3rem; }
.site-footer nav a { margin-right: 1rem; }
a { color: var(--accent); }
.form { display: grid; gap: .75rem; max-width: 24rem; margin: 1rem 0; }
.form label { display: block; font-weight: 600; font-size: .9rem; }
.form input { width: 100%; padding: .5rem; font: inherit; border: 1px solid #bbb; border-radius: 4px; }
.form .helptext { color: var(--muted); font-size: .8rem; }
.errorlist { color: #a11; margin: 0; padding: 0; list-style: none; font-size: .9rem; }
button { font: inherit; padding: .5rem 1rem; border: 0; border-radius: 4px; background: var(--accent); color: #fff; cursor: pointer; }
button.link { background: none; color: var(--accent); padding: 0; text-decoration: underline; }
.message { background: #e6f2f2; padding: .5rem 1rem; border-radius: 4px; }
.muted { color: var(--muted); font-size: .85rem; }
.catalogue { display: grid; grid-template-columns: 15rem 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 48rem) { .catalogue { grid-template-columns: 1fr; } }
.filters { display: grid; gap: .6rem; font-size: .9rem; }
.filters h2 { font-size: 1.1rem; margin: 0; }
.filters label { display: block; font-weight: 600; }
.filters input[type=text], .filters input[type=number], .filters select { width: 100%; padding: .35rem; font: inherit; }
.filters fieldset { border: 0; padding: 0; margin: 0; }
.filters legend { font-weight: 600; }
.filters fieldset div { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.filters fieldset label { font-weight: normal; display: inline; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; }
.tile { background: #fff; border: 1px solid #e3e1da; border-radius: 8px; overflow: hidden; }
.tile.sold-out, tr.sold-out { opacity: .55; }
.card-img { width: 100%; height: auto; display: block; border-radius: 4.75% / 3.5%; }
.tile-body { padding: .5rem .6rem .7rem; font-size: .9rem; }
.tile-name { font-weight: 600; text-decoration: none; }
.tile-price { display: flex; justify-content: space-between; align-items: baseline; margin-top: .25rem; }
.badges { display: inline-flex; gap: .25rem; flex-wrap: wrap; }
.badge { font-size: .7rem; padding: .05rem .4rem; border-radius: 999px; background: #ecebe6; color: var(--fg); }
.badge.cheaper { background: #dff3e6; color: #135c34; font-weight: 600; }
.other-printings h2 { font-size: 1.1rem; margin: 1.5rem 0 .25rem; }
.other-printings p { margin: 0 0 .5rem; }
.badge.foil { background: linear-gradient(90deg, #f6e7ff, #e3f6ff, #fff6dc); }
.pager { display: flex; gap: 1rem; justify-content: center; margin: 1.5rem 0; }
.detail { display: grid; grid-template-columns: minmax(12rem, 20rem) 1fr; gap: 2rem; }
@media (max-width: 40rem) { .detail { grid-template-columns: 1fr; } }
.detail-images { display: grid; gap: 1rem; }
.variants { border-collapse: collapse; width: 100%; font-size: .9rem; }
.variants th, .variants td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid #e3e1da; }
.site-header { gap: 1rem; }
.header-claims { margin-left: auto; font-weight: 600; }
.in-claims { display: inline-block; margin-top: .4rem; font-size: .85rem; font-weight: 600; color: var(--accent); }
.tile.claimed { outline: 2px solid var(--accent); outline-offset: -2px; }
.tile.claimed.sold-out, tr.claimed.sold-out { opacity: 1; }
.deck-form { display: grid; gap: .75rem; max-width: 40rem; }
.deck-form label { font-weight: 600; }
.deck-form textarea { display: block; width: 100%; font: .95rem/1.4 ui-monospace, monospace; padding: .5rem; margin-top: .25rem; }
.deck-options { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; border: 1px solid #e3e1da; border-radius: 6px; padding: .5rem .75rem; }
.deck-options label { font-weight: normal; }
.deck-summary { margin: 1rem 0; padding: .75rem 1rem; background: #fff; border: 1px solid #e3e1da; border-radius: 8px; }
.deck-headline { font-size: 1.1rem; margin: 0 0 .5rem; }
button.big { font-size: 1.1rem; padding: .7rem 1.4rem; margin-right: .75rem; }
.deck-results ul.picks { margin: 0; padding: 0; list-style: none; }
.deck-results .short { color: #a12a1a; font-size: .85rem; }
.deck-notes h2 { font-size: 1.05rem; margin: 1.25rem 0 .25rem; }
.deck-missing { columns: 2 14rem; }
.claim-note { margin: .4rem 0 0; font-size: .85rem; }
.claim-note.error { color: #a12a1a; }
.claim-form button[disabled] { opacity: .6; cursor: progress; }
.claim-form { display: flex; gap: .4rem; align-items: center; margin-top: .4rem; }
.claim-form .qty { width: 4rem; padding: .3rem; font: inherit; }
.claim-form button { padding: .3rem .8rem; font-size: .9rem; }
.message.error { background: #fbe9e9; }
tr.expired { opacity: .5; }
.claims-summary { margin: 1rem 0; padding: .75rem 1rem; background: #fff; border: 1px solid #e3e1da; border-radius: 8px; max-width: 32rem; }
.claims-summary p { margin: .25rem 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a.button { display: inline-block; padding: .5rem 1rem; border-radius: 4px; background: var(--accent); color: #fff; text-decoration: none; }
.site-header { flex-wrap: wrap; }
.header-deck { margin-left: auto; }
.header-claims { margin-left: 0; }
@media (max-width: 40rem) {
  .site-header { gap: .5rem 1rem; }
  .site-header .who { flex-basis: 100%; text-align: right; overflow-wrap: anywhere; }
  /* Wide tables scroll inside themselves rather than widening the page. */
  table.variants { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
.checkout { display: grid; grid-template-columns: 1fr 20rem; gap: 2rem; align-items: start; }
@media (max-width: 48rem) { .checkout { grid-template-columns: 1fr; } }
.options { list-style: none; padding: 0; display: grid; gap: .5rem; }
.options label { display: flex; gap: .5rem; padding: .5rem .75rem; border: 1px solid #e3e1da; border-radius: 6px; background: #fff; cursor: pointer; }
.totals { width: 100%; border-collapse: collapse; }
.totals td { padding: .25rem 0; }
.totals td:last-child { text-align: right; }
.totals .grand td { border-top: 1px solid #ccc; font-weight: 700; padding-top: .5rem; }
.invoice { background: #fff; border: 1px solid #e3e1da; border-radius: 8px; padding: 1.5rem; }
.invoice-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.status { display: inline-block; padding: .1rem .6rem; border-radius: 999px; background: #ecebe6; font-size: .85rem; }
.status-awaiting_payment { background: #fff3d6; }
.status-paid, .status-shipped { background: #e1f3e6; }
.status-cancelled { background: #f1e1e1; }
.payment { margin-top: 1.5rem; padding: 1rem; background: #f4f8f8; border-radius: 6px; }
