/* Reverse Krillion site theme: quiz-show daylight palette (cream, tomato, sunflower, dark ink).
   Flat colors only, no glows or soft shadows, no web fonts. Ink text on tomato (5.17:1), never white.
   Font sizes: 12/14/16/18/22/28/36/48. Spacing: 4/8/12/16/24/32/48/64. One radius: 12px. Container 1120px. */
:root {
  color-scheme: light;
  --bg: #FFF4DC;
  --card: #FFFFFF;
  --cover: #F3E6C8;
  --well: #FFF8E8;
  --line: #EFE2C4;
  --line-page: #EBD9B0;
  --line-strong: #CDB98E;
  --ink: #1F1A14;
  --muted: #6B5E4E;
  --accent: #FF4B2B;
  --accent-hover: #FF5F42;
  --accent-text: #C9341A;
  --accent2: #FFC93C;
  --edge: #B22A12;
  --radius: 12px;
  --lift: 0 4px 0 var(--edge);
  --lift-card: 0 4px 0 var(--line-page);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --frame-h: 790px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: 4px; font-weight: 600; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font); line-height: 1.2; margin: 0; font-weight: 900; letter-spacing: -0.04em; }
h3 { letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 16px; top: -64px; background: var(--accent); color: var(--ink); padding: 8px 16px; border-radius: var(--radius); z-index: 10; }
.skip:focus { top: 8px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 784px; }
.muted { color: var(--muted); }

/* ---------- Buttons: solid, with an offset bottom edge that sinks when pressed ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px; margin-bottom: 4px;
  font-family: var(--font); font-size: 16px; font-weight: 800; line-height: 1.2;
  color: var(--ink); background: var(--card);
  border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer; text-decoration: none;
  transition: transform 0.06s ease-out, box-shadow 0.06s ease-out, background-color 0.12s ease;
}
.btn:hover { background: var(--well); color: var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn-main { background: var(--accent); border-color: var(--accent); color: var(--ink); box-shadow: var(--lift); }
.btn-main:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-main:active { box-shadow: 0 0 0 var(--edge); }
.btn-quiet { font-size: 14px; }

/* ---------- Header ---------- */
.top { border-bottom: 2px solid var(--line-page); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 32px; height: 32px; padding: 4px 8px; flex: none;
  background: var(--accent2); border: 2px solid var(--ink); border-radius: var(--radius);
}
.brand-mark i { display: block; height: 4px; border-radius: var(--radius); background: var(--ink); }
.brand-mark i:nth-child(1) { width: 100%; background: var(--accent-text); }
.brand-mark i:nth-child(2) { width: 64%; }
.brand-mark i:nth-child(3) { width: 32%; }
.brand-name { font-size: 18px; font-weight: 900; letter-spacing: -0.03em; }
.top-nav { display: flex; gap: 24px; }
.top-nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700; }
.top-nav a:hover { color: var(--accent-text); }

/* ---------- Hero: title + game ---------- */
.hero { padding: 24px 0 48px; }
.hero-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; }
.hero h1 { font-size: 48px; }
.tagline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.tag-dot { flex: none; width: 12px; height: 12px; border-radius: var(--radius); background: var(--accent2); border: 2px solid var(--ink); }

.stage {
  position: relative;
  height: calc(var(--frame-h) + 4px); /* 2px border top and bottom: the game itself gets 790px */
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 0 var(--ink);
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.cover { position: absolute; inset: 0; background: var(--cover); }
.cover-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; opacity: 0.45; }
.cover-ui {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center;
}
.cover-card {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--ink); padding: 32px; max-width: 440px; width: 100%;
}
.cover-kicker {
  font-size: 14px; font-weight: 800; color: var(--ink);
  background: var(--accent2); border-radius: var(--radius); padding: 4px 12px;
}
.btn-play { min-height: 64px; padding: 16px 32px; font-size: 22px; font-weight: 900; width: 100%; }
.cover-sub { font-size: 14px; color: var(--muted); }

.loader {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: var(--bg);
  z-index: 2;
}
[data-gf-state] > .cover { display: none; }
[data-gf-state="loading"] > .loader { display: flex; }
.loader-board {
  display: flex; flex-direction: column; gap: 8px; width: 264px;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 12px;
}
.loader-board i {
  display: block; height: 12px; border-radius: var(--radius); background: var(--accent-text);
  transform-origin: left center; animation: fill 1.4s ease-in-out infinite;
}
.loader-board i:nth-child(1) { width: 100%; background: var(--accent); }
.loader-board i:nth-child(2) { width: 78%; animation-delay: 0.1s; }
.loader-board i:nth-child(3) { width: 50%; animation-delay: 0.2s; }
.loader-board i:nth-child(4) { width: 44%; animation-delay: 0.3s; }
.loader-board i:nth-child(5) { width: 33%; animation-delay: 0.4s; }
@keyframes fill { 0% { transform: scaleX(0.1); } 50% { transform: scaleX(1); } 100% { transform: scaleX(0.1); } }
.loader-text { font-size: 18px; font-weight: 800; color: var(--ink); }

.exit-fs { position: absolute; top: 12px; right: 12px; z-index: 3; }
.stage[data-gf-fs="1"] { height: 100vh; border-radius: 0; border: 0; box-shadow: none; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.btn-chip { font-size: 14px; }
.btn-chip[aria-pressed="true"], .btn-chip[data-gf-liked] { background: var(--accent2); }
.count:empty { display: none; }
.count { font-variant-numeric: tabular-nums; }
.share-msg { font-size: 14px; font-weight: 700; color: var(--accent-text); }
.ico { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; }
.ico-like { clip-path: polygon(50% 92%, 6% 46%, 6% 22%, 22% 8%, 38% 8%, 50% 22%, 62% 8%, 78% 8%, 94% 22%, 94% 46%); }
.ico-share { clip-path: polygon(50% 0, 88% 38%, 62% 38%, 62% 70%, 38% 70%, 38% 38%, 12% 38%); }
.ico-fs { background: none; border: 2px solid currentColor; }

/* ---------- Sections ---------- */
.sec { padding: 64px 0; border-top: 2px solid var(--line-page); }
.sec h2 { font-size: 36px; margin-bottom: 16px; }
.prose { max-width: 70ch; }
.prose p { margin: 0 0 16px; color: #2E271F; }
.prose p:last-child { margin-bottom: 0; }
.sub { font-size: 22px; margin-bottom: 16px; }

.split { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: center; }
.shot { margin: 0; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 12px; box-shadow: 0 4px 0 var(--ink); }
.shot img { border-radius: var(--radius); width: 100%; border: 2px solid var(--line); }
.shot figcaption { font-size: 14px; color: var(--muted); padding: 12px 4px 0; }

/* How to play */
.sec-how { background: var(--card); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 32px 0 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: 4px 16px; align-items: start; }
.step::before {
  content: counter(step); grid-row: 1 / span 2;
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  font-size: 22px; font-weight: 900; color: var(--ink);
  background: var(--accent2); border: 2px solid var(--ink); border-radius: var(--radius);
}
.step h3 { font-size: 18px; }
.step p { color: var(--muted); }

.how-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.ctrl-list { margin: 0 0 32px; display: flex; flex-direction: column; gap: 16px; }
.ctrl { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: baseline; }
.ctrl dt { margin: 0; }
.ctrl dd { margin: 0; color: var(--muted); }
.ctrl-key {
  display: inline-block; font-size: 14px; font-weight: 800; color: var(--ink);
  border: 2px solid var(--ink); border-bottom-width: 4px; border-radius: var(--radius); padding: 4px 8px; background: var(--well);
}
.shot-small { max-width: 320px; }

.scoring p { color: #2E271F; margin-bottom: 16px; }

/* Survey board: the one signature element */
.board { background: var(--well); border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px; box-shadow: 0 4px 0 var(--ink); }
.board-q { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; margin-bottom: 12px; color: var(--ink); }
.board-head, .board-row { display: grid; grid-template-columns: 4fr 5fr 2fr; gap: 12px; align-items: center; }
.board-head { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.04em; padding: 0 12px 8px; }
.board-head span:last-child, .b-pts { text-align: right; }
.board-row { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-top: 4px; }
.board-row:first-of-type { background: var(--accent2); border-color: var(--ink); }
.b-name { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 800; min-width: 0; }
.b-rank {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: var(--radius); background: var(--cover); font-size: 14px; font-weight: 800;
}
.board-row:first-of-type .b-rank { background: var(--ink); color: var(--accent2); }
.b-est { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.board-row:first-of-type .b-est { color: var(--ink); }
.b-track { flex: 1; height: 8px; background: var(--cover); border-radius: var(--radius); overflow: hidden; min-width: 48px; }
.b-track i { display: block; height: 100%; background: var(--accent-text); border-radius: var(--radius); }
.board-row:first-of-type .b-track { background: var(--card); }
.board-row:first-of-type .b-track i { background: var(--ink); }
.b-pts { font-size: 18px; font-weight: 900; }
.board-note { font-size: 14px; color: var(--muted); margin-top: 16px; }

/* Visitor questions: two-column grid */
.qa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 32px; }
.qa { background: var(--card); border: 2px solid var(--line-page); border-radius: var(--radius); padding: 24px; }
.qa h3 { font-size: 18px; margin-bottom: 8px; }
.qa p { color: var(--muted); margin: 0 0 12px; }
.qa p:last-child { margin-bottom: 0; }

/* Tips: numbered list beside the heading */
.tips-wrap { display: grid; grid-template-columns: 4fr 7fr; gap: 48px; align-items: start; }
.tips { list-style: none; counter-reset: tip; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; }
.tips li { counter-increment: tip; display: grid; grid-template-columns: 48px 1fr; gap: 4px 16px; }
.tips li::before {
  content: counter(tip, decimal-leading-zero); grid-row: 1 / span 2;
  font-size: 22px; font-weight: 900; color: var(--accent-text); letter-spacing: -0.04em;
}
.tips h3 { font-size: 18px; }
.tips p { color: var(--muted); }

/* FAQ: flat list, every question visible */
.faq { margin: 24px 0 0; }
.faq-item { padding: 24px 0; border-top: 2px solid var(--line-page); }
.faq-item:last-child { border-bottom: 2px solid var(--line-page); }
.faq dt { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.faq dd { margin: 0; color: var(--muted); }

/* Comments */
.sec-comments { background: var(--card); }
.c-form { display: flex; flex-direction: column; gap: 8px; margin: 24px 0 32px; }
.c-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.c-input {
  width: 100%; min-height: 44px; padding: 12px 16px; font: inherit; color: var(--ink);
  background: var(--well); border: 2px solid var(--line-strong); border-radius: var(--radius);
}
.c-input:focus { outline: 3px solid var(--ink); outline-offset: 3px; border-color: var(--ink); }
.c-text { resize: vertical; min-height: 96px; }
.c-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.c-msg { font-size: 14px; font-weight: 700; color: var(--accent-text); }
.c-rule { font-size: 12px; color: var(--muted); }
.c-reply-row { display: none; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--accent-text); }
[data-gf-replying] .c-reply-row { display: flex; }
.c-list, .c-replies { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.c-replies { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--line-page); }
.c-item { background: var(--well); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; }
.c-item[data-gf-owner] { border-color: var(--ink); }
.c-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 14px; }
.c-name { color: var(--ink); }
.c-time { color: var(--muted); font-size: 12px; }
.c-owner { display: none; font-size: 12px; font-weight: 800; color: var(--ink); background: var(--accent2); border-radius: var(--radius); padding: 0 8px; }
[data-gf-owner] > .c-meta .c-owner { display: inline-block; }
.c-to:empty { display: none; }
.c-to { font-size: 12px; color: var(--accent-text); margin-top: 4px; }
.c-body { margin-top: 8px; overflow-wrap: anywhere; white-space: pre-line; }
.c-reply { margin-top: 8px; background: none; border: 0; padding: 4px 0; color: var(--accent-text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.c-empty { display: none; color: var(--muted); font-size: 14px; border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; background: var(--well); }
[data-gf-comments][data-gf-empty] + .c-empty { display: block; }
[data-gf-comments][data-gf-off] ~ .c-empty { display: none; }

/* ---------- Footer ---------- */
.foot { border-top: 2px solid var(--line-page); padding: 48px 0 32px; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.foot-name { font-size: 18px; font-weight: 900; letter-spacing: -0.03em; margin-bottom: 8px; }
.foot-note { color: var(--muted); font-size: 14px; max-width: 48ch; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; align-content: flex-start; }
.foot-nav a { color: var(--ink); font-size: 14px; text-decoration: none; }
.foot-nav a:hover { color: var(--accent-text); text-decoration: underline; }
.foot-base { margin-top: 32px; font-size: 12px; color: var(--muted); }

/* ---------- Legal and contact pages ---------- */
.doc { padding: 48px 0 64px; }
.doc-kicker { font-size: 14px; font-weight: 800; color: var(--accent-text); margin-bottom: 8px; }
.doc h1 { font-size: 48px; margin-bottom: 8px; }
.doc-updated { font-size: 14px; color: var(--muted); margin-bottom: 32px; }
.doc-lead p { font-size: 18px; }
.doc-sec { padding-top: 32px; margin-top: 32px; border-top: 2px solid var(--line-page); }
.doc-sec h2 { font-size: 22px; margin-bottom: 12px; letter-spacing: -0.03em; }
.doc .prose ul { margin: 0 0 16px; padding-left: 24px; }
.doc .prose li { margin-bottom: 8px; color: #2E271F; }
.doc-back { margin-top: 48px; }
.mail { font-size: 18px; font-weight: 800; }

/* ---------- Embed page (the game inside the iframe) ---------- */
body.is-bare { background: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loader-board i { animation: none; }
  .btn { transition: none; }
  .btn:active { transform: none; box-shadow: 0 4px 0 var(--ink); }
  .btn-main:active { box-shadow: var(--lift); }
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top-row { min-height: 56px; }
  .top-nav { gap: 16px; }
  .hero { padding: 16px 0 32px; }
  .hero-head { margin-bottom: 12px; gap: 4px; }
  .hero h1 { font-size: 28px; }
  .tagline { align-items: flex-start; font-size: 12px; }
  .tag-dot { margin-top: 4px; width: 8px; height: 8px; border-width: 1px; }
  .stage {
    margin: 0 -16px;
    border-radius: 0; border-left: 0; border-right: 0; box-shadow: none;
    height: calc(100vh - 56px);
    height: calc(100svh - 56px);
    min-height: 560px; max-height: 760px;
  }
  .cover-card { padding: 24px 16px; }
  .cover-kicker { font-size: 12px; }
  .btn-play { font-size: 18px; }
  .actions .btn-chip { flex: 1; }
  .share-msg { width: 100%; }
  .sec { padding: 48px 0; }
  .sec h2 { font-size: 28px; }
  .split, .how-grid, .tips-wrap { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr; gap: 16px; margin: 24px 0 32px; }
  .qa-grid { grid-template-columns: 1fr; gap: 16px; }
  .qa { padding: 16px; }
  .ctrl { grid-template-columns: 1fr; gap: 4px; }
  .shot-small { max-width: 280px; margin: 0 auto; }
  .board { padding: 12px; }
  .board-head, .board-row { grid-template-columns: 5fr 4fr 2fr; gap: 8px; }
  .b-name { font-size: 16px; gap: 8px; }
  .b-est { gap: 8px; }
  .b-pts { font-size: 16px; }
  .c-send .btn-main { width: 100%; }
  .doc { padding: 32px 0 48px; }
  .doc h1 { font-size: 36px; }
}
