@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Outfit:wght@300;400;500;600&display=swap");

:root {
  --fb-ink: #1f2f2a;
  --fb-ink-deep: #15231f;
  --fb-stage: #315547;
  --fb-stage-deep: #234238;
  --fb-gold: #a77d48;
  --fb-gold-light: #c6a56d;
  --fb-sand: #efe8dc;
  --fb-sand-deep: #e1d7c7;
  --fb-ivory: #f8f4eb;
  --fb-sage: #78837c;
  --fb-text: #526159;
  --ink: var(--fb-ivory);
  --muted: rgba(248, 244, 235, 0.55);
  --night: var(--fb-ink-deep);
  --line: rgba(198, 165, 109, 0.2);
  --line-strong: rgba(198, 165, 109, 0.38);
  --lime: var(--fb-gold-light);
  --blue: #aab8af;
  --amber: var(--fb-gold-light);
  --coral: #c49671;
  --font-display: "Cormorant Garamond", serif;
  --font-body: "Outfit", sans-serif;
  color: var(--fb-ivory);
  background: var(--fb-ink-deep);
  font-family: var(--font-body);
}

html,
body,
#root {
  min-width: 320px;
  min-height: 100%;
}

html { background: var(--fb-ink-deep); }
body {
  margin: 0;
  background: var(--fb-ink-deep);
  color: var(--fb-ivory);
  font-family: var(--font-body);
}
button,
input { font-family: var(--font-body); }
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--fb-gold-light);
  outline-offset: 4px;
}

.local-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Navegación compartida */
.standalone-utility-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 700;
  height: 76px;
  padding: 0 3.5rem;
  border-bottom: 1px solid rgba(198, 165, 109, 0.2);
  background: rgba(16, 35, 28, 0.96);
  box-shadow: 0 12px 38px rgba(7, 21, 15, 0.16);
  backdrop-filter: blur(14px);
}
.utility-nav-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  width: 100%;
  min-height: 76px;
}
.nav-icon-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(198, 165, 109, 0.3);
  border-radius: 0;
  background: transparent;
  color: rgba(248, 244, 235, 0.72);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-icon-btn:hover,
.nav-icon-btn[aria-expanded="true"] {
  color: var(--fb-gold-light);
  border-color: rgba(198, 165, 109, 0.7);
  background: rgba(248, 244, 235, 0.05);
}
.nav-icon-btn svg { width: 21px; height: 21px; }
.nav-tools-item { position: relative; }
.tools-dropdown {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0;
  width: min(780px, calc(100vw - 3rem));
  padding: 0.85rem;
  border: 1px solid rgba(198, 165, 109, 0.34);
  background: rgba(21, 35, 31, 0.99);
  box-shadow: 0 30px 90px rgba(4, 12, 9, 0.45);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.22s, visibility 0.18s;
}
.tools-dropdown.open {
  visibility: visible;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.tools-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.75rem 1rem;
  border-bottom: 1px solid rgba(248, 244, 235, 0.12);
}
.tools-dropdown-head strong {
  color: var(--fb-ivory);
  font: 500 1.2rem "Cormorant Garamond", serif;
}
.tools-dropdown-head span {
  color: rgba(248, 244, 235, 0.5);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}
.tools-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.tools-menu-group { padding: 0.85rem 0.6rem 0.5rem; }
.tools-menu-group + .tools-menu-group {
  border-left: 1px solid rgba(248, 244, 235, 0.1);
}
.tools-menu-label {
  margin: 0 0 0.45rem 0.55rem;
  color: var(--fb-gold-light);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tools-menu-link {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  min-height: 58px;
  padding: 0.48rem 0.55rem;
  color: var(--fb-ivory);
  text-decoration: none;
  transition: background 0.2s;
}
.tools-menu-link:hover,
.tools-menu-link.active { background: rgba(248, 244, 235, 0.06); }
.tools-menu-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(198, 165, 109, 0.28);
  color: var(--fb-gold-light);
}
.tools-menu-icon svg { width: 20px; height: 20px; }
.tools-menu-copy strong,
.tools-menu-copy small { display: block; }
.tools-menu-copy strong { font-size: 0.76rem; font-weight: 500; }
.tools-menu-copy small {
  margin-top: 0.1rem;
  color: rgba(248, 244, 235, 0.43);
  font-size: 0.62rem;
  line-height: 1.25;
}

/* Una sola escena en escritorio */
.app-shell {
  position: relative;
  height: 100svh;
  min-height: 100svh;
  padding-top: 76px;
  overflow: hidden;
  background:
    radial-gradient(circle at 73% 20%, rgba(120, 151, 135, 0.18), transparent 29rem),
    radial-gradient(circle at 12% 82%, rgba(59, 89, 76, 0.24), transparent 30rem),
    linear-gradient(135deg, #1a382f, #10231c 78%);
}
.app-shell::before {
  opacity: 0.04;
  mix-blend-mode: soft-light;
}
.topbar { display: none; }
.skip-link {
  z-index: 900;
  background: var(--fb-gold-light);
  color: var(--fb-ink-deep);
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(410px, 38%) minmax(0, 62%);
  width: 100%;
  height: calc(100svh - 76px);
  min-height: 0;
  background: transparent;
}

/* Panel de configuración */
.config-panel {
  position: relative;
  z-index: 10;
  justify-content: flex-start;
  min-height: 0;
  padding: clamp(1.7rem, 3.2vh, 2.8rem) clamp(2rem, 3.4vw, 4.2rem);
  overflow-y: auto;
  border-right: 1px solid rgba(198, 165, 109, 0.15);
  background:
    radial-gradient(circle at 10% 14%, rgba(120, 131, 124, 0.08), transparent 19rem),
    linear-gradient(155deg, rgba(23, 50, 41, 0.99), rgba(16, 35, 28, 0.99));
  color: var(--fb-ivory);
  scrollbar-width: thin;
  scrollbar-color: rgba(198, 165, 109, 0.34) transparent;
}
.config-panel::-webkit-scrollbar { width: 7px; }
.config-panel::-webkit-scrollbar-thumb {
  background: rgba(198, 165, 109, 0.3);
}
.config-panel > h1 {
  width: 100%;
  max-width: 9.5ch;
  margin: 0;
  color: var(--fb-ivory);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.25rem, 4.5vw, 4.85rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.91;
}
.config-panel > h1 span {
  color: var(--fb-gold-light);
  font-size: 1em;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.04em;
}
.intro {
  max-width: 32rem;
  margin: 0.75rem 0 1rem;
  color: rgba(248, 244, 235, 0.56);
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.55;
}
.config-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 0.8rem;
}
.field-label {
  min-height: 0;
  margin-bottom: 0.35rem;
  color: rgba(248, 244, 235, 0.68);
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.number-control {
  height: 43px;
  padding: 0 0.75rem;
  border: 1px solid rgba(198, 165, 109, 0.2);
  border-radius: 2px;
  background: rgba(248, 244, 235, 0.045);
}
.number-control:focus-within {
  border-color: var(--fb-gold-light);
  background: rgba(248, 244, 235, 0.07);
  box-shadow: 0 0 0 3px rgba(198, 165, 109, 0.08);
}
.number-control b {
  color: var(--fb-gold-light);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-weight: 500;
}
.number-control input {
  color: var(--fb-ivory);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.08rem;
  font-weight: 500;
}
.number-control em {
  color: rgba(248, 244, 235, 0.45);
  font-size: 0.62rem;
}
.field-range { height: 19px; margin: 0; }
.field-range::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--fb-gold-light) 0 var(--progress), rgba(248, 244, 235, 0.14) var(--progress));
}
.field-range::-webkit-slider-thumb {
  border-color: var(--fb-ink-deep);
  background: var(--fb-gold-light);
  box-shadow: 0 0 0 1px var(--fb-gold-light), 0 0 10px rgba(198, 165, 109, 0.36);
}
.field-range::-moz-range-progress { background: var(--fb-gold-light); }
.field-range::-moz-range-thumb {
  border-color: var(--fb-ink-deep);
  background: var(--fb-gold-light);
}
.range-limits { color: rgba(248, 244, 235, 0.34); }
.range-limits small { font-size: 0.54rem; }

.quote-adjustment {
  min-height: 42px;
  margin-top: 0.75rem;
  padding: 0 0.75rem;
  border-color: rgba(198, 165, 109, 0.2);
  border-radius: 2px;
  background: rgba(248, 244, 235, 0.035);
  color: rgba(248, 244, 235, 0.64);
  font-size: 0.66rem;
}
.quote-adjustment svg,
.quote-adjustment strong { color: var(--fb-gold-light); }
.quote-adjustment:hover,
.quote-adjustment.is-active {
  border-color: rgba(198, 165, 109, 0.55);
  background: rgba(198, 165, 109, 0.08);
  color: var(--fb-ivory);
}
.quote-adjustment strong { font-size: 0.58rem; }
.investment-assumption {
  margin-top: 0.65rem;
  border-color: rgba(198, 165, 109, 0.17);
}
.investment-assumption summary {
  min-height: 40px;
  color: rgba(248, 244, 235, 0.58);
  font-size: 0.65rem;
}
.investment-assumption summary::after,
.investment-assumption summary strong { color: var(--fb-gold-light); }
.investment-assumption .config-field { padding-bottom: 0.7rem; }

.payment-highlight {
  gap: 0.2rem 1rem;
  margin-top: 0.7rem;
  padding: 0.75rem 0.85rem;
  border-color: rgba(198, 165, 109, 0.32);
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(198, 165, 109, 0.1), rgba(198, 165, 109, 0.025));
}
.payment-highlight span {
  color: rgba(248, 244, 235, 0.54);
  font-size: 0.59rem;
}
.payment-highlight strong {
  color: var(--fb-gold-light);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  font-weight: 500;
}
.payment-highlight p {
  color: rgba(248, 244, 235, 0.52);
  font-size: 0.65rem;
}
.final-summary { margin-top: 0.7rem; }
.summary-heading { margin-bottom: 0.4rem; }
.summary-heading span {
  color: rgba(248, 244, 235, 0.62);
  font-size: 0.58rem;
}
.summary-heading small {
  color: var(--fb-gold-light);
  font-size: 0.6rem;
}
.summary-grid { border-color: rgba(198, 165, 109, 0.15); }
.summary-grid > div {
  padding: 0.55rem 0.65rem;
  border-color: rgba(198, 165, 109, 0.15);
  background: rgba(248, 244, 235, 0.025);
}
.summary-grid span {
  color: rgba(248, 244, 235, 0.42);
  font-size: 0.56rem;
}
.summary-grid strong,
.summary-grid strong.amber,
.summary-grid strong.blue,
.summary-grid strong.coral {
  color: var(--fb-ivory);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.92rem, 1.3vw, 1.15rem);
  font-weight: 500;
}
.summary-grid > div:nth-child(2) strong { color: #d5b089; }
.summary-grid > div:nth-child(3) strong { color: var(--fb-gold-light); }
.summary-grid > div:nth-child(4) strong { color: #aab8af; }
.final-summary > p {
  margin-top: 0.45rem;
  color: rgba(248, 244, 235, 0.42);
  font-size: 0.59rem;
}
.final-summary > p strong { color: var(--fb-ivory); font-weight: 500; }
.defaults-button,
.credit-method-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  margin-top: 0.6rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(198, 165, 109, 0.2);
  border-radius: 2px;
  background: rgba(248, 244, 235, 0.025);
  color: rgba(248, 244, 235, 0.55);
  font-size: 0.62rem;
  font-weight: 500;
  cursor: pointer;
}
.credit-method-trigger { margin-left: 0.45rem; }
.credit-method-trigger svg { width: 17px; height: 17px; color: var(--fb-gold-light); }
.defaults-button:hover,
.credit-method-trigger:hover {
  border-color: rgba(198, 165, 109, 0.55);
  background: rgba(198, 165, 109, 0.07);
  color: var(--fb-ivory);
}

/* Escena 3D */
.world-panel {
  grid-template-rows: minmax(0, 1fr) 110px;
  height: 100%;
  min-height: 0;
  border: 0;
  background:
    radial-gradient(circle at 55% 35%, rgba(150, 176, 160, 0.26), transparent 35%),
    linear-gradient(145deg, var(--fb-stage), var(--fb-stage-deep) 74%);
}
.scene-wrap {
  min-height: 0;
  background: rgba(45, 77, 66, 0.32);
}
.scene-wrap::before {
  background:
    radial-gradient(at 50% 56%, transparent 29%, rgba(10, 30, 22, 0.42) 100%),
    linear-gradient(90deg, rgba(23, 50, 41, 0.2), transparent 22%);
}
.three-stage canvas {
  opacity: 1;
  filter: grayscale(0.03) sepia(0.08) saturate(0.84) contrast(1.13) brightness(1.04);
  mix-blend-mode: normal;
}
.scene-loader {
  background: var(--fb-stage-deep);
  color: rgba(248, 244, 235, 0.58);
}
.scene-loader span { border-top-color: var(--fb-gold-light); }
.scene-legend {
  top: 3.5%;
  gap: 0.55rem;
  left: clamp(1rem, 3vw, 2.6rem);
  right: clamp(1rem, 3vw, 2.6rem);
}
.scene-label {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(198, 165, 109, 0.22);
  border-radius: 2px;
  background: rgba(16, 35, 28, 0.78);
  box-shadow: 0 16px 34px rgba(7, 21, 15, 0.13);
}
.scene-label small {
  color: rgba(248, 244, 235, 0.46);
  font-size: 0.56rem;
  font-weight: 600;
}
.scene-label strong,
.car-label strong,
.investment-label strong {
  color: var(--fb-ivory);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1rem, 1.45vw, 1.45rem);
  font-weight: 500;
}
.car-label strong { color: var(--fb-gold-light); }
.investment-label strong { color: #b4c1b9; }
.scene-label b {
  color: rgba(248, 244, 235, 0.42);
  font-size: 0.54rem;
  font-weight: 300;
}
.paid-label .label-dot { background: var(--fb-ivory); box-shadow: 0 0 10px rgba(248, 244, 235, 0.46); }
.car-label .label-dot { background: var(--fb-gold-light); box-shadow: 0 0 10px rgba(198, 165, 109, 0.58); }
.investment-label .label-dot { background: #aab8af; box-shadow: 0 0 10px rgba(170, 184, 175, 0.5); }
.interest-dot { background: #c49671; box-shadow: 0 0 7px rgba(196, 150, 113, 0.5); }
.balance-pill {
  top: 7.5rem;
  right: clamp(1rem, 3vw, 2.6rem);
  left: auto;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(198, 165, 109, 0.42);
  border-radius: 2px;
  background: rgba(31, 47, 42, 0.91);
  color: var(--fb-gold-light);
  transform: none;
}
.balance-pill span { color: rgba(248, 244, 235, 0.5); }
.balance-pill strong { color: var(--fb-ivory); }
.drag-hint { color: rgba(248, 244, 235, 0.43); }
.control-deck {
  grid-template-columns: 104px minmax(200px, 1fr) 184px;
  gap: 1.2rem;
  min-height: 110px;
  padding: 0.85rem clamp(1.25rem, 3vw, 2.5rem);
  border-top: 1px solid rgba(198, 165, 109, 0.15);
  background: rgba(23, 50, 41, 0.76);
  backdrop-filter: blur(10px);
}
.month-readout span { color: var(--fb-gold-light); font-size: 0.6rem; }
.month-readout strong {
  color: var(--fb-ivory);
  font-family: "Cormorant Garamond", serif;
  font-size: 2.55rem;
  font-weight: 400;
}
.month-readout small,
.range-row { color: rgba(248, 244, 235, 0.46); }
.range-row { font-size: 0.55rem; }
.range-row strong { color: rgba(248, 244, 235, 0.68); font-size: 0.58rem; }
.timeline-control input {
  background: linear-gradient(90deg, var(--fb-gold-light) 0 var(--progress), rgba(248, 244, 235, 0.16) var(--progress));
}
.timeline-control input::-webkit-slider-thumb {
  border-color: var(--fb-gold-light);
  background: var(--fb-ink-deep);
  box-shadow: 0 0 12px rgba(198, 165, 109, 0.38);
}
.timeline-control input::-moz-range-thumb {
  border-color: var(--fb-gold-light);
  background: var(--fb-ink-deep);
}
.tick-row i.active { background: var(--fb-gold-light); }
.reset-button,
.play-button { min-height: 46px; border-radius: 2px; }
.reset-button {
  border-color: rgba(198, 165, 109, 0.25);
  background: rgba(248, 244, 235, 0.04);
  color: rgba(248, 244, 235, 0.66);
}
.reset-button:hover { border-color: var(--fb-gold-light); color: var(--fb-gold-light); }
.play-button {
  border-color: var(--fb-gold-light);
  background: var(--fb-gold-light);
  color: var(--fb-ink-deep);
}
.play-button:hover { background: #dfc18d; filter: none; }

/* Diálogos de metodología y cotización */
.dialog-backdrop {
  z-index: 850;
  background: rgba(7, 18, 14, 0.78);
  backdrop-filter: blur(7px);
}
.method-dialog {
  border: 1px solid rgba(198, 165, 109, 0.38);
  border-radius: 2px;
  background:
    radial-gradient(circle at 90% 8%, rgba(198, 165, 109, 0.11), transparent 15rem),
    var(--fb-ivory);
  color: var(--fb-ink);
  box-shadow: 0 30px 100px rgba(7, 18, 14, 0.5);
}
.method-dialog .mission-tag { color: var(--fb-gold); }
.method-dialog .mission-tag span { background: var(--fb-gold); box-shadow: none; }
.method-dialog h2 {
  color: var(--fb-ink);
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
}
.method-dialog ul,
.method-dialog > p,
.quote-dialog .quote-intro { color: var(--fb-text); }
.method-dialog li::marker { color: var(--fb-gold); }
.method-dialog li strong { color: var(--fb-ink); }
.dialog-close {
  border-color: rgba(31, 47, 42, 0.18);
  border-radius: 2px;
  background: transparent;
  color: var(--fb-text);
}
.dialog-close:hover { border-color: var(--fb-gold); color: var(--fb-gold); }
.quote-field > span:first-child { color: var(--fb-text); }
.quote-field > small { color: var(--fb-sage); }
.quote-dialog .number-control {
  border-color: rgba(31, 47, 42, 0.18);
  background: rgba(239, 232, 220, 0.6);
}
.quote-dialog .number-control input { color: var(--fb-ink); }
.quote-dialog .number-control em { color: var(--fb-text); }
.quote-toggle {
  border-color: rgba(31, 47, 42, 0.16);
  background: rgba(239, 232, 220, 0.48);
}
.quote-toggle strong { color: var(--fb-ink); }
.quote-toggle small { color: var(--fb-text); }
.quote-breakdown { border-color: rgba(31, 47, 42, 0.14); }
.quote-breakdown > div {
  border-color: rgba(31, 47, 42, 0.14);
  background: rgba(239, 232, 220, 0.4);
}
.quote-breakdown span { color: var(--fb-sage); }
.quote-breakdown strong,
.quote-breakdown strong.coral { color: var(--fb-ink); }
.quote-dialog-actions button {
  border-radius: 2px;
  border-color: rgba(31, 47, 42, 0.2);
  background: transparent;
  color: var(--fb-text);
}
.quote-dialog-actions button:last-child {
  border-color: var(--fb-gold);
  background: var(--fb-gold);
  color: var(--fb-ivory);
}
.method-sources {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(31, 47, 42, 0.14);
}
.method-sources h3 {
  margin: 0 0 0.45rem;
  color: var(--fb-ink);
  font: 500 1.12rem "Cormorant Garamond", serif;
}
.method-sources p {
  margin: 0 0 0.55rem;
  color: var(--fb-text);
  font-size: 0.7rem;
  line-height: 1.55;
}
.method-sources a {
  color: #76562f;
  text-underline-offset: 3px;
}
.method-sources a:hover { color: var(--fb-gold); }

.no-js-summary {
  width: min(760px, calc(100% - 3rem));
  margin: 8rem auto 4rem;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid rgba(198, 165, 109, 0.28);
  background: var(--fb-ivory);
  color: var(--fb-ink);
}
.no-js-summary h1 {
  margin: 0 0 1rem;
  color: var(--fb-ink);
  font: 400 clamp(2.5rem, 6vw, 4.5rem)/0.98 "Cormorant Garamond", serif;
}
.no-js-summary p,
.no-js-summary li { color: var(--fb-text); line-height: 1.7; }
.no-js-summary a { color: #76562f; }

@media (max-width: 1220px) and (min-width: 981px) {
  .game-layout { grid-template-columns: minmax(385px, 40%) minmax(0, 60%); }
  .config-panel { padding-inline: 1.75rem; }
  .config-panel > h1 { font-size: clamp(3rem, 4.4vw, 4rem); }
  .scene-label { padding-inline: 0.6rem; }
  .control-deck { grid-template-columns: 90px minmax(180px, 1fr) 165px; }
}

@media (max-width: 980px) {
  body { overflow: auto; }
  .standalone-utility-nav {
    height: 70px;
    padding: 0 1.5rem;
  }
  .utility-nav-inner { min-height: 70px; }
  .app-shell {
    height: auto;
    min-height: 100svh;
    padding-top: 70px;
    overflow: visible;
  }
  .game-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .config-panel {
    min-height: auto;
    padding: 4.25rem clamp(1.5rem, 7vw, 4.5rem);
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(198, 165, 109, 0.15);
  }
  .config-panel > * { width: min(100%, 45rem); margin-right: auto; margin-left: auto; }
  .config-panel > h1 { max-width: 10ch; font-size: clamp(3.8rem, 10vw, 5.4rem); }
  .world-panel {
    grid-template-rows: 570px 145px;
    height: 715px;
    min-height: 715px;
  }
  .control-deck { grid-template-columns: 90px minmax(0, 1fr) 180px; }
}

@media (max-width: 680px) {
  .standalone-utility-nav { padding: 0 1rem; }
  .tools-dropdown {
    position: fixed;
    top: 70px;
    right: 1rem;
    left: 1rem;
    width: auto;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
  }
  .tools-dropdown-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .tools-menu-grid { grid-template-columns: 1fr; }
  .tools-menu-group + .tools-menu-group {
    border-top: 1px solid rgba(248, 244, 235, 0.1);
    border-left: 0;
  }
  .config-panel { padding: 3.75rem 1.25rem; }
  .config-panel > h1 { font-size: clamp(3.45rem, 14vw, 4.75rem); }
  .scene-legend { top: 0.75rem; right: 0.5rem; left: 0.5rem; gap: 0.25rem; }
  .scene-label { display: block; padding: 0.55rem 0.2rem; text-align: center; }
  .scene-label .label-dot,
  .scene-label b { display: none; }
  .scene-label small { font-size: 0.48rem; letter-spacing: 0.04em; }
  .scene-label strong { font-size: clamp(0.82rem, 3.6vw, 1.05rem); }
  .balance-pill {
    top: 6.6rem;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
  .world-panel {
    grid-template-rows: 520px 176px;
    height: 696px;
    min-height: 696px;
  }
  .control-deck {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.8rem;
    padding: 1rem;
  }
  .play-controls { grid-column: 1 / -1; grid-template-columns: 48px minmax(150px, 1fr); }
  .quote-dialog { padding: 2rem 1.25rem; }
  .quote-fields { grid-template-columns: 1fr; }
  .quote-breakdown { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .config-grid { grid-template-columns: 1fr; }
  .number-control { height: 48px; }
  .payment-highlight { grid-template-columns: 1fr; }
  .payment-highlight strong { grid-area: auto / 1; font-size: 1.85rem; }
  .payment-highlight p { grid-column: 1; }
  .quote-adjustment { align-items: flex-start; flex-direction: column; padding-block: 0.65rem; }
  .quote-adjustment strong { text-align: left; }
  .defaults-button,
  .credit-method-trigger { width: 100%; margin-left: 0; }
  .world-panel {
    grid-template-rows: 490px 184px;
    height: 674px;
    min-height: 674px;
  }
  .balance-pill {
    max-width: calc(100% - 1.5rem);
    font-size: 0.58rem;
  }
}

@media (min-width: 981px) {
  body { overflow: hidden; }
}

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