@font-face { font-family: 'Press Start 2P'; src: url('/assets/fonts/PressStart2P-Regular.ttf') format('truetype'); font-display: swap; }
:root {
  --paper: #fff7f7; --surface: #fff; --ink: #17213d; --muted: #566077;
  --line: #17213d; --red: #e31837; --red-dark: #a50925; --blue: #005daa;
  --green: #186947; --green-soft: #e9f8ee; --amber: #93620a; --amber-soft: #fff5d6;
  --pixel: 'Press Start 2P', 'Courier New', monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: var(--ink); background: var(--paper); background-image: linear-gradient(#e3183706 1px, transparent 1px), linear-gradient(90deg, #e3183706 1px, transparent 1px); background-size: 16px 16px; font: 16px/1.65 system-ui, -apple-system, sans-serif; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
[hidden] { display: none !important; }
.site-header { background: white; border-top: 6px solid var(--red); border-bottom: 3px solid var(--ink); }
.header-inner, .article, .site-footer { width: min(100% - 40px, 900px); margin-inline: auto; }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 76px; }
.brand { font: 14px/1.5 var(--pixel); text-transform: uppercase; color: var(--red); text-decoration: none; letter-spacing: -1px; }
.brand-dot { color: var(--blue); }
.site-header { box-shadow: 0 4px 0 var(--blue); }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 700 13px/1.8 'Courier New', monospace; }
.site-nav a { text-decoration: none; color: var(--blue); padding: 3px 0; }
.site-nav a[aria-current] { color: var(--red); box-shadow: 0 3px 0 var(--red); }
.skip-link { position: absolute; top: -60px; left: 12px; z-index: 3; background: var(--ink); color: white; padding: 8px; }
.skip-link:focus { top: 12px; }
.hero { text-align: center; padding: 28px 20px 22px; }
.eyebrow { font: 700 11px/1.7 'Courier New', monospace; letter-spacing: 1.5px; text-transform: uppercase; color: var(--blue); margin: 0 0 10px; }
h1 { max-width: 950px; margin: 0 auto 14px; font: 20px/1.7 var(--pixel); color: var(--red); overflow-wrap: anywhere; }
body:has(.game-card) h1 { font-size: clamp(23px, 4.6vw, 42px); text-transform: uppercase; text-shadow: 3px 3px 0 #f3c3cc; letter-spacing: -2px; }
.hero-copy { margin: 0; font: 700 14px/1.8 'Courier New', monospace; color: var(--muted); }
.game-card { width: min(100% - 40px, 640px); margin: 0 auto; padding: 0 22px 20px; border: 3px solid var(--ink); background: white; box-shadow: 7px 7px 0 var(--red); }
.game-toolbar { display: flex; justify-content: space-between; gap: 10px; margin: 0 -22px 18px; padding: 10px 14px; background: var(--red); color: white; border-bottom: 3px solid var(--ink); font: 9px/1.7 var(--pixel); }
#game-date { text-align: center; font-size: 11px; letter-spacing: .5px; margin-bottom: 14px; }
.product-display { display: flex; gap: 18px; align-items: center; background: #fff1f3; padding: 16px; border: 2px solid var(--red); }
.product-display svg { width: 54px; height: 54px; flex-shrink: 0; image-rendering: pixelated; }
.product-display .eyebrow { margin: 0 0 6px; color: var(--red-dark); font-size: 10px; }
.product-name { margin: 0; font: 800 19px/1.4 'Courier New', monospace; }
.guess-form { margin: 18px 0 12px; }
.guess-form label { display: block; font: 700 11px/1.7 'Courier New', monospace; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 7px; }
.input-row { display: flex; gap: 12px; }
.guess-form input { min-width: 0; width: 100%; flex: 1; padding: 13px 12px; border: 3px solid var(--blue); background: #eef6ff; border-radius: 0; font: 20px/1.4 var(--pixel); color: var(--ink); box-shadow: inset 3px 3px 0 #c8def4; }
.guess-form input::placeholder { color: #8590a7; }
.guess-form button, .button, .share-button { display: inline-block; padding: 14px 16px; border: 3px solid var(--ink); border-radius: 0; background: var(--red); color: white; box-shadow: 4px 4px 0 var(--ink); font: 10px/1.7 var(--pixel); text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.guess-form button:hover, .button:hover, .share-button:hover { background: var(--red-dark); color: white; }
.guess-form button:active, .button:active, .share-button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.status { min-height: 24px; font: 700 12px/1.7 'Courier New', monospace; margin: 12px 0; color: var(--blue); }
.guess-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.game-card .guess-list { grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: slot; }
.guess-list li { padding: 12px; background: #f4f6fc; border: 2px solid #a8b0c3; display: flex; justify-content: space-between; gap: 10px; }
.game-card .guess-list li { border-color: var(--blue); background: #eef6ff; position: relative; min-height: 86px; padding: 22px 10px 10px; flex-direction: column; gap: 7px; box-shadow: inset 3px 3px 0 #d2e5f8; }
.game-card .guess-list li::before { counter-increment: slot; content: '0' counter(slot); position: absolute; top: 4px; left: 6px; color: var(--blue); font: 9px/1.5 var(--pixel); }
.game-card .guess-list li span:first-child { font: 700 16px/1.3 'Courier New', monospace; color: var(--ink); }
.game-card .guess-list li span:last-child { font: 10px/1.5 'Courier New', monospace; }
.guess-list li[data-kind='win'] { background: var(--green-soft); border-color: var(--green); box-shadow: inset 3px 3px 0 #cae9d5; }
.guess-list li[data-kind='near'] { background: var(--amber-soft); border-color: var(--amber); box-shadow: inset 3px 3px 0 #f3dfae; }
.guess-list li[data-kind='far'] { background: #ffe9ed; border-color: var(--red); box-shadow: inset 3px 3px 0 #f5cbd3; }
.share-button { margin-top: 16px; }
.stats { padding: 14px 0 0; margin-top: 16px; border-top: 2px dashed var(--blue); font: 700 12px/1.8 'Courier New', monospace; color: var(--blue); }
.game-card .notice { border: none; padding: 0; margin: 12px 0 0; background: none; font-size: 11px; color: var(--muted); }
.article { margin-top: 38px; padding: 28px; background: white; border: 2px solid var(--ink); box-shadow: 5px 5px 0 #dce1ec; }
.article .article { width: 100%; padding: 0; border: 0; box-shadow: none; margin-top: 28px; }
h2 { font: 13px/1.9 var(--pixel); color: var(--red-dark); margin: 26px 0 14px; overflow-wrap: anywhere; }
h3 { font: 800 17px/1.5 'Courier New', monospace; margin: 20px 0 8px; }
.article > :first-child { margin-top: 0; }
.panel { background: #fff6f7; border: 2px solid var(--red); padding: 18px; margin-top: 24px; }
.panel > :first-child { margin-top: 0; }
.notice { background: #f0f4fc; border-left: 4px solid var(--blue); padding: 14px; }
details { padding: 14px 0; border-bottom: 2px dashed #d2d7e3; }
summary { font-weight: 700; cursor: pointer; }
summary::marker { color: var(--red); }
details p { margin: 12px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 20px 0; }
th, td { text-align: left; padding: 10px; border: 1px solid #d2d7e3; }
th { background: #f0f4fc; }
.tag { padding: 3px 6px; font: 700 12px/1.5 'Courier New', monospace; }
.tag.win { background: var(--green-soft); color: var(--green); }
.tag.near { background: var(--amber-soft); color: var(--amber); }
.tag.far { background: #ffe9ed; color: var(--red-dark); }
textarea.share-text { width: 100%; min-height: 110px; border: 2px solid var(--ink); margin: 16px 0; padding: 12px; font-family: 'Courier New', monospace; }
.site-footer { border-top: 3px solid var(--red); margin-top: 40px; padding: 20px 0 30px; font-size: 12px; color: var(--muted); }
@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 0; }
  .site-nav { gap: 6px 14px; }
  .hero { padding-top: 22px; }
  h1 { font-size: 15px; }
  .game-card { padding: 0 14px 16px; }
  .game-toolbar { margin-inline: -14px; font-size: 8px; padding-inline: 10px; }
  .product-display { gap: 12px; padding: 12px; }
  .product-display svg { width: 40px; height: 40px; }
  .product-name { font-size: 16px; }
  .input-row { flex-direction: column; }
  .guess-form input { font-size: 18px; }
  .guess-form button { width: 100%; }
  .game-card .guess-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article { padding: 18px; }
  .article .article { padding: 0; }
  table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
/* Split, slanted pixel wordmark: warehouse red + blue. */
.wordmark-costco, .wordmark-dle { display: inline-block; transform: skewX(-12deg); font-family: var(--pixel); }
.wordmark-costco { color: var(--red); text-shadow: 2px 2px 0 white, 4px 4px 0 #c3cddd; -webkit-text-stroke: .7px var(--red); }
.wordmark-dle { color: var(--blue); text-shadow: 2px 2px 0 white, 4px 4px 0 #c3cddd; margin-left: .08em; }
.brand .wordmark-costco, .brand .wordmark-dle { text-shadow: 1px 1px 0 #d5deeb; }
body:has(.game-card) h1 { letter-spacing: -2px; font-size: clamp(22px, 4.2vw, 40px); }
.product-image { width: 130px; height: 130px; flex-shrink: 0; object-fit: contain; background: white; border: 2px solid var(--blue); padding: 6px; }
@media (max-width: 600px) {
  .product-display { flex-direction: row; text-align: left; }
  .product-image { width: 90px; height: 90px; }
  body:has(.game-card) h1 { font-size: clamp(22px, 6vw, 30px); }
}
/* Product-first board: six rows record six attempts, entry below. */
.game-card { width: min(100% - 40px, 560px); }
.product-display { flex-direction: column; text-align: center; border: 0; background: #eef2f7; padding: 18px; gap: 16px; box-shadow: 3px 3px 0 #c4cedd; }
.product-image { width: min(100%, 300px); height: auto; aspect-ratio: 1; padding: 8px; border: 0; background: white; }
.product-display .eyebrow { display: none; }
.product-name { font: 700 20px/1.5 'Courier New', monospace; }
.status { text-align: center; padding: 8px 0; margin: 16px 0 8px; font-size: 14px; }
.game-card .guess-list { grid-template-columns: 1fr; gap: 8px; }
.game-card .guess-list li { min-height: 44px; padding: 10px 14px; flex-direction: row; align-items: center; justify-content: space-between; background: #e7edf5; box-shadow: inset 2px 2px 0 #cdd8e8; border: 2px solid #8a9bb5; }
.game-card .guess-list li::before { content: none; }
.game-card .guess-list li span:first-child { font-size: 15px; }
.game-card .guess-list li span:last-child { font-size: 12px; text-align: right; }
.game-card .guess-list li[data-kind='win'] { background: var(--green-soft); border-color: var(--green); }
.game-card .guess-list li[data-kind='near'] { background: var(--amber-soft); border-color: var(--amber); }
.game-card .guess-list li[data-kind='far'] { background: #ffe9ed; border-color: var(--red); }
.input-row { position: relative; }
.input-row::before { content: '$'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--blue); font: 18px/1 var(--pixel); pointer-events: none; }
.guess-form input { padding-left: 42px; font: 700 18px/1.5 'Courier New', monospace; }
@media (max-width: 600px) {
  .product-display { flex-direction: column; padding: 12px; }
  .product-image { width: min(100%, 270px); height: auto; }
  .product-name { font-size: 18px; }
  .input-row { flex-direction: row; gap: 8px; }
  .guess-form button { width: auto; padding: 12px 9px; font-size: 8px; }
  .guess-form input { padding-left: 32px; font-size: 15px; }
  .input-row::before { left: 10px; font-size: 14px; }
  .game-card .guess-list { grid-template-columns: 1fr; }
  .game-card .guess-list li { gap: 8px; }
  .game-card .guess-list li span:last-child { font-size: 10px; }
}
