/* Shared release styles, after the base game and editor stylesheet. */
:root {
  --street: #111219;
  --asphalt: #181922;
  --ivory: #fff3de;
  --sun: #ffad7b;
  --signal: #ff836c;
  --sea: #a6e3ce;
  --rail: #ffffff24;
  --edge: max(clamp(20px, 5.7vw, 92px), calc((100vw - 1400px) / 2));
  --hud: 600 .75rem/1.15 var(--mono);
}
body:has(#lobby) { background: var(--street); color: var(--ivory); }
body:has(#lobby) .top-line { display: none; }
#main.wrap { width: 100%; max-width: none; }
.mast { position: relative; z-index: 4; background: #14141b; border-color: var(--rail); }
body:not(.driving) .mast {
  position: absolute; inset: 0 0 auto; border: 0;
  background: linear-gradient(180deg, #0b0b13aa, transparent);
}
.mast-inner.wrap {
  width: auto; max-width: none; margin: 0 var(--edge); height: 77px;
  gap: clamp(14px, 2.5vw, 42px); border-bottom: 1px solid var(--rail);
}
.driving .mast-inner { border: 0; height: 63px; }
.mast .logo img { width: clamp(130px, 12vw, 180px); }
.mast nav { gap: clamp(13px, 1.8vw, 29px); }
.mast .navlink { color: #eee5e1; font-size: .88rem; }
.mast .navlink.active { color: #fff5e7; }
.mast .navlink.active::after { height: 2px; background: var(--sun); }
.mast .wallet { margin-left: 0; min-height: 37px; padding: 7px 13px; text-wrap: nowrap; border-radius: 4px; background: #201b24a8; border-color: #f3d8cb52; }
.mast .wallet svg { width: 16px; color: var(--sun); }
.audio-controls { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.effects-switch, .station.compact { background: transparent; color: #f3e9e0; display: inline-flex; gap: 6px; align-items: center; padding: 8px 0; font-size: .82rem; }
.effects-switch svg { width: 16px; height: 16px; }
.effects-switch[aria-pressed=false] { color: #c7bdc4; }
.audio-controls .station.compact { display: none; }
.driving .audio-controls .station.compact { display: inline-flex; padding-left: 13px; border-left: 1px solid var(--rail); }
.station.compact .station-play { background: none; width: 16px; height: 20px; }
.station.compact .station-name b { font: 650 .83rem var(--sans); text-transform: none; }
.station.compact .station-name small, .station.compact .station-status, .station.compact .station-bars { display: none; }
.hero {
  width: 100%; margin: 0; height: clamp(615px, 80svh, 860px); min-height: 0;
  border: 0; border-radius: 0; display: flex; align-items: center;
  background: #4e333b; color: var(--ivory);
}
.hero-film, .hero-photo { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; object-position: 55% 53%; z-index: -3; }
.hero-film { z-index: -2; }
.hero-shade {
  z-index: -1;
  background: linear-gradient(90deg,#0c0b15d6 0%,#1c1023a0 24%,#291b3050 49%,transparent 75%),
    linear-gradient(0deg,#101118 0%,#121019b0 12%,#10101800 43%,#160e1820 70%,#140e1945 100%);
}
.hero-copy {
  padding: 82px 0 111px; margin-left: var(--edge); position: relative;
  width: min(50vw, 710px); z-index: 1;
}
.hero-copy .eyebrow { font: var(--hud); letter-spacing: .16em; color: #ffd0aa; }
.route-rule { width: 29px; height: 2px; background: #ffad7b; box-shadow: -5px 4px 0 -0.5px #ff816d; transform: skewX(-28deg); }
.hero h1 {
  width: max-content; max-width: 100%; margin: 23px 0 28px; letter-spacing: -.055em;
  font: italic 900 clamp(5.2rem, 8.8vw, 9.3rem)/.78 var(--display);
  filter: drop-shadow(0 4px 12px #150b183d); color: var(--ivory);
}
.hero h1 span { display: block; }
.hero h1 em {
  display: block; margin: -.015em 0 0 .11em; padding: 0 .15em .02em 0;
  font: 400 clamp(5.7rem, 10.6vw, 11.1rem)/.82 "Vice Script", cursive;
  letter-spacing: -.04em; transform: rotate(-5deg); transform-origin: 52% 48%;
  color: var(--sun); background: linear-gradient(162deg, #ffd5a5 15%, #ff9e73 59%, #ff6f75 96%);
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-copy p { max-width: 36ch; font-size: clamp(1rem,1.24vw,1.23rem); line-height: 1.5; color: #fff1e8; text-shadow: 0 1px 7px #130d14bb; }
.hero-actions { gap: 10px; margin-top: 24px; }
#main .primary, dialog .primary {
  background: linear-gradient(110deg,#ffc089,#ff8e70 80%,#ff8177); color: #231719;
  border: 1px solid #ffd3a866; border-radius: 4px;
  box-shadow: 0 2px 0 #8c514c55; font-weight: 760;
}
#main .primary:hover:not(:disabled), dialog .primary:hover:not(:disabled) {
  background: linear-gradient(110deg,#ffd6a4,#ffad89); box-shadow: 0 3px 18px #e973572b;
}
.hero-actions .primary, .hero-actions .secondary { min-height: 48px; padding-inline: 19px; gap: 8px; }
.hero-actions .secondary { border-radius: 4px; border-color: #ffebd95e; background: #15131dbb; color: #fff3e4; }
.hero-actions .secondary:hover { background: #34242b; }
.hero .viewfinder {
  left: auto; right: var(--edge); top: 106px; padding: 0;
  border: 0; border-radius: 0; background: transparent; backdrop-filter: none;
  font: var(--hud); color: var(--ivory); letter-spacing: .12em; text-shadow: 0 1px 6px #000;
}
.cam-light { width: 7px; height: 7px; border-radius: 50%; background: #ff896d; box-shadow: 0 0 8px #ff8a5a88; }
.hero .hero-strip {
  border: 0; right: var(--edge); bottom: 112px; padding: 0; gap: 7px;
  background: none; backdrop-filter: none; color: #fff4e8; font: 600 .7rem/1 var(--mono);
  letter-spacing: .045em; text-shadow: 0 1px 7px #190c16;
}
.hero-strip b { padding: 0 2px; color: var(--sun); }
.hero-strip button, .station-play {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: #1d1824bd; color: #fff1df;
}
.hero-strip button { border: 1px solid #fbe9d540; }
.hero-strip button svg, .station-play svg { width: 14px; height: 14px; }
.hero .instruments {
  position: absolute; bottom: 0; left: var(--edge); right: var(--edge);
  padding: 0; margin: 0; height: 91px; border-radius: 0; border: 0; border-top: 1px solid #f9e8db46;
  display: flex; align-items: center; gap: clamp(24px, 4.5vw, 68px); background: transparent;
}
.hero .instruments > div { display: grid; justify-content: start; gap: 5px; border: 0; }
.hero .instruments span, .station-status { font: var(--hud); color: #c5b9bd; letter-spacing: .095em; text-transform: uppercase; }
.hero .instruments strong { font: 750 clamp(1.22rem, 2vw, 1.8rem)/1 var(--display); letter-spacing: -.025em; color: var(--ivory); }
.hero > .station {
  display: flex; align-items: center; gap: 11px; text-align: left; position: absolute;
  bottom: 19px; right: var(--edge); padding: 4px 0 4px 6px; color: var(--ivory); background: transparent;
}
.station-play { background: #ffe1bd; color: #34212c; width: 36px; height: 36px; flex: none; }
.station-name { display: grid; gap: 2px; }
.station-name b { font: italic 850 1.28rem/1 var(--display); text-transform: uppercase; }
.station-name small { font: 500 .76rem/1.25 var(--sans); color: #d4c7c6; }
.station-status { color: #ffd4ac; font-size: .67rem; }
.station-bars { display: flex; gap: 2px; align-items: center; height: 28px; color: var(--sun); }
.station-bars i { width: 3px; height: 8px; background: currentColor; transform-origin: center; }
.station-bars i:nth-child(2),.station-bars i:nth-child(5) { height: 15px; }
.station-bars i:nth-child(3) { height: 23px; }
.station-bars i:nth-child(4) { height: 12px; }
.radio-on .station-bars i { animation: tuner-level .72s ease-in-out infinite alternate; }
.radio-on .station-bars i:nth-child(2n) { animation-delay: -.4s; animation-duration: .57s; }
.radio-on .station-bars i:nth-child(3) { animation-delay: -.2s; animation-duration: .87s; }
@keyframes tuner-level { from { transform: scaleY(.4); } to { transform: scaleY(1.15); } }
.route-menu {
  margin: 0 var(--edge); display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  border-bottom: 1px solid var(--rail); padding: 22px 0; gap: 0;
}
.route-entry {
  display: grid; grid-template-columns: clamp(44px,5.8vw,85px) minmax(0,1fr) 20px; gap: clamp(11px,1.3vw,21px);
  align-items: center; background: transparent; padding: 6px clamp(12px,2vw,31px);
  text-align: left; min-width: 0; color: var(--ivory); border-left: 1px solid var(--rail);
}
.route-entry:first-child { padding-left: 0; border: 0; }
.route-entry:last-child { padding-right: 0; }
.route-entry-copy { display: grid; gap: 4px; min-width: 0; }
.route-entry-copy small, .run-name small, .report-top small, .review-caption small, .finish-banner > small, .finish-roll small {
  font: var(--hud); letter-spacing: .12em; color: var(--sun); text-transform: uppercase;
}
.route-entry-copy b { font: italic 850 clamp(1.4rem,2.15vw,2.5rem)/1.05 var(--display); letter-spacing: -.025em; }
.route-entry-copy > span { color: #bfb7c0; font-size: .85rem; line-height: 1.35; }
.route-entry > svg { width: 18px; color: #ebc5b1; }
.route-pic {
  aspect-ratio: 1.16; align-self: center; background: #2b2834 center/cover;
  border-radius: 3px; box-shadow: inset 0 0 0 1px #ffffff24;
  transition: filter .22s, transform .22s;
}
.roam-pic { background-image: url('/media/frames/04.webp'); }
.atlas-pic { background-image: url('/media/leonida-map.webp'); background-position: 78% 50%; background-size: 165%; }
.tournament-pic { background-image: url('/media/frames/01.webp'); background-position: 60% center; }
.route-entry:hover b, .how-link:hover, .run-foot button:hover { color: var(--sun); }
.route-entry:hover .route-pic { filter: saturate(1.25); transform: translateY(-2px); }
.lobby-liner { margin: 12px var(--edge) 0; display: flex; justify-content: flex-end; }
.how-link, .run-foot button { display: inline-flex; align-items: center; gap: 7px; background: none; color: #d8caca; padding: 4px; font-size: .86rem; }
.how-link svg { width: 16px; }
body:has(#lobby) footer.wrap { margin: 12px var(--edge) 0; width: auto; padding: 15px 0 24px; border-color: var(--rail); }

/* In-game overlays and shared atlas controls. */
#panel {
  border-color: #80706791; border-radius: 10px; color: var(--ivory);
  background: linear-gradient(145deg,#27232b,#1a1a23 73%);
  box-shadow: 0 22px 95px #02040bba;
}
#panel::backdrop { background: #080a1280; backdrop-filter: blur(10px); }
#panel .dialog-top .eyebrow, #panel .rule i { color: var(--sun); }
#panel h2 { font-style: italic; color: var(--ivory); }
#panel .icon-btn { background: #ffffff08; border-color: var(--rail); }
#panel .icon-btn:hover { background: #ffffff15; }
#panel .empty { border-color: #96796763; background: #49313527; }
#panel .dialog-error { margin: 0; }
#panel .dialog-error:not(:empty) { margin-top: 16px; }
#panel .lens-help { font-size: .85rem; color: #cbc3c7; margin-top: 12px; }
.map-tools button { border-radius: 4px; border-color: #e0d8c359; background: #1d2029ed; }
.map-scale { color: #fff2dd; }
.map-line line { stroke: #ffe5a9; stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 0; }
.map-line line:not([style*="none"]) { animation: map-trace .62s ease-out both; }
@keyframes map-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.map-mark.guess { background: #ff8e75; }
.map-mark.correct { background: #9ee5c7; }
.map-key span::before { background: #ff8e75; }
.map-key span + span::before { background: #9ee5c7; }
.map-stage.photo-stage {
  height: min(60dvh,550px); min-height: 185px; background: #0b0d12;
  border: 1px solid #504953; border-radius: 5px; cursor: grab;
}
.photo-stage:active { cursor: grabbing; }
.photo-stage .map-plane img { max-width: none; }
#panel .atlas-modal .map-stage { border-color: #597672; }
.station[aria-pressed=true] .station-play { color: #231c20; background: var(--sea); }
.station.compact[aria-pressed=true] .station-play { color: var(--sea); background: none; }

@media (max-width: 1050px) {
  :root { --edge: clamp(22px,4.5vw,50px); }
  .mast-inner.wrap { gap: 20px; }
  .route-entry { grid-template-columns: 55px minmax(0,1fr); }
  .route-entry > svg { display: none; }
  .hero-copy { width: 59vw; }
}
@media (max-width: 760px) {
  :root { --edge: 20px; }
  .mast-inner.wrap { height: 64px; gap: 14px; }
  .mast .logo img { width: 128px; }
  .mast nav { gap: 13px; }
  .mast .navlink { font-size: .83rem; }
  .mast .wallet { padding: 7px 9px; }
  .effects-switch span, .mast .wallet span { display: none; }
  .effects-switch, .mast .wallet, .station.compact { min-width: 34px; min-height: 36px; justify-content: center; }
  .audio-controls { gap: 8px; }
  .driving .audio-controls .station.compact { padding-left: 6px; }
  .hero { height: clamp(580px,81svh,740px); }
  .hero-copy { width: min(77vw,470px); padding: 73px 0 100px; }
  .hero h1 { font-size: clamp(5rem,11vw,6.4rem); }
  .hero h1 em { font-size: clamp(5.8rem,14vw,7.4rem); }
  .hero .viewfinder { top: 87px; }
  .hero .instruments { gap: 25px; height: 79px; }
  .hero .instruments strong { font-size: 1.28rem; }
  .hero > .station { gap: 7px; bottom: 14px; }
  .station-status { display: none; }
  .hero .hero-strip { bottom: 92px; }
  .route-menu { gap: 0; padding: 15px 0; }
  .route-entry { padding-inline: 12px; grid-template-columns: minmax(0,1fr); gap: 8px; align-content: start; }
  .route-pic { height: clamp(54px,12vw,90px); width: 100%; aspect-ratio: auto; }
  .route-entry-copy b { font-size: 1.6rem; }
  .route-entry-copy small { font-size: .69rem; }
  .route-entry-copy > span { font-size: .8rem; }
}
@media (max-width: 530px) {
  :root { --edge: 17px; }
  .mast-inner.wrap { height: 60px; gap: 9px; }
  .mast .logo img { width: clamp(92px,25vw,124px); }
  .mast nav { gap: 8px; }
  .mast .navlink { font-size: .72rem; }
  .effects-switch, .mast .wallet, .station.compact { min-width: 29px; min-height: 34px; }
  .mast .wallet { padding: 6px; }
  .driving .mast nav { display: none; }
  .driving .audio-controls { gap: 7px; }
  .hero { min-height: 600px; height: auto; align-items: center; }
  .hero-copy { width: auto; margin: 0 var(--edge); padding: 149px 0 163px; }
  .hero-film, .hero-photo { object-position: 53% center; }
  .hero-shade {
    background: linear-gradient(90deg,#110c1abe,#170c184d 68%,transparent),
      linear-gradient(0deg,#101118 0%,#171019bd 23%,#130c1840 66%,#110b1352 100%);
  }
  .hero .viewfinder { top: 79px; right: var(--edge); font-size: .65rem; }
  .hero-copy .eyebrow { font-size: .69rem; }
  .hero h1 { font-size: clamp(4.55rem,17vw,6.6rem); margin: 19px 0 23px; }
  .hero h1 em { font-size: clamp(5.2rem,19.9vw,7.2rem); }
  .hero-copy p { max-width: 31ch; font-size: 1rem; }
  .hero-actions { margin-top: 18px; }
  .hero-actions .primary, .hero-actions .secondary { padding-inline: 14px; min-height: 43px; }
  .hero .hero-strip { bottom: 90px; left: var(--edge); right: auto; font-size: .68rem; }
  .hero .hero-strip button { width: 32px; height: 32px; }
  .hero > .station { right: var(--edge); bottom: 83px; padding-block: 2px; }
  .hero > .station .station-play { width: 30px; height: 30px; }
  .hero > .station .station-name b { font-size: 1.04rem; }
  .hero > .station .station-name small { font-size: .68rem; }
  .hero > .station .station-bars { margin-left: 2px; }
  .hero .instruments { height: 67px; gap: 0; justify-content: space-between; }
  .hero .instruments > div { gap: 4px; }
  .hero .instruments span { font-size: .65rem; letter-spacing: .055em; }
  .hero .instruments strong { font-size: 1.2rem; }
  .route-menu { grid-template-columns: 1fr; padding: 1px 0; border-bottom: 0; }
  .route-entry, .route-entry:first-child, .route-entry:last-child {
    grid-template-columns: 64px minmax(0,1fr) 20px; padding: 11px 0; gap: 13px;
    border: 0; border-bottom: 1px solid var(--rail); align-items: center;
  }
  .route-entry > svg { display: block; }
  .route-entry-copy { gap: 3px; }
  .route-pic { width: 64px; height: 54px; }
  .route-entry-copy b { font-size: 1.45rem; }
  .lobby-liner { margin-top: 9px; }
  .map-stage.photo-stage { height: min(53dvh,380px); }
}
@media (max-width: 350px) {
  :root { --edge: 12px; }
  .mast-inner.wrap { gap: 5px; }
  .mast nav { gap: 6px; }
  .mast .logo img { width: 88px; }
  .mast .navlink { font-size: .7rem; }
  .hero-actions { gap: 6px; }
  .hero-actions .primary, .hero-actions .secondary { padding-inline: 10px; }
  .hero > .station .station-bars { display: none; }
}
@media (max-height: 525px) and (min-width: 531px) {
  .hero { min-height: 480px; height: auto; }
  .hero-copy { padding: 100px 0 88px; }
  .hero h1 { font-size: 4.1rem; margin: 12px 0; }
  .hero h1 em { font-size: 4.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .station-bars i, .map-line line { animation: none !important; }
  .route-pic, .route-entry, .hero button { transition: none !important; }
}
