@font-face{font-family:"Bricolage Grotesque";font-weight:700;font-style:normal;font-display:swap;src:url(../fonts/bricolage-grotesque-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"Bricolage Grotesque";font-weight:800;font-style:normal;font-display:swap;src:url(../fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2")}
@font-face{font-family:"Figtree";font-weight:400;font-style:normal;font-display:swap;src:url(../fonts/figtree-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Figtree";font-weight:500;font-style:normal;font-display:swap;src:url(../fonts/figtree-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"Figtree";font-weight:600;font-style:normal;font-display:swap;src:url(../fonts/figtree-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Figtree";font-weight:700;font-style:normal;font-display:swap;src:url(../fonts/figtree-latin-700-normal.woff2) format("woff2")}
/* What every Timez game page shares: the palette, the one-screen column (header, rule line, stage,
   controls), toasts, bottom sheets (rules, result, hint, ad break) and buttons. Each game sets its own
   colour (--tile) and adds its own styles.css for its board. Always dark: one palette, on purpose. */
:root{
  --bg:#0F1422; --surface:#182033; --raised:#1F2940; --ink:#E6EAF4; --muted:#96A1B8; --line:#35415C;
  --tile:#5468FF; --tile-ink:#FFFFFF; --tile-edge:rgba(0,0,0,.28);
  --new:#C9A7F5; --new-ink:#2A1452;                 /* the Timez highlight */
  --key:#29334A; --key-ink:#E6EAF4;
  --good:#45C486; --bad:#F2735F; --scrim:rgba(3,6,14,.66);
  --display:"Bricolage Grotesque","Arial Black",system-ui,sans-serif;
  --body:"Figtree",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --ad-h:0px;                          /* height of the ad banner, set by the app */
  --safe-top:0px; --safe-bottom:0px;   /* phone notch and gesture bar, set by the app's page */
  color-scheme:dark;
}
html,body{height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--body);font-size:15px;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer}
button:focus-visible{outline:2px solid var(--new);outline-offset:2px}

.app{box-sizing:border-box;height:100%;max-width:520px;margin:0 auto;padding-inline:16px;padding-block:calc(10px + var(--safe-top)) calc(12px + var(--safe-bottom) + var(--ad-h));display:flex;flex-direction:column;gap:10px}

/* header */
.top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:flex;align-items:center;gap:10px;min-width:0}
.brand h1{margin:0;font-family:var(--display);font-weight:800;font-size:28px;letter-spacing:-.03em;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meta{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meta .chip{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--new-ink);background:var(--new);padding:2px 6px;border-radius:4px;margin-right:4px;vertical-align:1px}
.top-actions{display:flex;gap:8px;flex-shrink:0}
.ghost-btn{border:1.5px solid var(--line);background:transparent;border-radius:8px;padding:6px 10px;font-size:13px;font-weight:600}
.ghost-btn:hover{border-color:var(--muted)}
.round{width:34px;height:34px;padding:0;border-radius:50%;font-weight:700}

.rule{margin:0;font-size:14px;color:var(--muted);line-height:1.35}
.rule b{color:var(--ink);font-weight:600}

.stage{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;position:relative}

.toast{position:absolute;left:50%;top:0;transform:translate(-50%,-6px);background:var(--ink);color:var(--bg);font-weight:600;font-size:14px;padding:8px 14px;border-radius:8px;max-width:calc(100% - 20px);text-align:center;opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;z-index:5}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.good{background:var(--good);color:var(--bg)}

/* controls */
.controls{display:flex;gap:8px}
.controls .ghost-btn{flex:1;padding:11px 8px;font-size:14px}
.controls .ghost-btn[disabled]{opacity:.45;cursor:default}
.controls .primary{background:var(--tile);color:var(--tile-ink);border-color:var(--tile)}
.ad-tag{display:inline-block;font-size:9px;font-weight:800;letter-spacing:.08em;padding:1px 4px;border-radius:3px;background:var(--new);color:var(--new-ink);vertical-align:2px;margin-left:3px}

/* sheets */
.scrim[hidden]{display:none}
.scrim{position:fixed;inset:0 0 var(--ad-h) 0;background:var(--scrim);z-index:10;display:flex;align-items:flex-end;justify-content:center}
.sheet{box-sizing:border-box;width:100%;max-width:520px;max-height:calc(100% - 24px);overflow:auto;background:var(--surface);color:var(--ink);border-radius:14px 14px 0 0;padding-inline:20px;padding-block:18px calc(20px + var(--safe-bottom));animation:up .28s cubic-bezier(.2,.8,.2,1)}
@keyframes up{from{transform:translateY(24px);opacity:.4}}
.sheet:focus{outline:none}
.sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:0 0 4px}
.sheet h2{margin:0;font-family:var(--display);font-weight:800;font-size:30px;letter-spacing:-.02em;line-height:1.05;text-wrap:balance}
.sheet p{line-height:1.45;margin:0}
.sheet section{margin-top:18px;display:flex;flex-direction:column;gap:8px}
.sheet h3{margin:0;font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.sheet-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}
.sheet-actions button{flex:1 1 140px;border-radius:8px;padding:11px 12px;font-weight:700;border:1.5px solid var(--line);background:transparent}
.sheet-actions .primary{background:var(--tile);border-color:var(--tile);color:var(--tile-ink)}
.rules{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;line-height:1.45}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.stats div{display:flex;flex-direction:column;align-items:center;gap:2px}
.stats b{font-family:var(--display);font-size:26px;font-weight:800;font-variant-numeric:tabular-nums}
.stats span{font-size:12px;color:var(--muted);text-align:center}
.score{font-size:16px}
.score b{font-family:var(--display);font-size:22px;font-variant-numeric:tabular-nums}
.next{margin:14px 0 0;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.copybox{width:100%;box-sizing:border-box;font:13px/1.4 ui-monospace,Menlo,monospace;border:1.5px solid var(--line);border-radius:8px;padding:8px;background:var(--bg);color:var(--ink);resize:none}
.sheet .x{flex-shrink:0}

/* the example in the rules */
.example-box{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px;margin:14px 0 4px;border-radius:12px;background:var(--bg)}
.example-box .row{display:flex;gap:8px;align-items:center;font-weight:700}
.example-box .chip-btn{display:inline-grid;place-items:center;min-width:44px;height:34px;padding:0 10px;border-radius:9px;background:var(--tile);color:var(--tile-ink);font-family:var(--display);font-weight:800;font-size:18px}

/* ad break (apps only) */
.adbreak{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding-block:18px 6px}
.adbreak p:last-child{color:var(--muted);max-width:32ch}
.adbreak-mark{display:flex;gap:6px;margin-bottom:10px}
.adbreak-mark i{display:block;width:14px;height:14px;border-radius:4px;background:var(--tile);animation:breathe 1.2s ease-in-out infinite alternate}
.adbreak-mark i:nth-child(2){animation-delay:.2s}
.adbreak-mark i:nth-child(3){background:var(--new);animation-delay:.4s}
@keyframes breathe{to{opacity:.35}}

/* while a game is still being made: its example puzzle, and test buttons for the home screen */
.soon{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.soon .eyebrow{color:var(--new)}
.example{font-family:var(--display);font-weight:800;font-size:24px;line-height:1.35;letter-spacing:-.01em;white-space:pre-line;font-variant-numeric:tabular-nums;padding:16px 18px;border-radius:12px;background:var(--surface);box-shadow:inset 0 0 0 2px var(--tile)}
.soon-line{margin:0;color:var(--muted);max-width:34ch;line-height:1.45}
.progress{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;max-width:300px}
.progress i{width:22px;height:8px;border-radius:4px;background:var(--line)}
.progress i.on{background:var(--tile)}

/* the number keypad */
.kp{display:flex;flex-direction:column;gap:6px;user-select:none}
.kr{display:flex;gap:6px;justify-content:center}
.key{flex:1;height:48px;border:0;border-radius:8px;background:var(--key);color:var(--key-ink);font-family:var(--display);font-weight:800;font-size:20px;touch-action:manipulation;font-variant-numeric:tabular-nums}
.key.wide{flex:1.6;font-family:var(--body);font-size:15px;font-weight:700}
.key.primary{background:var(--tile);color:var(--tile-ink)}
.key:active:not(:disabled){filter:brightness(.88)}
.key:disabled{opacity:.4}
@media (max-height:680px){ .key{height:42px} }

@media (prefers-reduced-motion: reduce){
  .sheet,.adbreak-mark i{animation:none}
  .toast{transition:none}
}
@media (max-height:640px){ .rule{display:none} }

/* Pinpoint: the event on a card (the decade under it after a hint, its date once found); the guesses as
   chips, each with its arrow and coloured by how close it was (hot to cold); what the last guess said; the
   year being typed, big; the years still possible; then the tries left, Hint and the keypad with its − key.
   Its colour is orange. */
.stage{justify-content:center;gap:12px}
.event{padding:16px 18px;border-radius:16px;background:var(--surface);box-shadow:inset 0 0 0 2px var(--line);text-align:center;display:flex;flex-direction:column;gap:6px}
.event .eyebrow{margin:0;color:var(--tile)}
.event .title{margin:0;font-family:var(--display);font-weight:800;font-size:23px;line-height:1.15;letter-spacing:-.01em;text-wrap:balance}
.event .clue{margin:0;font-size:14px;color:var(--muted);min-height:1.2em}
.event .clue b{color:var(--ink)}
.event.found{box-shadow:inset 0 0 0 2px var(--good)}
.event.found .clue b{color:var(--good)}
.event.lost{box-shadow:inset 0 0 0 2px var(--bad)}

.chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:6px;min-height:30px}
.chips li{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 10px;border-radius:15px;font-weight:700;font-size:14px;font-variant-numeric:tabular-nums;background:#3A4560;color:#E6EAF4}
.chips li i{font-style:normal;font-size:13px}
.chips li.b0{background:#F2735F;color:#2A0D08}              /* within 5 years: hot */
.chips li.b1{background:#F2A65A;color:#2B1606}              /* within 25 */
.chips li.b2{background:#E9D36B;color:#29230A}              /* within 100 */
.chips li.found{background:var(--good);color:#0B2016}
.said{margin:0;text-align:center;font-size:14px;color:var(--muted);min-height:1.3em}
.said b{color:var(--ink)}
.typed{align-self:center;min-width:160px;padding:6px 18px;border-radius:12px;background:var(--surface);box-shadow:inset 0 -3px 0 var(--tile);
  text-align:center;font-family:var(--display);font-weight:800;font-size:40px;line-height:1.15;font-variant-numeric:tabular-nums;white-space:nowrap}
.typed.empty{color:var(--muted)}
.typed.ok{background:var(--good);color:#0B2016;box-shadow:none}
.typed.gone{display:none}
.typed.shake{animation:shake .38s}
@keyframes shake{20%{transform:translateX(-7px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(3px)}}
.typed.win{animation:pop .5s ease}
@keyframes pop{50%{transform:scale(1.08)}}
.range{margin:0;text-align:center;font-size:13px;color:var(--muted);min-height:1.2em;font-variant-numeric:tabular-nums}

.controls{align-items:center}
.pips{flex:1;display:flex;gap:6px;align-items:center}
.pips i{width:12px;height:12px;border-radius:50%;border:2px solid var(--line)}
.pips i.used{background:var(--line)}
.pips i.won{background:var(--good);border-color:var(--good)}
.controls .ghost-btn{flex:0 0 auto;min-width:96px}
.controls .ghost-btn[disabled]{opacity:.45}

/* the result sheet and the example */
.answer{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:12px;background:var(--bg)}
.answer b{font-family:var(--display);font-size:22px;font-weight:800;color:var(--good)}
.answer span{font-weight:600}
.sheet .chips{justify-content:flex-start}
.example-box .chips{justify-content:center}
.ex-title{margin:0;font-family:var(--display);font-weight:800;font-size:19px}

@media (max-height:720px){ .stage{gap:8px} .event{padding:12px 14px} .event .title{font-size:20px} .typed{font-size:34px} }
@media (max-height:620px){ .event .eyebrow{display:none} .said{display:none} .typed{font-size:30px} }
@media (prefers-reduced-motion: reduce){ .typed.shake,.typed.win{animation:none} }


/* ---------- on wordz.club ---------- */
/* The back arrow at the top left leads to the app's page on wordz.club (wordz.club/timez/). */
.wz-back{flex-shrink:0;width:36px;height:36px;margin-left:-8px;border:0;border-radius:999px;background:transparent;color:var(--ink);display:grid;place-items:center;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
.wz-back:hover,.wz-back:active{background:var(--raised)}
.brand{gap:6px}
@media (max-width:380px){ .brand h1{font-size:24px} }
/* A friend's challenge (a shared link): a short note above the game, with a close button. */
.wz-note{flex-shrink:0;display:flex;align-items:center;gap:8px;padding:8px 6px 8px 12px;border-radius:12px;background:var(--raised);border:1px solid var(--line);border-left:4px solid var(--new);font-size:14px;line-height:1.35;color:var(--ink);animation:wz-note-in .35s ease-out both}
.wz-note p{margin:0;flex:1;min-width:0}
.wz-note b{color:var(--new);font-weight:700}
.wz-note-x{flex-shrink:0;width:30px;height:30px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-size:14px;cursor:pointer}
.wz-note-x:hover{background:var(--key)}
@keyframes wz-note-in{from{opacity:0;transform:translateY(-6px)}}
@media (prefers-reduced-motion:reduce){ .wz-note{animation:none} }
/* "Get the app": the bar at the top of the game, and the store buttons in its sheet. */
.getapp{flex-shrink:0;display:flex;align-items:center;gap:10px;background:var(--raised);border:1px solid var(--line);border-radius:10px;padding-block:6px;padding-inline:12px 6px;font-size:13px}
.getapp-text{flex:1;min-width:0;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.getapp-btn{flex-shrink:0;border:0;border-radius:7px;background:var(--new);color:var(--new-ink);font-weight:700;font-size:13px;padding:6px 10px;cursor:pointer}
.getapp-x{flex-shrink:0;border:0;background:transparent;color:var(--muted);width:28px;height:28px;border-radius:6px;font-size:13px;cursor:pointer}
.getapp-x:hover{background:var(--key)}
.stores{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.store-btn{flex:1 1 140px;display:flex;flex-direction:column;justify-content:center;gap:1px;padding:8px 14px;border-radius:9px;background:var(--ink);color:var(--bg);text-decoration:none;line-height:1.15}
.store-btn small{font-size:11px;opacity:.8}
.store-btn b{font-family:var(--display);font-size:17px;font-weight:700;letter-spacing:-.01em}
.store-btn.soon{background:transparent;color:var(--muted);border:1.5px dashed var(--line)}
.store-btn:focus-visible{outline:2px solid var(--new);outline-offset:2px}
