:root{color-scheme:light}
body{margin:0}
img{max-width:100%}
[hidden]{display:none!important}

/* Self-hosted fonts (SIL OFL 1.1, see fonts/OFL-*.txt). Variable files cover the weights the page uses. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap; src: url(fonts/bricolage-grotesque-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap; src: url(fonts/bricolage-grotesque-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-stretch: 100%; font-display: swap; src: url(fonts/instrument-sans-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-stretch: 100%; font-display: swap; src: url(fonts/instrument-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Layout: one narrow centred column, like a cinema lobby board. Solved films stack as colour bars above a 4x4 wall of square headshots; controls sit under the wall. */
:root {
  --bg: #f2f0f6;
  --surface: #ffffff;
  --ink: #1b1726;
  --muted: #655f74;
  --line: #d8d3e2;
  --ring: #1b1726;
  --g0: #f3d560; /* easiest */
  --g1: #9fcf72;
  --g2: #a6c3f0;
  --g3: #c39adb; /* trickiest */
  --on-group: #1b1726;
  --mistake: #e0242f; /* "Mistakes remaining" dots, and the popcorn box red */
  --hint: #e0a100; /* hint outline and pulse */
  --display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14111b; --surface: #211c2c; --ink: #f1eef7; --muted: #a59eb6; --line: #362f45; --ring: #f1eef7;
    --g0: #e3c44c; --g1: #8dbd61; --g2: #93b2e3; --g3: #b287cc; --on-group: #14111b; --mistake: #ff4d55; --hint: #ffc83d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14111b; --surface: #211c2c; --ink: #f1eef7; --muted: #a59eb6; --line: #362f45; --ring: #f1eef7;
  --g0: #e3c44c; --g1: #8dbd61; --g2: #93b2e3; --g3: #b287cc; --on-group: #14111b; --mistake: #ff4d55; --hint: #ffc83d;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; }
.wrap { max-width: 560px; margin: 0 auto; padding-inline: 16px; padding-block: 28px 48px; display: flex; flex-direction: column; gap: 18px; }
header { display: flex; flex-direction: column; align-items: center; gap: 6px; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 9vw, 3.1rem); line-height: .95; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.logo { line-height: 0; align-self: stretch; }
.logo-svg { display: block; margin-inline: auto; width: min(100%, 220px); height: auto; color: var(--ink); overflow: visible; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lede { margin: 0; color: var(--muted); max-width: 46ch; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.picker { display: flex; align-items: center; gap: 6px; }
.picker span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.picker button { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: 600 .95rem var(--body); cursor: pointer; }
.picker button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tip { margin: 0; flex: 1 1 8rem; font-size: .92rem; color: var(--muted); }
.btn.small { padding: 6px 14px; font-size: .88rem; border-width: 1.5px; }
.btn.small[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.board { display: flex; flex-direction: column; gap: 8px; }
.solved { border-radius: 12px; padding: 12px 14px; color: var(--on-group); display: flex; align-items: center; gap: 12px; animation: pop .45s ease-out; min-height: 76px; }
.solved[data-g="0"] { background: var(--g0); } .solved[data-g="1"] { background: var(--g1); }
.solved[data-g="2"] { background: var(--g2); } .solved[data-g="3"] { background: var(--g3); }
.solved .thumbs { display: flex; flex: none; }
.solved .thumbs img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--on-group); margin-left: -12px; }
.solved .thumbs img:first-child { margin-left: 0; }
.solved .txt { min-width: 0; }
.solved h2 { font-family: var(--display); font-weight: 800; font-size: 1.12rem; line-height: 1.1; margin: 0 0 2px; text-transform: uppercase; letter-spacing: .01em; }
.solved h2 small { font: 500 .8rem var(--body); letter-spacing: 0; margin-left: 4px; text-transform: none; }
.solved p { margin: 0; font-size: .88rem; line-height: 1.3; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface); cursor: pointer; outline: 0 solid var(--ring); transition: transform .12s ease, outline-width .12s ease; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .15s ease, filter .15s ease; }
.tile:hover img { transform: scale(1.04); }
.tile[aria-pressed="true"] { outline-width: 4px; outline-offset: -4px; transform: scale(.95); }
.tile[aria-pressed="true"] img { filter: brightness(.62) saturate(.85); }
.tile[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--ring); color: var(--bg); font: 700 14px/24px var(--body); text-align: center; }
.tile:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--g2); }
.tile .name { position: absolute; inset: auto 0 0 0; padding: 14px 4px 5px; font-size: clamp(.62rem, 2.5vw, .8rem); font-weight: 600; line-height: 1.1; color: #fff; text-align: center; background: linear-gradient(transparent, rgba(10, 8, 16, .85)); text-wrap: balance; }
.tile.shake { animation: shake .4s; }
/* Hint (app.js): a subtle outline until the next guess; the pulse plays one tile at a time. */
.tile.hinted::before { content: ""; position: absolute; inset: 0; border: 3px solid var(--hint); border-radius: 12px; z-index: 1; pointer-events: none; }
.tile.hint-pulse { animation: hint-pulse .6s ease-in-out; z-index: 2; }
.bar-buttons { display: flex; gap: 8px; margin-left: auto; }
.result .hints-used { color: var(--muted); }
.status { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 30px; color: var(--ink); font-size: 1.12rem; font-weight: 600; }
.dots { display: inline-flex; gap: 8px; }
.dots i { width: 18px; height: 18px; border-radius: 50%; background: var(--mistake); transition: transform .25s, opacity .25s; }
.dots i.gone { transform: scale(0); opacity: 0; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn { font: 600 1rem var(--body); padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.btn:disabled { border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn.primary:not(:disabled) { background: var(--ink); color: var(--bg); }
.btn:focus-visible, .picker button:focus-visible { outline: 3px solid var(--g2); outline-offset: 2px; }
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 18px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 8px; font-weight: 600; z-index: 10; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); width: max-content; max-width: min(92vw, 30rem); text-align: center; }
.toast small { display: block; margin-top: 4px; font-size: .9rem; font-weight: 500; opacity: .85; }
.result { text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.result strong { font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.result .report { margin: 0; font-size: .88rem; color: var(--muted); width: 100%; max-width: 26rem; }
.result .report summary { cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.result .report summary::-webkit-details-marker { display: none; }
.report-form { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 12px; }
.report-label { margin: 0; color: var(--ink); font-weight: 600; }
.reasons { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.report-form textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; }
.report-form textarea:focus-visible { outline: 3px solid var(--g2); outline-offset: 1px; }
.report-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.report-error { margin: 0; color: var(--mistake); }
.report-thanks { color: var(--ink); font-weight: 600; }
.result .streak { display: flex; gap: 22px; margin: 8px 0 0; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.result .streak span { display: flex; flex-direction: column; align-items: center; }
.result .streak b { font-family: var(--display); font-weight: 800; font-size: 1.7rem; letter-spacing: 0; color: var(--ink); text-transform: none; }
.start { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; min-height: 46vh; padding: 12px 0 24px; text-align: center; }
.start-day { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.start-lede { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.2; max-width: 22ch; text-wrap: balance; }
.start-play { min-width: 140px; margin-top: 6px; }
.game { display: flex; flex-direction: column; gap: 18px; }
.game[hidden], .start[hidden] { display: none; }
.privacy { margin: 12px 0 0; }
.result pre { margin: 6px 0 0; font-size: 1.25rem; line-height: 1.15; font-family: inherit; }
details { border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: .88rem; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details ul { columns: 2; column-gap: 20px; padding-left: 18px; margin: 10px 0 0; }
details a { color: inherit; }
.how { margin: 8px 0 0; padding-left: 18px; }
@keyframes shake { 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
@keyframes hint-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } 45% { transform: scale(1.07); box-shadow: 0 0 0 4px var(--hint), 0 6px 18px rgba(0, 0, 0, .25); } }
@keyframes pop { 0% { transform: scale(.94); opacity: 0; } 60% { transform: scale(1.02); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 420px) { details ul { columns: 1; } .solved .thumbs img { width: 36px; height: 36px; } }

/* Formerly inline style attributes. */
.how.one-col { columns: 1; }
.credits-note { margin: 10px 0 0; }

/* Daily puzzle label, notices and countdown. */
.notice { margin: 8px 0; padding: 28px 16px; text-align: center; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--muted); }
.countdown { margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .95rem; }

/* Shared by 404.html and hulson's login page. */
.home { color: inherit; text-decoration: none; display: inline-block; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.muted { margin: 0; color: var(--muted); }
.login { display: flex; flex-direction: column; gap: 12px; width: min(100%, 320px); text-align: left; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.login input { font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.login input:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.login .btn { align-self: center; margin-top: 6px; }
.login-error { margin: 0; color: var(--mistake); font-size: .9rem; }
.nowrap { white-space: nowrap; }
