/* Sky Tower - the HUD over the canvas. The page frame (full window, font, back link) is the site's frame.css. */
:root { --ink: rgb(22 24 40 / 0.55); --line: rgb(255 255 255 / 0.2); --gold: #ffd36b; }
body { user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
[hidden] { display: none !important; }

.attract { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; text-align: center; padding: 0 16px; transition: opacity 0.45s; }
.attract h1 { margin: 6.5vh 0 0; font-size: clamp(56px, 12.5vh, 128px); line-height: 1; font-weight: 760; letter-spacing: -0.035em; color: #fff; text-shadow: 0 2px 2px rgb(40 50 90 / 0.25), 0 6px 34px rgb(30 40 90 / 0.45); }
.attract .sub { margin: 12px 0 0; font-size: clamp(14px, 2.3vh, 19px); font-weight: 500; color: rgb(255 255 255 / 0.92); text-shadow: 0 1px 12px rgb(20 30 70 / 0.65); }
.attract .go { margin: auto 0 6.5vh; padding: 12px 22px; border-radius: 9999px; background: var(--ink); border: 1px solid var(--line); font-size: clamp(14px, 2.2vh, 17px); font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.62; } }
.attract.gone { opacity: 0; }

.hud { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.playing .hud { opacity: 1; }
.over .hud .hint, .over .hud .drop { opacity: 0; }
.score { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); padding: 2px 16px 5px; border-radius: 16px; background: rgb(18 22 42 / 0.26); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-align: center; text-shadow: 0 1px 10px rgb(20 26 60 / 0.5); white-space: nowrap; }
.floors { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.floors b { font-size: 42px; line-height: 46px; font-weight: 760; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.floors span { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(255 255 255 / 0.8); }
.pts { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 2px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: rgb(255 255 255 / 0.9); }
.mult { font-style: normal; padding: 1px 8px; border-radius: 9999px; background: var(--gold); color: #3a2a06; font-size: 13px; font-weight: 750; text-shadow: none; opacity: 0; transform: scale(0.7); transition: opacity 0.2s, transform 0.2s; }
.mult.on { opacity: 1; transform: none; }

.lean { position: absolute; top: 54px; right: 12px; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: 0; transition: opacity 0.5s; }
.lean.on { opacity: 1; }
.lean::before { content: ""; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle, rgb(140 230 160 / 0.28) 0 30%, rgb(255 210 110 / 0.22) 30% 62%, rgb(255 110 100 / 0.26) 62% 100%); border: 1.5px solid rgb(255 255 255 / 0.55); box-sizing: border-box; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lean i { position: absolute; top: 22px; left: 25px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px rgb(255 255 255 / 0.8); transition: transform 0.4s cubic-bezier(.3, 1.4, .5, 1); }
.lean.warn i { background: #ff6b5e; box-shadow: 0 0 10px rgb(255 90 80 / 0.9); }
.lean span { font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(255 255 255 / 0.85); text-shadow: 0 1px 8px rgb(20 26 60 / 0.6); }

.toast { position: absolute; top: 21vh; left: 0; right: 0; text-align: center; font-size: clamp(20px, 3.4vh, 28px); font-weight: 750; letter-spacing: -0.01em; color: #fff; text-shadow: 0 2px 16px rgb(20 26 60 / 0.6); opacity: 0; }
.toast.show { animation: toast 1.6s ease-out forwards; }
.toast.gold { color: var(--gold); }
.toast.mark { color: #fff4dc; }
.toast.warn { color: #ffb0a6; }
@keyframes toast { 0% { opacity: 0; transform: translateY(10px) scale(0.9); } 12% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

.hint { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 9px 16px; border-radius: 9999px; background: var(--ink); border: 1px solid var(--line); font-size: 14px; font-weight: 550; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.8s; white-space: nowrap; max-width: calc(100vw - 32px); }
.hint.show { opacity: 1; }
.touch .hint { bottom: 120px; }

.touch-only { display: none; }
.touch .touch-only { display: inline-flex; }
.drop { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); width: 84px; height: 84px; border-radius: 50%; align-items: center; justify-content: center; background: rgb(255 255 255 / 0.22); border: 2px solid rgb(255 255 255 / 0.6); font-size: 15px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: auto; transition: opacity 0.3s; }
.drop:active { background: rgb(255 255 255 / 0.4); }

.mute { position: fixed; top: 12px; right: 12px; z-index: 40; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgb(15 15 15 / 0.5); border: 1px solid rgb(255 255 255 / 0.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mute:hover { background: rgb(15 15 15 / 0.75); }
.mute svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.card { position: fixed; left: 50%; top: 50%; width: min(320px, calc(100vw - 32px)); box-sizing: border-box; padding: 20px 22px 16px; border-radius: 18px; background: rgb(24 26 46 / 0.78); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 60px rgb(0 0 0 / 0.35); text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, -46%) scale(0.96); transition: opacity 0.3s, transform 0.3s; z-index: 30; }
.card.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
@media (max-aspect-ratio: 6/5), (max-width: 759px) { .card { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); transform: translate(-50%, 6%) scale(0.96); } .card.show { transform: translate(-50%, 0); } }
@media (min-aspect-ratio: 6/5) and (min-width: 760px) { .card { left: auto; right: 9vw; transform: translate(0, -46%) scale(0.96); } .card.show { transform: translate(0, -50%); } }
.card h2 { margin: 0; font-size: 15px; line-height: 20px; font-weight: 650; color: rgb(255 255 255 / 0.75); }
.card .big { margin: 2px 0 2px; font-size: 40px; line-height: 48px; font-weight: 760; letter-spacing: -0.02em; }
.card .badge { display: inline-block; margin: 0 0 10px; padding: 2px 10px; border-radius: 9999px; background: var(--gold); color: #3a2a06; font-size: 12px; font-weight: 750; }
.row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 14px; color: rgb(255 255 255 / 0.7); border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.row b { font-size: 16px; color: #fff; font-variant-numeric: tabular-nums; }
.again { margin-top: 16px; height: 40px; padding: 0 22px; border-radius: 9999px; background: #fff; color: #191b2e; font-size: 15px; font-weight: 700; }
.again:hover { background: #ffeec4; }
.card .small { margin: 10px 0 0; font-size: 12px; color: rgb(255 255 255 / 0.55); }

.fade { position: fixed; inset: 0; background: #eef3fb; opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 45; }
.fade.on { opacity: 1; }
@media (max-width: 560px) { .score { top: 52px; } .lean { top: 52px; } }
