@font-face {
  font-family: Oswald;
  src: url('/assets/Oswald-var.woff2') format('woff2');
  font-weight: 200 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #28211c;
  background: #f3eadd;
  --ink: #28211c;
  --quiet: #66574d;
  --light: #fffbf3;
  --line: #c7b8a6;
  --accent: #9e2b24;
  --accent-hover: #81221c;
  --accent-active: #661912;
  --sign: Oswald, 'Arial Narrow', system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; }
.shell { width: min(100% - 2rem, 66rem); margin-inline: auto; }
.site-header { background: var(--light); border-bottom: 2px solid var(--ink); }
.site-header .shell {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}
.brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: .16rem .85rem; text-decoration: none; }
.brand strong { font: 700 clamp(1.2rem, 4vw, 1.65rem)/1.15 var(--sign); text-transform: uppercase; letter-spacing: .035em; }
.brand span { color: var(--quiet); font-size: .78rem; white-space: nowrap; }
.game-link {
  flex: none;
  display: inline-flex;
  min-height: 2.375rem;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  color: var(--ink);
  border: 1px solid var(--ink);
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}
.game-link:hover { color: var(--accent); background: #f6e9da; }
.game-link:active { background: #ead5c0; }

main { flex: 1; padding-block: clamp(1.7rem, 4.2vw, 3.6rem) clamp(2.6rem, 5vw, 4.5rem); }
h1, h2 { font-family: var(--sign); line-height: 1.12; }
h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 7.3vw, 4.4rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .015em;
}
h2 { margin-block: 1.75rem .65rem; font-size: 1.45rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); }
a:active { color: var(--accent-active); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.store h1 { margin-bottom: .5rem; }
.store-lead { color: var(--quiet); font-size: clamp(.92rem, 2.2vw, 1.08rem); margin-bottom: clamp(1.3rem, 4vw, 2.2rem); }
.document { max-width: 50rem; }
.document h1 { font-size: clamp(2.05rem, 6vw, 3.5rem); }
.document .prose, #result {
  background: var(--light);
  border: 1px solid var(--line);
  padding: clamp(1rem, 4vw, 2rem);
  border-radius: .2rem;
  overflow-wrap: anywhere;
}
.document .prose > :last-child, #result > :last-child { margin-bottom: 0; }

label, legend { font-weight: 650; }
input, button { font: inherit; }
input:not([type="radio"], [type="checkbox"]) {
  width: 100%;
  min-width: 0;
  min-height: 2.85rem;
  padding: .6rem .8rem;
  color: var(--ink);
  background: #fffefa;
  border: 1px solid #a18e7d;
  border-radius: .22rem;
}
input::placeholder { color: #72645a; opacity: 1; }
input:not([type="radio"], [type="checkbox"]):hover { border-color: var(--accent); }
input:not([type="radio"], [type="checkbox"]):active { border-color: var(--accent-active); }
input:not([type="radio"], [type="checkbox"]):disabled {
  background: #f8f1e7;
  color: var(--quiet);
  border-color: #b5a795;
}
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); width: 1rem; height: 1rem; margin: 0; }
input:is([type="radio"], [type="checkbox"]):hover:not(:disabled) { accent-color: var(--accent-hover); }
input:is([type="radio"], [type="checkbox"]):active:not(:disabled) { accent-color: var(--accent-active); }

button {
  min-height: 2.85rem;
  padding: .6rem 1rem;
  background: var(--accent);
  color: #fffaf4;
  border: 1px solid var(--accent);
  border-radius: .22rem;
  cursor: pointer;
  font-weight: 700;
}
button:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button:active:not(:disabled) { background: var(--accent-active); border-color: var(--accent-active); }
button:disabled { background: #eee3d7; border-color: var(--line); color: #6e5d51; cursor: default; }
button[aria-busy="true"] { cursor: progress; }
.secondary:not(:disabled) { color: var(--ink); background: #f8f0e5; border-color: #a18e7d; }
.secondary:hover:not(:disabled) { color: var(--accent); background: #f3e1d1; }
.secondary:active:not(:disabled) { background: #e9cfbb; }

#purchase { display: grid; gap: 1rem; align-items: start; }
.purchase-details {
  display: grid;
  gap: clamp(1.2rem, 3vw, 1.65rem);
  padding: clamp(.9rem, 3vw, 1.7rem);
  border: 1px solid var(--line);
  border-radius: .25rem;
  background: var(--light);
}
.purchase-section { margin: 0; min-width: 0; padding: 0; border: 0; }
.field-title { display: block; padding: 0; margin-bottom: .55rem; font-weight: 700; }
.nick-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
#lookup { min-width: 7.25rem; padding-inline: .5rem; font-size: .82rem; white-space: nowrap; }
.status { margin: .45rem 0 0; font-size: .875rem; color: var(--quiet); }
.status:empty { margin: 0; }
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.pack {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 4.5rem;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: .22rem;
  cursor: pointer;
  background: #fffefa;
}
.pack input { flex: none; }
.pack-copy { display: grid; gap: .2rem; }
.pack-copy b { font: 620 clamp(1.12rem, 4.3vw, 1.5rem)/1.13 var(--sign); white-space: nowrap; }
.pack-copy span { color: var(--quiet); font-size: .83rem; font-weight: 500; white-space: nowrap; }
.pack-custom b { font: 700 .87rem/1.2 system-ui, sans-serif; white-space: normal; }
.pack:has(input:checked) { color: var(--accent-hover); border-color: var(--accent); background: #fae9e0; }
.pack:hover { border-color: var(--accent-hover); }
.pack:active { background: #f1d6c8; }
#custom-box { margin-top: .85rem; }
#custom-box label { display: block; margin-bottom: .35rem; font-size: .875rem; }
.consent { display: flex; gap: .6rem; align-items: flex-start; margin-top: .75rem; font-size: .82rem; font-weight: 400; color: var(--quiet); }
.consent input { flex: none; margin-top: .16rem; }

.checkout { overflow: hidden; border: 1px solid var(--ink); border-radius: .25rem; background: var(--ink); color: var(--light); }
.checkout-art { display: none; width: 100%; height: auto; }
.checkout-body { padding: 1.15rem clamp(1rem, 3vw, 1.45rem) 1.3rem; }
.checkout h2 { margin: 0 0 1rem; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .035em; }
.order-row, .total { display: flex; justify-content: space-between; gap: .65rem; align-items: baseline; }
.order-row { color: #e0cfbd; font-size: .875rem; }
.order-row > :last-child { font-weight: 650; white-space: nowrap; }
.total { margin-block: .85rem 1.05rem; padding-top: .85rem; border-top: 1px solid #706257; font-size: .9rem; }
.total > span { font-weight: 650; }
.total output { font: 650 clamp(1.5rem, 5.5vw, 2rem)/1.12 var(--sign); text-align: right; }
.checkout button { width: 100%; }
.checkout button:disabled { color: #f1ded4; border-color: #8a675e; background: #5a3d36; }
.checkout :focus-visible { outline-color: #faad99; }
.checkout .status, .checkout-mode { margin: .65rem 0 0; color: #e1d0c1; font-size: .82rem; }
.checkout .status:empty { margin: 0; }

footer { border-top: 1px solid var(--line); background: #eee2d2; padding-block: 1.3rem; color: var(--quiet); font-size: .8rem; overflow-wrap: anywhere; }
footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 1.8rem; align-items: start; }
footer p { margin: 0 0 .2rem; }
footer strong { color: var(--ink); }
footer nav { display: flex; gap: .5rem 1rem; flex-wrap: wrap; }
dd { margin: 0 0 .75rem; overflow-wrap: anywhere; }
dt { font-weight: 650; }
.muted { color: var(--quiet); overflow-wrap: anywhere; }
.month { display: grid; gap: .6rem; align-items: center; margin-bottom: 1.3rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { min-width: 6rem; padding: .55rem .45rem; text-align: left; border-bottom: 1px solid var(--line); }

@media (min-width: 32rem) {
  .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .month { grid-template-columns: 1fr 1fr auto; }
  #lookup { min-width: 8.7rem; }
}

@media (min-width: 49rem) {
  #purchase { grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 1fr); gap: clamp(1rem, 2.8vw, 2rem); }
  .checkout-art { display: block; height: clamp(10.5rem, 15.5vw, 13.75rem); object-fit: cover; object-position: 57% 51%; }
  .checkout-body { padding-block: 1.45rem 1.55rem; }
}
