/* Brettspielquest static-site styles: theme tokens, responsive entry flow, result flow, and animations. */

/* Shared visual tokens. */
:root {
  --bg: #f1e7cc;
  --bg-deep: #d6b874;
  --surface: rgba(255, 250, 239, 0.92);
  --surface-strong: #fffaf0;
  --surface-dark: #193748;
  --text: #1b1f25;
  --muted: #5c5762;
  --line: rgba(28, 35, 46, 0.12);
  --gold: #d9a43b;
  --gold-deep: #a96f14;
  --teal: #1f6d77;
  --navy: #21324d;
  --crimson: #bb5645;
  --shadow: 0 26px 60px rgba(31, 31, 45, 0.16);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Bricolage Grotesque", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 220, 130, 0.65), transparent 24%),
    radial-gradient(circle at 80% 10%, rgba(53, 118, 132, 0.26), transparent 22%),
    radial-gradient(circle at 50% 110%, rgba(187, 86, 69, 0.22), transparent 28%),
    linear-gradient(180deg, #f7edd1 0%, #efdeba 46%, #e4cc97 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(rgba(33, 50, 77, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 50, 77, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.15));
}

body::after {
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.34), transparent 18%),
    radial-gradient(circle at 88% 24%, rgba(255, 255, 255, 0.18), transparent 16%);
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.card {
  position: relative;
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 38%);
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -5% -55% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 59, 0.22), transparent 68%);
  pointer-events: none;
}

/* Entry-page introduction and sticker presentation. */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 250, 239, 0.96), rgba(241, 223, 176, 0.92)),
    var(--surface);
}

.hero-copy,
.hero-art,
.result-copy {
  position: relative;
  z-index: 1;
}

.hero-art {
  display: grid;
  justify-items: center;
  gap: 18px;
  align-content: center;
}

.logo-plaque {
  justify-self: center;
  width: min(100%, 540px);
  padding: 20px;
  border-radius: 26px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(244, 228, 189, 0.95));
  border: 2px solid rgba(169, 111, 20, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 18px 36px rgba(54, 44, 15, 0.16);
}

.hero-logo {
  display: block;
  width: min(100%, 500px);
  margin: 0 auto;
  object-fit: contain;
}

.sticker-fan {
  position: relative;
  width: min(100%, 480px);
  min-height: 170px;
}

.sticker-fan img {
  position: absolute;
  width: clamp(110px, 26vw, 170px);
  filter: drop-shadow(0 16px 26px rgba(31, 31, 45, 0.22));
}

.sticker-fan img:nth-child(1) {
  left: 0;
  bottom: 0;
  transform: rotate(-14deg);
}

.sticker-fan img:nth-child(2) {
  left: 28%;
  top: 0;
  z-index: 2;
  transform: rotate(5deg);
}

.sticker-fan img:nth-child(3) {
  right: 2%;
  bottom: 4%;
  transform: rotate(14deg);
}

.eyebrow,
.game,
.section-note,
.hero-meta span,
.result-badge,
label span,
.score-value,
.result-flair {
  font-family: "IBM Plex Mono", monospace;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.92;
  color: var(--navy);
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--navy);
}

h3 {
  margin-bottom: 8px;
  color: var(--navy);
}

.lede,
.result-summary,
.result-panel p,
.challenge p,
.score-help {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.58;
}

.lede {
  font-size: 1.05rem;
}

.hero-copy {
  align-self: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.result-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid rgba(33, 50, 77, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(33, 50, 77, 0.08);
  font-size: 0.82rem;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-note {
  margin: 0;
  max-width: 28ch;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

/* Attribute explanation cards and score entry controls. */
.challenge-grid,
.score-grid,
.stats-strip,
.result-panel {
  display: grid;
  gap: 16px;
}

.challenge-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.challenge {
  position: relative;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(33, 50, 77, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 247, 231, 0.94));
}

.challenge::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 22px 0 0 22px;
  background: var(--accent, var(--gold));
}

.challenge-luck {
  --accent: #d98f2d;
}

.challenge-dexterity {
  --accent: #2a9db1;
}

.challenge-strategy {
  --accent: #725ad8;
}

.challenge-charisma {
  --accent: #d15f83;
}

.game {
  margin-bottom: 10px;
  color: var(--gold-deep);
  font-size: 0.88rem;
  text-transform: uppercase;
}

.form-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(249, 239, 214, 0.95));
}

.score-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.score-input {
  display: block;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(245, 233, 201, 0.96));
  border: 1px solid rgba(33, 50, 77, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.score-input > span:first-child {
  display: inline-block;
  margin-right: 8px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
}

.score-value {
  float: right;
  color: var(--teal);
  font-size: 1.1rem;
}

.score-input input[type="range"] {
  width: 100%;
  margin-top: 14px;
  accent-color: var(--teal);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
  box-shadow: 0 14px 28px rgba(33, 50, 77, 0.22);
}

.secondary-button,
.ghost-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid rgba(33, 50, 77, 0.1);
}

.result-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.36), transparent 20%),
    linear-gradient(160deg, rgba(26, 51, 70, 0.96), rgba(39, 73, 102, 0.94));
  color: #f8f1e2;
}

.result-card h2,
.result-card h3,
.result-card .eyebrow,
.result-card .result-badge,
.result-card .result-flair,
.result-card p {
  color: inherit;
}

.result-card .section-heading {
  margin-bottom: 22px;
}

.result-card .result-badge {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.result-figure {
  margin: 0;
  padding: 14px;
  border-radius: 26px;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.result-figure img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.24));
}

.result-summary {
  font-size: 1.04rem;
}

.result-flair {
  margin: 0;
  opacity: 0.9;
  letter-spacing: 0.02em;
}

.stats-strip {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 24px 0;
}

.stat-pill {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-pill strong,
.score-value {
  font-size: 1.15rem;
}

.stat-pill p {
  margin: 6px 0 0;
  color: rgba(248, 241, 226, 0.78);
}

.result-panel {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.result-card[data-theme="luck"] {
  background: linear-gradient(155deg, #5e2c19, #9e5b16 54%, #d2871a);
}

.result-card[data-theme="dexterity"] {
  background: linear-gradient(155deg, #143859, #1d6272 56%, #25a4a8);
}

.result-card[data-theme="strategy"] {
  background: linear-gradient(155deg, #302352, #4c3d8d 56%, #7760d6);
}

.result-card[data-theme="charisma"] {
  background: linear-gradient(155deg, #572343, #8f3f67 56%, #d7688e);
}

.result-card[data-theme="luck-strategy"] {
  background: linear-gradient(155deg, #43315b, #77511b 55%, #b48729);
}

.result-card[data-theme="luck-dexterity"] {
  background: linear-gradient(155deg, #18434c, #8e5520 56%, #dc9133);
}

.result-card[data-theme="strategy-charisma"] {
  background: linear-gradient(155deg, #352858, #6e3d7a 56%, #d2667b);
}

.result-card[data-theme="strategy-dexterity"] {
  background: linear-gradient(155deg, #1c4254, #36508c 56%, #72b2cc);
}

.result-card[data-theme="balanced"] {
  background: linear-gradient(155deg, #23485e, #51714d 50%, #c18d33 100%);
}

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

  .result-hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    justify-items: center;
  }

  .sticker-fan {
    min-height: 140px;
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 18px, 1180px);
    padding-top: 18px;
  }

  .card,
  .hero {
    padding: 20px;
  }

  .section-heading {
    flex-direction: column;
  }

  .section-note {
    max-width: none;
    text-align: left;
  }

  .sticker-fan img:nth-child(2) {
    left: 33%;
  }
}


.entry-page .result-card {
  display: none;
}

/* The spoiler-free roulette transition before the result page. */
.calculation-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  color: #fff8e8;
  background:
    radial-gradient(circle at center, rgba(49, 94, 108, 0.88), rgba(16, 30, 45, 0.98) 62%),
    #102034;
}

.calculation-overlay.is-visible {
  display: grid;
  animation: reveal-veil 220ms ease-out both;
}

.calculation-overlay .eyebrow,
.calculation-overlay h2,
.calculation-overlay p {
  position: relative;
  z-index: 1;
  color: inherit;
}

.calculation-overlay h2 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4.5rem);
}

.calculation-overlay p:last-child {
  max-width: 30rem;
  margin: 0;
  opacity: 0.84;
}

.calculation-orb {
  position: relative;
  width: 136px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 235, 173, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 0 13px rgba(217, 164, 59, 0.08), 0 0 70px rgba(217, 164, 59, 0.52);
  animation: quest-pulse 1.25s ease-in-out infinite;
}

.calculation-orb::before,
.calculation-orb::after,
.calculation-orb span {
  content: "";
  position: absolute;
  inset: 17%;
  border: 1px solid rgba(255, 235, 173, 0.6);
  border-radius: 50%;
}

.calculation-orb::before { animation: orbit 2.8s linear infinite; }
.calculation-orb::after { inset: 31%; background: var(--gold); box-shadow: 0 0 30px var(--gold); }
.calculation-orb span:nth-child(1) { inset: -10%; border-style: dashed; animation: orbit 4s linear infinite reverse; }
.calculation-orb span:nth-child(2) { inset: 6%; transform: rotateX(62deg); }
.calculation-orb span:nth-child(3) { inset: 6%; transform: rotateY(62deg); }

/* Result page: hide entry-only cards and reveal the collectible layout. */
.result-page .hero,
.result-page .card:not(.result-card):not(.recommendations-card) {
  display: none;
}

.result-page .shell {
  width: min(1080px, calc(100% - 28px));
  padding-top: clamp(28px, 6vw, 72px);
}

.result-page .result-card {
  min-height: calc(100vh - 112px);
  padding: clamp(26px, 5vw, 56px);
  animation: card-arrival 560ms 100ms both;
}

.result-page .result-hero {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
}

.result-page .result-figure {
  padding: clamp(12px, 2vw, 24px);
  background: radial-gradient(circle at 45% 28%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.04) 67%);
}

.result-page .result-figure img {
  max-height: 480px;
  animation: avatar-arrival 650ms 180ms both;
}

.radar-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(260px, 1fr);
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: rgba(8, 19, 34, 0.16);
}

.radar-panel h3 { margin-bottom: 0; }
.radar-chart { width: min(100%, 390px); justify-self: center; }
.radar-chart svg { display: block; width: 100%; overflow: visible; }
.radar-grid { fill: rgba(255, 255, 255, 0.025); stroke: rgba(255, 255, 255, 0.23); stroke-width: 0.45; }
.radar-axis { stroke: rgba(255, 255, 255, 0.28); stroke-width: 0.35; }
.radar-profile { fill: rgba(237, 192, 78, 0.38); stroke: #ffe09a; stroke-width: 1.1; }
.radar-point { fill: #fff7dd; stroke: #c98326; stroke-width: 0.7; }
.radar-label { fill: #fff7dd; font-family: "IBM Plex Mono", monospace; font-size: 4px; font-weight: 500; text-anchor: middle; dominant-baseline: middle; }

@keyframes reveal-veil { from { opacity: 0; } to { opacity: 1; } }
@keyframes quest-pulse { 50% { transform: scale(1.08); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes card-arrival { from { opacity: 0; transform: translateY(22px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes avatar-arrival { from { opacity: 0; transform: translateY(18px) scale(0.92); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
  .result-page .result-hero,
  .radar-panel { grid-template-columns: 1fr; }
  .radar-panel { text-align: center; }
  .result-page .result-card { min-height: calc(100vh - 54px); }
}


/* Quest roulette is isolated to the temporary calculation overlay. */
.roulette-machine {
  position: relative;
  width: min(360px, 88vw);
  padding: 9px;
  border: 2px solid rgba(255, 226, 151, 0.76);
  border-radius: 22px;
  background: linear-gradient(145deg, #152b40, #274c59);
  box-shadow: 0 0 0 8px rgba(217, 164, 59, 0.12), 0 22px 44px rgba(0, 0, 0, 0.3);
}

.roulette-window {
  height: 136px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(4, 13, 23, 0.58);
}

.roulette-track {
  display: grid;
  gap: 8px;
  padding: 8px 0;
  will-change: transform;
}

.roulette-track.is-spinning {
  animation: quest-roulette 2.72s cubic-bezier(0.13, 0.78, 0.16, 1) forwards;
}

.roulette-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 10px;
  height: 120px;
  padding: 6px 13px 6px 8px;
  border: 1px solid rgba(255, 240, 196, 0.2);
  border-radius: 12px;
  color: #fff5d8;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
  font-weight: 800;
  text-align: left;
}

.roulette-card img {
  width: 88px;
  height: 106px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3));
}

.roulette-pointer {
  position: absolute;
  z-index: 2;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-right: 11px solid transparent;
  border-left: 11px solid transparent;
}

.roulette-pointer-top { top: -2px; border-top: 14px solid #ffe09a; }
.roulette-pointer-bottom { bottom: -2px; border-bottom: 14px solid #ffe09a; }

@keyframes quest-roulette {
  from { transform: translateY(0); }
  to { transform: translateY(var(--roulette-stop)); }
}


/* Overall-time picker; Speed is visual only and never selects a class. */
.speed-card {
  background:
    radial-gradient(circle at 88% 20%, rgba(75, 136, 106, 0.16), transparent 25%),
    linear-gradient(180deg, rgba(247, 251, 237, 0.9), rgba(227, 240, 213, 0.94));
}

.speed-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

.speed-input {
  padding: 22px;
  border-color: rgba(55, 104, 79, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 250, 0.98), rgba(235, 245, 224, 0.96));
}


.time-lock {
  max-width: 560px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid rgba(55, 104, 79, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(28, 63, 58, 0.96), rgba(47, 92, 78, 0.96)),
    var(--surface-dark);
  color: #f8f2df;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 32px rgba(32, 64, 46, 0.14);
}

.time-lock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.time-lock-header > span { font-size: 0.82rem; }
.time-lock .score-value { float: none; color: #ffe39c; font-size: 1.1rem; }

.dial-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(10px, 4vw, 24px);
  margin: 22px 0 18px;
}

.time-dial {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 244, 210, 0.22);
  border-radius: 18px;
  background: rgba(7, 24, 22, 0.36);
}

.time-dial output {
  min-width: 2.25ch;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(3rem, 10vw, 4.6rem);
  font-weight: 500;
  line-height: 0.92;
  color: #fff6de;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.time-dial > span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.dial-button {
  width: 100%;
  padding: 4px 14px;
  border: 1px solid rgba(255, 244, 210, 0.2);
  border-radius: 9px;
  color: #fff7e0;
  background: rgba(255, 255, 255, 0.1);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.1rem;
  line-height: 1;
}

.dial-button:hover { background: rgba(255, 226, 154, 0.2); }
.dial-button:active { transform: translateY(1px) scale(0.97); }

.time-separator {
  align-self: center;
  padding-bottom: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  color: #ffe39c;
}

.time-lock .score-help {
  margin: 0;
  color: rgba(255, 248, 227, 0.78);
}


.wheel-picker {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(10px, 4vw, 24px);
  margin: 22px 0 18px;
}

.wheel-column {
  position: relative;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.wheel-column::after {
  content: "";
  position: absolute;
  right: 7px;
  left: 7px;
  top: calc(50% + 10px);
  height: 52px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 230, 154, 0.52);
  border-radius: 10px;
  background: rgba(255, 230, 154, 0.08);
  box-shadow: 0 0 18px rgba(255, 226, 154, 0.12);
  pointer-events: none;
}

.wheel-unit {
  position: relative;
  z-index: 1;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.wheel-window {
  position: relative;
  z-index: 1;
  display: grid;
  height: 156px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  scroll-snap-type: y mandatory;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}

.wheel-window::-webkit-scrollbar { display: none; }
.wheel-spacer, .wheel-option { height: 52px; }
.wheel-spacer { display: block; scroll-snap-align: center; }

.wheel-option {
  width: 100%;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 246, 222, 0.38);
  background: transparent;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(2.4rem, 9vw, 4rem);
  font-weight: 500;
  line-height: 52px;
  scroll-snap-align: center;
  transition: color 140ms ease, transform 140ms ease;
}

.wheel-option.is-selected {
  color: #fff6de;
  transform: scale(1.04);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.wheel-picker .time-separator {
  padding: 22px 0 0;
}


.calculation-overlay.is-visible.is-arriving {
  animation: landing-shift 900ms ease forwards;
}

.roulette-track.is-spinning {
  animation: quest-roulette 4.35s cubic-bezier(0.08, 0.76, 0.16, 1) forwards;
}

@keyframes landing-shift {
  from { filter: saturate(1) brightness(1); }
  to { filter: saturate(1.25) brightness(1.18) sepia(0.12); }
}


.roulette-track.is-spinning {
  animation: quest-roulette 8s cubic-bezier(0.12, 0.64, 0.24, 1) forwards;
}


/* BasGame Novelties recommendation tiles. */
.recommendation-panel {
  padding: 2px 0;
}

.recommendation-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recommendation-list li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-left: 3px solid rgba(255, 224, 154, 0.76);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.09);
}

.recommendation-list strong {
  color: #fff6de;
}

.recommendation-list span {
  color: rgba(248, 241, 226, 0.78);
  font-size: 0.9rem;
}


.result-copy .recommendation-panel {
  margin-top: 22px;
}

.recommendation-intro {
  margin-bottom: 10px;
  color: #fff6de;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.5;
}


.result-copy,
.result-copy .result-flair,
.result-copy .recommendation-intro {
  font-family: "Bricolage Grotesque", sans-serif;
}

.recommendation-list {
  grid-template-columns: repeat(auto-fit, minmax(120px, 180px));
  justify-content: start;
  gap: 12px;
}

.recommendation-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.recommendation-list img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
}


.site-brand {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  margin: 0 auto 22px;
}

.site-brand .logo-plaque {
  width: 100%;
}


.score-input-luck, .stat-luck { --stat-accent: #d98f2d; }
.score-input-dexterity, .stat-dexterity { --stat-accent: #2a9db1; }
.score-input-strategy, .stat-strategy { --stat-accent: #725ad8; }
.score-input-charisma, .stat-charisma { --stat-accent: #d15f83; }
.speed-input, .stat-speed { --stat-accent: #4b886a; }

.score-input[class*="score-input-"] {
  border-color: color-mix(in srgb, var(--stat-accent) 32%, white);
}

.score-input[class*="score-input-"] .score-value {
  color: var(--stat-accent);
}

.score-input[class*="score-input-"] input[type="range"] {
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--stat-accent) 0 var(--range-fill), #efe4c8 var(--range-fill) 100%);
  accent-color: var(--stat-accent);
}

.score-input[class*="score-input-"] input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--stat-accent) 0 var(--range-fill), #efe4c8 var(--range-fill) 100%);
}

.score-input[class*="score-input-"] input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border: 3px solid #fffdf7;
  border-radius: 50%;
  background: var(--stat-accent);
  box-shadow: 0 2px 5px rgba(33, 50, 77, 0.25);
}

.score-input[class*="score-input-"] input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--stat-accent) 0 var(--range-fill), #efe4c8 var(--range-fill) 100%);
}

.score-input[class*="score-input-"] input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #fffdf7;
  border-radius: 50%;
  background: var(--stat-accent);
  box-shadow: 0 2px 5px rgba(33, 50, 77, 0.25);
}

.stat-pill[class*="stat-"] {
  border-color: color-mix(in srgb, var(--stat-accent) 50%, transparent);
  background: color-mix(in srgb, var(--stat-accent) 18%, transparent);
}

.stat-pill[class*="stat-"] strong {
  color: color-mix(in srgb, var(--stat-accent) 70%, white);
}

/* Keep score entry cards neutral, using the stat colour only as a quest-map edge. */
.score-input[class*="score-input-"] {
  position: relative;
  overflow: hidden;
  padding-left: 20px;
  border-color: rgba(33, 50, 77, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 247, 231, 0.94));
}

.score-input[class*="score-input-"]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 22px 0 0 22px;
  background: var(--stat-accent);
}

.radar-point:nth-of-type(1) { fill: #d98f2d; }
.radar-point:nth-of-type(2) { fill: #2a9db1; }
.radar-point:nth-of-type(3) { fill: #725ad8; }
.radar-point:nth-of-type(4) { fill: #d15f83; }
.radar-point:nth-of-type(5) { fill: #4b886a; }

/* Result stats use the same warm card language as the challenge descriptions. */
.stat-pill[class*="stat-"] {
  position: relative;
  overflow: hidden;
  padding-left: 20px;
  border-color: rgba(33, 50, 77, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 247, 231, 0.94));
}

.stat-pill[class*="stat-"]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 18px 0 0 18px;
  background: var(--stat-accent);
}

.stat-pill[class*="stat-"] strong { color: var(--navy); }
.stat-pill[class*="stat-"] p { color: var(--muted); }

.result-page .recommendations-card {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 34px);
  color: #fff6de;
  background: linear-gradient(145deg, #183752, #102338);
}

.result-page .recommendations-card .recommendation-intro {
  margin-top: 0;
  font-size: 1rem;
}
