:root {
  --bg: #100c07;
  --bg-soft: #19110a;
  --panel: rgba(18, 12, 8, 0.72);
  --panel-strong: rgba(28, 19, 11, 0.9);
  --text: #f5e9d2;
  --muted: #c8ad79;
  --gold: #d7b15c;
  --gold-soft: rgba(215, 177, 92, 0.18);
  --orange: #ff824a;
  --line: rgba(215, 177, 92, 0.22);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 130, 74, 0.08), transparent 32%),
    radial-gradient(1200px 700px at 50% 0%, rgba(215, 177, 92, 0.12), transparent 65%),
    var(--bg);
  color: var(--text);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(320px, 1.4fr) minmax(180px, auto);
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 12, 7, 0.96), rgba(16, 12, 7, 0.82));
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-emoji {
  font-size: 1.9rem;
  line-height: 1;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand-subtitle {
  margin-top: 0.14rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-start;
}

.tab-button {
  border: 1px solid rgba(215, 177, 92, 0.2);
  background: rgba(25, 17, 10, 0.82);
  color: var(--text);
  border-radius: 999px;
  padding: 0.68rem 1rem;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.tab-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 130, 74, 0.42);
  background: rgba(35, 24, 13, 0.92);
}

.tab-button.is-active {
  color: #100c07;
  background: linear-gradient(180deg, #f0d189, #c9922d);
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(215, 177, 92, 0.28);
}

.wallet-zone {
  display: flex;
  justify-content: flex-end;
}

.wallet-button {
  min-width: 160px;
  border: 1px solid rgba(215, 177, 92, 0.38);
  background: linear-gradient(180deg, rgba(40, 27, 14, 0.96), rgba(20, 14, 8, 0.96));
  color: var(--gold);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: transform 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.wallet-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 130, 74, 0.58);
  color: #ffd995;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
}

.wallet-button.is-connected {
  color: #130d08;
  background: linear-gradient(180deg, #f2da9a, #d09a33);
  border-color: transparent;
}

.main-stage {
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.hero-map {
  position: relative;
  min-height: clamp(560px, 72vh, 900px);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-map__image-wrap {
  position: absolute;
  inset: 0;
}

.hero-map__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 130, 74, 0.08), transparent 58%),
    #050403;
}

.hero-map__image-wrap {
  position: relative;
  inset: auto;
  z-index: 0;
  width: min(1280px, 100%);
  aspect-ratio: 3 / 2;
  margin-inline: auto;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(215, 177, 92, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 18px 48px rgba(0, 0, 0, 0.4),
    0 0 36px rgba(255, 130, 74, 0.1);
  background:
    radial-gradient(circle at 50% 50%, rgba(215, 177, 92, 0.09), transparent 60%),
    rgba(7, 5, 4, 0.96);
}

.hero-map__markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.checkpoint-fireworks-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.checkpoint-fireworks-layer:not(.is-active) {
  display: none;
}

.checkpoint-firework-rocket {
  position: absolute;
  left: calc(var(--startX) * 1%);
  top: calc(var(--startY) * 1%);
  opacity: 0;
}

.checkpoint-firework-arc {
  position: relative;
  width: 1px;
  height: 1px;
}

.checkpoint-firework-trail-dot {
  position: absolute;
  left: 50%;
  top: 86%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.95),
    0 0 18px rgba(250, 204, 21, 0.74);
  filter: blur(1.1px);
  transform: translateX(-50%);
}

.checkpoint-firework-trail {
  position: absolute;
  left: 50%;
  top: 96%;
  width: 6px;
  height: 30px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.96), rgba(250, 204, 21, 0.68), rgba(255, 255, 255, 0));
  filter: blur(3px);
  opacity: 0.9;
  transform: translateX(-50%);
}

.checkpoint-firework-pop,
.checkpoint-firework-flash,
.checkpoint-firework-particle {
  position: absolute;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.checkpoint-firework-pop {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.96), rgba(250, 204, 21, 0.62) 34%, transparent 70%);
  box-shadow:
    0 0 24px rgba(255, 255, 255, 0.85),
    0 0 34px rgba(250, 204, 21, 0.64);
}

.checkpoint-firework-flash {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.95),
    0 0 30px rgba(250, 204, 21, 0.74);
}

.checkpoint-firework-particle {
  width: 8px;
  height: 8px;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.95);
}

.checkpoint-firework-particle--1 {
  background: #fef08a;
  box-shadow: 0 0 12px rgba(254, 240, 138, 0.95);
}

.checkpoint-firework-particle--2 {
  background: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.95);
}

.map-pawn-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  width: clamp(56px, 5.2vw, 92px);
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.3));
}

.map-pawn-marker__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.map-pawn-marker__image--active {
  animation: pawnGlow 3.5s ease-in-out infinite;
  filter:
    drop-shadow(0 0 6px rgba(255, 190, 60, 0.75))
    drop-shadow(0 0 14px rgba(255, 120, 20, 0.45));
}

.map-checkpoint-debug {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  pointer-events: auto;
  z-index: 3;
}

.map-checkpoint-debug__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #67e8f9;
  border: 1px solid rgba(4, 12, 18, 0.9);
  box-shadow: 0 0 0 2px rgba(103, 232, 249, 0.2), 0 0 12px rgba(103, 232, 249, 0.7);
}

.map-checkpoint-debug__label {
  display: grid;
  gap: 0.12rem;
  padding: 0.28rem 0.36rem;
  border-radius: 4px;
  border: 1px solid rgba(103, 232, 249, 0.35);
  background: rgba(4, 12, 18, 0.82);
  color: #dffaff;
  font-size: 0.68rem;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
}

.map-checkpoint-debug__label strong,
.map-checkpoint-debug__label code,
.map-checkpoint-debug__label span {
  display: block;
}

.map-checkpoint-debug__label code {
  color: #9be9f3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.64rem;
}

.map-checkpoint-debug__controls {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.14rem;
  margin-top: 0.14rem;
}

.map-checkpoint-debug__controls button {
  min-width: 24px;
  padding: 0.1rem 0.16rem;
  border-radius: 3px;
  border: 1px solid rgba(103, 232, 249, 0.35);
  background: rgba(103, 232, 249, 0.12);
  color: #e9fbff;
  font-size: 0.58rem;
  line-height: 1;
  cursor: pointer;
}

@keyframes pawnGlow {
  0%,
  100% {
    filter:
      drop-shadow(0 0 5px rgba(255, 190, 60, 0.55))
      drop-shadow(0 0 10px rgba(255, 120, 20, 0.28));
  }

  50% {
    filter:
      drop-shadow(0 0 9px rgba(255, 215, 90, 0.9))
      drop-shadow(0 0 18px rgba(255, 130, 25, 0.55));
  }
}

.expedition-intro-modal {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 1.5rem));
  max-height: min(90vh, 820px);
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(215, 177, 92, 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 130, 74, 0.15), transparent 34%),
    radial-gradient(circle at 90% 100%, rgba(215, 177, 92, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(20, 13, 8, 0.98), rgba(10, 7, 5, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.58);
  padding: 1.25rem;
}

.expedition-intro-modal__frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% 50%, rgba(215, 177, 92, 0.1), transparent 58%),
    rgba(0, 0, 0, 0.4);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 28px rgba(255, 145, 42, 0.12);
}

.expedition-intro-modal__video {
  display: block;
  width: 100%;
  aspect-ratio: 774 / 516;
  max-height: min(516px, 62vh);
  object-fit: cover;
  background: #030303;
}

.expedition-intro-modal__question {
  pointer-events: none;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: clamp(0.75rem, 1.6vw, 1.1rem) clamp(1rem, 2.4vw, 1.65rem);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.68) 24%, rgba(0, 0, 0, 0.88) 100%);
  color: #ffe4a7;
  font-size: clamp(0.92rem, 1.45vw, 1.28rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 0 14px rgba(255, 194, 84, 0.25);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expedition-intro-modal .expedition-modal__subtitle {
  color: #d8bf8d;
}

.hero-copy {
  position: absolute;
  left: clamp(1rem, 4vw, 3rem);
  bottom: clamp(6.5rem, 10vw, 9rem);
  max-width: min(760px, calc(100vw - 2rem));
  z-index: 1;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #f2da9a;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.hero-title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 4rem);
  line-height: 0.98;
  max-width: 14ch;
}

.hero-text {
  margin: 1rem 0 0;
  max-width: 42ch;
  color: #f7e7be;
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 1.4rem;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.mars-notice {
  width: min(520px, calc(100vw - 2rem));
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(103, 232, 249, 0.35);
  background: rgba(6, 16, 22, 0.88);
  color: #dffaff;
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.mars-debug-panel {
  width: min(460px, 92vw);
  max-height: min(68vh, 720px);
  overflow: auto;
  padding: 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  background: rgba(3, 10, 14, 0.9);
  color: #e9fbff;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.mars-debug-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.mars-debug-panel__title {
  color: #67e8f9;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mars-debug-copy {
  border: 1px solid rgba(103, 232, 249, 0.38);
  background: rgba(103, 232, 249, 0.12);
  color: #e9fbff;
  border-radius: 5px;
  padding: 0.36rem 0.55rem;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.mars-debug-section {
  padding-top: 0.7rem;
  margin-top: 0.7rem;
  border-top: 1px solid rgba(103, 232, 249, 0.16);
}

.mars-debug-section h3,
.mars-debug-section h4 {
  margin: 0 0 0.45rem;
  color: #67e8f9;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mars-debug-section h4 {
  margin-top: 0.7rem;
  color: rgba(223, 250, 255, 0.78);
  font-size: 0.66rem;
}

.mars-debug-panel__grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.35rem 0.7rem;
}

.mars-debug-panel__grid > div {
  color: rgba(223, 250, 255, 0.72);
}

.mars-debug-panel code,
.mars-debug-panel strong {
  min-width: 0;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mars-debug-bitstream {
  display: block;
  margin-bottom: 0.45rem;
}

.mars-debug-bits-list {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.22rem;
}

.mars-debug-bit,
.mars-debug-step-row {
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 4px;
  padding: 0.22rem 0.28rem;
}

.mars-debug-bit.is-current,
.mars-debug-step-row.is-current {
  border-color: rgba(255, 216, 128, 0.68);
  background: rgba(255, 216, 128, 0.12);
  color: #fff3c4;
}

.mars-debug-current-summary {
  display: grid;
  gap: 0.22rem;
  margin-top: 0.55rem;
  border: 1px solid rgba(255, 216, 128, 0.22);
  border-radius: 4px;
  background: rgba(255, 216, 128, 0.06);
  padding: 0.45rem;
}

.mars-debug-current-summary strong {
  color: #fff3c4;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mars-debug-step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
}

.mars-debug-step-row {
  display: grid;
  grid-template-columns: minmax(54px, max-content) minmax(0, 1fr) max-content;
  align-items: center;
  gap: 0.45rem;
}

.mars-debug-checkpoint-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.4rem;
}

.mars-debug-checkpoint-card {
  display: grid;
  gap: 0.16rem;
  padding: 0.45rem;
  border-radius: 5px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.mars-debug-checkpoint-card span,
.mars-debug-checkpoint-card code {
  color: rgba(223, 250, 255, 0.82);
}

.mars-debug-adjust-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.18rem;
  margin-top: 0.18rem;
}

.mars-debug-adjust-row button {
  border: 1px solid rgba(103, 232, 249, 0.32);
  background: rgba(103, 232, 249, 0.1);
  color: #e9fbff;
  border-radius: 4px;
  padding: 0.2rem 0.24rem;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 800;
}

.mars-debug-route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.mars-debug-route span,
.mars-debug-route b {
  color: #e9fbff;
}

.mars-debug-route-decisions {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.5rem;
}

.mars-debug-route-decision {
  display: grid;
  gap: 0.12rem;
  padding: 0.36rem;
  border-radius: 4px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.mars-debug-route-decision.is-current {
  border-color: rgba(255, 216, 128, 0.68);
  background: rgba(255, 216, 128, 0.12);
}

.mars-debug-route-decision span {
  color: rgba(223, 250, 255, 0.82);
}

.mars-debug-empty {
  color: rgba(223, 250, 255, 0.62);
  font-style: italic;
}

.play-button {
  border: 1px solid rgba(255, 216, 128, 0.6);
  background: linear-gradient(180deg, #ffe39b, #d59c34);
  color: #130d08;
  font-weight: 900;
  letter-spacing: 0.14em;
  border-radius: 999px;
  padding: 0.95rem 1.5rem;
  min-width: 160px;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(214, 177, 92, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.play-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(214, 177, 92, 0.3);
  filter: brightness(1.04);
}

.play-button.is-hidden {
  display: none;
}

.status-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 14, 9, 0.88), rgba(14, 10, 6, 0.96));
}

.status-band.is-success {
  border-top-color: rgba(255, 216, 128, 0.46);
  background: linear-gradient(180deg, rgba(35, 24, 13, 0.96), rgba(16, 12, 7, 0.98));
}

.status-band__label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.status-band__text {
  color: var(--text);
  text-align: right;
}

[data-section] {
  display: none;
}

.section-open {
  display: block;
}

.is-hidden {
  display: none !important;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

#stepWagerResultVideoModal.modal-shell {
  z-index: 2100;
}

#stepDiceModal.modal-shell {
  z-index: 2150;
}

#stepDiceResultModal.modal-shell {
  z-index: 2160;
}

#gameOverModal.modal-shell {
  z-index: 2180;
}

#stepWagerResultModal.modal-shell {
  z-index: 2200;
}

.status-band.is-success {
  border-top-color: rgba(255, 216, 128, 0.46);
  background: linear-gradient(180deg, rgba(35, 24, 13, 0.96), rgba(16, 12, 7, 0.98));
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
}

#expeditionIntroModal.modal-shell,
#expeditionWagerModal.modal-shell,
#stepWagerResultVideoModal.modal-shell,
#stepDiceModal.modal-shell,
#stepDiceResultModal.modal-shell,
#gameOverModal.modal-shell,
#stepWagerResultModal.modal-shell {
  animation: introShellFade 180ms ease-out;
}

#expeditionIntroModal .modal-backdrop,
#expeditionWagerModal .modal-backdrop,
#stepWagerResultVideoModal .modal-backdrop,
#stepDiceModal .modal-backdrop,
#stepDiceResultModal .modal-backdrop,
#gameOverModal .modal-backdrop,
#stepWagerResultModal .modal-backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: introBackdropFade 180ms ease-out;
}

.expedition-modal {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 1.5rem));
  max-height: min(92vh, 980px);
  overflow: auto;
  border-radius: 26px;
  border: 1px solid rgba(215, 177, 92, 0.22);
  background:
    radial-gradient(circle at top, rgba(255, 130, 74, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(20, 13, 8, 0.98), rgba(10, 7, 5, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.56);
  padding: 1.25rem;
}

.active-pawn-modal {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 1.5rem));
  max-height: min(90vh, 900px);
  overflow: auto;
  border-radius: 26px;
  border: 1px solid rgba(215, 177, 92, 0.22);
  background:
    radial-gradient(circle at top, rgba(255, 130, 74, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(20, 13, 8, 0.98), rgba(10, 7, 5, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  padding: 1.25rem;
}

.expedition-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
}

.expedition-modal__title {
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #ffe7b6;
}

.expedition-modal__subtitle {
  margin-top: 0.35rem;
  color: var(--muted);
}

.expedition-intro-modal {
  position: relative;
  z-index: 1;
  width: min(92vw, 896px);
  max-height: min(90vh, 820px);
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(165, 243, 252, 0.25);
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.2), transparent 42%),
    linear-gradient(135deg, rgba(249, 115, 22, 0.1), transparent 46%),
    rgba(3, 7, 18, 0.96);
  box-shadow:
    0 0 42px rgba(34, 211, 238, 0.22),
    0 24px 80px rgba(0, 0, 0, 0.68);
  padding: 1.25rem;
  animation: introModalPop 180ms ease-out;
  text-align: center;
}

.expedition-intro-modal__frame {
  position: relative;
  width: min(100%, 774px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background:
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.08), transparent 58%),
    rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.1);
}

.expedition-intro-modal__video {
  display: block;
  width: 100%;
  aspect-ratio: 774 / 516;
  max-width: 774px;
  max-height: min(516px, 62vh);
  object-fit: cover;
  background: #030303;
}

.expedition-intro-modal__question {
  pointer-events: none;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: clamp(0.75rem, 1.6vw, 1.1rem) clamp(1rem, 2.4vw, 1.65rem);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.68) 24%, rgba(0, 0, 0, 0.88) 100%);
  color: #fef08a;
  font-size: clamp(0.92rem, 1.45vw, 1.28rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expedition-intro-modal .expedition-modal__subtitle {
  color: #d8bf8d;
}

.expedition-intro-modal .expedition-modal__header {
  justify-content: center;
  padding: 0 3rem 0.75rem;
  text-align: center;
}

.expedition-intro-modal__footer {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: nowrap;
}

.expedition-intro-modal .expedition-modal__title,
.expedition-wager-modal .expedition-modal__title {
  color: #eafcff;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.4);
}

.expedition-intro-modal .expedition-modal__subtitle,
.expedition-wager-modal .expedition-modal__subtitle {
  color: rgba(219, 245, 255, 0.72);
}

.expedition-intro-modal .primary-cta {
  border: 1px solid rgba(250, 204, 21, 0.8);
  border-radius: 8px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #030712;
  padding: 0.62rem 1.25rem;
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.52), 0 0 12px rgba(250, 204, 21, 0.25);
}

.expedition-intro-modal .primary-cta:hover {
  filter: brightness(1.08);
}

.expedition-intro-modal .modal-close-button {
  border: 1px solid rgba(165, 243, 252, 0.25);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #cffafe;
  padding: 0.62rem 1.25rem;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.12);
}

.expedition-intro-modal .modal-close-button:hover {
  border-color: rgba(165, 243, 252, 0.56);
  background: rgba(34, 211, 238, 0.08);
}

.expedition-wager-modal {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - 1.5rem));
  max-height: min(92vh, 920px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(165, 243, 252, 0.25);
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.2), transparent 36%),
    radial-gradient(circle at 85% 80%, rgba(250, 204, 21, 0.12), transparent 34%),
    rgba(3, 7, 18, 0.96);
  box-shadow:
    0 0 46px rgba(34, 211, 238, 0.24),
    0 24px 86px rgba(0, 0, 0, 0.72);
  padding: 1.25rem;
  animation: introModalPop 180ms ease-out;
}

.expedition-wager-modal__layout {
  display: grid;
  grid-template-columns: minmax(280px, 42%) minmax(0, 58%);
  gap: 1rem;
  align-items: stretch;
}

.expedition-wager-modal__media {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background:
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.18), transparent 44%),
    rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.1);
}

.wager-wait-badge {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 168px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.72);
  background:
    linear-gradient(135deg, rgba(24, 16, 5, 0.92), rgba(3, 7, 18, 0.78)),
    rgba(0, 0, 0, 0.62);
  color: #facc15;
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow:
    0 0 18px rgba(250, 204, 21, 0.34),
    inset 0 0 16px rgba(250, 204, 21, 0.08);
}

.wager-wait-badge.is-hidden {
  display: none;
}

.wager-wait-badge__spinner {
  width: 0.92rem;
  height: 0.92rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 2px solid rgba(250, 204, 21, 0.26);
  border-top-color: #fef08a;
  border-right-color: rgba(250, 204, 21, 0.86);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.46);
  animation: wagerWaitSpin 0.78s linear infinite;
}

.expedition-wager-modal__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.expedition-wager-modal__content {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0 1.25rem;
  text-align: left;
}

.expedition-wager-modal__status {
  margin: 0.35rem 0 0;
  min-height: 1.4rem;
  color: rgba(207, 250, 254, 0.64);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.expedition-wager-modal__section-label,
.expedition-wager-modal__summary-label {
  margin-top: 1.25rem;
  color: rgba(207, 250, 254, 0.8);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.expedition-wager-modal__bets {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.expedition-wager-button {
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(165, 243, 252, 0.18);
  background: rgba(2, 6, 23, 0.8);
  color: rgba(236, 254, 255, 0.82);
  min-height: 40px;
  padding: 0.62rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, filter 140ms ease;
}

.expedition-wager-button:hover {
  transform: translateY(-1px);
  border-color: rgba(165, 243, 252, 0.44);
  color: #ecfeff;
  filter: brightness(1.04);
}

.expedition-wager-button.is-selected {
  border-color: rgba(250, 204, 21, 0.85);
  background: linear-gradient(180deg, #22d3ee, #0ea5e9, #2563eb);
  color: #020617;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 18px rgba(56, 189, 248, 0.55),
    0 0 12px rgba(250, 204, 21, 0.26);
}

.expedition-wager-modal__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.expedition-choice-button {
  min-height: 92px;
  border-radius: 12px;
  border: 1px solid rgba(165, 243, 252, 0.18);
  background: rgba(2, 6, 23, 0.8);
  color: rgba(236, 254, 255, 0.82);
  padding: 0.95rem 1rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.06);
  transition: transform 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.expedition-choice-button:hover {
  transform: translateY(-1px);
  border-color: rgba(165, 243, 252, 0.38);
  color: #ecfeff;
}

.expedition-choice-button.is-selected {
  border-color: rgba(250, 204, 21, 0.85);
  background: linear-gradient(180deg, #22d3ee, #7dd3fc, #2563eb);
  color: #020617;
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.55),
    0 0 12px rgba(250, 204, 21, 0.26);
}

.expedition-choice-button__label {
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
}

.expedition-wager-modal__summary {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.expedition-wager-modal__selected,
.expedition-wager-modal__payout {
  border-radius: 12px;
  border: 1px solid rgba(165, 243, 252, 0.18);
  background: rgba(2, 6, 23, 0.8);
  padding: 0.85rem;
}

.expedition-wager-modal__summary-label {
  margin-top: 0;
  color: rgba(207, 250, 254, 0.7);
}

.expedition-wager-modal__summary-value {
  margin-top: 0.25rem;
  color: #ecfeff;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  line-height: 1.2;
  font-weight: 900;
  word-break: break-word;
}

.expedition-wager-modal__summary-count {
  color: #fef08a;
  font-size: 0.82rem;
  font-weight: 900;
}

.expedition-wager-modal__payout {
  color: rgba(236, 254, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.55;
}

.expedition-wager-modal__payout span {
  color: #fef08a;
}

.expedition-wager-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.expedition-wager-action,
.expedition-wager-confirm {
  border-radius: 8px;
  padding: 0.62rem 1rem;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.expedition-wager-action {
  border: 1px solid rgba(165, 243, 252, 0.25);
  background: rgba(0, 0, 0, 0.45);
  color: #cffafe;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.12);
}

.expedition-wager-action:hover {
  border-color: rgba(165, 243, 252, 0.55);
  background: rgba(34, 211, 238, 0.1);
}

.expedition-wager-confirm {
  border: 1px solid rgba(250, 204, 21, 0.8);
  background: linear-gradient(180deg, #22d3ee, #7dd3fc, #2563eb);
  color: #020617;
  box-shadow:
    0 0 14px rgba(56, 189, 248, 0.55),
    0 0 18px rgba(56, 189, 248, 0.35),
    0 0 10px rgba(250, 204, 21, 0.28);
}

.expedition-wager-modal .expedition-modal__subtitle {
  color: #d8bf8d;
}

.expedition-wager-modal .expedition-modal__copy {
  margin: 0.9rem 0 0;
  color: #fef08a;
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(250, 204, 21, 0.3);
}

.step-result-video-modal {
  position: relative;
  z-index: 1;
  width: min(92vw, 896px);
  max-height: min(90vh, 820px);
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(165, 243, 252, 0.28);
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.2), transparent 42%),
    radial-gradient(circle at 85% 85%, rgba(250, 204, 21, 0.16), transparent 36%),
    rgba(3, 7, 18, 0.97);
  box-shadow:
    0 0 50px rgba(34, 211, 238, 0.26),
    0 24px 92px rgba(0, 0, 0, 0.76);
  padding: 1.25rem;
  color: #ecfeff;
  animation: introModalPop 180ms ease-out;
}

.step-result-video-modal .modal-close-button--icon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  letter-spacing: 0;
  z-index: 2;
}

.step-result-video-modal__header {
  margin: 0 2.75rem 0.85rem;
  text-align: center;
}

.step-result-video-modal__title {
  margin-top: 0.35rem;
  color: #eafcff;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.46);
}

.step-result-video-modal__frame {
  position: relative;
  width: min(100%, 774px);
  max-width: 774px;
  max-height: min(516px, 62vh);
  aspect-ratio: 774 / 516;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(165, 243, 252, 0.24);
  background:
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.08), transparent 58%),
    rgba(0, 0, 0, 0.5);
  box-shadow:
    inset 0 0 26px rgba(34, 211, 238, 0.08),
    0 0 28px rgba(250, 204, 21, 0.12);
}

.step-result-video-modal__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

.step-result-video-overlay {
  pointer-events: none;
  position: absolute;
  z-index: 20;
}

.step-result-video-overlay--question {
  top: 1rem;
  left: 1rem;
  max-width: min(460px, calc(100% - 2rem));
}

.step-result-video-overlay__card {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.65);
  padding: 1rem 1.25rem;
  color: #fff;
  text-align: left;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.step-result-video-overlay__live {
  position: absolute;
  top: -0.5rem;
  right: 0.75rem;
  border-radius: 6px;
  background: #ef4444;
  color: #fff;
  padding: 0.15rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

.step-result-video-overlay__question {
  padding-right: 2.5rem;
  color: #fff;
  font-size: clamp(0.82rem, 1.35vw, 1rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
}

.step-result-video-overlay__status {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  font-weight: 700;
}

.step-result-video-progress {
  height: 3px;
  width: 100%;
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.step-result-video-progress__fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
  transition: width 75ms linear;
}

.step-result-video-overlay--revealing {
  top: 1rem;
  right: 1rem;
}

.step-result-video-overlay__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.65);
  color: rgba(255, 255, 255, 0.82);
  padding: 0.55rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.step-result-video-overlay__spinner {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: stepResultSpinner 800ms linear infinite;
}

.step-result-video-modal__cinematic-layer,
.step-result-video-sweep {
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.step-result-video-modal__cinematic-layer {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(255, 0, 80, 0.08), transparent 20%, transparent 80%, rgba(0, 200, 255, 0.08)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0;
}

.step-result-video-sweep {
  inset-block: 0;
  left: -35%;
  z-index: 3;
  width: 35%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.05) 80%,
    transparent 100%
  );
  filter: blur(2px);
  opacity: 0;
  transform: translateX(-120%);
}

.step-result-video-modal__frame.is-sweeping .step-result-video-modal__cinematic-layer {
  animation: stepResultGlitchFlash 0.7s ease-out forwards;
}

.step-result-video-modal__frame.is-sweeping .step-result-video-sweep {
  animation: stepResultLightSweep 1.1s ease-out forwards;
}

@keyframes stepResultGlitchFlash {
  0% { opacity: 0; }
  18% { opacity: 0.9; }
  100% { opacity: 0.34; }
}

@keyframes stepResultLightSweep {
  0% { transform: translateX(-120%); opacity: 0; }
  15% { opacity: 0.85; }
  85% { opacity: 0.85; }
  100% { transform: translateX(420%); opacity: 0; }
}

@keyframes stepResultSpinner {
  to {
    transform: rotate(360deg);
  }
}

.step-dice-modal,
.step-dice-result-modal {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 1.5rem));
  max-height: min(92vh, 760px);
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(165, 243, 252, 0.28);
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.2), transparent 42%),
    radial-gradient(circle at 86% 82%, rgba(250, 204, 21, 0.16), transparent 36%),
    rgba(3, 7, 18, 0.97);
  box-shadow:
    0 0 50px rgba(34, 211, 238, 0.26),
    0 24px 92px rgba(0, 0, 0, 0.76);
  padding: 1.25rem;
  color: #ecfeff;
  text-align: center;
  animation: introModalPop 180ms ease-out;
}

.step-dice-modal__title,
.step-dice-result-modal__title {
  margin: 0.45rem 0 0;
  color: #eafcff;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.46);
}

.step-dice-modal__stage {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 1.2rem;
}

.step-dice-modal__route {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.step-dice-modal__route-card {
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(165, 243, 252, 0.18);
  background: rgba(2, 6, 23, 0.72);
  padding: 0.8rem;
  text-align: left;
}

.step-dice-modal__route-card span {
  display: block;
  color: rgba(207, 250, 254, 0.68);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.step-dice-modal__route-card strong {
  display: block;
  margin-top: 0.25rem;
  color: #fef08a;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.step-dice-modal__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.step-dice-modal__actions.is-hidden {
  display: none;
}

.step-dice-modal__roll {
  border: 1px solid rgba(250, 204, 21, 0.8);
  border-radius: 8px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #030712;
  padding: 0.72rem 1.35rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.52), 0 0 12px rgba(250, 204, 21, 0.25);
}

.step-dice-modal__close {
  border: 1px solid rgba(165, 243, 252, 0.25);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #cffafe;
  padding: 0.72rem 1.35rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.step-dice-scene {
  position: relative;
  width: 120px;
  height: 120px;
  perspective: 1200px;
  --step-dice-glow: rgba(250, 204, 21, 0.55);
  --step-dice-ring: rgba(250, 204, 21, 0.55);
  filter: drop-shadow(0 0 24px rgba(250, 204, 21, 0.34));
  transition: filter 0.3s ease;
}

.step-dice-scene--gold {
  --step-dice-glow: rgba(250, 204, 21, 0.55);
  --step-dice-ring: rgba(250, 204, 21, 0.55);
  filter: drop-shadow(0 0 24px rgba(250, 204, 21, 0.34));
}

.step-dice-scene--shadow,
.step-dice-scene--black {
  --step-dice-glow: rgba(148, 163, 184, 0.45);
  --step-dice-ring: rgba(34, 211, 238, 0.28);
  filter: drop-shadow(0 0 24px rgba(15, 23, 42, 0.8)) drop-shadow(0 0 16px rgba(148, 163, 184, 0.22));
}

.step-dice-scene--ivory,
.step-dice-scene--bone {
  --step-dice-glow: rgba(255, 237, 213, 0.58);
  --step-dice-ring: rgba(251, 191, 36, 0.35);
  filter: drop-shadow(0 0 24px rgba(255, 237, 213, 0.38)) drop-shadow(0 0 12px rgba(251, 191, 36, 0.16));
}

.step-dice-scene--water {
  --step-dice-glow: rgba(56, 189, 248, 0.55);
  --step-dice-ring: rgba(34, 211, 238, 0.5);
  filter: drop-shadow(0 0 26px rgba(56, 189, 248, 0.48));
}

.step-dice-scene--oil {
  --step-dice-glow: rgba(251, 191, 36, 0.35);
  --step-dice-ring: rgba(245, 158, 11, 0.45);
  filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.42));
}

.step-dice-scene--diamond {
  --step-dice-glow: rgba(217, 70, 239, 0.55);
  --step-dice-ring: rgba(217, 70, 239, 0.5);
  filter: drop-shadow(0 0 26px rgba(217, 70, 239, 0.45));
}

.step-dice-scene.is-rolling {
  animation: diceShake 0.25s linear infinite;
}

.step-dice-scene.is-flashing {
  filter: drop-shadow(0 0 30px var(--step-dice-glow));
}

.step-dice-scene.is-zoom-pulse {
  animation: diceZoomPulse 0.45s ease-out;
}

.step-dice-cube {
  position: relative;
  width: 120px;
  height: 120px;
  transform-style: preserve-3d;
  transition: transform 0.35s ease;
}

.step-dice-cube.is-rolling {
  transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.step-dice-cube.is-stopping {
  transition: transform 1.8s cubic-bezier(0.08, 0.82, 0.18, 1);
}

.step-dice-cube.is-idle {
  transition: transform 0.35s ease;
}

.step-dice-face {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
  width: 120px;
  height: 120px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #f59e0b, #eab308);
  padding: 1.05rem;
  backface-visibility: hidden;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.42);
}

.step-dice-scene--gold .step-dice-face {
  background: linear-gradient(135deg, #f59e0b, #eab308);
}

.step-dice-scene--shadow .step-dice-face,
.step-dice-scene--black .step-dice-face {
  border-color: rgba(203, 213, 225, 0.16);
  background:
    linear-gradient(145deg, rgba(148, 163, 184, 0.32), transparent 36%),
    linear-gradient(135deg, #111827, #020617 58%, #1f2937);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.72),
    inset 0 1px 10px rgba(255, 255, 255, 0.08);
}

.step-dice-scene--ivory .step-dice-face,
.step-dice-scene--bone .step-dice-face {
  border-color: rgba(254, 243, 199, 0.44);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.48), transparent 34%),
    linear-gradient(135deg, #fff7ed, #f5e6c8 48%, #d6b981);
  box-shadow:
    inset 0 0 20px rgba(120, 53, 15, 0.18),
    inset 0 1px 12px rgba(255, 255, 255, 0.4);
}

.step-dice-scene--ivory .step-dice-pip,
.step-dice-scene--bone .step-dice-pip {
  background: #6B4423;
  box-shadow: 0 0 8px rgba(107, 68, 35, 0.34);
}

.step-dice-scene--water .step-dice-face {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.step-dice-scene--oil .step-dice-face {
  background: linear-gradient(135deg, #3f3f46, #020617);
}

.step-dice-scene--diamond .step-dice-face {
  background: linear-gradient(135deg, #d946ef, #7e22ce);
}

.step-dice-face--1 {
  transform: rotateY(0deg) translateZ(60px);
}

.step-dice-face--2 {
  transform: rotateY(90deg) translateZ(60px);
}

.step-dice-face--5 {
  transform: rotateY(-90deg) translateZ(60px);
}

.step-dice-face--6 {
  transform: rotateY(180deg) translateZ(60px);
}

.step-dice-face--3 {
  transform: rotateX(90deg) translateZ(60px);
}

.step-dice-face--4 {
  transform: rotateX(-90deg) translateZ(60px);
}

.step-dice-pip {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  opacity: 0;
}

.step-dice-pip.is-visible {
  opacity: 1;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
}

.step-dice-scene--ivory .step-dice-pip.is-visible,
.step-dice-scene--bone .step-dice-pip.is-visible {
  background: #6B4423;
  box-shadow: 0 0 8px rgba(107, 68, 35, 0.34);
}

.step-dice-flash,
.step-dice-shockwave,
.step-dice-jackpot {
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.step-dice-flash {
  border-radius: 18px;
  background: #fff;
  opacity: 0;
  z-index: 3;
}

.step-dice-scene.is-flashing .step-dice-flash {
  animation: diceFlashFade 0.4s ease-out forwards;
}

.step-dice-shockwave {
  z-index: 2;
}

.step-dice-shockwave span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  border: 2px solid var(--step-dice-ring);
  box-shadow: 0 0 18px var(--step-dice-ring);
  opacity: 0;
}

.step-dice-shockwave span:nth-child(2) {
  border-width: 1px;
  box-shadow: 0 0 12px var(--step-dice-ring);
}

.step-dice-scene.is-shockwave .step-dice-shockwave span:first-child {
  animation: diceShockRing 0.7s ease-out forwards;
}

.step-dice-scene.is-shockwave .step-dice-shockwave span:nth-child(2) {
  animation: diceShockRing 0.85s ease-out 0.12s forwards;
}

.step-dice-jackpot {
  inset: -0.75rem;
  border-radius: 24px;
  border: 1px solid rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.1);
  opacity: 0;
  z-index: 1;
}

.step-dice-scene.is-jackpot .step-dice-jackpot {
  animation: diceJackpotPulse 0.9s ease-out infinite alternate;
}

.step-dice-modal__status {
  min-height: 1.5rem;
  margin: 0;
  color: #fef08a;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-dice-result-modal__summary {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.step-dice-result-modal__line {
  border-radius: 12px;
  border: 1px solid rgba(165, 243, 252, 0.18);
  background: rgba(2, 6, 23, 0.8);
  padding: 0.95rem;
  color: #fef08a;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.06);
}

.step-dice-result-modal__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.step-dice-result-modal__continue {
  border: 1px solid rgba(250, 204, 21, 0.8);
  border-radius: 8px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #030712;
  padding: 0.72rem 1.35rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.52), 0 0 12px rgba(250, 204, 21, 0.25);
}

.game-over-modal {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 1.5rem));
  border-radius: 16px;
  border: 1px solid rgba(250, 204, 21, 0.32);
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.16), transparent 42%),
    rgba(3, 7, 18, 0.97);
  box-shadow:
    0 0 56px rgba(250, 204, 21, 0.22),
    0 26px 94px rgba(0, 0, 0, 0.78);
  padding: 1.25rem;
  color: #fefce8;
  text-align: center;
  animation: introModalPop 180ms ease-out;
}

.game-over-modal__image-wrap {
  position: relative;
  width: min(600px, 100%);
  aspect-ratio: 3 / 2;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(250, 204, 21, 0.26);
  background: rgba(2, 6, 23, 0.88);
}

.game-over-modal__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-over-modal__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.8rem 1rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  color: #fef3c7;
  font-size: clamp(2rem, 8vw, 4.2rem);
  font-weight: 1000;
  letter-spacing: 0.16em;
  line-height: 0.95;
  text-align: center;
  text-shadow:
    0 0 16px rgba(250, 204, 21, 0.62),
    0 4px 18px rgba(0, 0, 0, 0.92);
  pointer-events: none;
}

.game-over-modal__actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.game-over-modal__close {
  min-width: 150px;
  border: 1px solid rgba(250, 204, 21, 0.8);
  border-radius: 8px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #030712;
  padding: 0.75rem 1.45rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.34);
}

@keyframes diceShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

@keyframes wagerWaitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fireworkTrailFade {
  0% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.35);
  }
}

@keyframes fireworkExplosionFlash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.8);
  }
}

@keyframes fireworkParticle {
  0% {
    opacity: 1;
    transform: translate(0px, 0px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.35);
  }
}

@keyframes fireworkPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

@keyframes rocketToTemple {
  0% {
    left: calc(var(--startX) * 1%);
    top: calc(var(--startY) * 1%);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    left: calc(var(--targetX) * 1%);
    top: calc(var(--targetY) * 1%);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes rocketArc {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(calc(var(--arc) * -1px));
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes diceZoomPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes diceFlashFade {
  0% { opacity: 0.6; }
  100% { opacity: 0; }
}

@keyframes diceShockRing {
  0% {
    transform: translate(-50%, -50%) scale(0.35);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.9);
    opacity: 0;
  }
}

@keyframes diceJackpotPulse {
  0% {
    opacity: 0.15;
    transform: scale(0.95);
  }
  100% {
    opacity: 0.7;
    transform: scale(1.08);
  }
}

@keyframes goldRainFall {
  0% {
    transform: translateY(-45%);
    opacity: 0.9;
  }
  85% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(65%);
    opacity: 0;
  }
}

@keyframes payoutGoldShimmer {
  0% {
    transform: translateX(-120%);
    opacity: 0.35;
  }
  75% {
    opacity: 0.35;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes fx-drift {
  0% {
    opacity: 0;
    transform: translate3d(var(--fx-x-start, 0), -28px, 0) scale(0.65) rotate(0deg);
  }
  10% {
    opacity: 0.82;
  }
  62% {
    opacity: 0.62;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--fx-x-end, 0), var(--fx-y, 160px), 0) scale(1.15) rotate(34deg);
  }
}

.step-wager-result-modal {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 1.5rem));
  max-height: 80vh;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(165, 243, 252, 0.28);
  background:
    radial-gradient(circle at 24% 14%, rgba(56, 189, 248, 0.22), transparent 36%),
    radial-gradient(circle at 82% 82%, rgba(250, 204, 21, 0.14), transparent 34%),
    rgba(3, 7, 18, 0.97);
  box-shadow:
    0 0 50px rgba(34, 211, 238, 0.26),
    0 24px 92px rgba(0, 0, 0, 0.76);
  padding: 1.25rem;
  color: #ecfeff;
  animation: introModalPop 180ms ease-out;
}

.step-wager-result-modal .modal-close-button--icon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  letter-spacing: 0;
}

.step-wager-result-modal__glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 0, 80, 0.06), transparent 22%, transparent 78%, rgba(0, 200, 255, 0.08)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 56%);
  mix-blend-mode: screen;
}

.step-wager-result-modal__layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
  max-height: calc(80vh - 2.5rem);
  min-height: 0;
}

#stepWagerResultModal.has-result-media .step-wager-result-modal__layout,
.step-wager-result-modal.has-result-media .step-wager-result-modal__layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#stepWagerResultModal.has-result-media .step-result-media,
.step-wager-result-modal.has-result-media .step-result-media {
  height: min(520px, calc(80vh - 2.5rem));
}

.step-result-media {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: min(520px, calc(80vh - 2.5rem));
  align-self: stretch;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(165, 243, 252, 0.24);
  background:
    radial-gradient(circle at 26% 18%, rgba(250, 204, 21, 0.16), transparent 34%),
    rgba(2, 6, 23, 0.82);
  box-shadow:
    inset 0 0 26px rgba(34, 211, 238, 0.08),
    0 0 24px rgba(34, 211, 238, 0.18);
}

.step-result-media__image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
}

.step-wager-result-modal__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: calc(80vh - 2.5rem);
  overflow: hidden;
  padding: 0.35rem 0.75rem 0 0.25rem;
  text-align: left;
  gap: 0.75rem;
}

.step-wager-result-modal__eyebrow {
  flex-shrink: 0;
  color: rgba(207, 250, 254, 0.66);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.step-wager-result-modal__title {
  flex-shrink: 0;
  margin: 0.45rem 0 0;
  color: #eafcff;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.46);
}

.step-wager-result-modal__subtitle {
  flex-shrink: 0;
  margin: 0;
  color: #fef08a;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(250, 204, 21, 0.26);
}

.step-wager-result-modal__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.25rem;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.step-wager-result-modal__item {
  position: relative;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(165, 243, 252, 0.18);
  background: rgba(2, 6, 23, 0.8);
  padding: 0.65rem 0.72rem;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.06);
}

.step-result-payout-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(250, 204, 21, 0.36);
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.14), rgba(2, 6, 23, 0.78) 42%, rgba(251, 191, 36, 0.1)),
    rgba(2, 6, 23, 0.86);
  box-shadow:
    0 0 22px rgba(250, 204, 21, 0.12),
    inset 0 0 18px rgba(250, 204, 21, 0.06);
}

.step-result-payout-card::before,
.step-result-payout-card::after {
  pointer-events: none;
  position: absolute;
  content: "";
  z-index: 0;
}

.step-result-payout-card::before {
  inset: -40% 0;
  background:
    radial-gradient(circle, rgba(255, 245, 157, 0.92) 0 1px, transparent 2px) 8px 4px / 48px 42px,
    radial-gradient(circle, rgba(250, 204, 21, 0.74) 0 1px, transparent 2px) 30px 18px / 54px 48px,
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px) 18px 30px / 62px 54px;
  opacity: 0.42;
  transform: translateY(-45%);
  animation: goldRainFall 5s linear forwards;
}

.step-result-payout-card::after {
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 245, 157, 0.2) 45%, rgba(255, 255, 255, 0.36) 50%, rgba(255, 245, 157, 0.2) 55%, transparent 100%);
  opacity: 0.35;
  transform: translateX(-120%);
  animation: payoutGoldShimmer 7.2s ease-in-out forwards;
}

.step-result-payout-card.is-rain-reset::before,
.step-result-payout-card.is-rain-reset::after {
  animation: none;
}

.step-result-payout-card .step-wager-result-modal__label,
.step-result-payout-card .step-wager-result-modal__value {
  position: relative;
  z-index: 2;
}

.payout-sparks-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.payout-spark {
  position: absolute;
  top: -0.85rem;
  display: inline-block;
  line-height: 1;
  opacity: 0;
  text-shadow:
    0 0 10px rgba(255, 80, 40, 0.55),
    0 0 18px rgba(255, 0, 80, 0.25);
  transform: translate3d(var(--fx-x-start, 0), -28px, 0) scale(0.7);
  animation-name: fx-drift;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  animation-iteration-count: 1;
}

.step-wager-result-modal__item:first-child {
  grid-column: 1 / -1;
  border-color: rgba(250, 204, 21, 0.24);
  background: rgba(250, 204, 21, 0.08);
}

.step-wager-result-modal__label {
  color: rgba(207, 250, 254, 0.7);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.step-wager-result-modal__value {
  margin-top: 0.22rem;
  color: #fef08a;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.step-wager-result-modal__value--mono {
  color: #a5f3fc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.94rem;
}

.step-wager-result-modal__actions {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 1rem;
}

.step-wager-result-modal__continue {
  border: 1px solid rgba(250, 204, 21, 0.8);
  border-radius: 8px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #030712;
  padding: 0.72rem 1.35rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.52), 0 0 12px rgba(250, 204, 21, 0.25);
}

.step-wager-result-modal__continue:hover {
  filter: brightness(1.08);
}

@keyframes introShellFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes introBackdropFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes introModalPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 960px) {
  .expedition-wager-modal__layout {
    grid-template-columns: 1fr;
  }

  #stepWagerResultModal.has-result-media .step-wager-result-modal__layout,
  .step-wager-result-modal.has-result-media .step-wager-result-modal__layout {
    grid-template-columns: 1fr;
  }

  .step-result-media {
    height: auto;
    max-height: 260px;
    aspect-ratio: 16 / 10;
  }

  .expedition-wager-modal__image {
    aspect-ratio: 16 / 10;
  }

  .step-result-media__image {
    height: 100%;
    max-height: 260px;
    min-height: 0;
  }

  .step-wager-result-modal__layout {
    max-height: calc(80vh - 2rem);
  }

  .step-wager-result-modal__content {
    max-height: calc(80vh - 2rem - 260px - 20px);
    padding-right: 0.25rem;
  }

  .expedition-wager-modal__bets {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .expedition-intro-modal,
  .expedition-wager-modal,
  .step-result-video-modal,
  .step-dice-modal,
  .step-dice-result-modal,
  .game-over-modal,
  .step-wager-result-modal {
    width: min(96vw, 1080px);
    padding: 1rem;
  }

  .step-wager-result-modal {
    max-height: 88vh;
  }

  .step-wager-result-modal__layout {
    max-height: calc(88vh - 2rem);
    gap: 0.85rem;
  }

  .step-result-media {
    max-height: 210px;
  }

  .step-result-media__image {
    max-height: 210px;
  }

  .step-wager-result-modal__content {
    max-height: calc(88vh - 2rem - 210px - 0.85rem);
  }

  .step-result-video-overlay--question {
    top: 0.7rem;
    left: 0.7rem;
    max-width: calc(100% - 1.4rem);
  }

  .step-result-video-overlay__card {
    padding: 0.75rem 0.85rem;
  }

  .step-result-video-overlay__question {
    padding-right: 1.8rem;
    font-size: 0.74rem;
  }

  .step-result-video-overlay__status {
    font-size: 0.68rem;
  }

  .step-result-video-overlay--revealing {
    top: auto;
    right: 0.7rem;
    bottom: 0.7rem;
  }

  .step-result-video-overlay__badge {
    padding: 0.45rem 0.6rem;
    font-size: 0.68rem;
  }

  .expedition-intro-modal__frame {
    width: 100%;
  }

  .expedition-intro-modal__footer {
    gap: 0.6rem;
  }

  .expedition-wager-modal__bets {
    flex-direction: column;
  }

  .expedition-wager-modal__options,
  .expedition-wager-modal__summary,
  .step-wager-result-modal__summary {
    grid-template-columns: 1fr;
  }

  .expedition-wager-modal__actions,
  .step-dice-result-modal__actions,
  .step-wager-result-modal__actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .step-dice-result-modal__continue,
  .step-wager-result-modal__continue {
    width: 100%;
  }

  .step-dice-modal__route {
    grid-template-columns: 1fr;
  }

  .step-dice-modal__roll,
  .step-dice-modal__close {
    flex: 1 1 150px;
  }
}

.modal-close-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  cursor: pointer;
}

.modal-close-button--icon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(165, 243, 252, 0.25);
  background: rgba(0, 0, 0, 0.45);
  color: #cffafe;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.12);
}

.modal-close-button--icon:hover {
  border-color: rgba(165, 243, 252, 0.6);
  background: rgba(34, 211, 238, 0.12);
}

.expedition-intro-modal .modal-close-button--icon,
.expedition-wager-modal .modal-close-button--icon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  letter-spacing: 0;
}

.expedition-wager-modal .expedition-wager-action {
  border-radius: 8px;
  border: 1px solid rgba(165, 243, 252, 0.25);
  background: rgba(0, 0, 0, 0.45);
  color: #cffafe;
  padding: 0.62rem 1rem;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.12);
}

.expedition-wager-modal .expedition-wager-action:hover {
  border-color: rgba(165, 243, 252, 0.55);
  background: rgba(34, 211, 238, 0.1);
}

.expedition-modal__copy {
  margin: 0 0 1rem;
  color: #f5dfb6;
  line-height: 1.65;
}

.expedition-modal__status {
  margin: 0.9rem 0 0.25rem;
  min-height: 1.4rem;
  color: #f2da9a;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
}

.expedition-modal__debug {
  margin: 0.5rem 0 0;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 130, 74, 0.22);
  background: rgba(10, 7, 5, 0.92);
  color: #f5dfb6;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow: auto;
}

.pawn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.pawn-card {
  border-radius: 18px;
  border: 1px solid rgba(215, 177, 92, 0.16);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem;
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.pawn-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 130, 74, 0.34);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.pawn-card.is-selected {
  border-color: rgba(255, 221, 140, 0.7);
  background: linear-gradient(180deg, rgba(255, 224, 163, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 0 1px rgba(255, 221, 140, 0.22) inset, 0 16px 32px rgba(0, 0, 0, 0.28);
}

.pawn-card__image-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.26);
}

.pawn-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pawn-card__name {
  margin-top: 0.75rem;
  font-weight: 800;
  color: #fff3d0;
}

.pawn-card__price {
  margin-top: 0.25rem;
  color: var(--gold);
  font-size: 0.95rem;
}

.expedition-modal__footer {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.expedition-intro-modal .expedition-intro-modal__footer {
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-direction: row;
  flex-wrap: wrap;
}

.active-pawn-modal__hero {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

.active-pawn-modal__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.24);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.active-pawn-modal__details {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.active-pawn-modal__name {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff3d0;
}

.active-pawn-modal__meta {
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}

.active-pawn-modal__actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.expedition-modal__price {
  color: #f4dc9f;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.primary-cta {
  border: 1px solid rgba(255, 216, 128, 0.5);
  background: linear-gradient(180deg, #ffe39b, #cf962e);
  color: #100c07;
  font-weight: 900;
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  cursor: pointer;
}

.expedition-wager-modal .expedition-wager-confirm {
  border-radius: 8px;
  border: 1px solid rgba(250, 204, 21, 0.8);
  background: linear-gradient(180deg, #22d3ee, #7dd3fc, #2563eb);
  color: #020617;
  padding: 0.62rem 1rem;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow:
    0 0 14px rgba(56, 189, 248, 0.55),
    0 0 18px rgba(56, 189, 248, 0.35),
    0 0 10px rgba(250, 204, 21, 0.28);
}

.expedition-wager-modal .expedition-wager-confirm:hover {
  filter: brightness(1.08);
}

.chest-shell-root,
.chest-fail-root {
  display: none;
}

.chest-shell-root.is-open,
.chest-fail-root.is-open {
  display: block;
}

.chest-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 3700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.chest-fail-root .chest-modal-shell {
  z-index: 3750;
}

.chest-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.chest-shell-modal,
.chest-fail-modal {
  position: relative;
  width: min(100%, 1380px);
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 26px;
  background:
    radial-gradient(circle at 14% 2%, rgba(34, 211, 238, 0.16), transparent 26rem),
    radial-gradient(circle at 88% 12%, rgba(250, 204, 21, 0.13), transparent 22rem),
    linear-gradient(145deg, rgba(18, 11, 8, 0.98), rgba(22, 15, 20, 0.98));
  box-shadow: 0 0 42px rgba(0, 0, 0, 0.58);
  color: #f8fafc;
}

.chest-shell-modal {
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.chest-shell-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.chest-shell-modal__close:hover,
.chest-shell-modal__close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(250, 204, 21, 0.58);
  background: rgba(250, 204, 21, 0.16);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.2);
}

.chest-shell-modal__close:active {
  transform: scale(0.96);
}

.chest-shell-modal__header {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
}

.chest-shell-modal__eyebrow,
.chest-fail-modal__eyebrow {
  color: #67e8f9;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.chest-shell-modal__title,
.chest-fail-modal__title {
  margin: 0.6rem 0 0;
  color: #fef3c7;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
}

.chest-shell-modal__copy,
.chest-fail-modal__text {
  margin: 0.85rem auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  line-height: 1.6;
}

.chest-shell-modal__debug {
  display: inline-flex;
  margin-top: 0.85rem;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.12);
  color: #bae6fd;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chest-shell-grid {
  position: relative;
  height: clamp(13.5rem, 25vw, 19.5rem);
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  max-width: 1120px;
  overflow: visible;
}

.chest-shell-card {
  --chest-y: 0px;
  --chest-scale: 1;
  position: absolute;
  top: 0;
  left: calc(var(--chest-slot) * 25% + 0.35rem);
  width: calc(25% - 0.7rem);
  min-height: clamp(12rem, 24vw, 18.75rem);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  padding: clamp(0.6rem, 1.4vw, 1rem);
  transform: translateY(var(--chest-y)) scale(var(--chest-scale));
  transition:
    left 560ms ease-in-out,
    transform 560ms ease-in-out,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.chest-shell-card:not(:disabled):hover {
  --chest-y: -5px;
  --chest-scale: 1.015;
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.16);
}

.chest-shell-card:disabled {
  cursor: default;
}

.chest-shell-card.is-selected {
  border-color: rgba(250, 204, 21, 0.64);
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.2);
}

.chest-shell-card.is-revealed {
  --chest-y: -7px;
  --chest-scale: 1.02;
  background: rgba(250, 204, 21, 0.08);
}

.chest-shell-grid.is-shuffling .chest-shell-card {
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.12);
}

.chest-shell-card__glow {
  position: absolute;
  inset: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  filter: blur(18px);
}

.chest-shell-card__image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: clamp(10rem, 22vw, 16.5rem);
  object-fit: contain;
  user-select: none;
}

.chest-shell-modal__actions,
.chest-fail-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: clamp(1.2rem, 3vw, 2rem);
}

.chest-shell-settle-status {
  flex-basis: 100%;
  color: #fef3c7;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.chest-shell-settle-status.is-error {
  color: #fecaca;
}

.chest-shell-button {
  min-width: 12rem;
  border: 1px solid rgba(250, 204, 21, 0.65);
  border-radius: 8px;
  padding: 0.85rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    background 160ms ease;
}

.chest-shell-button--primary {
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  color: #1c1204;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.26);
}

.chest-shell-button--danger {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.chest-shell-button:not(:disabled):hover,
.chest-shell-button:not(:disabled):focus-visible {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.08);
  border-color: rgba(250, 204, 21, 0.92);
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.15),
    0 0 30px rgba(245, 158, 11, 0.34);
}

.chest-shell-button--danger:not(:disabled):hover,
.chest-shell-button--danger:not(:disabled):focus-visible {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(239, 68, 68, 0.24);
  box-shadow:
    0 0 0 2px rgba(248, 113, 113, 0.12),
    0 0 24px rgba(248, 113, 113, 0.22);
}

.chest-shell-button:not(:disabled):active {
  transform: scale(0.98);
}

.chest-shell-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.18);
}

.chest-fail-modal {
  width: min(100%, 34rem);
  border-color: rgba(248, 113, 113, 0.25);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 0 35px rgba(248, 113, 113, 0.18);
}

.chest-fail-modal__eyebrow {
  color: #fca5a5;
}

.chest-fail-modal__title {
  color: #fff7ed;
}

.final-carousel-root {
  display: none;
}

.final-carousel-root.is-open {
  display: block;
}

.final-carousel-shell {
  position: fixed;
  inset: 0;
  z-index: 3800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.final-carousel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.final-carousel-modal {
  position: relative;
  width: min(100%, 1240px);
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(250, 204, 21, 0.14), transparent 24rem),
    radial-gradient(circle at 86% 14%, rgba(34, 211, 238, 0.14), transparent 22rem),
    linear-gradient(145deg, rgba(18, 11, 8, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 0 46px rgba(0, 0, 0, 0.64);
  color: #f8fafc;
  padding: clamp(1.2rem, 2.5vw, 2rem);
}

.final-carousel-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.final-carousel-modal__close:hover,
.final-carousel-modal__close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(250, 204, 21, 0.58);
  background: rgba(250, 204, 21, 0.16);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.2);
}

.final-carousel-modal__close:active {
  transform: scale(0.96);
}

.final-carousel-modal__header {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.final-carousel-modal__eyebrow {
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.final-carousel-modal__title {
  margin: 0.6rem 0 0;
  color: #fef3c7;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

.final-carousel-modal__copy {
  margin: 0.85rem auto 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  line-height: 1.5;
}

.final-carousel-modal__debug {
  display: inline-flex;
  margin-top: 0.85rem;
  border: 1px solid rgba(250, 204, 21, 0.32);
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.1);
  color: #fef3c7;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.final-carousel-window {
  position: relative;
  height: clamp(17rem, 36vw, 26.5rem);
  margin: clamp(1.1rem, 2.4vw, 1.75rem) auto 0;
  overflow: hidden;
}

.final-carousel-pointer {
  position: absolute;
  left: 50%;
  top: 0.25rem;
  z-index: 5;
  width: 0;
  height: 0;
  border-left: 0.75rem solid transparent;
  border-right: 0.75rem solid transparent;
  border-top: 1.1rem solid #facc15;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.5));
}

.final-carousel-strip {
  position: relative;
  height: 100%;
}

.final-carousel-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(8.2rem, 18vw, 15rem);
  min-height: clamp(13rem, 26vw, 21rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  padding: clamp(0.45rem, 1vw, 0.7rem);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.5rem;
  transform:
    translate(calc(-50% + (var(--carousel-offset) * clamp(8.6rem, 20vw, 16.5rem))), -50%)
    scale(var(--carousel-scale));
  opacity: var(--carousel-opacity);
  transition:
    transform 170ms ease,
    opacity 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease;
}

.final-carousel-card.is-active {
  z-index: 3;
  border-color: rgba(250, 204, 21, 0.64);
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.12),
    0 0 30px rgba(250, 204, 21, 0.24);
}

.final-carousel-card.is-final {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.14),
    0 0 36px rgba(34, 211, 238, 0.32),
    0 0 26px rgba(250, 204, 21, 0.22);
}

.final-carousel-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 0;
  object-fit: contain;
  border-radius: 12px;
  user-select: none;
}

.final-carousel-card__meta {
  display: grid;
  gap: 0.2rem;
  margin-top: 0;
  text-align: center;
}

.final-carousel-card__meta span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.final-carousel-card__meta strong {
  color: #fef3c7;
  font-size: clamp(0.82rem, 1.5vw, 1rem);
  font-weight: 900;
}

.final-carousel-window.is-spinning .final-carousel-card.is-active {
  animation: finalCarouselPulse 340ms ease-in-out infinite alternate;
}

.final-carousel-modal__actions {
  display: flex;
  justify-content: center;
  margin-top: clamp(0.55rem, 1.4vw, 1rem);
}

.final-carousel-button {
  min-width: 12rem;
  border: 1px solid rgba(250, 204, 21, 0.65);
  border-radius: 8px;
  padding: 0.85rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    background 160ms ease;
}

.final-carousel-button--primary {
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  color: #1c1204;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.26);
}

.final-carousel-button--secondary {
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(125, 211, 252, 0.38);
  color: #e0f2fe;
}

.final-carousel-button:not(:disabled):hover,
.final-carousel-button:not(:disabled):focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(250, 204, 21, 0.92);
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.16),
    0 0 28px rgba(245, 158, 11, 0.34);
}

.final-carousel-button--secondary:not(:disabled):hover,
.final-carousel-button--secondary:not(:disabled):focus-visible {
  border-color: rgba(125, 211, 252, 0.72);
  background: rgba(34, 211, 238, 0.22);
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.13),
    0 0 28px rgba(34, 211, 238, 0.24);
}

.final-carousel-button:not(:disabled):active {
  transform: scale(0.98);
}

.final-carousel-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

@keyframes finalCarouselPulse {
  from {
    transform:
      translate(calc(-50% + (var(--carousel-offset) * clamp(8.6rem, 20vw, 16.5rem))), -50%)
      scale(1.01);
  }

  to {
    transform:
      translate(calc(-50% + (var(--carousel-offset) * clamp(8.6rem, 20vw, 16.5rem))), -50%)
      scale(1.035);
  }
}

@keyframes chestShufflePulse {
  from {
    transform: translateY(-3px) rotate(-1.5deg);
  }

  to {
    transform: translateY(4px) rotate(1.5deg);
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .wallet-zone {
    justify-content: flex-start;
  }

  .tabs {
    justify-content: flex-start;
  }

  .hero-map {
    min-height: 62vh;
  }

  .hero-copy {
    bottom: clamp(4.5rem, 8vw, 6rem);
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0.9rem 0.9rem 0.85rem;
  }

  .brand-title {
    font-size: 1rem;
  }

  .tab-button {
    padding: 0.6rem 0.85rem;
  }

  .wallet-button {
    width: 100%;
  }

  .hero-map {
    min-height: 56vh;
    padding: 0.85rem;
  }

  .hero-copy {
    bottom: 4.5rem;
    left: 0.9rem;
    right: 0.9rem;
  }

  .hero-title {
    max-width: 100%;
  }

  .status-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-band__text {
    text-align: left;
  }

  .pawn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero-actions {
    margin-top: 1rem;
  }

  .play-button {
    width: 100%;
  }

  .chest-shell-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expedition-modal {
    width: min(100vw - 1rem, 980px);
    padding: 1rem;
    border-radius: 22px;
  }

  .expedition-modal__header,
  .expedition-modal__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .expedition-intro-modal .expedition-intro-modal__footer {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
  }

  .pawn-grid {
    grid-template-columns: 1fr;
  }

  .chest-shell-modal {
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
  }
}
