:root {
  --ink: #040a13; --paper: #edf3f2; --cyan: #68ffe2; --pink: #ff3e96;
  --line: #accbd52e; --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; color-scheme: dark; background: #030813; }
body { margin: 0; min-width: 320px; min-height: 100svh; color: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; isolation: isolate; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 16px; transform: translateY(-160%); background: var(--cyan); color: var(--ink); }
.skip-link:focus { transform: none; }
#city-canvas { position: fixed; z-index: 1; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; touch-action: pan-y; transition: opacity 600ms; }
html[data-render="live"] #city-canvas { opacity: 1; }
html[data-render="fallback"] #city-canvas { display: none; }
.fallback-scene { position: fixed; z-index: 0; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 55% 38%, #191b3b, #030813 70%); pointer-events: none; }
html[data-render="live"] .fallback-scene { display: none; }
.fallback-city { position: absolute; inset: 0; width: 100%; height: 100%; }
.fallback-buildings--far { fill: #0c2637; }
.fallback-buildings--near { fill: #07131e; }
.fallback-signals { fill: #82e5dc; }
.fallback-comets i { position: absolute; top: 20%; left: 40%; width: 22vw; height: 2px; background: linear-gradient(90deg,#c6fff9,transparent); transform: rotate(-18deg); box-shadow: 0 0 8px #8ddffb55; }
.fallback-comets i:nth-child(2) { top: 34%; left: 20%; transform: rotate(19deg); }
.fallback-comets i:nth-child(3) { top: 11%; left: 65%; }
.fallback-comets i:nth-child(4) { top: 45%; left: 60%; transform: rotate(26deg); }
.ui-shell { position: relative; z-index: 5; min-height: 100svh; pointer-events: none; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; z-index: 30; padding: 27px 4.6vw; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; pointer-events: auto; }
.brand-mark { display: flex; align-items: flex-end; gap: 3px; width: 25px; height: 27px; padding: 4px; border: 1px solid #68ffe277; transform: skewX(-9deg); }
.brand-mark i { display: block; width: 4px; height: 10px; background: var(--cyan); }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:last-child { height: 22px; background: var(--pink); }
.brand-copy { display: grid; gap: 5px; }
.brand-copy strong { font: 650 14px/1 var(--mono); letter-spacing: .16em; }
.brand-copy small { font: 9px/1 var(--mono); letter-spacing: .16em; color: #97acb9; }
.system-tools { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.fx-toggle { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 10px; color: #d0dfed; background: #07111d99; border: 1px solid var(--line); font: 11px var(--mono); }
.fx-glyph { width: 5px; height: 5px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 7px #68ffe280; }
.fx-toggle[aria-pressed="false"] .fx-glyph { background: #80919b; box-shadow: none; }
.fx-toggle kbd { margin-left: 6px; color: #80919b; font: 9px var(--mono); }
.stage { position: relative; min-height: max(590px, calc(100svh - 155px)); }
.hero { position: absolute; left: 5%; top: clamp(75px, 12vh, 150px); width: min(43%, 620px); pointer-events: auto; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 27px; color: #a8e6dd; font: 10px var(--mono); letter-spacing: .18em; }
.eyebrow > span { width: 24px; height: 1px; background: var(--cyan); }
.hero h1 { margin: 0; font-size: clamp(48px, 5vw, 76px); line-height: 1.12; letter-spacing: -.045em; font-weight: 700; }
.hero-copy { margin: 27px 0 0; color: #b9cbd1; font-size: 14px; line-height: 1.9; letter-spacing: .035em; text-shadow: 0 2px 8px #030813; }
.access-panel { position: absolute; top: clamp(62px, 10vh, 130px); right: 5%; width: clamp(340px,27vw,390px); padding: 32px 29px 25px; border: 1px solid #9bc8cf33; background: linear-gradient(145deg,#102331ed,#08121ded); box-shadow: 0 20px 65px #0005; pointer-events: auto; }
.access-panel::before { content: ""; position: absolute; top: -1px; left: 29px; width: 74px; height: 1px; background: #68ffe2; box-shadow: 0 0 10px #68ffe255; }
.panel-kicker { margin: 0 0 13px; color: #a8e6dd; font: 10px var(--mono); letter-spacing: .18em; }
.panel-heading h2 { margin: 0; font-size: 27px; line-height: 1.25; letter-spacing: -.035em; color: #9effeb; text-shadow: -1px 0 #68ffe277, 1px 0 #ff3e9688, 0 0 12px #68ffe25c, 0 0 28px #68ffe226; animation: login-neon 6s ease-in-out infinite; }
.panel-description { margin: 15px 0 27px; color: #9fb2c1; font-size: 12px; line-height: 1.85; }
.flash { margin: 0 0 18px; padding: 12px; border: 1px solid #ff8bb380; background: #ff8bb312; color: #ffafc9; font-size: 12px; line-height: 1.65; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { margin-bottom: 17px; }
.field label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; color: #c4d2dc; font-size: 12px; }
.field label span { color: #708b9b; font: 9px var(--mono); letter-spacing: .12em; }
.input-wrap { display: flex; min-height: 48px; border: 1px solid #708b9b55; background: #030b1499; transition: border-color 180ms; }
.input-wrap:focus-within { border-color: #77e8d6; box-shadow: 0 0 0 2px #68ffe20a; }
.input-wrap.is-invalid { border-color: #ff719c; }
.input-wrap input { min-width: 0; width: 100%; padding: 13px 12px; border: 0; background: transparent; color: #edf7f9; font-size: 14px; outline: none; }
.input-wrap input::placeholder { color: #758b9a; font-size: 12px; }
.password-toggle { flex: none; padding: 0 12px; border: 0; background: none; color: #9bb4bf; font-size: 11px; }
.field-error { margin: 5px 0 0; min-height: 12px; color: #ff8cac; font-size: 11px; line-height: 1.5; }
.primary-action { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; margin-top: 6px; padding: 12px 17px; border: 1px solid #90ffe7; background: #68ffe2; color: #04251f; font-size: 14px; font-weight: 650; transition: background 150ms; }
.primary-action:hover { background: #a6ffeb; }
.primary-action:disabled { opacity: .6; cursor: wait; }
.login-status { color: #a6bbc8; font-size: 11px; line-height: 1.65; margin: 13px 0 0; }
.login-status:empty { display: none; }
.login-status a { color: #b8f4e6; text-underline-offset: 3px; }
.auth-signature { padding-top: 23px; margin: 23px 0 0; border-top: 1px solid #9bc8cf1c; color: #7f9aa9; font: 8px/1.5 var(--mono); letter-spacing: .1em; white-space: nowrap; }
.auth-signature span { margin: 0 6px; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; min-height: 60px; padding: 19px 5% 24px; color: #90a8b5; font: 9px/1.6 var(--mono); letter-spacing: .13em; }
.page-footer a { pointer-events: auto; text-decoration: none; }
body[data-effects="off"] *, body[data-effects="off"] *::before, body[data-effects="off"] *::after { animation: none !important; }
body[data-effects="off"] .signal-word { opacity: 1; transform: none; }
body[data-effects="off"] .signal-word::before, body[data-effects="off"] .signal-word::after { opacity: 0; }
@media (max-width: 1000px) {
  .masthead { padding: 22px 24px; }
  .hero { left: 4%; width: 43%; }
  .hero h1 { font-size: clamp(39px,5.5vw,55px); }
  .access-panel { right: 4%; width: 340px; padding: 28px 24px 24px; }
  .hero-copy { max-width: 260px; }
}
@media (max-width: 700px) {
  .masthead { padding: 18px 18px 10px; gap: 12px; }
  .brand { gap: 9px; }
  .brand-copy strong { font-size: 11px; letter-spacing: .12em; }
  .brand-copy small { font-size: 7px; letter-spacing: .05em; }
  .brand-mark { width: 21px; height: 24px; padding: 3px; }
  .fx-toggle { min-height: 44px; padding: 8px; font-size: 10px; }
  .fx-toggle kbd { display: none; }
  .stage { display: flex; flex-direction: column; min-height: 0; }
  .hero { position: relative; inset: auto; width: auto; margin: 40px 24px 0; }
  .eyebrow { font-size: 9px; letter-spacing: .09em; margin-bottom: 20px; }
  .eyebrow > span { width: 16px; }
  .hero h1 { font-size: clamp(36px,10.5vw,52px); }
  .hero-copy { margin-top: 18px; font-size: 12px; max-width: none; }
  .access-panel { position: relative; inset: auto; width: calc(100% - 40px); max-width: 390px; margin: 45px auto 0; padding: 27px 23px 22px; }
  .panel-heading h2 { font-size: 25px; }
  .panel-description { margin-bottom: 23px; }
  .page-footer { padding: 25px 22px; font-size: 8px; letter-spacing: .04em; }
}
@media (max-width: 360px) { .brand-copy small { display: none; } .auth-signature { font-size: 7px; letter-spacing: 0; } .page-footer span { max-width: 145px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .signal-word { opacity: 1; transform: none; }
  .signal-word::before, .signal-word::after { opacity: 0; }
}
@media (forced-colors: active) { .signal-word, .signal-word--accent, .panel-heading h2 { color: CanvasText; text-shadow: none; animation: none; } .signal-word::before, .signal-word::after { display: none; } }
