:root {
  --green: #165936;
  --green-deep: #0a2118;
  --orange: #fe8c06;
  --cream: #fff5e3;
  --cream-dim: rgba(255, 245, 227, 0.62);
  --line: rgba(255, 245, 227, 0.22);
  --mono: "Space Mono", ui-monospace, monospace;
  --display: "Sour Gummy", "Trebuchet MS", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--cream);
  font-family: var(--display);
  background:
    radial-gradient(54% 44% at 52% 34%, rgba(254, 199, 116, 0.3) 0%, rgba(254, 140, 6, 0.08) 44%, transparent 74%),
    radial-gradient(120% 95% at 50% 42%, #2b5a41 0%, #15432e 42%, #0a2118 74%, #06150f 100%);
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.14'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

#scene {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  filter: saturate(1.07) contrast(1.02);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(48% 42% at 0% 100%, rgba(6, 21, 15, 0.62) 0%, rgba(6, 21, 15, 0.24) 46%, transparent 74%),
    radial-gradient(32% 26% at 100% 100%, rgba(6, 21, 15, 0.3) 0%, transparent 72%);
}

.brand,
.tagline,
.hint,
.controls,
.variant-nav,
.settings {
  z-index: 2;
}

.variant-nav {
  position: fixed;
  top: clamp(20px, 3vw, 40px);
  right: clamp(20px, 3.4vw, 52px);
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 33, 24, 0.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.variant-nav a {
  padding: 7px 13px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream-dim);
  transition: background 160ms ease, color 160ms ease;
}

.variant-nav a:hover {
  color: var(--cream);
}

.variant-nav a[aria-current="page"] {
  background: var(--cream);
  color: var(--green-deep);
}

.variant-nav a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.settings {
  position: fixed;
  top: calc(clamp(20px, 3vw, 40px) + 47px);
  right: clamp(20px, 3.4vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.settings__button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 33, 24, 0.46);
  color: var(--cream);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.settings__button:hover {
  border-color: rgba(255, 245, 227, 0.55);
  background: rgba(22, 89, 54, 0.6);
}

.settings__button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.settings__button[aria-expanded="true"] {
  border-color: var(--cream);
  background: var(--cream);
  color: var(--green-deep);
}

.settings__button svg {
  width: 16px;
  height: 16px;
}

.settings__panel {
  width: 236px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 13px 14px 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 33, 24, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.settings__panel[hidden] {
  display: none;
}

.settings__title {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}

.settings__title--sub {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 245, 227, 0.1);
}

.settings__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.settings__row + .settings__row {
  border-top: 1px solid rgba(255, 245, 227, 0.1);
}

.settings__name {
  color: var(--cream);
}

.settings__value {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
}

.settings__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 245, 227, 0.18);
  transition: background 180ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cream);
  transition: transform 180ms ease;
}

.settings__input:checked + .switch {
  background: var(--orange);
}

.settings__input:checked + .switch::after {
  transform: translateX(16px);
}

.settings__input:focus-visible + .switch {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.settings__row--stack {
  flex-wrap: wrap;
  row-gap: 9px;
}

.settings__range {
  flex: 0 0 100%;
  width: 100%;
  height: 14px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.settings__range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 245, 227, 0.22);
}

.settings__range::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px rgba(10, 33, 24, 0.9);
  -webkit-appearance: none;
  appearance: none;
}

.settings__range::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 245, 227, 0.22);
}

.settings__range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px rgba(10, 33, 24, 0.9);
}

.settings__range:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  border-radius: 999px;
}

.settings__color {
  flex: 0 0 34px;
  width: 34px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.settings__color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.settings__color::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.settings__color::-moz-color-swatch {
  border: 0;
  border-radius: 999px;
}

.settings__color:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

#scene:active {
  cursor: grabbing;
}

.brand {
  position: fixed;
  top: clamp(20px, 3vw, 40px);
  left: clamp(20px, 3.4vw, 52px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 20px);
  pointer-events: none;
}

.brand__logo {
  width: clamp(92px, 10vw, 146px);
  height: auto;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.35));
}

.brand__meta {
  padding-left: clamp(12px, 1.4vw, 20px);
  border-left: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}

.brand h1 {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.brand h1 span {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.tagline {
  position: fixed;
  left: clamp(20px, 3.4vw, 52px);
  bottom: clamp(62px, 7vw, 96px);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cream);
  pointer-events: none;
}

.tagline__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 14px rgba(254, 140, 6, 0.9);
}

.hint {
  position: fixed;
  left: clamp(20px, 3.4vw, 52px);
  bottom: clamp(24px, 3vw, 38px);
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
  pointer-events: none;
}

.hint span {
  margin: 0 4px;
  color: var(--orange);
}

.controls {
  position: fixed;
  right: clamp(20px, 3.4vw, 52px);
  bottom: clamp(20px, 3vw, 38px);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: calc(100vw - 40px);
}

.pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 33, 24, 0.42);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.pill:hover {
  border-color: rgba(255, 245, 227, 0.55);
  background: rgba(22, 89, 54, 0.6);
}

.pill:active {
  transform: translateY(1px);
}

.pill:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px rgba(254, 140, 6, 0.8);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.pill[aria-pressed="false"] .pill__dot {
  background: rgba(255, 245, 227, 0.3);
  box-shadow: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: #081c14;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader img {
  width: min(240px, 46vw);
  height: auto;
  animation: bob 2.4s ease-in-out infinite;
}

.loader p {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.loader__dots::after {
  content: "…";
  display: inline-block;
  animation: dots 1.4s steps(4, end) infinite;
  width: 1.2em;
  text-align: left;
  color: var(--orange);
}

.fallback {
  position: fixed;
  inset: auto 20px 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cream);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "·"; }
  50% { content: "··"; }
  75% { content: "···"; }
}

@media (max-width: 720px) {
  .brand__meta {
    display: none;
  }

  .brand__logo {
    width: 104px;
  }

  .hint {
    display: none;
  }

  .tagline {
    bottom: 82px;
  }

  .controls {
    gap: 6px;
  }

  .pill {
    padding: 10px 13px;
  }

  .settings {
    top: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader img,
  .loader__dots::after {
    animation: none;
  }

  .pill,
  .switch,
  .switch::after {
    transition: none;
  }
}

/* ---------- Peras customiser ---------- */

.panel-toggle {
  position: fixed;
  top: clamp(20px, 3vw, 40px);
  right: clamp(20px, 3.4vw, 52px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 33, 24, 0.46);
  color: var(--cream);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.panel-toggle:hover {
  border-color: rgba(255, 245, 227, 0.55);
  background: rgba(22, 89, 54, 0.6);
}

.panel-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.panel-toggle[aria-expanded="true"] {
  border-color: var(--cream);
  background: var(--cream);
  color: var(--green-deep);
}

.panel-toggle svg {
  width: 17px;
  height: 17px;
}

.panel {
  position: fixed;
  top: calc(clamp(20px, 3vw, 40px) + 50px);
  right: clamp(20px, 3.4vw, 52px);
  z-index: 3;
  width: 302px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 27, 19, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.panel[hidden] {
  display: none;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px 16px;
  border-bottom: 1px solid rgba(255, 245, 227, 0.1);
}

.panel__title {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
}

.panel__close {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 245, 227, 0.1);
  color: var(--cream);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.panel__close:hover {
  background: rgba(255, 245, 227, 0.2);
}

.panel__close:focus-visible,
.swatch:focus-visible,
.segmented button:focus-visible,
.panel__reset:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.panel__body {
  padding: 4px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.panel__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 0 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}

.panel__label span {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--cream-dim);
}

.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 245, 227, 0.08);
}

.color-row__name {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.color-row__swatches {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 245, 227, 0.28);
  border-radius: 50%;
  background: var(--swatch, transparent);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

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

.swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--green-deep), 0 0 0 3px var(--cream);
}

.swatch--custom {
  border-radius: 7px;
  background: transparent;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.swatch--custom::-webkit-color-swatch-wrapper {
  padding: 0;
}

.swatch--custom::-webkit-color-swatch {
  border: 0;
  border-radius: 6px;
}

.swatch--custom::-moz-color-swatch {
  border: 0;
  border-radius: 6px;
}

.panel__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 245, 227, 0.08);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.panel__row--stack {
  flex-wrap: wrap;
  row-gap: 9px;
}

.panel__row-name {
  color: var(--cream);
}

.panel__value {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
}

.panel__check {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.panel__check:checked + .switch {
  background: var(--orange);
}

.panel__check:checked + .switch::after {
  transform: translateX(16px);
}

.panel__check:focus-visible + .switch {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.segmented {
  display: flex;
  gap: 3px;
  width: 100%;
  padding: 3px;
  border: 1px solid rgba(255, 245, 227, 0.14);
  border-radius: 999px;
  background: rgba(255, 245, 227, 0.06);
}

.segmented button {
  flex: 1;
  padding: 6px 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.segmented button:hover {
  color: var(--cream);
}

.segmented button[aria-pressed="true"] {
  background: var(--cream);
  color: var(--green-deep);
}

.field {
  display: block;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 245, 227, 0.08);
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.field__input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 245, 227, 0.18);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.field__input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.panel__reset {
  width: 100%;
  margin-top: 14px;
  padding: 9px;
  border: 1px solid rgba(255, 245, 227, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.panel__reset:hover {
  border-color: var(--cream);
  color: var(--cream);
}

/* ---------- Hotspots ---------- */

.hotspots {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hotspots[hidden] {
  display: none;
}

.hotspot {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cream);
  pointer-events: auto;
  cursor: pointer;
  transform-origin: center;
  transition: opacity 220ms ease;
  will-change: transform;
}

.hotspot--left {
  flex-direction: row-reverse;
}

.hotspot__dot {
  position: relative;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px rgba(255, 245, 227, 0.7), 0 6px 14px rgba(0, 0, 0, 0.4);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.hotspot__dot::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 245, 227, 0.45);
  animation: hotspot-ripple 2.8s ease-out infinite;
}

.hotspot__label {
  padding: 5px 9px;
  border: 1px solid rgba(255, 245, 227, 0.2);
  border-radius: 999px;
  background: rgba(8, 27, 19, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: hotspot-pulse 4.2s ease-in-out infinite;
  transition: opacity 160ms ease;
}

.hotspot:hover .hotspot__dot,
.hotspot:focus-visible .hotspot__dot {
  transform: scale(1.7);
  box-shadow: 0 0 0 3px rgba(255, 245, 227, 0.9), 0 8px 22px rgba(0, 0, 0, 0.5);
}

.hotspot:hover .hotspot__label,
.hotspot:focus-visible .hotspot__label {
  animation: none;
  opacity: 1;
}

.hotspot:focus-visible {
  outline: none;
}

.hotspot.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes hotspot-pulse {
  0%, 100% { opacity: 0.32; }
  46%, 62% { opacity: 1; }
}

@keyframes hotspot-ripple {
  0% { transform: scale(0.7); opacity: 0.7; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- Detail card ---------- */

.detail {
  position: fixed;
  left: clamp(20px, 3.4vw, 52px);
  bottom: clamp(108px, 13vw, 150px);
  z-index: 3;
  width: min(340px, calc(100vw - 40px));
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 27, 19, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42);
  animation: detail-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.detail[hidden] {
  display: none;
}

.detail__close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px 15px;
  border: 1px solid rgba(254, 140, 6, 0.55);
  border-radius: 999px;
  background: rgba(254, 140, 6, 0.14);
  color: var(--orange);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.detail__close:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #0a2118;
  transform: translateX(-2px);
}

.detail__close:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.detail__kicker {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.detail__title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.05;
}

.detail__body {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 245, 227, 0.78);
}

.detail__tip {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255, 245, 227, 0.42);
}

@keyframes detail-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .panel-toggle {
    top: 20px;
    right: 20px;
    width: 34px;
    height: 34px;
  }

  .panel {
    top: 64px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 88px);
  }

  .detail {
    left: 16px;
    right: 16px;
    bottom: 92px;
    width: auto;
  }

  .hotspot__label {
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hotspot__label {
    animation: none;
    opacity: 1;
  }

  .hotspot__dot::before {
    animation: none;
  }

  .detail {
    animation: none;
  }
}
