.lan-stage-identity { display: none; }
.theme-trigger { white-space: nowrap; }
.theme-dialog { width: min(720px, calc(100vw - 28px)); }
.play-theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0 15px; }
.play-theme-option { padding: 0 0 20px; overflow: hidden; text-align: left; border-radius: 12px; border: 1px solid #a7c6dd35; background: #0c1a2a; }
.play-theme-option[aria-pressed="true"] { border-color: #b7efff; box-shadow: 0 0 0 1px #b7efff80, 0 0 25px #86c9ed14; }
.play-theme-option strong, .play-theme-option small { display: block; padding: 0 17px; }
.play-theme-option strong { margin-top: 16px; font-size: 17px; color: #ecfaff; font-weight: 500; }
.play-theme-option small { margin-top: 8px; font-size: 11px; color: #a5bbc8; line-height: 1.6; }
.play-theme-art { height: 180px; display: grid; place-items: center; border-bottom: 1px solid #b3dff524; }
.play-theme-art img { height: 165px; width: 120px; object-fit: contain; filter: drop-shadow(0 0 18px #92dffb30); }
.play-theme-art.basic { background: radial-gradient(ellipse at 30% 40%, #194b50, transparent 60%), radial-gradient(ellipse at 85% 70%, #393251, #091421 75%); }
.play-theme-art.advanced { background: linear-gradient(#09203518,#08142255), url('/media/lan-ocean-home-v4.webp') center / cover; }
.play-theme-tag { display: inline-block; margin: 14px 17px 0; border-radius: 30px; padding: 5px 9px; border: 1px solid #a4d9ed33; color: #c8eefb; font-size: 10px; }
.theme-feedback { color: #add5e5; font-size: 12px; line-height: 1.7; }
.lan-stat-label, .lan-hud-flare { display: none; }
body[data-theme="lan-advanced"] { --cyan: #b2eaff; --pink: #d8efff; --muted: #a3becf; }
body[data-theme="lan-advanced"] #gameSurface { position: relative; border-color: #badff94a; background: #071829; box-shadow: 0 28px 90px #0008; }
body[data-theme="lan-advanced"] #gameSurface .game-top { background: linear-gradient(90deg,#10283b,#0b1b2d); }
body[data-theme="lan-advanced"] #gameSurface .stage-wrap { overflow: hidden; container-type: inline-size; }
body[data-theme="lan-advanced"] #gameSurface .stage-toolbar { background: #091b2a; color: #b0c9d9; }
body[data-theme="lan-advanced"] #gameSurface .stage-legend .long { background: linear-gradient(90deg,#a7deff11,#c6ecff); border-color: #c6ecff; }

/* The reference HUD scales with the playing surface, not the whole browser. */
body[data-theme="lan-advanced"] #gameSurface .lan-stage-identity { position: absolute; display: flex; align-items: center; gap: 1.2cqw; left: 2%; top: 2.3%; z-index: 2; width: 27%; pointer-events: none; }
body[data-theme="lan-advanced"] #gameSurface .lan-portrait { display: block; position: relative; flex: 0 0 9.2cqw; height: 9.2cqw; border-radius: 50%; border: 1px solid #c2ecffc0; background: radial-gradient(circle at 50% 65%,#76b7d74a,#18364d55 54%,#08192800 73%); box-shadow: inset 0 0 0 3px #a5dcff13,0 0 17px #8ec8ed19; }
body[data-theme="lan-advanced"] #gameSurface .lan-portrait::before { content: ""; position: absolute; inset: -5%; border: 1px dashed #acd9f76b; border-radius: 50%; }
body[data-theme="lan-advanced"] #gameSurface .lan-portrait img { position: absolute; width: 118%; height: 118%; max-width: none; left: -11%; top: -14%; object-fit: cover; object-position: center top; border-radius: 0 0 45% 45%; clip-path: ellipse(49% 55% at 51% 44%); }
body[data-theme="lan-advanced"] #gameSurface .lan-wordmark { min-width: 0; flex: 1; padding-top: .6cqw; }
body[data-theme="lan-advanced"] #gameSurface .lan-wordmark>span { display: block; white-space: nowrap; font-size: 1.7cqw; letter-spacing: .15cqw; line-height: 1.2; color: #eef9ff; }
body[data-theme="lan-advanced"] #gameSurface .lan-wordmark b { font-weight: 600; }
body[data-theme="lan-advanced"] #gameSurface .lan-wordmark em { font-weight: 300; font-style: normal; color: #93b4c9; }
body[data-theme="lan-advanced"] #gameSurface .lan-wordmark small { display: block; margin-top: .7cqw; color: #bad0de; font-size: 1.15cqw; font-weight: 300; letter-spacing: .17cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-theme="lan-advanced"] #gameSurface .lan-wordmark i { display: block; position: relative; height: 1px; margin-top: 1cqw; background: linear-gradient(90deg,#caf3ff99,transparent); }
body[data-theme="lan-advanced"] #gameSurface .lan-wordmark i::before { content: ""; position: absolute; width: 3px; height: 3px; top: -1px; left: 0; border-radius: 50%; background: #effcff; box-shadow: 0 0 6px 2px #96dcff; }
body[data-theme="lan-advanced"] #gameSurface .stats { position: absolute; display: block; inset: 0; gap: 0; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat { position: absolute; min-width: 0; padding: 0; }
body[data-theme="lan-advanced"] #gameSurface .stats .base-stat-label { display: none; }
body[data-theme="lan-advanced"] #gameSurface .stats .lan-stat-label { display: inline; }
body[data-theme="lan-advanced"] #gameSurface .stats small { color: #e0eef7; font-size: 1.05cqw; letter-spacing: .27cqw; font-weight: 400; margin: 0 0 .65cqw; line-height: 1; }
body[data-theme="lan-advanced"] #gameSurface .stats strong { font-family: "Helvetica Neue",Arial,sans-serif; font-variant-numeric: tabular-nums; font-weight: 300; color: #effaff; text-shadow: 0 0 13px #afdcff40; line-height: 1.12; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child { left: 50%; top: 2.8%; transform: translateX(-50%); text-align: center; width: 31%; height: calc(10.4cqw - 2.8%); padding: 0; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child::before { content: ""; position: absolute; width: 100%; aspect-ratio: 1; left: 0; bottom: 0; border: 1px solid #b8eaff9c; border-bottom: 2px solid #dbf8ff; border-radius: 50%; box-shadow: 0 2px 5px #95e3ff70,inset 0 -5px 0 #afe5ff0a,inset 0 -13px 0 #afe5ff08,0 0 0 9px #9bcff90b,0 0 0 21px #9bcff908; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child::after { content: ""; position: absolute; width: 116%; aspect-ratio: 1; left: -8%; bottom: -.9cqw; border-radius: 50%; border: 1px dashed #b0e1ff44; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child strong { display: block; position: relative; font-size: 2.8cqw; letter-spacing: .47cqw; padding-left: .47cqw; }
body[data-theme="lan-advanced"] #gameSurface .lan-hud-flare { display: block; position: relative; height: 1px; background: linear-gradient(90deg,transparent,#c3ebff,transparent); width: 24%; margin: 1.15cqw auto 0; }
body[data-theme="lan-advanced"] #gameSurface .lan-hud-flare::after { content: ""; width: 3px; height: 3px; background: #f4ffff; box-shadow: 0 0 8px 2px #8cddff; position: absolute; left: 50%; top: -1px; border-radius: 50%; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat.center { top: 22.5%; left: 15.7%; text-align: left; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat.center strong { color: #e3f5ff; font-size: 3.25cqw; letter-spacing: .5cqw; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat.center .lan-hud-flare { width: 150%; margin-left: -35%; margin-top: .9cqw; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child { right: 3%; top: 2.7%; width: 8.6cqw; height: 8.6cqw; border: 1px solid #a3dfffaa; border-right: 2px solid #e1f8ff; border-bottom: 2px solid #c2efff; border-radius: 50%; padding: 1.9cqw .1cqw 0; text-align: center; box-shadow: -3px -2px 0 #b6dcff35,inset 0 0 10px #a0dfff17,1px 2px 8px #a6dfff44; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child strong { font-size: 1.95cqw; letter-spacing: .12cqw; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child small { font-size: 1.05cqw; letter-spacing: .25cqw; margin-bottom: .65cqw; }
body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child .lan-hud-flare { width: 65%; margin-top: .65cqw; }

/* A light track lies on the water. Existing buttons and input handlers remain. */
body[data-theme="lan-advanced"] #gameSurface .game-bottom { position: absolute; z-index: 2; bottom: 0; left: 0; right: 0; display: block; height: clamp(58px,6.8vw,92px); padding: 0; background: linear-gradient(transparent,#06172b7a); pointer-events: none; }
body[data-theme="lan-advanced"] #gameSurface .game-bottom .timeline { position: absolute; top: 50%; left: 10%; width: auto; right: 7%; height: 2px; overflow: visible; border-radius: 0; background: #c2e7ff3d; box-shadow: 0 1px 0 #e1f5ff0d; }
body[data-theme="lan-advanced"] #gameSurface .timeline::before,body[data-theme="lan-advanced"] #gameSurface .timeline::after { content: ""; position: absolute; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: #e3f7ff; box-shadow: 0 0 7px #a8e9ff; }
body[data-theme="lan-advanced"] #gameSurface .timeline::before { left: 0; }
body[data-theme="lan-advanced"] #gameSurface .timeline::after { right: 0; }
body[data-theme="lan-advanced"] #gameSurface .timeline i { position: relative; display: block; height: 100%; background: linear-gradient(90deg,#b7e6ff,#f1fcff); box-shadow: 0 0 9px #a6e7ffbb; }
body[data-theme="lan-advanced"] #gameSurface .timeline i::after { content: ""; position: absolute; width: 7px; height: 7px; right: -3px; top: -2.5px; border-radius: 50%; background: #f4ffff; box-shadow: 0 0 5px 2px #bcf3ff,0 0 18px 3px #64beeb80; }
body[data-theme="lan-advanced"] #gameSurface .game-bottom .timeline-labels { position: absolute; top: calc(50% + 11px); left: 10%; right: 7%; margin: 0; font-size: 9px; color: #9ebbd0; letter-spacing: 1.5px; }
body[data-theme="lan-advanced"] #gameSurface .game-bottom .touch-controls,body[data-theme="lan-advanced"] #gameSurface .game-bottom .play-controls { display: contents; }
body[data-theme="lan-advanced"] #gameSurface .game-bottom .hit-btn { display: none; }
body[data-theme="lan-advanced"] #gameSurface .game-bottom #pauseButton { position: absolute; left: 2.4%; top: 50%; transform: translateY(-50%); width: clamp(36px,4.2vw,66px); height: clamp(36px,4.2vw,66px); min-height: 44px; min-width: 44px; padding: 0; border-radius: 50%; border: 1px solid #d2f0ffc9; border-left: 3px solid #97c2dd65; font-size: 0; background: #0a243d33; color: #effbff; box-shadow: inset 0 0 0 3px #a5d9ff0d,0 0 8px #b2e8ff22; pointer-events: auto; }
body[data-theme="lan-advanced"] #pauseButton::before { content: ""; position: absolute; width: 24%; height: 34%; left: 38%; top: 33%; border-left: 4px solid currentColor; border-right: 4px solid currentColor; filter: drop-shadow(0 0 4px #abdeff88); }
body[data-theme="lan-advanced"] #pauseButton[data-action="resume"]::before { width: 0; height: 0; left: 43%; top: 31%; border: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 12px solid currentColor; }
body[data-theme="lan-advanced"] #gameSurface .game-bottom #restartButton { position: absolute; right: 1.6%; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 0; border: 1px solid #c7e8ff33; border-radius: 50%; color: #b2d0e0; background: #081e2b44; pointer-events: auto; }
body[data-theme="lan-advanced"] #restartButton::before { content: "↻"; font-size: 20px; line-height: 1; }
body[data-theme="lan-advanced"] #gameSurface .overlay::before { background: linear-gradient(145deg,#0c2539f2,#081b2bf0); border-color: #bde8ff40; }
body[data-theme="lan-advanced"] #gameSurface .overlay .primary { background: #c4ecfa; color: #082236; }

@media(max-width:760px) {
 .play-theme-grid { gap: 10px; }
 .play-theme-art { height: 140px; }
 .play-theme-art img { height: 125px; width: 95px; }
 .play-theme-option strong { font-size: 14px; }
 .play-theme-option strong,.play-theme-option small { padding: 0 12px; }
 .play-theme-tag { margin: 12px 10px 0; padding: 5px 6px; font-size: 9px; }
 body[data-theme="lan-advanced"] #gameSurface .lan-stage-identity { width: 29%; top: 3%; }
 body[data-theme="lan-advanced"] #gameSurface .lan-portrait { flex-basis: 11cqw; height: 11cqw; }
 body[data-theme="lan-advanced"] #gameSurface .lan-wordmark>span { font-size: 2.2cqw; letter-spacing: .1cqw; }
 body[data-theme="lan-advanced"] #gameSurface .lan-wordmark small { font-size: 1.8cqw; letter-spacing: .1cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child { top: 3%; width: 34%; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child strong { font-size: 3.7cqw; letter-spacing: .3cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats small { font-size: 1.7cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child { width: 12cqw; height: 12cqw; padding-top: 2.6cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child strong { font-size: 2.6cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child small { font-size: 1.7cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat.center { top: 18%; left: 12%; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat.center strong { font-size: 5cqw; }
 body[data-theme="lan-advanced"] #gameSurface .game-bottom .timeline,body[data-theme="lan-advanced"] #gameSurface .game-bottom .timeline-labels { left: 16%; right: 13%; }
}
@media(max-height:600px) and (orientation:landscape) {
 body[data-theme="lan-advanced"] #gameSurface .lan-stage-identity { top: 3%; width: 26%; gap: 1cqw; }
 body[data-theme="lan-advanced"] #gameSurface .lan-portrait { flex-basis: 6.7cqw; height: 6.7cqw; }
 body[data-theme="lan-advanced"] #gameSurface .lan-wordmark>span { font-size: 1.55cqw; }
 body[data-theme="lan-advanced"] #gameSurface .lan-wordmark small { font-size: 1cqw; margin-top: .4cqw; }
 body[data-theme="lan-advanced"] #gameSurface .lan-wordmark i { margin-top: .6cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child { top: 3%; width: 30%; height: calc(9.1cqw - 3%); padding-bottom: 0; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child strong { font-size: 2.8cqw; letter-spacing: .35cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child::before { bottom: 0; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:first-child::after { bottom: -.8cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats small { font-size: .9cqw; margin-bottom: .4cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat.center { top: 29%; left: 13.5%; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat.center strong { font-size: 2.7cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat.center .lan-hud-flare { margin-top: .3cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child { top: 3%; width: 7.3cqw; height: 7.3cqw; padding-top: 1.5cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child small { font-size: .9cqw; }
 body[data-theme="lan-advanced"] #gameSurface .stats .stat:last-child strong { font-size: 1.65cqw; }
 body[data-theme="lan-advanced"] #gameSurface .lan-hud-flare { margin-top: .65cqw; }
 body[data-theme="lan-advanced"] #gameSurface .game-bottom { height: 45px; }
 body[data-theme="lan-advanced"] #gameSurface .game-bottom .timeline-labels { top: calc(50% + 7px); font-size: 7px; }
 body[data-theme="lan-advanced"] #gameSurface .game-bottom #pauseButton { width: 44px; height: 44px; }
 body[data-theme="lan-advanced"] #gameSurface .game-bottom #restartButton { width: 44px; height: 44px; }
 .theme-trigger { padding: 3px 7px; font-size: 10px; }
 .theme-dialog { max-height: calc(100dvh - 20px); }
 .theme-dialog .play-theme-art { height: 85px; }
 .theme-dialog .play-theme-art img { height: 80px; }
 .theme-dialog .play-theme-grid { margin: 10px 0; }
}
