/* boredprof study games (boredprof.com/games): her dark board, chalk ink, the red pen. Games 20261117. The clean look (Nov 17: Matt liked a
   competitor's calmer vibe): the phone's own system font, flat pill buttons, no frames, lots of black. */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 900; font-display: swap; src: url(/fonts/nunito-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; }
:root {
  --ink: #0a0a0b; --paper: #111113; --card: #151518; --line: #26262b; --line-2: #3a3a41; --text: #f2f0ea; --soft: #cfcec9; --muted: #8d8d93;
  --red: #ff4646; --red-lip: #b52a2d; --green: #72e872; --green-lip: #3f9d3f; --yellow: #ffd43b; --blue: #4b82ff; --pop: #ffd43b;
  --sys: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--text); }
body { font: 500 16px/1.5 var(--sys); -webkit-tap-highlight-color: transparent; }
a { color: var(--text); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 1100px; margin: 0 auto; padding: 14px 16px; }
.logo { font-weight: 800; font-size: 21px; text-decoration: none; letter-spacing: -.03em; }
.logo span { color: var(--red); }
.top nav { display: flex; align-items: center; gap: 14px; }
.top nav a { color: #d6d4cf; text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid #2a2a2e; border-radius: 999px; padding: 7px 15px; }
.top nav a:hover { color: var(--text); border-color: #45454c; }
.icon-btn { background: none; border: 1px solid #2a2a2e; border-radius: 999px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; font-size: 16px; }

main { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
h1 { font-weight: 800; font-size: clamp(36px, 7vw, 64px); line-height: 1; letter-spacing: -.045em; margin: 12px 0 12px; }
h1 em { font-style: normal; color: var(--red); }
h2 { font-weight: 800; font-size: 24px; letter-spacing: -.02em; margin: 36px 0 12px; }
.lede { color: #b6b5b0; font-size: 19px; font-weight: 500; letter-spacing: -.01em; max-width: 640px; margin: 0 0 24px; }
.chip { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #2a2a2e; border-radius: 999px; padding: 8px 16px; color: #e8e6e1; font-size: 15px; font-weight: 600; }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* ---------- buttons: flat pills: the primary white, the others dark with a thin outline ---------- */
.go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 12px 24px; border: 0; border-radius: 16px; background: #f2f0ea; color: #0a0a0b; font: 650 17px/1.2 var(--sys); letter-spacing: -.01em; text-decoration: none; cursor: pointer; transition: transform .12s, background .15s, border-color .15s; }
.go:hover { background: #fff; }
.go:active { transform: scale(.98); }
.go.light, .go.ghost { background: #111113; color: var(--text); border: 1px solid #2c2c31; }
.go.light:hover, .go.ghost:hover { background: #151518; border-color: #46464d; }
.go:disabled { opacity: .45; cursor: default; }
button, .go { touch-action: manipulation; } /* (a quick second tap is a second tap, never a zoom: iPhones zoom on double taps) */

/* ---------- her board ---------- */
.board { display: block; width: 100%; height: 100%; background: transparent; touch-action: manipulation; }
.board path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.board .hit { fill: transparent; }
.board .pen-tip { opacity: 0; transition: opacity .35s; stroke: #ffffffcc; stroke-width: 1.5; }
.board .pen-tip.on { opacity: .95; transition: opacity .1s; }
.board g.hl path { animation: hlpulse 1s ease-in-out infinite; }
@keyframes hlpulse { 50% { opacity: .55; } }
.boardbox { position: relative; border: 0; border-radius: 16px; overflow: hidden; background: transparent; }

/* ---------- game library cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; text-align: left; background: #0f0f11; border: 1px solid #1f1f23; border-radius: 16px; padding: 0; overflow: hidden; cursor: pointer; text-decoration: none; transition: border-color .15s, translate .15s; }
.card:hover { border-color: var(--line-2); translate: 0 -2px; }
.card .thumb { aspect-ratio: 16 / 9; background: var(--ink); border-bottom: 1px solid var(--line); }
.card .thumb svg { display: block; width: 100%; height: 100%; }
.card .body { padding: 12px 14px 14px; }
.card b { display: block; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.card .tag { color: var(--muted); font-size: 14px; }
.card .best { color: var(--green); font-size: 13px; margin-top: 4px; }

/* ---------- playing ---------- */
.hud { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; color: var(--soft); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.hud .bars { display: flex; gap: 6px; }
.hud .bars i { width: 30px; height: 5px; border-radius: 3px; background: var(--line-2); }
.hud .bars i.on { background: var(--red); }
.hud .bars i.past { background: var(--soft); }
.hud .grow { flex: 1; }
.hud .clock { font-variant-numeric: tabular-nums; color: var(--text); font-size: 18px; letter-spacing: 0; text-transform: none; }
.ask { text-align: center; padding: 14px 0 0; }
.prompt { margin: 0 0 12px; color: var(--soft); font-size: 17px; }
.prompt b { color: var(--red); }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 620px; margin: 0 auto; }
.opt { min-height: 52px; padding: 10px 14px; border-radius: 14px; border: 1px solid #2c2c31; background: #111113; color: var(--text); font: 650 17px/1.3 var(--sys); letter-spacing: -.01em; cursor: pointer; transition: transform .1s, border-color .15s, background .15s; } /* (flat, like the rest of the clean look) */
.opt:hover { border-color: #46464d; }
.opt:active { transform: scale(.98); }
.opt.right { border-color: var(--green); background: #12301a; }
.opt.wrong { border-color: var(--red); background: #33161a; animation: shake .3s; }
.typer { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.typer input { flex: 1; min-width: 0; height: 56px; padding: 0 16px; border-radius: 14px; border: 1px solid #2c2c31; background: #0f0f11; color: var(--text); font: 700 20px var(--sys); outline: none; }
.typer input:focus { border-color: var(--soft); }
.typer input.wrong { border-color: var(--red); animation: shake .3s; }
.typer input.right { border-color: var(--green); }
.typer .go { min-height: 56px; padding: 0 18px; }
.tools { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.tools button { background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; color: var(--soft); font-size: 14px; cursor: pointer; }
.note { min-height: 24px; margin: 10px 0 0; color: var(--soft); font-size: 15px; }
.note.bad { color: #ff8a8a; }
.note.good { color: var(--green); }
.note a { color: var(--yellow); }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 4px 0; } }

.toast { position: absolute; left: 50%; top: 14px; translate: -50% 0; padding: 8px 16px; border-radius: 999px; background: #000000cc; border: 1px solid var(--line-2); font-weight: 800; font-size: 15px; opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: 1; }
.cover { position: absolute; inset: 0; display: grid; place-items: center; background: #0a0a0bcc; text-align: center; padding: 16px; }
.cover h3 { margin: 0 0 6px; font-weight: 900; font-size: clamp(24px, 4vw, 36px); }
.cover p { margin: 0 0 14px; color: var(--soft); }
.skiptap { position: absolute; right: 12px; bottom: 10px; background: #000000aa; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; color: var(--soft); font-size: 13px; cursor: pointer; }

/* ---------- results ---------- */
.done { text-align: center; padding: 18px 0 0; }
.done .big { font-weight: 900; font-size: clamp(30px, 6vw, 46px); margin: 0; }
.done .sub { color: var(--soft); margin: 4px 0 16px; }
.done .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 18px; }
.missed { max-width: 560px; margin: 0 auto 18px; text-align: left; border: 1px solid #1f1f23; background: #0f0f11; border-radius: 16px; padding: 12px 16px; }
.missed h4 { margin: 0 0 6px; font-size: 15px; color: var(--soft); text-transform: uppercase; letter-spacing: .08em; }
.missed li { margin: 6px 0; }
.missed a { color: var(--yellow); font-size: 14px; margin-left: 6px; }
.pitch { max-width: 640px; margin: 28px auto 0; padding: 22px; border: 1px solid #1f1f23; border-radius: 18px; text-align: center; background: #0f0f11; }
.pitch h3 { margin: 0 0 6px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.pitch p { margin: 0 0 14px; color: var(--soft); }

.foot { max-width: 1100px; margin: 0 auto; padding: 26px 16px 40px; color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); }

/* ---------- phones: board first, big; the header gets out of the way while playing ---------- */
@media (max-width: 700px) {
  .top { padding: 10px 14px; }
  body.playing .top, body.playing .foot { display: none; }
  body.playing main { padding-top: 8px; }
  .hud { margin: 0 0 8px; font-size: 12px; gap: 8px; }
  .hud .bars i { width: 20px; }
  .opts { gap: 8px; }
  .opt { min-height: 48px; font-size: 16px; }
  .typer input { height: 52px; font-size: 18px; }
  .lede { font-size: 16px; }
}
