@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito+Sans:wght@500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --ink: #f8f4e8;
  --muted: #aeb7bd;
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(18, 21, 27, 0.88);
  --panel-strong: #151820;
  --paper: #f8f4e8;
  --red: #ee5e55;
  --cyan: #4dc9d8;
  --yellow: #ffd35a;
  --green: #61c781;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --font-display: "Fredoka", "Trebuchet MS", "Arial Rounded MT Bold", sans-serif;
  --font-body: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #101319;
  background-size: 34px 34px;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  font-family: var(--font-display);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(16, 19, 25, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border: 3px solid #151820;
  border-radius: 50% 50% 46% 48%;
  background: linear-gradient(135deg, var(--yellow) 0 38%, var(--cyan) 38% 67%, var(--red) 67% 100%);
  box-shadow: 0 0 0 2px var(--paper);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.top-nav a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  align-items: center;
  gap: clamp(28px, 5vw, 68px);
  min-height: calc(100vh - 68px);
  padding: clamp(26px, 5vw, 68px) clamp(18px, 4vw, 56px) clamp(40px, 6vw, 76px);
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0;
  line-height: 0.98;
}

h1 {
  max-width: 10ch;
  font-size: clamp(4rem, 12vw, 9rem);
}

h2 {
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 4.4rem);
}

.hero-text {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.hero-support {
  max-width: 560px;
  margin: 14px 0 0;
  color: rgba(248, 244, 232, 0.72);
  font-size: 0.98rem;
  line-height: 1.55;
}

.hero-actions,
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  letter-spacing: 0.01em;
  font-weight: 800;
  cursor: pointer;
}

.primary-action {
  background: var(--yellow);
  color: #151820;
  box-shadow: 0 10px 28px rgba(255, 211, 90, 0.22);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid var(--line);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.game-panel {
  width: 100%;
  max-width: 780px;
  margin-left: auto;
  padding: clamp(16px, 3vw, 24px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.score-strip > div {
  position: relative;
  min-height: 72px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
}

.score-strip strong {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.score-pop {
  border-color: rgba(255, 211, 90, 0.7) !important;
  box-shadow: 0 0 0 2px rgba(255, 211, 90, 0.18), 0 18px 34px rgba(255, 211, 90, 0.16);
  transform: translateY(-2px);
}

.score-delta {
  position: absolute;
  right: 14px;
  top: 14px;
  color: var(--yellow);
  font-size: 0.92rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.score-delta.visible {
  opacity: 1;
  transform: translateY(0);
}

.stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.toon-card {
  min-height: 300px;
  padding: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toon-card p {
  min-height: 44px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.toon-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 240px);
  aspect-ratio: 1;
  margin: 12px auto 0;
  border: 8px solid rgba(248, 244, 232, 0.92);
  border-radius: 48% 52% 45% 55%;
  background: var(--toon-color, hsl(180 70% 62%));
  box-shadow:
    inset -16px -18px 0 rgba(0, 0, 0, 0.12),
    inset 15px 16px 0 rgba(255, 255, 255, 0.18);
  transition: background-color 0.18s ease, filter 0.18s ease;
}

.toon-avatar::before,
.toon-avatar::after {
  content: "";
  position: absolute;
  top: 28%;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #101319;
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.28);
}

.toon-avatar::before {
  left: 28%;
}

.toon-avatar::after {
  right: 28%;
}

.toon-face {
  position: absolute;
  bottom: 27%;
  width: 33%;
  height: 16%;
  border-bottom: 7px solid #101319;
  border-radius: 50%;
}

.target-hidden {
  filter: grayscale(1) brightness(0.28);
}

.target-hidden::before,
.target-hidden::after,
.target-hidden .toon-face {
  opacity: 0.35;
}

.controls {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.controls label {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.controls span {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}

.result-panel {
  margin-top: 18px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255, 211, 90, 0.12), rgba(77, 201, 216, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.result-panel.is-hidden {
  display: none;
}

.game-hint {
  margin: 18px 0 0;
  color: rgba(248, 244, 232, 0.68);
  font-size: 0.98rem;
  line-height: 1.5;
}

.result-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.result-head strong {
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  line-height: 1;
}

.result-meta {
  margin-top: 10px;
}

.result-meta p {
  margin: 0;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 0.88rem;
  font-family: var(--font-display);
  font-weight: 800;
}

.score-badge.neutral {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(248, 244, 232, 0.82);
}

.score-badge.high {
  background: rgba(97, 199, 129, 0.18);
  color: #8ef0ab;
}

.score-badge.mid {
  background: rgba(255, 211, 90, 0.18);
  color: #ffe28a;
}

.score-badge.low {
  background: rgba(238, 94, 85, 0.18);
  color: #ff9d95;
}

#scoreBreakdown {
  margin-top: 10px;
  color: rgba(248, 244, 232, 0.76);
  line-height: 1.6;
}

.result-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.swatch-card {
  padding: 14px;
  background: rgba(16, 19, 25, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.result-swatch {
  width: 100%;
  height: 78px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--toon-color, rgba(255, 255, 255, 0.08));
}

.swatch-card p {
  margin: 10px 0 0;
  color: rgba(248, 244, 232, 0.76);
  font-size: 0.95rem;
}

.info-band {
  padding: clamp(46px, 8vw, 96px) clamp(18px, 4vw, 56px);
  background: #151a22;
  color: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.alt-band {
  background: #1a212c;
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-lead {
  max-width: 840px;
  margin: 18px 0 0;
  color: rgba(248, 244, 232, 0.74);
  font-size: 1.08rem;
  line-height: 1.7;
}

.intro-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.content-stack {
  display: grid;
  gap: 16px;
}

.copy-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.copy-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.25;
}

.copy-card p {
  margin: 0 0 12px;
  color: rgba(248, 244, 232, 0.74);
  line-height: 1.7;
}

.copy-card p:last-child {
  margin-bottom: 0;
}

.info-band .eyebrow {
  color: var(--cyan);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.rule-grid article,
.faq-list details {
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.rule-grid p,
.split p,
.faq-list p {
  color: rgba(248, 244, 232, 0.74);
  line-height: 1.6;
}

.rule-grid strong,
.faq-list summary,
.copy-card h3,
.info-band h2 {
  color: var(--ink);
}

.split {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 440px);
  gap: clamp(24px, 5vw, 60px);
  align-items: start;
}

.split p {
  margin: 0;
  font-size: 1.12rem;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

summary {
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: start;
  padding: 30px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: grid;
  gap: 10px;
}

.footer-brand strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.footer-brand p {
  max-width: 44ch;
  margin: 0;
  color: inherit;
  line-height: 1.6;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-title {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.footer-column a {
  color: var(--ink);
  font-family: var(--font-display);
  opacity: 0.82;
}

.footer-column a:hover {
  opacity: 1;
}

.policy-page .site-footer {
  margin-top: 32px;
  background: rgba(21, 24, 32, 0.92);
  color: rgba(248, 244, 232, 0.72);
  border-top: 0;
}

.policy-page .footer-column a,
.policy-page .footer-brand strong {
  color: var(--paper);
  opacity: 0.82;
}

.policy-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #f7f3e8 0%, #f2f7f6 100%);
  color: #151820;
}

.policy-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 18px 72px;
}

.policy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.policy-intro,
.policy-aside,
.policy-card {
  border: 1px solid rgba(21, 24, 32, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(16, 19, 25, 0.08);
}

.policy-intro {
  padding: clamp(24px, 4vw, 36px);
}

.policy-aside {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.policy-aside strong {
  color: #151820;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.policy-aside p,
.policy-aside li {
  margin: 0;
  color: rgba(21, 24, 32, 0.72);
  line-height: 1.6;
}

.policy-aside ul {
  margin: 0;
  padding-left: 18px;
}

.policy-card {
  padding: clamp(24px, 3vw, 34px);
}

.policy-intro h1,
.policy-card h1 {
  max-width: none;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.95;
}

.policy-intro h1 {
  margin-top: 6px;
}

.policy-card h2 {
  margin-top: 32px;
  max-width: none;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  line-height: 1.2;
}

.policy-intro p {
  margin: 0;
  color: rgba(21, 24, 32, 0.76);
  line-height: 1.7;
}

.policy-card p,
.policy-card li {
  color: rgba(21, 24, 32, 0.78);
  line-height: 1.7;
}

.policy-card ul {
  padding-left: 18px;
}

.policy-meta {
  margin: 16px 0 0;
  color: rgba(21, 24, 32, 0.56);
}

.policy-summary {
  margin-top: 18px;
  font-size: 1.05rem;
}

.policy-sections {
  display: grid;
  gap: 16px;
}

.policy-section {
  padding: 22px;
  border: 1px solid rgba(21, 24, 32, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.policy-section h2 {
  margin-top: 0;
}

.policy-email {
  color: #151820;
  font-size: 1.12rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .game-panel {
    max-width: none;
  }

  .rule-grid,
  .split,
  .intro-grid,
  .article-grid,
  .policy-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.9rem;
  }

  h1 {
    font-size: clamp(3.5rem, 22vw, 5.8rem);
  }

  .stage,
  .score-strip,
  .result-swatches {
    grid-template-columns: 1fr;
  }

  .toon-card {
    min-height: 250px;
  }

  .toon-avatar {
    max-width: 190px;
  }

  .controls label {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }
}
