:root {
  --ink: #f3f8fb;
  --muted: #9eb5c7;
  --gold: #ffe100;
  --gold-light: #fff5a4;
  --navy: #001328;
  --blue: #063862;
  --line: rgba(122, 172, 207, 0.35);
  --red: #d52b1e;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--navy);
  font-family: "Sora", sans-serif;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 76% 20%, rgba(255, 225, 0, 0.16), transparent 28rem),
    radial-gradient(circle at 15% 85%, rgba(20, 123, 167, 0.28), transparent 32rem),
    linear-gradient(140deg, #06345b 0%, var(--navy) 62%);
}
body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.3;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.wiphala { display: flex; height: 7px; }
.wiphala span { flex: 1; }
.wiphala span:nth-child(1) { background: #d82b2b; }
.wiphala span:nth-child(2) { background: #f2762e; }
.wiphala span:nth-child(3) { background: #f7c631; }
.wiphala span:nth-child(4) { background: #f5f2ec; }
.wiphala span:nth-child(5) { background: #3fa54a; }
.wiphala span:nth-child(6) { background: #2e6fd0; }
.wiphala span:nth-child(7) { background: #8c4fa0; }
.roulette-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.roulette-header { display: flex; align-items: center; justify-content: space-between; padding: 26px 0; border-bottom: 1px solid var(--line); }
.brand-link { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand-link img { width: 120px; height: auto; padding: 5px 9px; border: 1px solid rgba(255,225,0,.4); border-radius: 7px; background: white; }
.brand-link span { display: grid; gap: 3px; }
.brand-link small { color: var(--gold); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; }
.brand-link strong { font-family: "Alfa Slab One", serif; font-size: 1.45rem; font-weight: 400; }
.back-link, .map-link { color: var(--gold-light); font-size: .75rem; font-weight: 700; text-decoration: none; }
.back-link:hover, .map-link:hover { color: white; }
.roulette-main { padding: clamp(46px, 8vw, 92px) 0 70px; }
.intro { max-width: 680px; margin-bottom: 44px; }
.eyebrow, .panel-kicker, .result-label { color: var(--gold); font-size: .7rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.intro h1 { margin: 9px 0 14px; color: var(--gold-light); font-family: "Alfa Slab One", serif; font-size: clamp(2.8rem, 7vw, 5.8rem); font-weight: 400; line-height: .98; text-shadow: 0 7px 26px rgba(255,225,0,.13); }
.intro p:last-child { max-width: 55ch; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.game-layout { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(300px, .68fr); gap: clamp(30px, 7vw, 100px); align-items: center; }
.wheel-stage { position: relative; display: grid; place-items: center; min-height: 570px; }
.wheel-stage::before { position: absolute; width: min(74%, 430px); aspect-ratio: 1; border: 1px solid rgba(255,225,0,.24); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,225,0,.025), 0 0 80px rgba(0,0,0,.32); content: ""; }
.pointer { position: absolute; z-index: 4; top: 3%; width: 0; height: 0; border-right: 20px solid transparent; border-left: 20px solid transparent; border-top: 47px solid var(--gold-light); filter: drop-shadow(0 5px 5px rgba(0,0,0,.45)); }
.wheel { position: relative; width: min(74vw, 500px); aspect-ratio: 1; border: 14px solid #09223c; border-radius: 50%; background: #23415a; box-shadow: 0 22px 0 #00101f, 0 32px 58px rgba(0,0,0,.42), inset 0 0 0 3px rgba(255,255,255,.45); transition: transform 5.4s cubic-bezier(.12,.7,.08,1); }
.wheel::after { position: absolute; inset: 6%; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; content: ""; }
.wheel-label {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 24%;
  color: #001328;
  font-size: clamp(.62rem, 1.2vw, .82rem);
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(0deg) translateY(calc(-1 * min(37vw, 185px))) rotate(0deg);
  text-shadow: 0 0 4px rgba(255,255,255,.7);
}
.wheel-label .wl-name {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 1px 4px;
  background: rgba(255,255,255,.85);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.wheel-label small {
  display: block;
  font-size: .48em;
  letter-spacing: .04em;
  opacity: .7;
}
[data-count] .wheel-label { font-size: clamp(.55rem, 1.1vw, .75rem); }
[data-count] .wheel-label .wl-name { padding: 1px 3px; }
[data-count="9"] .wheel-label,
[data-count="10"] .wheel-label { font-size: clamp(.48rem, 1vw, .68rem); }
.label-1 { transform: translate(-50%, -50%) rotate(0deg) translateY(calc(-1 * min(37vw, 185px))) rotate(0deg); }
.label-2 { transform: translate(-50%, -50%) rotate(45deg) translateY(calc(-1 * min(37vw, 185px))) rotate(-45deg); }
.label-3 { transform: translate(-50%, -50%) rotate(90deg) translateY(calc(-1 * min(37vw, 185px))) rotate(-90deg); }
.label-4 { transform: translate(-50%, -50%) rotate(135deg) translateY(calc(-1 * min(37vw, 185px))) rotate(-135deg); }
.label-5 { transform: translate(-50%, -50%) rotate(180deg) translateY(calc(-1 * min(37vw, 185px))) rotate(-180deg); }
.label-6 { transform: translate(-50%, -50%) rotate(225deg) translateY(calc(-1 * min(37vw, 185px))) rotate(-225deg); }
.label-7 { transform: translate(-50%, -50%) rotate(270deg) translateY(calc(-1 * min(37vw, 185px))) rotate(-270deg); }
.label-8 { transform: translate(-50%, -50%) rotate(315deg) translateY(calc(-1 * min(37vw, 185px))) rotate(-315deg); }
.wheel-center { position: absolute; z-index: 3; top: 50%; left: 50%; display: grid; width: 26%; aspect-ratio: 1; place-content: center; border: 5px solid var(--gold-light); border-radius: 50%; background: var(--navy); box-shadow: 0 5px 15px rgba(0,0,0,.4); text-align: center; transform: translate(-50%, -50%); }
.wheel-center span { color: var(--gold); font-family: "Alfa Slab One", serif; font-size: clamp(.75rem, 2vw, 1.15rem); }
.wheel-center b { color: var(--ink); font-size: .58rem; letter-spacing: .2em; }
.game-panel { padding: clamp(24px, 4vw, 44px); border-left: 1px solid var(--line); }
.game-panel h2 { margin: 11px 0 13px; font-family: "Alfa Slab One", serif; font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 400; }
.panel-copy { max-width: 38ch; margin: 0 0 28px; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.spin-button { border: 1px solid var(--gold); border-radius: 10px; padding: 15px 20px; color: #001328; background: linear-gradient(180deg, #fff15e, #e6b900); box-shadow: 0 12px 24px rgba(0,0,0,.24); cursor: pointer; font: 800 .82rem "Sora", sans-serif; transition: transform .2s, box-shadow .2s; }
.spin-button span { display: inline-block; margin-right: 7px; font-size: 1.2rem; vertical-align: -2px; }
.spin-button:hover { box-shadow: 0 15px 30px rgba(0,0,0,.32); transform: translateY(-2px); }
.spin-button:disabled { cursor: wait; opacity: .65; }
.status { min-height: 22px; margin: 16px 0; color: var(--muted); font-size: .75rem; }
.result { margin: 20px 0 28px; padding: 19px; border: 1px solid rgba(255,225,0,.5); border-radius: 10px; background: rgba(255,225,0,.08); animation: reveal .35s ease both; }
.result strong { display: block; margin-top: 7px; color: var(--gold-light); font-family: "Alfa Slab One", serif; font-size: 1.45rem; font-weight: 400; }
.result p { margin: 7px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.map-link { display: inline-block; margin-top: 24px; }
.map-link span { margin-left: 7px; font-size: 1.1rem; }
.roulette-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; letter-spacing: .04em; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 800px) { .game-layout { grid-template-columns: 1fr; } .wheel-stage { min-height: 460px; } .game-panel { border-top: 1px solid var(--line); border-left: 0; } }
@media (max-width: 520px) { .roulette-shell { width: min(100% - 28px, 1180px); } .roulette-header { align-items: flex-start; flex-direction: column; gap: 18px; } .wheel-stage { min-height: 360px; } .pointer { top: 2%; border-right-width: 15px; border-left-width: 15px; border-top-width: 36px; } .roulette-footer { flex-direction: column; } }
