:root {
  --canopy-night: #071b12;
  --canopy-deep: #123c2a;
  --canopy-leaf: #2f6a3e;
  --canopy-moss: #78a74e;
  --canopy-lime: #bed45a;
  --canopy-sun: #f2c65c;
  --canopy-clay: #b6602b;
  --canopy-bark: #4a2d1b;
  --canopy-mist: #d9e4c2;
  --canopy-cream: #fff4d1;
}

*,
*::before,
*::after {
  border-radius: 0 !important;
}

body {
  background: var(--canopy-night);
}

.canopy-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem);
  color: var(--canopy-cream);
  background:
    radial-gradient(circle at 50% 5%, rgba(190, 212, 90, 0.22), transparent 26%),
    linear-gradient(180deg, #1d5736 0%, #0f3424 38%, #071b12 100%);
}

.canopy-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.26;
  background-image:
    linear-gradient(115deg, transparent 45%, rgba(217, 228, 194, 0.18) 46%, transparent 48%),
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(3, 18, 10, 0.2) 79px 81px);
}

.canopy-hero__mist {
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: 2%;
  left: -8%;
  height: 33%;
  background:
    radial-gradient(ellipse at 18% 70%, rgba(217, 228, 194, 0.15), transparent 42%),
    radial-gradient(ellipse at 74% 60%, rgba(217, 228, 194, 0.12), transparent 40%);
  filter: blur(10px);
  pointer-events: none;
}

.canopy-hero__vines {
  position: absolute;
  top: -10px;
  z-index: -1;
  width: clamp(90px, 15vw, 180px);
  height: min(62vh, 520px);
  opacity: 0.85;
  filter: drop-shadow(7px 12px 8px rgba(0, 0, 0, 0.25));
  pointer-events: none;
}

.canopy-hero__vines--left {
  left: 0;
}

.canopy-hero__vines--right {
  right: 0;
}

.canopy-hero__inner {
  position: relative;
  z-index: 1;
}

.canopy-hero__copy {
  margin: 0 auto clamp(1.75rem, 4vw, 3rem);
  max-width: 760px;
  text-align: center;
}

.canopy-kicker {
  margin: 0 0 0.6rem;
  color: var(--canopy-lime);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.canopy-hero h1 {
  margin-bottom: 0.75rem;
  color: var(--canopy-cream);
  font-size: clamp(2.9rem, 9vw, 6.75rem);
  letter-spacing: -0.065em;
  line-height: 0.88;
  text-shadow: 0 5px 0 #132b1d, 0 11px 22px rgba(0, 0, 0, 0.35);
}

.canopy-hero h1 span {
  color: var(--canopy-sun);
}

.canopy-hero__copy > p:last-child {
  margin: 0 auto;
  max-width: 58ch;
  color: #dce8cc;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.canopy-game {
  position: relative;
  margin: 0 auto;
  padding: 0;
  max-width: 1000px;
  overflow: hidden;
  border: 4px solid #050f0a;
  background: #e8deba;
  color: #172419;
  box-shadow: 0 18px 0 #06150d, 0 28px 52px rgba(0, 0, 0, 0.42);
}

.canopy-game::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.canopy-game__topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 12px 20px;
  gap: 1rem;
  border-bottom: 4px solid #050f0a;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.11), transparent 30%),
    var(--canopy-bark);
  color: var(--canopy-cream);
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.08), inset 0 -6px 0 rgba(0, 0, 0, 0.18);
}

.canopy-game__topline > div:first-child {
  display: grid;
}

.canopy-game__eyebrow,
.canopy-game__mini-balance span {
  color: #d5bf87;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.canopy-game__mini-balance {
  display: grid;
  min-width: 128px;
  padding-left: 18px;
  border-left: 2px solid rgba(255, 244, 209, 0.2);
  text-align: right;
}

.canopy-game__mini-balance strong {
  color: var(--canopy-sun);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.canopy-game__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.75fr);
  min-height: 590px;
}

.wheel-zone {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: clamp(3.8rem, 7vw, 5rem) clamp(1.25rem, 4vw, 3rem) 2rem;
  overflow: hidden;
  border-right: 4px solid #050f0a;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 50%, transparent 50%) 0 0 / 32px 32px,
    linear-gradient(rgba(255, 255, 255, 0.035) 50%, transparent 50%) 0 0 / 32px 32px,
    radial-gradient(circle, #315d3d 0%, #183d29 67%, #0d2a1d 100%);
}

.wheel-zone::before,
.wheel-zone::after {
  content: "";
  position: absolute;
  bottom: 17px;
  width: 96px;
  height: 116px;
  opacity: 0.4;
  background:
    linear-gradient(67deg, transparent 46%, #73a34d 47% 53%, transparent 54%),
    linear-gradient(-67deg, transparent 46%, #73a34d 47% 53%, transparent 54%);
  pointer-events: none;
}

.wheel-zone::before {
  left: -15px;
}

.wheel-zone::after {
  right: -15px;
  transform: scaleX(-1);
}

.wheel-pointer {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 5;
  width: clamp(56px, 10vw, 82px);
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 3px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.wheel-pointer svg {
  display: block;
  width: 100%;
}

.wheel-stage {
  position: relative;
  z-index: 2;
  width: min(100%, 510px);
  aspect-ratio: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.wheel-stage:focus-visible {
  outline-color: var(--canopy-sun);
  outline-offset: 8px;
}

.wheel-stage.is-disabled {
  cursor: wait;
}

.wheel-rim {
  width: 100%;
  height: 100%;
  padding: 3.2%;
  border: clamp(9px, 2vw, 15px) solid #3c2918;
  background:
    repeating-conic-gradient(from 0deg, #d3a052 0deg 8deg, #70421f 8deg 16deg);
  box-shadow:
    inset 0 0 0 7px #e8b964,
    inset 0 0 0 13px #4c2f1a,
    0 17px 0 #06170e,
    0 25px 28px rgba(0, 0, 0, 0.5);
}

.wheel {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  will-change: transform;
}

.wheel.is-spinning {
  transition: transform 5.2s cubic-bezier(0.12, 0.64, 0.08, 1);
}

.wheel-segment {
  stroke: #26391f;
  stroke-width: 5;
}

.wheel-segment__shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.23);
  stroke-width: 8;
  pointer-events: none;
}

.wheel-label {
  fill: #fff7d8;
  stroke: rgba(25, 24, 13, 0.48);
  stroke-width: 5px;
  paint-order: stroke fill;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1px;
  text-anchor: middle;
}

.wheel-label--dark {
  fill: #13281a;
  stroke: rgba(255, 244, 209, 0.25);
}

.wheel-zone__hint {
  position: relative;
  z-index: 3;
  margin: 2rem 0 0;
  color: #bad2ae;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.expedition-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background:
    linear-gradient(rgba(75, 45, 26, 0.07) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(135deg, #f1e7c8, #d6c798);
  box-shadow: inset 9px 0 15px rgba(40, 28, 15, 0.13);
}

.tribal-mask {
  width: 94px;
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 8px 3px rgba(58, 38, 20, 0.34));
}

.tribal-mask svg {
  display: block;
  width: 100%;
}

.canopy-bet {
  display: block;
  margin-bottom: 1rem;
}

.canopy-bet label {
  display: block;
  margin-bottom: 0.45rem;
  color: #304329;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.canopy-bet__stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.canopy-bet select {
  min-width: 0;
  width: 100%;
  height: 48px;
  padding: 0 8px;
  border: solid #243620;
  border-width: 2px 0;
  background: #fff9e7;
  color: #172419;
  text-align: center;
}

.canopy-bet__button {
  min-width: 44px;
  min-height: 48px;
  border: 2px solid #243620;
  background: #5c7b3e;
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.12), inset 0 -5px 0 rgba(0, 0, 0, 0.18);
}

.canopy-bet__button:hover {
  background: #466730;
}

.spin-button {
  position: relative;
  width: 100%;
  min-height: 76px;
  padding: 12px 14px 15px;
  border: 3px solid #44250f;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 34%),
    var(--canopy-clay);
  color: #fff9e9;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 -8px 0 #75401e, 0 7px 0 #352115;
  text-shadow: 0 2px 0 #623419;
}

.spin-button:hover {
  background-color: #ce7535;
}

.spin-button:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: inset 0 -5px 0 #75401e, 0 3px 0 #352115;
}

.spin-button small {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.spin-button:disabled,
.canopy-bet__button:disabled,
.canopy-bet select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.round-result {
  min-height: 83px;
  margin-top: 1.25rem;
  padding: 12px 14px;
  border: 2px solid #657250;
  background: rgba(255, 252, 231, 0.7);
  box-shadow: inset 0 0 0 3px rgba(101, 114, 80, 0.1);
}

.round-result__label {
  display: block;
  color: #657250;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.round-result strong {
  display: block;
  margin-top: 4px;
  color: #20341f;
  font-size: 1rem;
  line-height: 1.35;
}

.round-result.is-win {
  border-color: #93701c;
  background: #fff0a8;
}

.canopy-game__disclaimer {
  margin: 0.9rem 0 0;
  color: #5d604d;
  font-size: 0.74rem;
  line-height: 1.35;
  text-align: center;
}

.canopy-info {
  color: #172419;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(47, 106, 62, 0.05) 50%, transparent 50.2%) 0 0 / 44px 44px,
    var(--canopy-mist);
  border-top: 4px solid #050f0a;
}

.canopy-info__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
}

.canopy-rules,
.field-note {
  margin: 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 3px solid #172419;
  background: #fff8df;
  box-shadow: 8px 8px 0 rgba(23, 36, 25, 0.16);
}

.canopy-rules .canopy-kicker,
.field-note .canopy-kicker {
  color: #4f7132;
}

.canopy-rules h2,
.field-note h2 {
  color: #173923;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.canopy-rules ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  counter-reset: trail;
}

.canopy-rules li {
  position: relative;
  padding: 3.2rem 1rem 0 0;
  counter-increment: trail;
}

.canopy-rules li::before {
  content: "0" counter(trail);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--canopy-clay);
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 900;
}

.canopy-rules li + li {
  padding-left: 1rem;
  border-left: 2px solid #d6cda8;
}

.canopy-rules li + li::before {
  left: 1rem;
}

.canopy-rules li strong,
.canopy-rules li span {
  display: block;
}

.canopy-rules li span {
  margin-top: 0.35rem;
  color: #596153;
  font-size: 0.88rem;
}

.canopy-rules > p:last-child,
.field-note p {
  color: #475047;
  font-size: 0.95rem;
}

.field-note {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.5rem;
  background: #c9dc82;
}

.field-note__number {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 104px;
  padding: 1rem;
  border-right: 3px solid #172419;
  color: #173923;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.reset-button {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 2px solid #172419;
  background: transparent;
  color: #172419;
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
}

.reset-button:hover {
  background: rgba(255, 255, 255, 0.35);
}

.age-band {
  border-top: 0;
  background: #102b1f;
}

.age-band p {
  color: #e4edda;
}

.age-band a {
  color: #dce98f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.age-band a:hover {
  color: #fff4d1;
}

.site-footer {
  border-top-color: #06150d;
}

.site-footer .brand,
.site-footer .footer-nav a {
  color: var(--ink);
}

.footer-meta {
  max-width: none;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.noscript-note {
  margin: 2rem auto 0;
  max-width: 1000px;
  color: #2b2412;
}

@media (max-width: 860px) {
  .canopy-game__layout {
    grid-template-columns: 1fr;
  }

  .wheel-zone {
    min-height: 580px;
    border-right: 0;
    border-bottom: 4px solid #050f0a;
  }

  .expedition-panel {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 1rem 1.5rem;
  }

  .tribal-mask {
    grid-row: span 3;
    width: 82px;
    margin: 0;
  }

  .canopy-bet,
  .round-result {
    margin: 0;
  }

  .canopy-game__disclaimer {
    grid-column: 2;
  }

  .canopy-info__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .canopy-hero {
    padding-top: 2rem;
  }

  .canopy-hero__vines {
    opacity: 0.4;
  }

  .canopy-game {
    width: calc(100% + 1rem);
    margin-left: -0.5rem;
    border-width: 3px;
  }

  .canopy-game__topline {
    padding-inline: 14px;
  }

  .canopy-game__mini-balance {
    min-width: 100px;
  }

  .wheel-zone {
    min-height: auto;
    padding: 3.9rem 0.85rem 1.5rem;
  }

  .wheel-pointer {
    top: 8px;
  }

  .wheel-zone__hint {
    margin-top: 1.5rem;
  }

  .expedition-panel {
    display: block;
    padding: 1.35rem;
  }

  .tribal-mask {
    width: 72px;
    margin: 0 auto 1rem;
  }

  .canopy-bet,
  .round-result {
    margin-bottom: 1rem;
  }

  .canopy-game__disclaimer {
    margin-top: 1rem;
  }

  .canopy-rules ol {
    grid-template-columns: 1fr;
  }

  .canopy-rules li {
    min-height: 78px;
    padding: 0 0 1rem 3.5rem;
  }

  .canopy-rules li::before {
    top: -0.25rem;
  }

  .canopy-rules li + li {
    padding-top: 1rem;
    padding-left: 3.5rem;
    border-top: 2px solid #d6cda8;
    border-left: 0;
  }

  .canopy-rules li + li::before {
    top: 0.7rem;
    left: 0;
  }

  .field-note {
    grid-template-columns: 1fr;
  }

  .field-note__number {
    min-width: 0;
    border-right: 0;
    border-bottom: 3px solid #172419;
    writing-mode: initial;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wheel.is-spinning {
    transition-duration: 1.2s;
    transition-timing-function: ease-out;
  }
}
