@font-face {
  font-family: Workbench;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/designs/pixel/workbench.woff2') format('woff2');
}

html[data-design="pixel"] {
  color-scheme: dark;
  --paper: #212034;
  --white: #302b44;
  --ink: #fff1d5;
  --forest: #ffcd7c;
  --muted: #d0c2cf;
  --rule: #68596f;
  --accent: #ffcd7c;
  --serif: Workbench, monospace;
  --sans: 'DM Sans', system-ui, sans-serif;
  --pixel-mono: ui-monospace, 'Courier New', monospace;
  --pixel-edge: #151523;
  --pixel-gold: #ffcd7c;
  --pixel-green: #a6d4ae;
  --pixel-red: #ffada0;
  --pixel-panel: #343047;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
}

html[data-design="pixel"] body {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, #19182942 3px 4px);
}
.masthead {
  background: #191929;
  border-bottom: 2px solid #54475e;
}
.header-inner, .gallery-main, .site-foot { width: min(1152px, 94%) }
.header-inner { min-height: 59px }
.wordmark, .footer-mark {
  color: var(--ink);
  font: 400 1.6rem/1 Workbench, monospace;
  letter-spacing: -.065em;
  text-transform: uppercase;
}
.wordmark { gap: .45rem }
.emblem {
  width: 44px;
  height: 42px;
  margin: 0;
  border: 0;
  transform: none;
  background: url('/designs/pixel/frame.png') center / contain no-repeat;
  image-rendering: pixelated;
}
.emblem::after { content: none }
.header-inner nav, .site-foot nav { gap: 5px 19px }
.header-inner nav a, .site-foot nav a, .help {
  font: 600 .85rem/1.25 var(--pixel-mono);
  text-decoration: none;
}
.header-inner nav a[aria-current="page"], .header-inner nav a:hover, .site-foot a:hover { color: var(--pixel-gold) }
.header-inner nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--pixel-gold) }
#game .intro {
  min-height: 178px;
  padding: 22px 2px 26px;
  margin: 0;
  align-items: center;
  position: relative;
  isolation: isolate;
  border-bottom: 2px solid var(--rule);
}
#game .intro::before {
  content: "";
  position: absolute;
  inset: 1px 0 0 49%;
  z-index: -1;
  background: url('/designs/pixel/night-museum.png') right bottom / contain no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}
#game .intro > div:first-child { max-width: 61% }
.edition, .meter-label, .ad-label {
  font: 600 .75rem/1.3 var(--pixel-mono);
  letter-spacing: .08em;
}
.edition { margin-bottom: 10px }
.accent {
  width: 9px; height: 9px; background: var(--pixel-gold);
  box-shadow: 3px 0 0 #96704b, 0 3px 0 #6c4d43;
}
h1, h1 em, .score {
  font: 400 clamp(2.4rem,4.2vw,4.15rem)/1.02 Workbench, monospace;
  letter-spacing: -.067em;
}
h1 { color: #fff0d5; text-shadow: 0 3px #73596a, 3px 3px #241d30 }
h1 em { color: var(--pixel-gold); white-space: nowrap; text-shadow: 0 3px #a06653, 3px 3px #382535 }
.instruction { color: #e2d1d7; margin: 11px 0 0; font: 400 1rem/1.4 var(--sans) }
.round-info {
  position: absolute;
  top: 10px;
  right: 3px;
  padding: 4px 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #211f31;
  border: 1px solid #584b61;
}
.round-info strong { font: 600 .79rem/1.2 var(--pixel-mono) }
#progress { margin: 0; gap: 3px }
.pip { width: 8px; height: 8px; border-radius: 0; background: #695a6e }
.pip.active { background: #ffcd7c }
.pip.hit { background: var(--pixel-green) }
.pip.miss { background: var(--pixel-red) }
.scorebar {
  margin: 0;
  min-height: 42px;
  padding: 7px 2px;
  border: 0;
  gap: 4px 25px;
}
.scorebar > div { color: var(--ink); gap: 8px }
.scorebar strong, .outcome { font: 600 .94rem/1.2 var(--pixel-mono) }
.scorebar strong { color: #fff2d7 }
.meter-label, .ad-label { color: #c5b3c6 }
.clock-wrap #clock { color: var(--pixel-gold) }
.help { color: #efe1d6; padding: 5px 0 5px 8px; text-decoration: underline; text-underline-offset: 3px }
.round-start {
  border: 2px solid #8f7990;
  border-radius: 0;
  background: var(--pixel-panel);
  box-shadow: 3px 3px 0 var(--pixel-edge);
  grid-template-columns: 1.2fr 1fr;
}
.cover {
  min-height: 200px;
  border: 9px solid #584455;
  outline: 2px solid #cba67f;
  outline-offset: -5px;
  background: #232137;
}
.cover img { z-index: 0; object-position: 50% 45% }
.cover figcaption {
  color: #fff5e1; z-index: 1;
  background: #211e2cde;
  padding: 5px 9px;
  font-size: .75rem;
}
.round-invite {
  padding: clamp(16px,3vw,38px);
  min-height: 209px;
  border-left: 2px solid #8f7990;
  background-color: var(--pixel-panel);
  background-image: linear-gradient(90deg, #5d4d6033 1px, transparent 1px), linear-gradient(#5d4d6033 1px, transparent 1px);
  background-size: 17px 17px;
}
.round-invite p:first-child { font: 400 clamp(1.55rem,2.5vw,2.4rem)/1.05 Workbench,monospace; letter-spacing: -.05em; color: #fff1d5 }
.round-invite p:nth-child(2) { font-size: .98rem; color: #e4d6db }
.primary, .secondary, .round-invite .primary, .zoom, .close, .reason {
  border: 2px solid #191726;
  border-radius: 0;
  box-shadow: 2px 3px 0 #171620, inset 0 2px #ffffff45;
}
.primary, .round-invite .primary {
  font: 700 .98rem/1.24 var(--pixel-mono);
  color: #34283a;
  background: var(--pixel-gold);
  padding: 10px 15px;
}
.primary:hover, .round-invite .primary:hover:not(:disabled) { background: #ffe0a0 }
.secondary, .reason, .zoom, .close { color: #fff1dd; background: #534455 }
.secondary:hover, .reason:hover, .zoom:hover, .close:hover { background: #665369 }
.primary:active:not(:disabled), .secondary:active, .zoom:active { transform: translate(1px,2px); box-shadow: 1px 1px 0 #171620 }
.round-invite .primary { margin-top: 15px }
.gallery { gap: clamp(8px,1.3vw,18px) }
.card, .feedback, .results li {
  border: 2px solid #77657a;
  border-radius: 0;
  background: var(--pixel-panel);
  box-shadow: 3px 3px 0 var(--pixel-edge);
}
.card:has(.choose:not(:disabled):hover), .card:focus-within { border-color: var(--pixel-gold) }
.card.correct { border-color: var(--pixel-green); outline: none }
.card.wrong { border-color: var(--pixel-red); outline: none }
.card .wall, .card:nth-child(2) .wall, .card:nth-child(3) .wall {
  background: #4a4053;
  height: clamp(155px,24vh,264px);
  padding: clamp(13px,1.8vw,24px);
}
.wall img { box-shadow: 0 0 0 2px #272333, 0 0 0 4px #c8a27d, 4px 5px 0 4px #272333 }
.label {
  color: #fff0d7;
  font: 500 1.06rem/1.3 var(--sans);
  border-top: 2px solid #766178;
  min-height: 52px; padding: 8px 55px 8px 12px;
}
.letter {
  width: 28px; height: 28px;
  color: #332a31; background: var(--pixel-gold); border: 2px solid #211e31;
  border-radius: 0; font: 400 1.22rem/1 Workbench,monospace;
}
.zoom { width: 31px; height: 31px; bottom: 12px; right: 12px }
.meta { padding: 0 12px 11px }
.status-tag, .card.correct .label .status-tag { color: var(--pixel-green) }
.card.wrong .status-tag { color: var(--pixel-red) }
.feedback { padding: 10px 14px; border-left: 5px solid var(--pixel-green) }
.feedback strong, .modal-title, .test-score { color: #fff0d7; font: 400 1.55rem/1.15 Workbench,monospace }
.feedback p, .match-note { color: #dfd3db; font-size: .94rem }
.feedback .primary { flex: none }
#response { margin-top: 12px }
dialog { border: 2px solid #97829b; border-radius: 0; background: var(--pixel-panel); box-shadow: 5px 5px 0 #171620 }
dialog::backdrop { background: #151221dd }
.reason[aria-pressed="true"] { background: var(--pixel-gold); color: #282033 }
.results { padding: 18px 1px 3px }
.results ol { max-width: 740px; margin: 12px 0 }
.results li { margin-bottom: 5px; padding: 5px 10px; gap: 10px }
.results li img { width: 54px; height: 34px; background: #514656 }
.results .score { color: var(--pixel-gold) }
.outcome { font-size: .85rem }
.house-slot { margin: 16px 0 12px }
.slice-ad { border: 2px solid #c5b39a; border-radius: 0; box-shadow: 3px 3px 0 var(--pixel-edge); padding-block: 5px }
.slice-ad img { width: 45px; height: 45px }
.site-foot { padding: 12px 0; border-top: 2px solid var(--rule) }
.site-foot .footer-mark { font-size: 1rem }
.site-foot nav a { font-size: .78rem }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #a7e5ef; outline-offset: 3px }
.skip:focus { color: #201928 }
@media(max-width: 800px) {
  #game .intro { min-height: 154px }
  .round-info { gap: 5px }
}
@media(max-width: 700px) {
  .header-inner { min-height: 45px }
  .wordmark { font-size: 1.15rem; gap: 4px }
  .emblem { width: 30px; height: 30px }
  .header-inner nav { gap: 7px }
  .header-inner nav a { font-size: .75rem; padding-block: 8px }
  #game .intro { display: block; min-height: 0; padding: 14px 0 10px }
  #game .intro::before { inset: auto -1px 2px auto; width: 41%; height: 67px; background-position: right bottom }
  #game .intro > div:first-child { max-width: none }
  .edition { font-size: .65rem; margin-bottom: 7px; gap: 6px }
  h1, h1 em { font-size: clamp(1.82rem,6.8vw,2.7rem) }
  .instruction { max-width: 58%; font-size: .83rem; margin: 5px 0 8px }
  .round-info { position: relative; inset: auto; display: inline-flex; gap: 7px; padding: 2px 5px }
  .round-info strong { font-size: .67rem }
  .pip { width: 6px; height: 6px }
  .scorebar { min-height: 31px; padding: 3px 0; gap: 13px }
  .scorebar strong { font-size: .84rem }
  .meter-label { font-size: .65rem }
  .help { font-size: .75rem }
  .round-start { display: block }
  .cover { min-height: clamp(115px,19dvh,177px); border-width: 7px }
  .cover figcaption { padding: 4px 7px; font-size: .68rem }
  .round-invite { display: grid; min-height: 0; grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; padding: 11px 10px; border-left: 0; border-top: 2px solid #8f7990 }
  .round-invite p:first-child { font-size: 1.18rem; margin: 0 }
  .round-invite p:nth-child(2) { font-size: .8rem; line-height: 1.25 }
  .round-invite .primary { margin: 0; font-size: .8rem; padding: 9px 8px }
  #game:has(#round-start[hidden]) .intro { min-height: 0; padding-block: 7px }
  #game:has(#round-start[hidden]) .intro::before,
  #game:has(#round-start[hidden]) .instruction,
  #game:has(#round-start[hidden]) .edition { display: none }
  #game:has(#round-start[hidden]) .intro { display:flex; align-items:center; justify-content:space-between; gap:4px }
  #game:has(#round-start[hidden]) h1, #game:has(#round-start[hidden]) h1 em {font-size:clamp(1.15rem,4.4vw,1.6rem)}
  .gallery { gap: 6px }
  .card .wall, .card:nth-child(2) .wall, .card:nth-child(3) .wall { height: clamp(86px,14dvh,130px); padding: 8px 11px }
  .label { border-top: 0; border-left: 2px solid #766178; padding: 8px; font-size: .95rem }
  .letter { width: 21px; height: 22px; font-size: .97rem }
  .zoom { width: 29px; height: 29px; right: 4px; top: 4px }
  .meta { padding: 3px 8px; font-size: .72rem }
  .meta a { display: inline; margin-right: 7px }
  .feedback { flex-direction: row; align-items: center; gap: 8px; padding: 7px 8px }
  .feedback strong { font-size: 1.15rem }
  .feedback p,.match-note { font-size: .78rem; line-height: 1.25 }
  .feedback .primary { font-size: .76rem; padding: 6px 7px }
  .feedback .primary { align-self: center }
  .house-slot { margin: 12px 0 }
  .slice-ad { padding-block: 3px }
  .slice-ad img { width: 36px; height: 36px }
}
@media(max-width: 370px) {
  .header-inner { flex-wrap: nowrap }
  .header-inner nav { gap: 5px }
  .header-inner nav a { font-size: .68rem }
  .wordmark { font-size: 1.03rem }
  #game .intro::before { width: 35% }
}
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto } }
/* Workbench's scan-line axis keeps strokes joined on small displays. */
.wordmark, .footer-mark, h1, h1 em, .score, .round-invite p:first-child, .letter, .feedback strong, .modal-title, .test-score {
  font-variation-settings: 'BLED' 0, 'SCAN' 24;
}
.wordmark, .footer-mark { letter-spacing: 0 }
h1, h1 em, .score { letter-spacing: -.03em }
@media(min-width:701px) { .round-info { right: auto; left: 53%; top: 10px } }
@media(max-width:700px) {
  .round-invite p:first-child,.feedback strong { font: 700 1rem/1.2 var(--pixel-mono); letter-spacing: -.035em }
  .wordmark { font: 700 .96rem/1 var(--pixel-mono); letter-spacing: -.04em }
}

#museum-sound[aria-pressed="true"] .sound-slash,#museum-sound[aria-pressed="false"] .sound-waves {display:none}
#museum-sound svg {color:var(--pixel-gold)}
#museum-sound:hover {background:var(--pixel-panel)}
.clock-wrap #clock.last-seconds {color:var(--pixel-red)}

/* Give the three paintings the free space while the clock is running. */
@media (min-width:701px) {
  .gallery .card:not(.revealed) .wall {height:clamp(180px,calc(100dvh - 425px),390px)}
}
@media (max-width:700px) {
  .gallery .card:not(.revealed) .choose {grid-template-columns:minmax(0,2.15fr) minmax(85px,1fr)}
  .gallery .card:not(.revealed) .wall {height:clamp(84px,calc((100dvh - 265px) / 3),205px)}
  .card .zoom {width:35px;height:35px}
  .card .zoom::after {content:"";position:absolute;inset:-4px}
}
@media (max-width:370px) {
  .scorebar {gap:5px}
  .scorebar > div {gap:4px}
  .scorebar .help {padding-inline:2px}
}
