/* Puzzle Kettle · Daily Mystery. Phone first, one thing at a time: text >= 18 px, tap targets >= 48 px. */
@font-face { font-family: Playfair; src: url("fonts/PlayfairDisplay-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: Lora; src: url("fonts/Lora-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Lora; src: url("fonts/Lora-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Lora; src: url("fonts/Lora-Italic.ttf") format("truetype"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url("fonts/BarlowCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --navy: #10162f; --navy2: #1c2550; --navy3: #26305f; --amber: #f2a541; --ember: #e8743b; --cream: #f6e7c8;
  --muted: #d3c8b0; --line: rgba(246, 231, 200, 0.2); --green: #7fe0a3;
  --p0: #f2a541; --p1: #8fd8cf; --p2: #f0937a; --p3: #c4b5ff; --p4: #a8dc87;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--navy); color: var(--cream);
  background-image: radial-gradient(120% 60% at 50% -10%, #2a2f5c 0%, var(--navy) 60%);
  font-family: Lora, Georgia, serif; font-size: 19px; line-height: 1.5;
}
button, input { font: inherit; color: inherit; }
a { color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
p { margin: 0 0 12px; }
h1, h2, h3 { margin: 0; }

/* header */
.top { max-width: 600px; margin: 0 auto; padding: 10px 12px 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name, .brand-sub { display: block; font-family: Barlow, sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 18px; line-height: 1.2; }
.brand-sub { color: var(--amber); }
.iconbtn { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--navy2); cursor: pointer; display: grid; place-items: center; flex: none; }
.iconbtn svg { width: 26px; height: 26px; fill: var(--amber); }

main { max-width: 600px; margin: 0 auto; padding: 4px 12px 20px; }
.notice { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--amber); border-radius: 12px; font-size: 18px; }
.card { background: var(--navy2); border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; margin: 12px 0; }
.kicker { font-family: Barlow, sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--amber); font-size: 18px; margin: 8px 0 4px; }
h1 { font-family: Playfair, Georgia, serif; font-weight: 800; font-size: 34px; line-height: 1.1; margin: 0 0 10px; }
h2 { font-family: Barlow, sans-serif; font-weight: 600; font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); margin: 0 0 10px; }
h2.casetitle { font-family: Playfair, Georgia, serif; font-weight: 800; text-transform: none; letter-spacing: 0; font-size: 26px; line-height: 1.15; color: var(--cream); }
h3 { font-family: Barlow, sans-serif; font-weight: 600; font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); margin: 18px 0 8px; }
.hint { color: var(--muted); font-size: 18px; }

/* buttons */
.big, .wide, .primary, .secondary { display: flex; align-items: center; justify-content: center; text-align: center; border-radius: 14px; cursor: pointer;
  font-family: Barlow, sans-serif; font-weight: 600; letter-spacing: 0.04em; touch-action: manipulation; text-decoration: none; }
.big { width: 100%; min-height: 60px; font-size: 24px; padding: 10px 18px; margin: 14px 0 8px; }
.wide { width: 100%; min-height: 54px; font-size: 21px; padding: 10px 16px; }
.primary { background: var(--amber); color: var(--navy); border: 2px solid var(--amber); }
.primary:hover { background: #f6b864; }
.secondary { background: var(--navy3); color: var(--cream); border: 2px solid var(--line); }
.textbtn { display: block; margin: 4px auto; min-height: 48px; padding: 8px 12px; background: none; border: 0; color: var(--amber);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 19px; }
.textbtn.small { margin: 0; font-size: 18px; white-space: nowrap; flex: none; }
.linkbtn { margin: 14px 0 0; }

/* start */
.teaser { font-size: 21px; line-height: 1.45; }
.faces { list-style: none; padding: 0; margin: 18px 0 6px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 10px; }
.faces li { width: 30%; min-width: 96px; text-align: center; }
.face { position: relative; width: 84px; height: 84px; margin: 14px auto 6px; border-radius: 50%; display: grid; place-items: center;
  font-family: Playfair, Georgia, serif; font-weight: 800; font-size: 36px; color: var(--navy); border: 3px solid rgba(246, 231, 200, 0.5); }
.face .hat { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); width: 60px; height: 34px; fill: var(--cream); }
.face .hat .band { fill: var(--ember); }
.fname { font-family: Playfair, Georgia, serif; font-weight: 800; font-size: 20px; line-height: 1.2; }
.frole { color: var(--muted); font-size: 18px; line-height: 1.25; }

/* solve */
.steprow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 0; }
.steplabel { margin: 0; font-family: Barlow, sans-serif; font-weight: 600; font-size: 21px; letter-spacing: 0.04em; color: var(--amber); }
.steplabel:focus { outline: none; }
#story-more p:first-child { margin-top: 0; }
.rules { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rules li { position: relative; padding: 12px 12px 12px 48px; margin-bottom: 8px; border-radius: 12px; background: rgba(232, 116, 59, 0.14); border: 1px solid rgba(232, 116, 59, 0.55); }
.rules li::before { counter-increment: r; content: counter(r); position: absolute; left: 12px; top: 13px; width: 26px; height: 26px; border-radius: 50%; background: var(--ember); color: var(--navy); font-family: Barlow, sans-serif; font-weight: 600; font-size: 18px; line-height: 26px; text-align: center; }
.legend { margin: 6px 0 0; color: var(--muted); font-size: 18px; display: flex; align-items: center; gap: 8px; }
.hat { width: 28px; height: 17px; fill: var(--amber); flex: none; vertical-align: middle; }
.hat .band { fill: var(--navy2); }
.clues { list-style: none; margin: 0; padding: 0; }
.clues li { margin-bottom: 8px; }
.clue { display: flex; gap: 12px; width: 100%; text-align: left; padding: 12px; min-height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--navy3); cursor: pointer; touch-action: manipulation; line-height: 1.4; }
.clue .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--amber); color: var(--navy); font-family: Barlow, sans-serif; font-weight: 600; font-size: 18px; line-height: 28px; text-align: center; }
.clue[aria-pressed="true"] { opacity: 0.6; background: transparent; }
.clue[aria-pressed="true"] .tx { text-decoration: line-through; text-decoration-thickness: 2px; }
.clue[aria-pressed="true"] .n { background: var(--muted); }
.hints { list-style: none; margin: 0; padding: 0; }
.hints li { padding: 12px; margin-bottom: 10px; border-radius: 12px; background: rgba(242, 165, 65, 0.12); border: 1px solid rgba(242, 165, 65, 0.5); }
.hints .hl { display: block; font-family: Barlow, sans-serif; font-weight: 600; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); }
.hints .q { font-style: italic; color: var(--muted); margin: 4px 0; }
.hints .h { font-weight: 700; margin: 0; }
.bighead { font-family: Playfair, Georgia, serif; font-weight: 800; text-transform: none; letter-spacing: 0; font-size: 34px; color: var(--cream); margin: 14px 0 12px; }
.picks { display: grid; gap: 10px; }
.pick { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--navy2); cursor: pointer; text-align: left; }
.pick .face { width: 56px; height: 56px; margin: 8px 0 0; font-size: 26px; flex: none; }
.pick .face .hat { width: 42px; height: 24px; top: -11px; }
.pick:hover { border-color: var(--amber); }

/* notebook */
.mode { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 10px; border: 2px solid var(--amber); border-radius: 12px; overflow: hidden; }
.mode button { min-height: 50px; border: 0; background: transparent; font-family: Barlow, sans-serif; font-weight: 600; font-size: 20px; cursor: pointer; }
.mode button[aria-pressed="true"] { background: var(--amber); color: var(--navy); }
.gridwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
/* 3 hours fit a 360 px phone; with more hours the grid scrolls sideways inside its box and the names stay put */
table.grid { width: 100%; min-width: calc(72px + var(--cols, 3) * 74px); border-collapse: separate; border-spacing: 4px; table-layout: fixed; font-family: Barlow, sans-serif; font-weight: 600; font-size: 18px; }
table.grid th { font-weight: 600; text-align: center; padding: 4px 2px; }
table.grid thead th { color: var(--amber); }
table.grid thead th.murder { color: var(--ember); }
table.grid thead th small { display: block; font-size: 18px; }
table.grid th.corner { width: 72px; }
table.grid th.corner, table.grid tbody th { position: sticky; left: 0; z-index: 1; background: var(--navy2); }
table.grid tbody th { text-align: left; font-family: Lora, Georgia, serif; font-weight: 700; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
table.grid tbody th .hat { width: 22px; height: 14px; margin-left: 3px; }
.cell { width: 100%; min-height: 58px; padding: 4px 2px; -webkit-hyphens: auto; hyphens: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--navy3); cursor: pointer;
  font-family: Barlow, sans-serif; font-weight: 600; font-size: 18px; line-height: 1.1; overflow-wrap: break-word;
  touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cell.place { border-width: 2px; background: rgba(16, 22, 47, 0.6); }
.cell.not { color: var(--muted); }
.cell.not .x { color: var(--ember); }
.cell.not .nm { text-decoration: line-through; text-decoration-thickness: 2px; }
.cell[data-p="0"] { color: var(--p0); border-color: var(--p0); }
.cell[data-p="1"] { color: var(--p1); border-color: var(--p1); }
.cell[data-p="2"] { color: var(--p2); border-color: var(--p2); }
.cell[data-p="3"] { color: var(--p3); border-color: var(--p3); }
.cell[data-p="4"] { color: var(--p4); border-color: var(--p4); }
.cell.empty { color: var(--muted); }
table.grid.solved td { text-align: center; padding: 8px 2px; border-radius: 10px; background: var(--navy3); line-height: 1.12; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
table.grid.solved td.kill { background: var(--ember); color: var(--navy); }

/* result */
.verdictbox { margin: 10px 0 4px; padding: 20px 16px; border-radius: 18px; text-align: center; background: var(--navy2); border: 3px solid var(--amber); }
.verdictbox:focus { outline: none; }
.verdictbox.right { border-color: var(--green); background: rgba(127, 224, 163, 0.12); }
.verdict { font-family: Playfair, Georgia, serif; font-weight: 800; font-size: 34px; line-height: 1.15; margin: 0 0 10px; }
.verdictbox.right .verdict { color: var(--green); }
.reason { font-size: 20px; margin: 0; }
.status { min-height: 1.5em; margin: 0; text-align: center; color: var(--amber); font-size: 18px; }
.share { white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; background: var(--navy); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 6px 0 12px; overflow-wrap: anywhere; }
.next { text-align: center; font-family: Barlow, sans-serif; font-weight: 600; font-size: 21px; letter-spacing: 0.03em; margin: 8px 0 14px; }
.next .countdown { color: var(--amber); }
.reveal { font-style: italic; margin: 0 0 4px; }
#explain h3:first-of-type { margin-top: 10px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 12px 12px 12px 50px; margin-bottom: 8px; border-radius: 12px; background: var(--navy2); }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 12px; top: 14px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--amber); color: var(--amber); font-family: Barlow, sans-serif; font-weight: 600; font-size: 18px; line-height: 22px; text-align: center; }
.steps .hl { display: block; font-family: Barlow, sans-serif; font-weight: 600; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); }
.steps .q { font-style: italic; color: var(--muted); margin: 2px 0 4px; }
.steps .h { font-weight: 700; margin: 0; }
.steps .s { margin: 2px 0 0; }
.signup label { display: block; font-family: Barlow, sans-serif; font-weight: 600; font-size: 22px; color: var(--amber); margin-bottom: 8px; }
.signup input { width: 100%; min-height: 54px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--navy); margin-bottom: 10px; font-size: 19px; }
.signup .hint { margin: 10px 0 0; }
.signup .hint a { display: inline-block; min-height: 48px; padding: 12px 6px; }

/* dialogs: bottom sheets */
dialog.sheet { width: min(560px, calc(100% - 16px)); max-height: calc(100% - 16px); margin: auto auto 8px; padding: 18px 16px 12px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--navy2); color: var(--cream); overflow-y: auto; }
dialog.sheet::backdrop { background: rgba(5, 8, 22, 0.72); }
.confirm-q { font-family: Playfair, Georgia, serif; font-weight: 800; font-size: 28px; line-height: 1.2; text-align: center; margin: 6px 0 4px; }
.tut-head { display: flex; align-items: center; justify-content: space-between; }
.tut-head .textbtn { margin: 0; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 6px -16px 0; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; padding: 4px 16px; }
.slide-text { font-size: 22px; line-height: 1.35; margin: 4px 0 12px; }
table.mini { border-collapse: separate; border-spacing: 6px; margin: 0 auto; font-family: Barlow, sans-serif; font-weight: 600; font-size: 20px; }
table.mini th { color: var(--amber); padding: 2px 8px; text-align: left; }
table.mini td { background: var(--navy3); border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px; text-align: center; }
table.mini td.hot { background: var(--ember); color: var(--navy); border-color: var(--ember); }
.mini-note { text-align: center; font-family: Barlow, sans-serif; font-weight: 600; font-size: 21px; color: var(--amber); margin: 8px 0; }
.mini-clue { margin: 4px auto 8px; padding: 12px; border-radius: 12px; background: var(--navy3); border: 1px solid var(--line); }
.dots { display: flex; justify-content: center; gap: 8px; margin: 12px 0 0; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--amber); }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 12px; text-align: center; }
.statgrid div { background: var(--navy3); border-radius: 12px; padding: 8px 2px; display: flex; flex-direction: column-reverse; }
.statgrid dd { margin: 0; font-family: Playfair, Georgia, serif; font-weight: 800; font-size: 30px; line-height: 1.1; }
.statgrid dt { font-family: Barlow, sans-serif; font-weight: 600; font-size: 18px; color: var(--muted); }

/* footer */
footer { max-width: 600px; margin: 0 auto; padding: 6px 12px 32px; text-align: center; font-size: 18px; color: var(--muted); }
footer p { margin: 0 0 6px; }
footer a { display: inline-block; min-height: 48px; padding: 12px 6px; }
.videos { font-family: Barlow, sans-serif; font-weight: 600; font-size: 19px; letter-spacing: 0.03em; }

/* text pages: privacy.html, 404.html */
.doc main > h2 { margin-top: 26px; }
.doc main ul { padding-left: 22px; margin: 0 0 12px; }
.doc main li { margin-bottom: 8px; }
.doc code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; background: var(--navy3); padding: 1px 5px; border-radius: 6px; overflow-wrap: anywhere; }
.doc a.brand { color: inherit; text-decoration: none; }
.doc main > h1 { margin-top: 12px; }

@media (min-width: 560px) { h1 { font-size: 40px; } .card { padding: 20px 22px; } }
