:root {
  color-scheme: light;
  --five-d-ink: #17110f;
  --five-d-muted: #7d6b5f;
  --five-d-red: #e43a33;
  --five-d-red-dark: #c92722;
  --five-d-gold: #f6a10c;
  --five-d-gold-soft: #fff0cc;
  --five-d-cream: #fdf6ed;
  --five-d-card: #fffdfb;
  --five-d-line: #efe5dc;
  --five-d-blue: #0b5cff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #eee8df;
  color: var(--five-d-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input { font: inherit; }

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid #9f211d;
  outline-offset: 2px;
}

.five-d-stage__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.five-d-stage-host { min-height: 100%; }

.five-d-stage {
  width: min(100%, 624px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 19px 14px;
  overflow: hidden;
  background-color: var(--five-d-cream);
  background-image: url("./assets/five-d-ivory-stage-bg.v1.png");
  background-position: top center;
  background-repeat: repeat-y;
  background-size: 100% auto;
  font-variant-numeric: tabular-nums;
}

.five-d-stage__header {
  display: flex;
  height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 5px;
}

.five-d-stage__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.five-d-stage__brand-tile {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(125, 75, 30, 0.14);
}

.five-d-stage__identity h1,
.five-d-stage__identity p { margin: 0; }

.five-d-stage__identity h1 {
  font-size: var(--merxi-stage-title-mobile, 28px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.five-d-stage__identity p {
  margin-top: 5px;
  color: #6b584c;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.11em;
}

.five-d-stage__demo-chip {
  display: flex;
  min-width: 82px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid #efdcc8;
  border-radius: 22px;
  background: rgba(255, 253, 250, 0.9);
  box-shadow: 0 5px 14px rgba(112, 74, 42, 0.07);
}

.five-d-stage__demo-chip strong {
  color: var(--five-d-red-dark);
  font-size: 11px;
  line-height: 1;
}

.five-d-stage__demo-chip small {
  margin-top: 4px;
  color: #6b584c;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.five-d-stage__layout { display: block; }

.five-d-stage__round-column { min-width: 0; }

.five-d-stage__metrics,
.five-d-stage__round-ticker,
.five-d-stage__wager-card,
.five-d-stage__proof {
  border: 1px solid rgba(239, 229, 220, 0.94);
  background: rgba(255, 253, 251, 0.94);
  box-shadow: 0 7px 20px rgba(120, 77, 44, 0.08);
}

.five-d-stage__metrics {
  display: grid;
  height: 102px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 14px;
}

.five-d-stage__metric {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 12px 8px 9px;
  text-align: center;
}

.five-d-stage__metric + .five-d-stage__metric::before {
  position: absolute;
  top: 19px;
  bottom: 19px;
  left: 0;
  width: 1px;
  background: var(--five-d-line);
  content: "";
}

.five-d-stage__metric > span {
  color: #755f52;
  font-size: 15px;
  font-weight: 560;
  line-height: 1;
}

.five-d-stage__metric > strong {
  display: flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  overflow: hidden;
  color: var(--five-d-red);
  font-size: clamp(19px, 4.2vw, 28px);
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.five-d-stage__metric > strong img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.five-d-stage__metric > small {
  margin-top: 8px;
  color: #6b584c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.five-d-stage__metric.is-stake > strong { color: var(--five-d-ink); }

.five-d-stage__metric.is-countdown > strong {
  color: var(--five-d-red);
  font-size: 30px;
}

.five-d-stage__round-ticker {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 0 17px;
  border-radius: 21px;
  color: #7c6759;
  font-size: 13px;
}

.five-d-stage__round-ticker > img {
  width: 21px;
  height: 21px;
  opacity: 0.68;
}

.five-d-stage__round-ticker > span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.five-d-stage__round-ticker strong {
  color: var(--five-d-red-dark);
  font-weight: 660;
}

.five-d-stage__round-ticker code {
  color: #6b584c;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.five-d-stage__hero {
  position: relative;
  height: 287px;
  margin-top: 1px;
  overflow: hidden;
  isolation: isolate;
}

.five-d-stage__hero-scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.five-d-stage__hero-badge {
  position: absolute;
  z-index: 4;
  top: 116px;
  display: flex;
  width: 84px;
  height: 84px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 2px solid rgba(246, 161, 12, 0.62);
  border-radius: 50%;
  background: rgba(255, 252, 246, 0.94);
  box-shadow: inset 0 0 0 5px rgba(255, 239, 204, 0.7), 0 8px 20px rgba(139, 84, 29, 0.1);
  text-align: center;
}

button.five-d-stage__hero-badge { padding: 0; }

.five-d-stage__hero-badge.is-play { left: 2px; }
.five-d-stage__hero-badge.is-rtp { right: 2px; }

.five-d-stage__hero-badge span {
  color: #b84332;
  font-size: 13px;
  font-weight: 650;
}

.five-d-stage__hero-badge strong {
  margin-top: 7px;
  color: var(--five-d-red-dark);
  font-size: 18px;
  font-weight: 780;
  line-height: 1;
}

.five-d-stage__reel-label {
  position: absolute;
  z-index: 3;
  top: 25px;
  left: 50%;
  padding: 4px 9px;
  transform: translateX(-50%);
  border: 1px solid rgba(226, 187, 124, 0.55);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.84);
  color: #6b584c;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.five-d-stage__reels {
  position: absolute;
  z-index: 3;
  top: 92px;
  right: 17.8%;
  left: 17.4%;
  display: grid;
  height: 83px;
  align-items: center;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.five-d-stage__reels > span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c9ae8c;
  font-size: 54px;
  font-weight: 820;
  letter-spacing: -0.05em;
  line-height: 1;
  text-shadow: 0 2px 0 #fff, 0 5px 12px rgba(170, 64, 45, 0.12);
}

.five-d-stage__reels.is-preview > span:not(:empty) { color: #e14138; }
.five-d-stage__reels.is-revealed > span { color: var(--five-d-red-dark); }

.five-d-stage__hero-pill {
  position: absolute;
  z-index: 3;
  right: 19%;
  bottom: 12px;
  left: 19%;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1px solid rgba(232, 199, 149, 0.72);
  border-radius: 22px;
  background: rgba(255, 251, 243, 0.96);
  box-shadow: 0 6px 16px rgba(130, 77, 31, 0.08);
  color: #725a49;
  font-size: 12px;
  text-align: center;
}

.five-d-stage__hero-pill strong {
  margin: 0 4px;
  color: var(--five-d-red-dark);
  font-size: 15px;
}

.five-d-stage__wager-card {
  min-height: 620px;
  padding: 18px 20px 17px;
  border-radius: 14px;
}

.five-d-stage__stake-row {
  display: grid;
  grid-template-columns: minmax(0, 259px) minmax(0, 1fr);
  gap: 13px;
}

.five-d-stage__stake-input {
  display: flex;
  height: 62px;
  justify-content: center;
  flex-direction: column;
  padding: 10px 13px;
  border: 1px solid var(--five-d-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
}

.five-d-stage__stake-input > span:first-child {
  color: #5d493e;
  font-size: 14px;
  font-weight: 600;
}

.five-d-stage__stake-input small {
  margin-left: 6px;
  color: #6b584c;
  font-size: 10px;
  font-weight: 520;
}

.five-d-stage__stake-value {
  display: flex;
  align-items: center;
  margin-top: 6px;
}

.five-d-stage__stake-value input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--five-d-ink);
  font-size: 26px;
  font-weight: 680;
  line-height: 1;
}

.five-d-stage__stake-value input[aria-invalid="true"] { color: var(--five-d-red); }

.five-d-stage__stake-value img {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.five-d-stage__stake-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.five-d-stage__stake-presets button {
  min-width: 44px;
  min-height: 44px;
  position: relative;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f7f3ef;
  color: #4a382f;
  font-size: 18px;
  font-weight: 560;
}

.five-d-stage__stake-presets button.is-active {
  border-color: #f3ce7a;
  background: #fff8e9;
}

.five-d-stage__money-message {
  min-height: 18px;
  margin: 6px 2px 4px;
  color: #6b584c;
  font-size: 10px;
  text-align: left;
}

.five-d-stage__money-message.has-error { color: var(--five-d-red-dark); }

.five-d-stage__selection-heading {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.five-d-stage__selection-heading h2 {
  display: inline;
  margin: 0;
  font-size: 17px;
  font-weight: 670;
}

.five-d-stage__selection-heading > div > span {
  margin-left: 7px;
  color: #6b584c;
  font-size: 12px;
}

.five-d-stage__selection-heading > button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #6b584c;
  font-size: 13px;
  font-weight: 600;
}

.five-d-stage__selection-heading > button img {
  width: 17px;
  height: 17px;
}

.five-d-stage__play-drawer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 12px;
  padding: 9px;
  border: 1px solid var(--five-d-line);
  border-radius: 12px;
  background: #fff9f3;
  animation: five-d-panel-in 180ms ease-out both;
}

.five-d-stage__play-drawer button {
  display: flex;
  min-height: 49px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 7px 10px;
  border: 1px solid var(--five-d-line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
}

.five-d-stage__play-drawer button.is-active {
  border-color: #f0b65a;
  background: var(--five-d-gold-soft);
}

.five-d-stage__play-drawer span {
  font-size: 12px;
  font-weight: 650;
}

.five-d-stage__play-drawer strong {
  margin-top: 3px;
  color: var(--five-d-red-dark);
  font-size: 11px;
}

.five-d-stage__position-row,
.five-d-stage__ordered-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 5px 0 10px;
}

.five-d-stage__position-row button,
.five-d-stage__ordered-slots button {
  min-height: 48px;
  border: 1px solid var(--five-d-line);
  border-radius: 9px;
  background: #fff;
  color: #6b584c;
  font-size: 13px;
}

.five-d-stage__position-row button.is-active,
.five-d-stage__ordered-slots button.is-active {
  border-color: #d93630;
  background: #fff1ed;
  color: var(--five-d-red-dark);
  box-shadow: 0 0 0 2px rgba(217, 54, 48, 0.1);
}

.five-d-stage__ordered-slots button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.five-d-stage__ordered-slots span {
  color: #6b584c;
  font-size: 10px;
}

.five-d-stage__ordered-slots strong {
  margin-top: 2px;
  font-size: 19px;
}

.five-d-stage__selection-progress {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 1px 5px;
  color: #6b584c;
  font-size: 11px;
}

.five-d-stage__selection-progress strong {
  color: var(--five-d-red-dark);
  font-size: 12px;
  font-weight: 720;
}

.five-d-stage__selection-progress span { text-align: right; }

.five-d-stage__digit-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  margin-top: 3px;
}

.five-d-stage__digit-grid button {
  position: relative;
  height: 49px;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--five-d-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.82);
  color: #34261f;
  font-size: 20px;
  font-weight: 560;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.five-d-stage__digit-grid button.is-picked {
  border-color: #d93630;
  background: #fff1ed;
  color: var(--five-d-red-dark);
  box-shadow: inset 0 0 0 1px rgba(217, 54, 48, 0.08);
}

.five-d-stage__class-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 5px 0 10px;
}

.five-d-stage__class-slots button {
  display: flex;
  min-height: 52px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 7px 13px;
  border: 1px solid var(--five-d-line);
  border-radius: 10px;
  background: white;
}

.five-d-stage__class-slots button.is-active {
  border-color: #d93630;
  background: #fff1ed;
  box-shadow: 0 0 0 2px rgba(217, 54, 48, 0.1);
}

.five-d-stage__class-slots span {
  color: #6b584c;
  font-size: 10px;
}

.five-d-stage__class-slots strong {
  margin-top: 4px;
  color: var(--five-d-red-dark);
  font-size: 14px;
}

.five-d-stage__class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.five-d-stage__class-grid button {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--five-d-line);
  border-radius: 10px;
  background: white;
}

.five-d-stage__class-grid button.is-active {
  border-color: #d93630;
  background: #fff1ed;
  color: var(--five-d-red-dark);
}

.five-d-stage__class-grid strong { font-size: 18px; }
.five-d-stage__class-grid span { margin-top: 3px; color: #6b584c; font-size: 10px; }

.five-d-stage__number-controls.is-readonly button,
.five-d-stage__class-controls.is-readonly button { opacity: 0.72; }

.five-d-stage__readonly-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  color: #6b584c;
  font-size: 10px;
}

.five-d-stage__readonly-note img { width: 15px; height: 15px; }

.five-d-stage__selected-row {
  display: grid;
  min-height: 56px;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  margin-top: 10px;
  border-top: 1px solid rgba(239, 229, 220, 0.74);
}

.five-d-stage__selected-row > span {
  font-size: 15px;
  font-weight: 650;
}

.five-d-stage__selected-row > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.five-d-stage__selected-row > div::-webkit-scrollbar { display: none; }

.five-d-stage__selected-row strong {
  display: inline-flex;
  min-width: 40px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #fbf1e8;
  color: var(--five-d-red);
  font-size: 19px;
}

.five-d-stage__selected-row strong.is-placeholder {
  border: 1px dashed #d8c8bc;
  background: #fffaf6;
  color: #806b5e;
}

.five-d-stage__selected-row em {
  color: #6b584c;
  font-size: 12px;
  font-style: normal;
}

.five-d-stage__selected-row > button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #806a5c;
  font-size: 12px;
}

.five-d-stage__selected-row > button img { width: 17px; height: 17px; }

.five-d-stage__tip {
  display: grid;
  width: 100%;
  min-height: 44px;
  align-items: center;
  grid-template-columns: 22px minmax(0, 1fr) 16px;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid #f1e4d8;
  border-radius: 22px;
  background: #fff9f4;
  color: #6b584c;
  font-size: 11px;
  text-align: left;
}

.five-d-stage__tip img:first-child { width: 20px; height: 20px; }
.five-d-stage__tip img:last-child { width: 15px; height: 15px; }
.five-d-stage__tip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.five-d-stage__rules {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff7ef;
  color: #806b5e;
  font-size: 10px;
  line-height: 1.5;
  animation: five-d-panel-in 160ms ease-out both;
}

.five-d-stage__notice {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff5df;
  color: #9b5e21;
  font-size: 11px;
  text-align: center;
  animation: five-d-notice-in 180ms ease-out both;
}

.five-d-stage__receipt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 11px;
  border: 1px solid #efd8b8;
  border-radius: 10px;
  background: #fff9ef;
  font-size: 11px;
}

.five-d-stage__receipt span { color: var(--five-d-red-dark); font-weight: 700; }
.five-d-stage__receipt strong { flex: 1; }
.five-d-stage__receipt em { color: #6b584c; font-style: normal; }

.five-d-stage__submit {
  display: flex;
  width: 100%;
  min-height: 86px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-top: 12px;
  padding: 10px 20px;
  border: 0;
  border-radius: 17px;
  background: #d5cec8;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: white;
  box-shadow: 0 8px 18px rgba(120, 70, 40, 0.12);
  text-align: center;
}

.five-d-stage__submit.is-ready {
  background-color: #d93630;
  background-image: url("./assets/five-d-red-cta.v2.png");
  background-blend-mode: darken;
  box-shadow: 0 11px 24px rgba(211, 43, 37, 0.23);
}

.five-d-stage__submit span {
  font-size: 25px;
  font-weight: 740;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.five-d-stage__submit small {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 540;
  opacity: 0.92;
}

.five-d-stage__mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 15px;
}

.five-d-stage__mode-switch button {
  position: relative;
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #eee1d6;
  border-radius: 25px;
  background: #fff;
  color: #493831;
  font-size: 15px;
  font-weight: 600;
}

.five-d-stage__mode-switch button.is-active {
  border-color: #fc9f45;
  color: var(--five-d-red-dark);
  box-shadow: 0 5px 13px rgba(222, 77, 42, 0.08);
}

.five-d-stage__mode-switch button > img:first-child { width: 21px; height: 21px; }

.five-d-stage__mode-switch .five-d-stage__mode-check {
  position: absolute;
  right: 9px;
  width: 23px;
  height: 23px;
}

.five-d-stage__auto-note {
  margin: 8px 0 0;
  color: #6b584c;
  font-size: 10px;
  text-align: center;
}

.five-d-stage__proof {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 13px;
}

.five-d-stage__proof > button,
.five-d-stage__proof > div:not(.five-d-stage__proof-details) {
  display: flex;
  min-width: 0;
  min-height: 70px;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 0;
  background: rgba(255, 253, 251, 0.86);
  text-align: left;
}

.five-d-stage__proof > * + *::before {
  position: absolute;
  width: 1px;
  height: 34px;
  margin-left: -12px;
  background: var(--five-d-line);
  content: "";
}

.five-d-stage__proof > button > span:first-child,
.five-d-stage__proof > div > span:first-child {
  display: flex;
  width: 31px;
  height: 31px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff2e4;
}

.five-d-stage__proof span:first-child img { width: 18px; height: 18px; }
.five-d-stage__proof > button > img { width: 14px; height: 14px; opacity: 0.45; }
.five-d-stage__proof strong,
.five-d-stage__proof small { display: block; }
.five-d-stage__proof strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.five-d-stage__proof small { margin-top: 4px; color: #6b584c; font-size: 10px; }

.five-d-stage__proof-details {
  grid-column: 1 / -1;
  padding: 11px 14px;
  border-top: 1px solid var(--five-d-line);
  background: #fff9f2;
  animation: five-d-panel-in 160ms ease-out both;
}

.five-d-stage__proof-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 25px;
  color: #826e61;
  font-size: 10px;
}

.five-d-stage__proof-details code {
  overflow: hidden;
  color: #6b584c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.five-d-stage__compliance {
  padding: 11px 6px 1px;
  color: #6b584c;
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.07em;
  text-align: center;
}

@keyframes five-d-panel-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes five-d-select-pop {
  0% { transform: scale(0.88); }
  58% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes five-d-reel-draft {
  0% { opacity: 0.3; transform: translateY(-15px) scale(0.94); filter: blur(4px); }
  70% { opacity: 1; transform: translateY(3px) scale(1.04); filter: blur(0); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes five-d-reel-reveal {
  0% { opacity: 0; transform: translateY(-42px) rotateX(70deg); filter: blur(8px); }
  65% { opacity: 1; transform: translateY(5px) rotateX(0); filter: blur(0); }
  100% { transform: translateY(0); }
}

@keyframes five-d-notice-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.five-d-stage__digit-grid button.is-animating,
.five-d-stage__class-grid button.is-animating,
.five-d-stage__ordered-slots button.is-animating,
.five-d-stage__class-slots button.is-animating,
.five-d-stage__selected-row strong.is-animating { animation: five-d-select-pop 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.five-d-stage__reels.is-draft-animating > span {
  animation: five-d-reel-draft 260ms cubic-bezier(0.18, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--reel-index) * 36ms);
}

.five-d-stage__reels.is-reveal-animating > span {
  animation: five-d-reel-reveal 520ms cubic-bezier(0.16, 0.78, 0.22, 1) both;
  animation-delay: calc(var(--reel-index) * 55ms);
}

@media (hover: hover) and (pointer: fine) {
  .five-d-stage button:not(:disabled) { transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease; }
  .five-d-stage button:not(:disabled):hover { transform: translateY(-1px); }
  .five-d-stage__submit.is-ready:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(211, 43, 37, 0.28); }
}

@media (max-width: 539px) {
  .five-d-stage { padding: 12px 12px 10px; }
  .five-d-stage__header { height: 52px; padding: 0 3px; }
  .five-d-stage__brand-tile { width: 42px; height: 42px; border-radius: 12px; }
  .five-d-stage__identity { gap: 10px; }
  .five-d-stage__identity h1 { font-size: var(--merxi-stage-title-mobile, 28px); }
  .five-d-stage__identity p { font-size: 10px; }
  .five-d-stage__demo-chip { min-width: 72px; min-height: 38px; }
  .five-d-stage__metrics { height: 82px; }
  .five-d-stage__metric { padding: 8px 5px 6px; }
  .five-d-stage__metric > span { font-size: 11px; }
  .five-d-stage__metric > strong { gap: 4px; margin-top: 7px; font-size: clamp(16px, 4.6vw, 21px); }
  .five-d-stage__metric > strong img { width: 18px; height: 18px; }
  .five-d-stage__metric.is-countdown > strong { font-size: 24px; }
  .five-d-stage__metric > small { margin-top: 4px; font-size: 9px; }
  .five-d-stage__round-ticker { height: 36px; margin-top: 7px; padding: 0 12px; font-size: 11px; }
  .five-d-stage__round-ticker code { display: none; }
  .five-d-stage__hero { height: 178px; }
  .five-d-stage__hero-badge { top: 67px; width: 59px; height: 59px; }
  .five-d-stage__hero-badge span { font-size: 10px; }
  .five-d-stage__hero-badge strong { margin-top: 5px; font-size: 14px; }
  .five-d-stage__reel-label { top: 12px; font-size: 9px; }
  .five-d-stage__reels { top: 53px; height: 58px; }
  .five-d-stage__reels > span { font-size: clamp(31px, 9vw, 42px); }
  .five-d-stage__hero-pill { right: 14%; bottom: 5px; left: 14%; min-height: 32px; font-size: 10px; }
  .five-d-stage__hero-pill strong { font-size: 13px; }
  .five-d-stage__wager-card { min-height: 0; padding: 15px 14px; }
  .five-d-stage__stake-row { grid-template-columns: minmax(0, 43%) minmax(0, 57%); gap: 8px; }
  .five-d-stage__stake-input { height: 54px; padding: 7px 10px; }
  .five-d-stage__stake-input > span:first-child { font-size: 12px; }
  .five-d-stage__stake-value input { font-size: 22px; }
  .five-d-stage__stake-value img { width: 22px; height: 22px; }
  .five-d-stage__stake-presets { gap: 5px; }
  .five-d-stage__stake-presets button { font-size: 14px; }
  .five-d-stage__selection-heading h2 { font-size: 15px; }
  .five-d-stage__selection-heading > div > span { display: block; margin: 3px 0 0; font-size: 10px; }
  .five-d-stage__play-drawer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .five-d-stage__position-row,
  .five-d-stage__ordered-slots { gap: 6px; }
  .five-d-stage__position-row button,
  .five-d-stage__ordered-slots button { min-height: 44px; font-size: 12px; }
  .five-d-stage__selection-progress { min-height: 30px; gap: 7px; font-size: 10px; }
  .five-d-stage__selection-progress strong { font-size: 11px; }
  .five-d-stage__digit-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .five-d-stage__digit-grid button { height: 46px; }
  .five-d-stage__selected-row { min-height: 52px; gap: 8px; }
  .five-d-stage__selected-row > span { font-size: 13px; }
  .five-d-stage__selected-row strong { min-width: 36px; height: 40px; font-size: 17px; }
  .five-d-stage__submit { min-height: 64px; margin-top: 8px; }
  .five-d-stage__submit span { font-size: 21px; }
  .five-d-stage__submit small { margin-top: 6px; font-size: 10px; }
  .five-d-stage__mode-switch { margin-top: 8px; }
  .five-d-stage__mode-switch button { min-height: 44px; font-size: 13px; }
  .five-d-stage__auto-note { margin-top: 6px; }
  .five-d-stage__proof > button,
  .five-d-stage__proof > div:not(.five-d-stage__proof-details) { min-height: 66px; gap: 5px; padding: 8px 6px; }
  .five-d-stage__proof > button > span:first-child,
  .five-d-stage__proof > div > span:first-child { width: 27px; height: 27px; }
  .five-d-stage__proof strong { font-size: 10px; }
  .five-d-stage__proof small { font-size: 10px; }
}

@media (max-width: 359px) {
  .five-d-stage__demo-chip { display: none; }
  .five-d-stage__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; }
  .five-d-stage__metric { min-height: 82px; }
  .five-d-stage__metric.is-countdown { grid-column: 1 / -1; min-height: 70px; border-top: 1px solid var(--five-d-line); }
  .five-d-stage__metric.is-countdown::before { display: none; }
  .five-d-stage__hero { height: 165px; }
  .five-d-stage__hero-badge { top: 61px; width: 55px; height: 55px; }
  .five-d-stage__stake-row { grid-template-columns: 1fr; }
  .five-d-stage__stake-presets { min-height: 44px; }
  .five-d-stage__selected-row { grid-template-columns: auto minmax(0, 1fr); }
  .five-d-stage__selected-row > button { grid-column: 1 / -1; justify-self: end; }
  .five-d-stage__proof { grid-template-columns: 1fr; }
  .five-d-stage__proof > * + *::before { display: none; }
}

@media (min-width: 960px) {
  .five-d-stage {
    width: min(calc(100% - 48px), 1240px);
    min-height: 100vh;
    padding: 22px 28px 16px;
    background-size: 760px auto;
  }
  .five-d-stage__header { height: 78px; padding: 0 7px; }
  .five-d-stage__brand-tile { width: 56px; height: 56px; }
  .five-d-stage__identity h1 { font-size: var(--merxi-stage-title, 42px); }
  .five-d-stage__layout {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(390px, 0.44fr) minmax(520px, 0.56fr);
    grid-template-areas: "round wager" "proof wager";
    gap: 18px 24px;
  }
  .five-d-stage__round-column { grid-area: round; }
  .five-d-stage__wager-card { grid-area: wager; min-height: 690px; margin: 0; padding: 22px 24px; }
  .five-d-stage__proof { grid-area: proof; margin-top: 0; }
  .five-d-stage__metrics { height: 112px; }
  .five-d-stage__metric > span { font-size: 13px; }
  .five-d-stage__metric > strong { font-size: clamp(21px, 1.8vw, 27px); }
  .five-d-stage__round-ticker { height: 44px; margin-top: 12px; }
  .five-d-stage__hero { height: 500px; }
  .five-d-stage__hero-badge { top: 228px; width: 92px; height: 92px; }
  .five-d-stage__reel-label { top: 54px; }
  .five-d-stage__reels { top: 166px; height: 142px; }
  .five-d-stage__reels > span { font-size: clamp(48px, 4vw, 66px); }
  .five-d-stage__hero-pill { right: 18%; bottom: 32px; left: 18%; min-height: 46px; }
  .five-d-stage__stake-row { grid-template-columns: minmax(200px, 0.47fr) minmax(280px, 0.53fr); }
  .five-d-stage__digit-grid { gap: 7px; }
  .five-d-stage__selected-row { margin-top: 16px; }
  .five-d-stage__submit { min-height: 84px; margin-top: 15px; }
  .five-d-stage__compliance { padding-top: 13px; }
}

@media (min-width: 1500px) {
  .five-d-stage { width: min(calc(100% - 80px), 1320px); }
  .five-d-stage__layout { grid-template-columns: 0.45fr 0.55fr; gap: 22px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
