@font-face { font-family: Jersey; src: url(assets/display.ttf) format("truetype"); font-display: swap; }
:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  --bg: #121611;
  --surface: #1f251b;
  --line: #3b4735;
  --ink: #f4f1df;
  --muted: #c0c6ad;
  --gold: #f6c557;
  --green: #aada91;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, a { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, h2:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.masthead, main, footer { width: min(100% - 2rem, 53rem); margin-inline: auto; }
.masthead { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.brand { display: flex; align-items: center; gap: .6rem; font: 29px/1 Jersey, sans-serif; white-space: nowrap; }
.brand-mark { width: 21px; height: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; transform: skewX(-11deg); }
.brand-mark i { background: var(--gold); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(4) { height: 67%; align-self: end; }
.header-label, .eyebrow, .target span, .scout strong, footer {
  font-size: .75rem; font-weight: 800; letter-spacing: .11em;
}
.header-label, footer { color: var(--muted); }
.arena { border: 1px solid var(--line); }
.stadium {
  position: relative; min-height: 147px; display: flex; justify-content: space-between; align-items: end; gap: .6rem;
  padding: 1.15rem; background: linear-gradient(0deg, #0c100bf5, #11170b35), url(assets/stadium.png) center 38% / cover;
  image-rendering: pixelated;
}
.matchup { display: flex; min-width: 0; gap: .8rem; align-items: center; }
.matchup > div { min-width: 0; }
.matchup img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.eyebrow { color: var(--gold); margin: 0 0 .22rem; }
h1, h2, .target strong { font-family: Jersey, sans-serif; font-weight: 400; margin: 0; }
h1 { font-size: clamp(2.35rem, 7vw, 4.35rem); line-height: .84; }
h2 { font-size: 2.1rem; line-height: .94; }
.target { flex: none; text-align: center; padding: .5rem .8rem .4rem; background: #131910; border: 1px solid #6b7455; }
.target span { display: block; color: var(--muted); }
.target strong { font-size: 3.4rem; line-height: .85; color: var(--gold); }
.field {
  height: 90px; position: relative; overflow: hidden; border-block: 1px solid #77805c;
  background: repeating-linear-gradient(90deg, #ffffff30 0 1px, transparent 1px 20%),
    repeating-linear-gradient(90deg, #2c5832 0 20%, #305f36 20% 40%);
}
.field::before, .field::after { content: ""; position: absolute; left: 0; right: 0; border-top: 1px solid #e5e9b65c; }
.field::before { top: 12px; }
.field::after { bottom: 12px; }
.yard-numbers { position: absolute; inset: 16px 4% auto; display: flex; justify-content: space-between; color: #e7ecd3; font: 22px Jersey, sans-serif; }
.chalk { position: absolute; left: 31%; top: 55px; display: flex; gap: 11px; }
.chalk i { width: 8px; height: 8px; background: #e2efed; border: 1px solid #3d554f; box-shadow: 0 2px 0 #152918; }
.football {
  position: absolute; top: 54px; left: var(--ball, 22%); width: 13px; height: 8px; border: 1px solid #fbeaab;
  border-radius: 55%; background: #a15536; box-shadow: 0 2px #143015; transition: left .5s ease-out;
}
.arena.settled .chalk i { background: #feb960; }
.scout { min-height: 48px; display: flex; align-items: baseline; gap: .7rem; padding: .65rem .9rem; background: #20281c; }
.scout strong { color: var(--gold); flex: none; }
.scout span { color: var(--ink); font-size: .95rem; }
.controls { padding-top: 1.05rem; }
.section-line { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .64rem; }
.section-line span { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.slots, .cards { display: grid; gap: .5rem; }
.slots { grid-template-columns: repeat(3, 1fr); margin-bottom: .75rem; }
.slot {
  display: flex; align-items: center; gap: .4rem; min-width: 0; min-height: 44px;
  border: 1px dashed var(--line); background: #181e16; color: var(--muted); padding: .4rem .6rem; text-align: left;
}
.slot-number { font: 1.35rem Jersey, sans-serif; color: var(--gold); }
.slot.filled { border-style: solid; border-color: #827343; color: var(--ink); background: #29271a; }
.slot.filled .slot-text { flex: 1; }
.slot-text { overflow-wrap: anywhere; font-size: .87rem; }
.slot-x { color: var(--muted); }
.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: .75rem; }
.card {
  position: relative; min-height: 111px; display: grid; align-content: start; gap: .2rem; text-align: left;
  padding: .62rem .62rem .55rem .72rem; border: 1px solid var(--line); border-top: 2px solid #768d64; background: var(--surface);
}
.card[data-type="Screen"] { border-top-color: #d3a254; }
.card[data-type="Quick pass"] { border-top-color: #9dbbd0; }
.card:hover:not(:disabled) { border-color: var(--gold); }
.card[aria-pressed="true"] { background: #332d1b; border-color: var(--gold); }
.card:disabled { opacity: .62; cursor: default; }
.card-type { color: var(--muted); font-size: .76rem; font-weight: 700; }
.card-name { font: 1.52rem/.95 Jersey, sans-serif; }
.card-read { font-size: .81rem; color: var(--muted); line-height: 1.25; }
.card-order { position: absolute; top: .46rem; right: .53rem; color: var(--gold); font-weight: 800; }
.primary, .secondary, .store-links a {
  display: inline-flex; justify-content: center; align-items: center; min-height: 46px;
  padding: .48rem .95rem; border: 1px solid var(--line); text-decoration: none;
}
.primary { width: 100%; color: #211708; font: 1.75rem/.95 Jersey, sans-serif; background: var(--gold); border-color: var(--gold); }
.primary:not(:disabled):hover { background: #ffda7e; }
.primary:disabled { color: #c2c5a9; background: #32372a; border-color: #424a36; cursor: default; }
.secondary, .store-links a { color: var(--ink); background: var(--surface); font-weight: 700; }
.secondary:hover, .store-links a:hover { border-color: var(--gold); }
.result .section-line { margin-bottom: .35rem; }
.result .section-line span { color: var(--gold); font-weight: 800; }
.result > p, .store p:last-child { color: var(--muted); margin: .35rem 0 .7rem; line-height: 1.45; }
.receipt { list-style: none; margin: 0 0 .75rem; padding: 0; border-top: 1px solid var(--line); }
.receipt li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; min-height: 40px; padding: .4rem .6rem; border-bottom: 1px solid var(--line); }
.receipt b { flex: none; color: var(--green); }
.receipt small { display: inline-block; color: var(--muted); margin-left: .35rem; }
.play-instructions { color: var(--muted); margin: 0 0 .65rem; line-height: 1.38; }
.friend-target { border-left: 3px solid var(--gold); padding: .4rem .65rem; margin: 0 0 .7rem; background: var(--surface); color: var(--ink); }
.score-reason { margin: 0 0 .75rem; padding: .7rem .85rem; background: var(--surface); border: 1px solid var(--line); }
.score-reason h3 { margin: 0; font-size: .94rem; color: var(--gold); }
.score-reason p { margin: .28rem 0 0; line-height: 1.4; color: var(--muted); }
#score-math { font-variant-numeric: tabular-nums; }
.result-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem; }
#share-status { overflow-wrap: anywhere; }
#share-status:empty { display: none; }
.store { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .9rem; margin-top: .9rem; border: 1px solid var(--line); background: var(--surface); }
.store p:last-child { margin: .35rem 0 0; font-size: .9rem; }
.store-links { display: flex; flex-wrap: wrap; gap: .4rem; }
footer { padding-block: 1.05rem; }
@media (max-width: 560px) {
  .masthead, main, footer { width: calc(100% - 1.25rem); }
  .masthead { min-height: 52px; }
  .brand { font-size: 24px; gap: .43rem; }
  .brand-mark { width: 17px; height: 17px; }
  .header-label { font-size: .66rem; letter-spacing: .07em; }
  .stadium { min-height: 120px; padding: .73rem; }
  .matchup { gap: .42rem; }
  .matchup img { width: 45px; height: 45px; }
  .target { padding-inline: .42rem; }
  .target span { font-size: .64rem; }
  .target strong { font-size: 2.8rem; }
  .field { height: 71px; }
  .chalk, .football { top: 46px; }
  .scout { display: grid; gap: .18rem; padding: .5rem .65rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 82px; }
  .store { display: grid; }
  .slot { padding-inline: .33rem; }
}
@media (max-width: 390px) {
  .stadium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 5.1rem); align-items: center; }
  .matchup img { width: 34px; height: 34px; }
  h1 { font-size: clamp(1.9rem, 9.3vw, 2.35rem); overflow-wrap: anywhere; }
  .target { padding-inline: .24rem; }
  .target span { letter-spacing: .05em; }
  .result-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #share { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
