/* GovThatWorks.org V57 — Cinematic Article V Ratification Paths */

.v55-ratification {
  --home-navy: #0F1E36;
  --home-teal: #0D9488;
  --v55-surface: #f8fafc;
  --v55-card: #ffffff;
  --v55-border: rgba(15, 30, 54, 0.14);
  --v55-muted: #64748b;
  --v55-apply: #D97706;
  --v55-ratify: #0F1E36;
  --v55-depth: 10px;
  position: relative;
  overflow: hidden;
}

.v55-ratification::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 12%, rgba(13, 148, 136, .08), transparent 28%),
    radial-gradient(circle at 88% 76%, rgba(15, 30, 54, .07), transparent 32%);
}

.v55-ratification > * { position: relative; z-index: 1; }

.v55-ratification .v45-tool__header h2 { max-width: 830px; }

.v55-ratification__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: 14px 0 18px;
  font-size: .76rem;
  color: #475569;
}

.v55-ratification__legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.v55-ratification__legend i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(15,30,54,.14);
  box-shadow: 0 3px 7px rgba(15,30,54,.12);
}

.v55-ratification__legend .is-ratify { background: var(--v55-ratify); }
.v55-ratification__legend .is-apply { background: var(--v55-apply); }
.v55-ratification__legend .is-both {
  background: linear-gradient(135deg, var(--v55-ratify) 0 49%, var(--v55-apply) 51% 100%);
}

/* ---------- Controls ---------- */

.v55-ratification .v45-actions[data-v55-regional-actions] {
  padding: 12px;
  border: 1px solid var(--v55-border);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 30px rgba(15,30,54,.05);
}

.v55-ratification .v45-btn[data-v45-region] {
  position: relative;
  overflow: hidden;
}

.v55-ratification .v45-btn[data-v45-region]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.58) 50%, transparent 75%);
  transform: translateX(-140%);
}

.v55-ratification .v45-btn[data-v45-region].is-triggered::after {
  animation: v55-region-button-sheen .7s ease;
}

@keyframes v55-region-button-sheen {
  to { transform: translateX(140%); }
}

/* ---------- Isometric map scene ---------- */

.v55-map-shell {
  margin-top: 18px;
  padding: 28px 22px 34px;
  border: 1px solid var(--v55-border);
  border-radius: 24px;
  background:
    linear-gradient(rgba(255,255,255,.82), rgba(248,250,252,.96)),
    repeating-linear-gradient(0deg, rgba(15,30,54,.028) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(15,30,54,.028) 0 1px, transparent 1px 28px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 20px 52px rgba(15,30,54,.08);
  perspective: 1200px;
  overflow-x: auto;
  overflow-y: hidden;
}

.v55-map-stage {
  min-width: 760px;
  padding: 12px 6px 26px;
  transform-style: preserve-3d;
}

.v45-state-map.v55-state-map {
  display: grid;
  grid-template-columns: repeat(12, minmax(42px, 1fr));
  grid-auto-rows: 48px;
  gap: 8px;
  width: min(980px, 100%);
  margin: 0 auto;
  transform-origin: 50% 50%;
  transform: rotateX(48deg) rotateZ(-2deg) translateY(-10px);
  transform-style: preserve-3d;
  transition: transform .35s ease;
}

.v55-map-shell:hover .v45-state-map.v55-state-map {
  transform: rotateX(43deg) rotateZ(-1deg) translateY(-8px);
}

.v45-map-state.v55-state-tile {
  --tile-top: #e9eef4;
  --tile-edge: #cbd5e1;
  --tile-side: #b8c4d1;
  --tile-ink: #334155;
  position: relative;
  isolation: isolate;
  appearance: none;
  border: 0;
  border-radius: 7px;
  min-width: 38px;
  min-height: 40px;
  padding: 0;
  overflow: visible;
  background: transparent;
  color: var(--tile-ink);
  font: inherit;
  font-size: .72rem;
  font-weight: 900;
  cursor: pointer;
  transform-style: preserve-3d;
  transform: translateZ(0);
  transition:
    transform .28s cubic-bezier(.22,.8,.2,1),
    filter .28s ease;
}

.v55-state-tile__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15,30,54,.14);
  border-radius: 7px;
  background: linear-gradient(145deg, #f7f9fc 0%, var(--tile-top) 68%, #dce4ed 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 4px 8px rgba(15,30,54,.08);
  transform: translateZ(0);
  transition:
    background .28s ease,
    border-color .28s ease,
    box-shadow .28s ease,
    color .28s ease;
}

.v55-state-tile__face::before,
.v55-state-tile__face::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.v55-state-tile__face::before {
  left: 5px;
  right: 1px;
  bottom: calc(var(--v55-depth) * -1);
  height: var(--v55-depth);
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, var(--tile-edge), #9eacbb);
  transform: skewX(-33deg);
  transform-origin: top left;
  opacity: .72;
}

.v55-state-tile__face::after {
  top: 5px;
  bottom: 0;
  right: calc(var(--v55-depth) * -1);
  width: var(--v55-depth);
  border-radius: 0 5px 6px 0;
  background: linear-gradient(90deg, var(--tile-side), #8e9cab);
  transform: skewY(-33deg);
  transform-origin: top left;
  opacity: .65;
}

.v55-state-tile__label {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.66);
  color: inherit;
  box-shadow: inset 0 0 0 1px rgba(15,30,54,.05);
  transform: translateZ(11px) rotateZ(2deg) rotateX(-48deg);
  transition: background .25s ease, color .25s ease, transform .28s ease;
}

.v45-map-state.v55-state-tile:hover,
.v45-map-state.v55-state-tile:focus-visible {
  transform: translateZ(10px);
  filter: drop-shadow(0 12px 12px rgba(15,30,54,.16));
  z-index: 10;
}

.v45-map-state.v55-state-tile:focus-visible {
  outline: none;
}

.v45-map-state.v55-state-tile:focus-visible .v55-state-tile__face {
  box-shadow:
    0 0 0 3px rgba(13,148,136,.32),
    0 13px 28px rgba(15,30,54,.16);
}

.v45-map-state.v55-state-tile[data-status="ratify"] {
  --tile-top: #0F1E36;
  --tile-edge: #091423;
  --tile-side: #07111f;
  --tile-ink: #ffffff;
  transform: translateZ(17px);
  filter: drop-shadow(0 15px 15px rgba(15,30,54,.28));
}

.v45-map-state.v55-state-tile[data-status="apply"] {
  --tile-top: #0D9488;
  --tile-edge: #08766d;
  --tile-side: #075f59;
  --tile-ink: #ffffff;
  transform: translateZ(17px);
  filter: drop-shadow(0 15px 15px rgba(13,148,136,.24));
}

.v45-map-state.v55-state-tile[data-status="both"] {
  --tile-edge: #0b4d59;
  --tile-side: #092d41;
  --tile-ink: #ffffff;
  transform: translateZ(20px);
  filter: drop-shadow(0 17px 16px rgba(15,30,54,.27));
}

.v45-map-state.v55-state-tile[data-status="ratify"] .v55-state-tile__face {
  background: linear-gradient(145deg, #203756 0%, #0F1E36 62%, #091423 100%);
}

.v45-map-state.v55-state-tile[data-status="apply"] .v55-state-tile__face {
  background: linear-gradient(145deg, #16b3a5 0%, #0D9488 62%, #08766d 100%);
}

.v45-map-state.v55-state-tile[data-status="both"] .v55-state-tile__face {
  background: linear-gradient(135deg, #0F1E36 0 49%, #0D9488 51% 100%);
  border-color: rgba(255,255,255,.28);
}

.v45-map-state.v55-state-tile[data-status="ratify"] .v55-state-tile__face,
.v45-map-state.v55-state-tile[data-status="apply"] .v55-state-tile__face {
  border-color: rgba(255,255,255,.22);
}

.v45-map-state.v55-state-tile[data-status="ratify"] .v55-state-tile__label,
.v45-map-state.v55-state-tile[data-status="apply"] .v55-state-tile__label,
.v45-map-state.v55-state-tile[data-status="both"] .v55-state-tile__label {
  background: rgba(255,255,255,.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.v45-map-state.v55-state-tile.is-region-wave {
  animation: v55-state-wave .72s cubic-bezier(.22,.8,.2,1) both;
}

@keyframes v55-state-wave {
  0% { transform: translateZ(0) scale(.94); filter: brightness(.92); }
  45% { transform: translateZ(28px) scale(1.08); filter: brightness(1.12) drop-shadow(0 18px 18px rgba(13,148,136,.24)); }
  100% { transform: translateZ(17px) scale(1); }
}

/* ---------- 3D progress pillars ---------- */

.v55-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.v55-progress-pillar {
  --progress: 0%;
  --pillar-color: var(--v55-ratify);
  position: relative;
  padding: 18px 18px 20px;
  border: 1px solid var(--v55-border);
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  box-shadow:
    0 16px 38px rgba(15,30,54,.08),
    inset 0 1px 0 rgba(255,255,255,.96);
  perspective: 900px;
}

.v55-progress-pillar.application { --pillar-color: var(--v55-apply); }

.v55-progress-pillar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.v55-progress-pillar__head strong {
  color: #0f1e36;
  font-size: .88rem;
}

.v55-progress-pillar__head output {
  color: #0f1e36;
  font-size: 1.05rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.v55-progress-pillar__track {
  position: relative;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(180deg, #dbe3eb, #c8d3df);
  box-shadow:
    inset 0 2px 5px rgba(15,30,54,.12),
    0 10px 22px rgba(15,30,54,.08);
  transform: rotateX(54deg);
  transform-style: preserve-3d;
  overflow: visible;
}

.v55-progress-pillar__track::before {
  content: "";
  position: absolute;
  left: 7px;
  right: -7px;
  bottom: -10px;
  height: 10px;
  background: #aab7c5;
  border-radius: 0 0 8px 8px;
  transform: skewX(-38deg);
  transform-origin: top left;
  opacity: .75;
}

.v55-progress-pillar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  min-width: 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), transparent 42%),
    var(--pillar-color);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    7px 0 18px color-mix(in srgb, var(--pillar-color) 28%, transparent);
  transition: width .48s cubic-bezier(.22,.8,.2,1);
}

.v55-progress-pillar__fill::after {
  content: "";
  position: absolute;
  top: 3px;
  right: -7px;
  width: 7px;
  bottom: 0;
  background: color-mix(in srgb, var(--pillar-color) 75%, #000 25%);
  transform: skewY(-38deg);
  transform-origin: top left;
  border-radius: 0 4px 4px 0;
}

.v55-progress-pillar__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  color: var(--v55-muted);
  font-size: .72rem;
}

.v55-progress-pillar.is-complete {
  border-color: color-mix(in srgb, var(--pillar-color) 45%, #ffffff 55%);
  box-shadow:
    0 16px 38px rgba(15,30,54,.08),
    0 0 0 3px color-mix(in srgb, var(--pillar-color) 12%, transparent);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .v55-map-shell { padding: 20px 14px 28px; }
  .v55-map-stage { min-width: 680px; }
  .v45-state-map.v55-state-map {
    grid-template-columns: repeat(12, minmax(40px, 1fr));
    grid-auto-rows: 46px;
  }
}

@media (max-width: 680px) {
  .v55-map-shell {
    overflow: visible;
    padding: 16px;
  }
  .v55-map-stage { min-width: 0; padding: 0; }
  .v45-state-map.v55-state-map {
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    grid-auto-rows: 50px;
    gap: 10px;
    transform: none;
  }
  .v55-map-shell:hover .v45-state-map.v55-state-map { transform: none; }
  .v45-map-state.v55-state-tile { grid-column: auto !important; grid-row: auto !important; }
  .v55-state-tile__label { transform: translateZ(7px); }
  .v55-progress-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .v45-state-map.v55-state-map,
  .v55-map-shell:hover .v45-state-map.v55-state-map,
  .v45-map-state.v55-state-tile,
  .v55-state-tile__face,
  .v55-state-tile__label {
    transform: none !important;
    transition: none !important;
    filter: none !important;
  }
  .v45-map-state.v55-state-tile.is-region-wave { animation: none !important; }
  .v55-state-tile__face::before,
  .v55-state-tile__face::after { display: none; }
  .v55-progress-pillar__track { transform: none; }
  .v55-progress-pillar__track::before,
  .v55-progress-pillar__fill::after { display: none; }
  .v55-progress-pillar__fill { transition: none; }
  .v55-ratification .v45-btn[data-v45-region].is-triggered::after { animation: none; }
}


/* ==========================================================
   V57 CINEMATIC NARRATIVE CONTROLS
   ========================================================== */

.v57-ratification {
  --v57-gold: #d7a62a;
  --v57-gold-deep: #a56f00;
  --v57-amber: #d97706;
  --v57-teal: #0d9488;
  --v57-navy: #0f1e36;
}

.v57-ratification__header { margin-bottom: 18px; }

.v57-narrative-panel {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid rgba(15,30,54,.14);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(241,245,249,.92));
  box-shadow: 0 18px 46px rgba(15,30,54,.08);
}

.v57-narrative-panel__top {
  display: grid;
  grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr);
  gap: 18px;
  align-items: end;
}

.v57-amendment-context select { min-height: 48px; }

.v57-route-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr)) auto;
  gap: 10px;
}

.v57-route-button,
.v57-reset-button {
  min-height: 56px;
  border-radius: 15px;
  font: inherit;
  cursor: pointer;
}

.v57-route-button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid rgba(15,30,54,.15);
  background: #fff;
  color: #0f1e36;
  box-shadow: 0 8px 20px rgba(15,30,54,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.v57-route-button:hover,
.v57-route-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 13px 28px rgba(15,30,54,.11);
  border-color: rgba(13,148,136,.42);
  outline: none;
}

.v57-route-button:disabled {
  cursor: default;
  opacity: .58;
  transform: none;
}

.v57-route-button__number {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0f1e36;
  color: #fff;
  font-weight: 900;
}

.v57-route-button.route-two .v57-route-button__number { background: #d97706; }
.v57-route-button strong,
.v57-route-button small { display: block; }
.v57-route-button strong { font-size: .86rem; }
.v57-route-button small { margin-top: 2px; color: #64748b; font-size: .69rem; }

.v57-reset-button {
  padding: 0 16px;
  border: 1px solid rgba(15,30,54,.15);
  background: #eef2f6;
  color: #334155;
  font-size: .76rem;
  font-weight: 800;
}

.v57-reset-button:hover,
.v57-reset-button:focus-visible {
  background: #e2e8f0;
  outline: 3px solid rgba(13,148,136,.18);
}

.v57-narrative-card {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 20%, rgba(13,148,136,.18), transparent 27%),
    linear-gradient(135deg, #0f1e36, #173a55);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 18px 36px rgba(15,30,54,.16);
}

.v57-narrative-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -80px;
  bottom: -92px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.v57-narrative-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.v57-route-label,
.v57-step-label {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.v57-route-label { background: rgba(255,255,255,.12); color: #d9e5ec; }
.v57-step-label { background: rgba(13,148,136,.22); color: #91f1e7; }

.v57-narrative-card h3 {
  margin: 0;
  max-width: 760px;
  font-family: Georgia,serif;
  font-size: clamp(1.4rem,2.8vw,2.15rem);
  font-weight: 500;
  color: #fff;
}

.v57-narrative-card p {
  max-width: 780px;
  margin: 8px 0 0;
  color: rgba(255,255,255,.76);
  line-height: 1.62;
}

.v57-ratification__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 17px;
  margin: 10px 0 17px;
  color: #475569;
  font-size: .74rem;
}

.v57-ratification__legend span { display: inline-flex; align-items: center; gap: 7px; }
.v57-ratification__legend i {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 1px solid rgba(15,30,54,.13);
  box-shadow: 0 3px 7px rgba(15,30,54,.1);
}
.v57-ratification__legend .is-idle { background: #e7edf3; }
.v57-ratification__legend .is-apply { background: #d97706; }
.v57-ratification__legend .is-ratify { background: #0f1e36; }
.v57-ratification__legend .is-threshold {
  background: linear-gradient(145deg,#f7d463,#d7a62a 62%,#a56f00);
  box-shadow: 0 0 0 2px rgba(215,166,42,.18), 0 4px 10px rgba(165,111,0,.2);
}

/* Non-interactive tiles: keep the cinematic surface, remove click affordance. */
.v57-state-map .v55-state-tile {
  cursor: default;
  pointer-events: none;
}
.v57-map-shell:hover .v57-state-map { transform: rotateX(48deg) rotateZ(-2deg) translateY(-10px); }
.v57-state-map .v55-state-tile:hover { transform: translateZ(0); filter: none; }

/* Applications use amber in the narrative route. */
.v57-state-map .v55-state-tile[data-status="apply"] {
  --tile-top: #d97706;
  --tile-edge: #a95404;
  --tile-side: #8f4304;
  --tile-ink: #fff;
  transform: translateZ(16px);
  filter: drop-shadow(0 14px 15px rgba(217,119,6,.24));
}
.v57-state-map .v55-state-tile[data-status="apply"] .v55-state-tile__face {
  background: linear-gradient(145deg,#f59e0b 0%,#d97706 62%,#a95404 100%);
}

/* Ratification uses the deep navy surface. */
.v57-state-map .v55-state-tile[data-status="ratify"] {
  transform: translateZ(18px);
}

/* The decisive 38th state receives a temporary gold milestone treatment. */
.v57-state-map .v55-state-tile.is-threshold-state {
  --tile-top: #d7a62a;
  --tile-edge: #a56f00;
  --tile-side: #8c5d00;
  --tile-ink: #241b00;
  z-index: 20;
  transform: translateZ(30px) scale(1.08);
  filter: drop-shadow(0 0 18px rgba(215,166,42,.7)) drop-shadow(0 20px 18px rgba(15,30,54,.24));
}
.v57-state-map .v55-state-tile.is-threshold-state .v55-state-tile__face {
  background: linear-gradient(145deg,#ffe58a 0%,#d7a62a 58%,#a56f00 100%);
  border-color: rgba(255,244,192,.84);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 0 0 3px rgba(215,166,42,.18);
}
.v57-state-map .v55-state-tile.is-threshold-state .v55-state-tile__label {
  color: #241b00;
  background: rgba(255,255,255,.55);
}

.v57-state-map .v55-state-tile.is-cinematic-pop {
  animation: v57-cinematic-pop .52s cubic-bezier(.18,.85,.22,1) both;
}
@keyframes v57-cinematic-pop {
  0% { transform: translateZ(0) scale(.92); filter: brightness(.93); }
  58% { transform: translateZ(29px) scale(1.09); filter: brightness(1.12) drop-shadow(0 20px 18px rgba(15,30,54,.2)); }
  100% { transform: translateZ(18px) scale(1); }
}

.v57-state-map .v55-state-tile.is-resetting {
  animation: v57-tile-reset .38s ease both;
}
@keyframes v57-tile-reset {
  from { transform: translateZ(18px); filter: drop-shadow(0 14px 14px rgba(15,30,54,.18)); }
  to { transform: translateZ(0); filter: none; }
}

.v57-progress-grid { margin-top: 25px; }
.v57-progress-grid .application { --pillar-color: #d97706; }

.v57-success {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(215,166,42,.44);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 15%,rgba(255,229,138,.28),transparent 24%),
    linear-gradient(135deg,#fff9e8,#fffdf6);
  box-shadow: 0 16px 42px rgba(165,111,0,.12), inset 0 1px 0 #fff;
  animation: v57-success-in .58s cubic-bezier(.18,.85,.22,1) both;
}
.v57-success[hidden] { display: none; }
.v57-success__seal {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d7a62a;
  color: #241b00;
  font-size: 1.35rem;
  font-weight: 1000;
  box-shadow: 0 8px 20px rgba(165,111,0,.24);
}
.v57-success span:not(.v57-success__seal) {
  display: block;
  color: #8b6500;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.v57-success strong {
  display: block;
  margin-top: 2px;
  color: #0f1e36;
  font-family: Georgia,serif;
  font-size: 1.7rem;
}
.v57-success p { margin: 4px 0 0; color: #64748b; }
@keyframes v57-success-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .v57-narrative-panel__top { grid-template-columns: 1fr; }
  .v57-route-actions { grid-template-columns: 1fr 1fr; }
  .v57-reset-button { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .v57-route-actions { grid-template-columns: 1fr; }
  .v57-reset-button { grid-column: auto; }
  .v57-narrative-card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .v57-route-button,
  .v57-state-map .v55-state-tile,
  .v57-success { transition: none !important; animation: none !important; }
  .v57-state-map .v55-state-tile.is-cinematic-pop,
  .v57-state-map .v55-state-tile.is-resetting { animation: none !important; }
  .v57-state-map .v55-state-tile.is-threshold-state {
    transform: none !important;
    filter: none !important;
    outline: 4px solid rgba(215,166,42,.48);
  }
}
