:root {
  --navy-950: #020720;
  --navy-900: #041137;
  --navy-800: #09215f;
  --navy-700: #0e3c96;
  --blue: #1b76e8;
  --cyan: #58e7ff;
  --ice: #dcecff;
  --muted: #8dafdc;
  --gold: #e6bb62;
  --red: #ff5c62;
  --panel: rgba(3, 14, 51, 0.9);
  --line: rgba(115, 180, 255, 0.33);
  --shadow: 0 22px 70px rgba(0, 4, 24, 0.56);
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--navy-950);
  color: #f4f8ff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--navy-950);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(25, 103, 236, 0.3), transparent 32rem),
    var(--navy-950);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-180%);
  padding: 10px 14px;
  background: var(--cyan);
  color: var(--navy-950);
  font-weight: 900;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  min-height: 64px;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 22px;
  padding: 10px clamp(14px, 2.4vw, 32px);
  border-bottom: 1px solid rgba(113, 172, 255, 0.3);
  background: rgba(2, 7, 32, 0.96);
  box-shadow: 0 10px 35px rgba(0, 3, 20, 0.42);
}

.brand,
.game-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  width: max-content;
  color: #f5f8ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
  box-shadow: 0 0 18px rgba(69, 159, 255, 0.35);
}

.game-lockup {
  gap: 9px;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.game-lockup span {
  color: var(--cyan);
  font-weight: 950;
}

.game-lockup b {
  color: #7695c3;
  font-size: 8px;
}

.network-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(88, 231, 255, 0.3);
  border-radius: 3px;
  background: rgba(15, 62, 145, 0.35);
  color: #bdefff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 1px;
  background: var(--cyan);
  box-shadow: 0 0 11px rgba(88, 231, 255, 0.9);
  animation: pulse 1.8s ease-in-out infinite;
}

.icon-button {
  display: grid;
  min-width: 48px;
  height: 34px;
  place-items: center;
  border: 1px solid #31578e;
  border-radius: 3px;
  background: #081b4b;
  color: #aac6ec;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.icon-button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.sound-off,
.is-muted .sound-on {
  display: none;
}

.is-muted .sound-off {
  display: inline;
}

.game-shell {
  display: grid;
  min-height: calc(100svh - 64px);
  grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 430px);
}

.deal-room {
  position: relative;
  min-height: 710px;
  overflow: hidden;
  background: #03102b;
  isolation: isolate;
}

.deal-room-art,
.art-scrim,
.scanlines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.deal-room-art {
  z-index: -3;
  object-fit: cover;
  object-position: center 50%;
  filter: saturate(1.03) contrast(1.03);
  transform: scale(1.01);
}

.art-scrim {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(1, 6, 27, 0.72), rgba(3, 12, 45, 0.12) 30%, rgba(2, 8, 29, 0.48) 70%, rgba(1, 5, 25, 0.94)),
    radial-gradient(circle at 52% 44%, rgba(25, 115, 255, 0.12), transparent 45%);
}

.scanlines {
  z-index: -1;
  pointer-events: none;
  opacity: 0.12;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: screen;
}

.scene-header {
  position: absolute;
  z-index: 3;
  top: clamp(18px, 3.2vw, 38px);
  right: clamp(18px, 3vw, 40px);
  left: clamp(18px, 3vw, 40px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.scene-header p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--cyan);
  font-size: clamp(8px, 0.72vw, 11px);
  font-weight: 950;
  letter-spacing: 0.18em;
}

.scene-header h1 {
  margin: 4px 0 0;
  color: white;
  font-size: clamp(24px, 3vw, 48px);
  font-weight: 1000;
  letter-spacing: -0.065em;
  line-height: 0.88;
  text-shadow: 0 3px 28px #000, 0 0 28px rgba(56, 132, 255, 0.42);
}

.term-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.term-pills span {
  padding: 7px 9px;
  border: 1px solid rgba(125, 185, 255, 0.45);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(22, 66, 145, 0.86), rgba(4, 17, 61, 0.86));
  color: #dceaff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
  font-size: clamp(7px, 0.55vw, 9px);
  font-weight: 900;
  letter-spacing: 0.08em;
  backdrop-filter: blur(6px);
}

.model {
  position: absolute;
  z-index: 2;
  top: clamp(118px, 18%, 175px);
  right: clamp(62px, 8%, 118px);
  bottom: clamp(70px, 12%, 120px);
  left: clamp(38px, 8%, 118px);
  display: flex;
  min-height: 440px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(101, 180, 255, 0.62);
  border-radius: 5px;
  background:
    linear-gradient(150deg, rgba(7, 29, 92, 0.79), rgba(2, 10, 39, 0.83)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 22px,
      rgba(88, 231, 255, 0.035) 23px
    );
  box-shadow:
    var(--shadow),
    8px 8px 0 rgba(1, 7, 29, 0.5),
    inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(3px);
}

.model::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(88, 231, 255, 0.08), transparent);
  transform: translateX(-120%);
  animation: scan 5.5s linear infinite;
}

.model-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(15px, 1.5vw, 23px) clamp(16px, 1.8vw, 28px) 10px;
}

.moic-block span,
.round-status span,
.section-label span {
  display: block;
  color: var(--muted);
  font-size: clamp(7px, 0.58vw, 9px);
  font-weight: 950;
  letter-spacing: 0.16em;
}

.moic-block strong {
  display: block;
  margin-top: 1px;
  color: var(--cyan);
  font-size: clamp(35px, 4vw, 64px);
  font-weight: 1000;
  letter-spacing: -0.075em;
  line-height: 0.95;
  text-shadow: 0 0 24px rgba(88, 231, 255, 0.4);
}

.moic-block strong.is-loss {
  color: var(--red);
  text-decoration: line-through;
  text-shadow: 0 0 24px rgba(255, 92, 98, 0.35);
}

.round-status {
  max-width: 48%;
  text-align: right;
}

.round-status span {
  color: var(--gold);
}

.round-status small {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #7fa4d4;
  font-size: clamp(7px, 0.58vw, 9px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 clamp(16px, 1.8vw, 28px) 13px;
  overflow: hidden;
  border: 1px solid rgba(125, 184, 255, 0.22);
  border-radius: 3px;
  background: rgba(83, 157, 255, 0.16);
}

.kpi-grid div {
  min-width: 0;
  padding: 9px 10px;
  background: linear-gradient(180deg, rgba(13, 50, 134, 0.76), rgba(4, 16, 58, 0.84));
}

.kpi-grid span,
.kpi-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-grid span {
  color: #87a8d4;
  font-size: clamp(7px, 0.53vw, 9px);
}

.kpi-grid strong {
  margin-top: 3px;
  color: #f0f5ff;
  font-size: clamp(9px, 0.76vw, 12px);
}

.stage-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  padding: 0 clamp(16px, 1.8vw, 28px) 14px;
}

.stage-track::before {
  position: absolute;
  top: 13px;
  right: 7%;
  left: 7%;
  height: 1px;
  content: "";
  background: rgba(121, 184, 255, 0.28);
}

.stage {
  position: relative;
  z-index: 1;
  min-width: 0;
  color: #6689bc;
  text-align: center;
}

.stage b {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  margin: 0 auto 4px;
  border: 1px solid #315d9f;
  border-radius: 2px;
  background: #091b50;
  font-size: 9px;
}

.stage small {
  display: block;
  overflow: hidden;
  font-size: clamp(6px, 0.48vw, 8px);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage.is-safe {
  color: var(--cyan);
}

.stage.is-safe b {
  border-color: var(--cyan);
  background: linear-gradient(145deg, #0d7ee0, #073d96);
  box-shadow: 0 0 14px rgba(88, 231, 255, 0.38);
}

.stage.is-active b {
  transform: translateY(-2px) scale(1.08);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 0 3px rgba(230, 187, 98, 0.14), 0 0 12px rgba(230, 187, 98, 0.4);
}

.stage.is-failed {
  color: var(--red);
}

.stage.is-failed b {
  border-color: var(--red);
  background: #65172e;
  color: white;
  box-shadow: 0 0 14px rgba(255, 92, 98, 0.35);
}

.model-body {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(180px, 0.85fr) minmax(260px, 1.55fr);
  gap: 11px;
  padding: 0 clamp(16px, 1.8vw, 28px) clamp(15px, 1.5vw, 24px);
}

.return-bridge,
.event-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(124, 184, 255, 0.27);
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(18, 59, 146, 0.52), rgba(2, 12, 49, 0.62));
  padding: 13px;
}

.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.section-label small {
  color: #6f94c4;
  font-size: 7px;
}

.bridge-bars {
  display: flex;
  height: calc(100% - 18px);
  min-height: 80px;
  align-items: flex-end;
  justify-content: space-around;
  gap: 5px;
  padding-top: 14px;
  border-bottom: 1px solid rgba(88, 231, 255, 0.24);
}

.bridge-column {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
}

.bridge-column i {
  display: block;
  width: min(70%, 24px);
  min-height: 6%;
  margin: 0 auto;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #72efff, #1f72ed);
  box-shadow: 0 0 12px rgba(88, 231, 255, 0.28);
  animation: grow 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.bridge-column:first-child i,
.bridge-column:last-child i {
  background: linear-gradient(180deg, #edf5ff, #6e9afa);
}

.bridge-column small {
  margin-top: 5px;
  color: #82a5d5;
  font-size: clamp(6px, 0.42vw, 7px);
}

.event-panel h2 {
  margin: clamp(12px, 1vw, 17px) 0 0;
  overflow: hidden;
  color: white;
  font-size: clamp(15px, 1.4vw, 23px);
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-panel p {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: #c2d6f3;
  font-size: clamp(9px, 0.75vw, 12px);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.event-panel blockquote {
  margin: 12px 0 0;
  overflow: hidden;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  color: #cbe0ff;
  font-size: clamp(8px, 0.69vw, 11px);
  font-style: italic;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-strip {
  position: absolute;
  z-index: 4;
  top: 35%;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.staff-strip span {
  display: flex;
  width: 44px;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: 0.48;
  transition: opacity 180ms ease, transform 180ms ease;
}

.staff-strip b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #46699a;
  border-radius: 2px;
  background: #09163b;
  color: #9bb7df;
  font-size: 8px;
}

.staff-strip small {
  color: #6c8bb8;
  font-size: 6px;
  font-weight: 800;
}

.staff-strip span.is-active {
  opacity: 1;
  transform: translateX(-4px);
}

.staff-strip span.is-active b {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(88, 231, 255, 0.36);
}

.scene-alert {
  position: absolute;
  z-index: 8;
  right: 50%;
  bottom: 24px;
  width: min(440px, calc(100% - 40px));
  transform: translateX(50%);
  border: 1px solid rgba(116, 189, 255, 0.72);
  border-radius: 4px;
  padding: 13px 18px;
  background: rgba(3, 14, 51, 0.94);
  box-shadow: 6px 6px 0 rgba(0, 4, 25, 0.65), 0 0 40px rgba(40, 121, 255, 0.28);
  text-align: center;
  backdrop-filter: blur(9px);
}

.scene-alert span,
.scene-alert strong,
.scene-alert small {
  display: block;
}

.scene-alert span {
  color: var(--gold);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.18em;
}

.scene-alert strong {
  margin-top: 3px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.scene-alert small {
  margin-top: 4px;
  color: #98b4dc;
  font-size: 9px;
}

.scene-alert.is-loss {
  border-color: rgba(255, 92, 98, 0.78);
  box-shadow: 6px 6px 0 rgba(0, 4, 25, 0.65), 0 0 40px rgba(255, 54, 75, 0.24);
}

.scene-alert.is-loss span {
  color: var(--red);
}

.control-room {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 36px);
  border-left: 1px solid rgba(103, 168, 255, 0.31);
  background:
    linear-gradient(180deg, rgba(7, 28, 81, 0.98), rgba(2, 8, 31, 0.99)),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 25px,
      rgba(88, 231, 255, 0.025) 26px
    );
  box-shadow: -14px 0 50px rgba(0, 4, 25, 0.4);
}

.control-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 23px;
  border-bottom: 1px solid rgba(111, 167, 242, 0.26);
  padding-bottom: 18px;
}

.control-head p {
  margin: 0;
  color: var(--gold);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.18em;
}

.control-head h2 {
  margin: 4px 0 0;
  font-size: clamp(25px, 2vw, 34px);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.deal-number {
  color: #607fae;
  font: 800 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.control-view {
  display: block;
}

.control-view[hidden] {
  display: none;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  color: #b6cae8;
  font-size: 10px;
  font-weight: 850;
}

.field-label small,
.field-help {
  color: #6f91bf;
  font-size: 8px;
  font-weight: 650;
}

.amount-field {
  display: flex;
  align-items: center;
  border: 1px solid #3e6fae;
  border-radius: 3px;
  background: rgba(10, 38, 98, 0.8);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.amount-field:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(88, 231, 255, 0.1);
}

.amount-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 14px;
  outline: 0;
  background: transparent;
  color: white;
  font-size: 20px;
  font-weight: 950;
}

.amount-field b {
  padding: 0 14px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.field-help {
  margin: 7px 0 19px;
}

.mode-fieldset {
  margin: 0 0 20px;
  border: 0;
  padding: 0;
}

.mode-fieldset legend {
  margin-bottom: 8px;
  color: #b6cae8;
  font-size: 10px;
  font-weight: 850;
}

.mode-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mode-selector button {
  min-width: 0;
  border: 1px solid #2b568f;
  border-radius: 3px;
  padding: 10px 7px;
  background: rgba(6, 26, 74, 0.76);
  color: #c5d5ed;
  text-align: left;
}

.mode-selector button:hover {
  border-color: #6194d1;
}

.mode-selector button.is-selected {
  border-color: var(--gold);
  background:
    linear-gradient(150deg, rgba(211, 148, 44, 0.18), rgba(7, 30, 82, 0.85));
  box-shadow: 4px 4px 0 rgba(0, 5, 26, 0.5);
}

.mode-selector small,
.mode-selector b,
.mode-selector span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-selector small {
  color: #708fbb;
  font-size: 6px;
  letter-spacing: 0.09em;
}

.mode-selector b {
  margin-top: 5px;
  font-size: clamp(8px, 0.68vw, 10px);
}

.mode-selector span {
  margin-top: 5px;
  color: var(--gold);
  font-size: 8px;
}

select {
  width: 100%;
  border: 1px solid #3e6fae;
  border-radius: 3px;
  padding: 13px 38px 13px 13px;
  outline: 0;
  background: #0a2864;
  color: white;
  font-size: 11px;
  font-weight: 800;
}

select:focus {
  border-color: var(--cyan);
}

.terms-card {
  margin: 19px 0;
  border: 1px solid rgba(89, 137, 199, 0.4);
  border-radius: 3px;
  padding: 14px;
  background: rgba(3, 16, 54, 0.58);
}

.terms-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #8eadd5;
  font-size: 9px;
}

.terms-card div + div {
  margin-top: 8px;
}

.terms-card strong {
  color: #eef5ff;
}

.terms-card p,
.risk-note p,
.preview-disclosure p {
  margin: 12px 0 0;
  color: #7896c0;
  font-size: 8px;
  line-height: 1.55;
}

.primary-action,
.cashout-action,
.secondary-action,
.text-action {
  width: 100%;
  border-radius: 3px;
  font-weight: 950;
}

.primary-action {
  min-height: 58px;
  border: 1px solid #54d9ff;
  padding: 10px 15px;
  background:
    linear-gradient(145deg, #1286df, #0d4fba);
  color: white;
  box-shadow: 6px 6px 0 #03102e, inset 0 1px rgba(255, 255, 255, 0.25);
}

.primary-action:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  background: linear-gradient(145deg, #1aa2ed, #1464d6);
  box-shadow: 8px 8px 0 #03102e, 0 0 24px rgba(46, 164, 255, 0.3);
}

.primary-action:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 #03102e;
}

.primary-action:disabled {
  border-color: #32537d;
  background: #17345f;
  color: #718cad;
  box-shadow: none;
  opacity: 0.72;
}

.primary-action span,
.primary-action strong {
  display: block;
}

.primary-action span {
  font-size: 10px;
  letter-spacing: 0.12em;
}

.primary-action strong {
  margin-top: 3px;
  color: #d8f7ff;
  font-size: 9px;
}

.locked-terms {
  display: block;
  margin-bottom: 26px;
  border-left: 3px solid var(--cyan);
  padding: 3px 0 3px 11px;
}

.locked-terms span,
.locked-terms strong {
  display: block;
}

.locked-terms span {
  color: var(--cyan);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.locked-terms strong {
  margin-top: 5px;
  color: #9cb8df;
  font-size: 9px;
}

.quarter-summary {
  padding: 23px 0 27px;
  border-top: 1px solid rgba(96, 145, 206, 0.25);
  border-bottom: 1px solid rgba(96, 145, 206, 0.25);
  text-align: center;
}

.quarter-summary span,
.quarter-summary strong,
.quarter-summary small {
  display: block;
}

.quarter-summary span {
  color: #7695be;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.quarter-summary strong {
  margin-top: 4px;
  color: var(--cyan);
  font-size: clamp(45px, 4.5vw, 72px);
  font-weight: 1000;
  letter-spacing: -0.08em;
  line-height: 0.95;
}

.quarter-summary small {
  margin-top: 8px;
  color: #88a3ca;
  font-size: 8px;
  font-weight: 800;
}

.action-stack {
  margin-top: 25px;
}

.cashout-action {
  min-height: 64px;
  border: 1px solid #f3cf7a;
  padding: 10px 15px;
  background: linear-gradient(145deg, #e4b24d, #a86d14);
  color: #160e02;
  box-shadow: 6px 6px 0 #03102e;
}

.cashout-action:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 8px 8px 0 #03102e, 0 0 22px rgba(230, 187, 98, 0.28);
}

.cashout-action:disabled {
  border-color: #34557d;
  background: #15345f;
  color: #7891b2;
  box-shadow: none;
}

.cashout-action span,
.cashout-action strong {
  display: block;
}

.cashout-action span {
  font-size: 10px;
  letter-spacing: 0.13em;
}

.cashout-action strong {
  margin-top: 3px;
  font-size: 16px;
}

.or-divider {
  display: block;
  margin: 11px 0;
  color: #5b79a2;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-align: center;
}

.risk-note {
  margin-top: 23px;
  border: 1px solid rgba(255, 92, 98, 0.25);
  padding: 13px;
  background: rgba(91, 21, 46, 0.16);
}

.risk-note > span {
  color: #ff8990;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.risk-note p {
  margin-top: 7px;
}

.result-view {
  text-align: center;
}

.result-view > span {
  color: #809dc5;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.result-view > strong {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: clamp(57px, 6vw, 90px);
  font-weight: 1000;
  letter-spacing: -0.09em;
  line-height: 0.95;
}

.result-view > strong.is-loss {
  color: var(--red);
  text-decoration: line-through;
}

.result-view > p {
  margin: 8px 0 25px;
  color: #a8bfdf;
  font-size: 11px;
}

.result-actions {
  display: grid;
  gap: 9px;
}

.secondary-action {
  min-height: 46px;
  border: 1px solid #416da6;
  background: #0a2558;
  color: #d6e6fc;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.secondary-action:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.text-action {
  border: 0;
  padding: 9px;
  background: transparent;
  color: #7898c0;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.text-action:hover {
  color: white;
}

.round-receipt {
  margin: 23px 0 0;
  border-top: 1px solid rgba(93, 140, 200, 0.27);
  padding-top: 15px;
  text-align: left;
}

.round-receipt div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding: 5px 0;
  font: 700 8px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.round-receipt dt {
  color: #6688b5;
}

.round-receipt dd {
  overflow: hidden;
  margin: 0;
  color: #acc4e4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-disclosure {
  margin-top: auto;
  padding-top: 24px;
}

.preview-disclosure span {
  color: var(--cyan);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.15em;
}

.preview-disclosure p {
  margin-top: 7px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: 18px;
  width: min(390px, calc(100vw - 36px));
  border: 1px solid var(--cyan);
  border-radius: 3px;
  padding: 13px 15px;
  background: rgba(4, 24, 73, 0.96);
  color: white;
  box-shadow: 6px 6px 0 rgba(0, 4, 23, 0.8), 0 0 30px rgba(46, 157, 255, 0.24);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.45;
}

.toast.is-error {
  border-color: var(--red);
  background: rgba(75, 15, 37, 0.97);
}

.is-busy .primary-action,
.is-busy .cashout-action {
  pointer-events: none;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scan {
  to {
    transform: translateX(120%);
  }
}

@keyframes grow {
  from {
    transform: scaleY(0.1);
    transform-origin: bottom;
  }
  to {
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

@media (max-width: 1120px) {
  .game-shell {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .model {
    right: 58px;
    left: 28px;
  }

  .event-panel p {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 850px) {
  .topbar {
    grid-template-columns: 1fr auto auto;
  }

  .game-lockup {
    display: none;
  }

  .game-shell {
    display: block;
  }

  .deal-room {
    min-height: min(690px, 74svh);
  }

  .control-room {
    min-height: 620px;
    border-top: 1px solid rgba(103, 168, 255, 0.31);
    border-left: 0;
  }

  .control-view,
  .control-head,
  .preview-disclosure {
    width: min(610px, 100%);
    margin-right: auto;
    margin-left: auto;
  }

  .mode-selector button b {
    font-size: 10px;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 56px;
    gap: 9px;
  }

  .brand span {
    font-size: 10px;
  }

  .network-pill {
    padding: 7px 8px;
  }

  .network-pill span:last-child {
    font-size: 0;
  }

  .network-pill span:last-child::after {
    content: "APE";
    font-size: 8px;
  }

  .game-shell {
    min-height: calc(100svh - 56px);
  }

  .deal-room {
    min-height: 680px;
  }

  .deal-room-art {
    object-position: 53% 50%;
  }

  .scene-header {
    top: 16px;
    right: 14px;
    left: 14px;
  }

  .term-pills span:nth-child(2) {
    display: none;
  }

  .model {
    top: 104px;
    right: 14px;
    bottom: 58px;
    left: 14px;
    min-height: 510px;
  }

  .model-top {
    padding: 14px 14px 8px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    margin: 0 14px 12px;
  }

  .stage-track {
    gap: 3px;
    padding: 0 12px 13px;
  }

  .stage b {
    width: 22px;
    height: 22px;
    font-size: 8px;
  }

  .stage small {
    font-size: 5px;
  }

  .model-body {
    grid-template-columns: 1fr;
    grid-template-rows: 106px minmax(0, 1fr);
    gap: 8px;
    padding: 0 14px 14px;
  }

  .return-bridge {
    order: 2;
  }

  .event-panel {
    order: 1;
  }

  .event-panel h2 {
    margin-top: 8px;
    font-size: 14px;
  }

  .event-panel p {
    margin-top: 6px;
    font-size: 8px;
    -webkit-line-clamp: 2;
  }

  .event-panel blockquote {
    margin-top: 7px;
    font-size: 7px;
  }

  .staff-strip {
    display: none;
  }

  .scene-alert {
    bottom: 12px;
  }

  .control-room {
    padding: 25px 18px calc(30px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .brand img {
    width: 29px;
    height: 29px;
  }

  .brand span {
    letter-spacing: 0.03em;
  }

  .deal-room {
    min-height: 650px;
  }

  .scene-header h1 {
    font-size: 23px;
  }

  .term-pills span {
    padding: 6px;
    font-size: 6px;
  }

  .mode-selector {
    grid-template-columns: 1fr;
  }

  .mode-selector button {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .mode-selector button small {
    grid-column: 1 / -1;
  }

  .mode-selector button span {
    margin-top: 5px;
  }
}

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