/* Wonderhop Unlimited — original design
   Palette drawn from the official pixel-art dusk seascape (peach sky, teal
   sea, navy abyss) but reassembled into our own composition: a single
   "horizon card" hero instead of the official's four stacked mode panels. */

:root {
  --sky-top: #f6dcb6;
  --sky-mid: #ecb183;
  --sky-low: #d9835f;
  --sea-top: #1f5d6b;
  --sea-mid: #12344d;
  --sea-deep: #0a1f33;
  --abyss: #091a2c;
  --cream: #f0e4c8;
  --cream-ink: #4a3a1f;
  --abyss-blue: #1b3b6f;
  --amber: #caa23c;
  --ink: #152436;
  --ink-soft: #3d5064;
  --paper: #fbf6ec;
  --line: rgba(10, 30, 45, 0.14);
  --radius: 14px;
  --font-display: "Futura PT", "Century Gothic", "Segoe UI", system-ui, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a { color: var(--sea-top); }
a:hover { color: var(--sky-low); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  background: linear-gradient(180deg, #16314a, #0e2236);
  border-bottom: 3px solid var(--amber);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
}

.brand-mark { display: inline-flex; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.35)); }

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
  color: var(--cream);
}

.brand-accent {
  color: var(--amber);
  font-weight: 700;
  margin-left: 4px;
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(240, 228, 200, 0.14);
  color: var(--amber);
}

/* ---------- Hero / Game shell ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-low) 78%, var(--sea-top) 100%);
  padding-bottom: 50px;
}

.hero-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.sun {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6df, #f6cf86 55%, #ecab6b 85%);
  box-shadow: 0 0 60px rgba(246, 207, 134, 0.6);
  opacity: 0.9;
}

.cloud {
  position: absolute;
  background: rgba(255, 250, 240, 0.55);
  border-radius: 40px;
  filter: blur(1px);
}
.cloud-a { width: 140px; height: 26px; top: 70px; left: 8%; }
.cloud-b { width: 100px; height: 20px; top: 120px; right: 10%; }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 20px 0;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2.4px;
  color: var(--sea-mid);
  margin: 0 0 10px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  margin: 0 0 14px;
  color: var(--sea-deep);
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--ink);
  max-width: 640px;
  margin: 0 auto 10px;
}

.version-line {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 26px;
}

/* game shell card */

.game-shell {
  background: rgba(251, 246, 236, 0.92);
  border: 2px solid rgba(10, 30, 45, 0.25);
  border-radius: 18px;
  padding: 22px 22px 26px;
  box-shadow: 0 18px 40px rgba(9, 26, 44, 0.28);
  backdrop-filter: blur(2px);
  text-align: left;
}

.shell-note {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-align: center;
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.mode-btn {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.5px;
  border: 2px solid rgba(10, 30, 45, 0.3);
  border-radius: 12px;
  padding: 12px 8px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mode-btn:hover { transform: translateY(-2px); }
.mode-btn[aria-selected="true"] { box-shadow: inset 0 0 0 3px rgba(255,255,255,0.5); }

.mode-icon { font-size: 0.9rem; }

.mode-sky { background: var(--cream); color: var(--cream-ink); }
.mode-abyss { background: var(--abyss-blue); color: var(--cream); }
.mode-daily { background: var(--amber); color: #3a2a06; }

.game-root {
  background: #fff;
  border: 1px dashed rgba(10, 30, 45, 0.25);
  border-radius: 12px;
  padding: 20px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.wh-question {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  max-width: 480px;
}

.wh-timer {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--sea-top);
  background: var(--cream);
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--amber);
}

.wh-form { width: 100%; max-width: 420px; }

.wh-input {
  width: 100%;
  font-size: 1.05rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid rgba(10, 30, 45, 0.3);
  outline-offset: 2px;
}

.wh-input:focus { border-color: var(--sea-top); }

.wh-feedback {
  font-size: 0.95rem;
  color: var(--ink-soft);
  min-height: 1.4em;
}

.wh-rating {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 0.95rem;
  color: var(--abyss-blue);
  min-height: 1.4em;
}

.helper-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.helper-btn {
  background: transparent;
  border: 2px solid var(--sea-mid);
  color: var(--sea-mid);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.helper-btn:hover { background: var(--sea-mid); color: var(--cream); }

.wave-divider {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 50px;
  display: block;
}

/* ---------- Content bands ---------- */

.content-band { padding: 56px 20px; }

.sea-band { background: linear-gradient(180deg, var(--sea-mid), var(--sea-top)); color: var(--cream); }
.abyss-band { background: linear-gradient(180deg, var(--sea-deep), var(--abyss)); color: var(--cream); }

.content-inner { max-width: 760px; margin: 0 auto; }

.content-band h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--amber);
  margin: 0 0 18px;
  letter-spacing: 0.3px;
}

.content-band p { margin: 0 0 14px; color: rgba(251, 246, 236, 0.92); }

.content-band a { color: #ffd98a; font-weight: 600; }
.content-band a:hover { color: #fff; }

/* link cards */

.link-cards-band { padding-top: 42px; padding-bottom: 42px; }

.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(240, 228, 200, 0.08);
  border: 1px solid rgba(240, 228, 200, 0.3);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: var(--cream);
  transition: transform 0.15s ease, background 0.15s ease;
}

.link-card:hover {
  transform: translateY(-4px);
  background: rgba(240, 228, 200, 0.16);
}

.link-card-icon {
  font-size: 1.3rem;
  color: var(--amber);
}

.link-card-title {
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: #fff;
}

.link-card-desc {
  font-size: 0.88rem;
  color: rgba(240, 228, 200, 0.75);
}

/* compare table */

.table-wrap { overflow-x: auto; margin-bottom: 14px; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(251, 246, 236, 0.06);
  border-radius: 12px;
  overflow: hidden;
  min-width: 480px;
}

.compare-table th, .compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(240, 228, 200, 0.18);
  color: rgba(251, 246, 236, 0.92);
  font-size: 0.95rem;
}

.compare-table th {
  font-family: var(--font-display);
  color: var(--amber);
  font-size: 0.82rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  font-family: var(--font-display);
}

.tag-sky { background: var(--cream); color: var(--cream-ink); }
.tag-abyss { background: var(--abyss-blue); color: var(--cream); }
.tag-daily { background: var(--amber); color: #3a2a06; }

.table-note {
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(251, 246, 236, 0.7) !important;
}

/* FAQ */

.faq-band h2 { color: var(--amber); }

.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
  background: rgba(240, 228, 200, 0.07);
  border: 1px solid rgba(240, 228, 200, 0.22);
  border-radius: 10px;
  padding: 12px 16px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::before {
  content: "+";
  color: var(--amber);
  display: inline-block;
  width: 1.2em;
  font-weight: 800;
}

.faq-item[open] summary::before { content: "–"; }

.faq-item p {
  margin: 10px 0 0 1.2em;
  color: rgba(251, 246, 236, 0.88);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--abyss);
  color: rgba(240, 228, 200, 0.75);
  padding: 30px 20px;
  border-top: 3px solid var(--amber);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.footer-nav a:hover { color: var(--amber); }

.footer-disclaimer, .footer-source {
  font-size: 0.82rem;
  margin: 4px auto;
  max-width: 620px;
  line-height: 1.5;
}

.footer-source a { color: var(--amber); }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-nav { width: 100%; justify-content: flex-start; }
  .mode-row { grid-template-columns: 1fr; }
  .compare-table { min-width: 0; }
}

/* ---------- Game internals (mounted inside .game-root) ---------- */

.wh-start { text-align: center; }
.wh-start-text { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 16px; }
.wh-start-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.wh-btn {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.4px;
  border: 2px solid rgba(10, 30, 45, 0.3);
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  background: var(--sea-mid);
  color: var(--cream);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.wh-btn:hover { transform: translateY(-2px); }

.wh-start-btn { min-width: 120px; }
.wh-start-btn:nth-child(1) { background: var(--cream); color: var(--cream-ink); }
.wh-start-btn:nth-child(2) { background: var(--abyss-blue); color: var(--cream); }
.wh-start-btn:nth-child(3) { background: var(--amber); color: #3a2a06; }

.wh-qhead {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.wh-qnum { font-weight: 700; color: var(--ink-soft); font-size: 0.85rem; }
.wh-mode-tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--abyss-blue);
}

.wh-meter {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sea-top), var(--abyss));
  margin: 4px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}
.wh-meter-sky { background: linear-gradient(90deg, var(--sea-top), var(--sky-mid)); }
.wh-meter-top, .wh-meter-bottom {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(251, 246, 236, 0.9);
}
.wh-meter-marker {
  position: absolute;
  left: 8px;
  bottom: auto;
  top: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid #fff;
  transition: left 0.4s ease;
}

.wh-feedback.wh-miss { color: #b3402e; font-weight: 600; }

.wh-rating-perfect { color: var(--amber); text-shadow: 0 1px 0 #7a5c10; }
.wh-rating-excellent { color: #2f8f5b; }
.wh-rating-great { color: var(--abyss-blue); }
.wh-rating-ok { color: var(--ink-soft); }
.wh-rating-weak { color: #b3402e; }
.wh-rating-timeout { color: #b3402e; }

.wh-reveal {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: left;
  width: 100%;
  max-width: 420px;
}
.wh-reveal li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.wh-reveal li.is-hit { color: var(--ink); font-weight: 700; }

.wh-form { display: flex; gap: 8px; }
.wh-submit { white-space: nowrap; }

.wh-aux { display: flex; gap: 10px; margin-top: 4px; }
.wh-give, .wh-quit {
  background: transparent;
  color: var(--ink-soft);
  border-color: rgba(10, 30, 45, 0.2);
  font-size: 0.8rem;
  padding: 6px 12px;
}
.wh-next { margin-top: 10px; }

.wh-end-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink);
}
.wh-end-list {
  text-align: left;
  font-size: 0.88rem;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0;
  padding-left: 1.2em;
}
.wh-end-item { padding: 3px 0; }
.wh-end-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.wh-share { background: var(--amber); color: #3a2a06; }
.wh-back { background: transparent; color: var(--ink-soft); }

/* answers page */
.wh-ans-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.wh-ans-item {
  background: rgba(240, 228, 200, 0.07);
  border: 1px solid rgba(240, 228, 200, 0.22);
  border-radius: 10px;
  padding: 14px 16px;
}
.wh-ans-q { font-weight: 700; color: #fff; margin: 0 0 8px; }
.wh-ans-box { font-size: 0.95rem; }
.wh-ans-box.is-hidden .wh-ans-top { filter: blur(7px); user-select: none; pointer-events: none; }
.wh-ans-top { margin: 0 0 10px; padding-left: 1.2em; color: rgba(251, 246, 236, 0.92); transition: filter 0.2s ease; }
.wh-ans-reveal {
  font-size: 0.82rem;
  font-weight: 700;
  background: transparent;
  border: 1px solid rgba(240, 228, 200, 0.4);
  color: var(--cream);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
}
.wh-ans-reveal:hover { border-color: var(--amber); color: var(--amber); }

@media (max-width: 640px) {
  .wh-qhead { justify-content: center; }
  .wh-form { flex-direction: column; }
}

/* breadcrumb */
.breadcrumb {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 0.82rem;
  background: #0e2236;
}
.breadcrumb a { color: rgba(240, 228, 200, 0.8); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb span { color: rgba(240, 228, 200, 0.55); }

/* answers page — details-based spoiler items */
.wh-ans-item summary.wh-ans-q {
  cursor: pointer;
  list-style: none;
}
.wh-ans-item summary.wh-ans-q::-webkit-details-marker { display: none; }
.wh-ans-item summary.wh-ans-q::before {
  content: "+";
  color: var(--amber);
  display: inline-block;
  width: 1.2em;
  font-weight: 800;
}
.wh-ans-item[open] summary.wh-ans-q::before { content: "–"; }
.wh-ans-item .wh-ans-top { margin: 8px 0 0 1.2em; }
