/* Screen shell, typography, landing, city, settings. */
.screen {
  position: absolute; inset: 0; width: min(100%, 560px); margin: 0 auto;
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none;
  padding: calc(var(--safe-t) + 20px) 16px calc(var(--safe-b) + var(--dock-h) + 40px);
  outline: none; animation: screen-in .55s var(--ease) both;
}
.screen::-webkit-scrollbar { display: none; }
/* scrims keep text readable over the live city: content screens dim it, the landing only shades the text zones */
.screen:not(.landing) { background: linear-gradient(180deg, rgb(var(--bg-rgb) / .8), rgb(var(--bg-rgb) / .6) 45%, rgb(var(--bg-rgb) / .78)); }
.landing { background: linear-gradient(180deg, rgb(var(--bg-rgb) / .4), transparent 16%, rgb(var(--bg-rgb) / .5) 44%, rgb(var(--bg-rgb) / .88) 100%); }
.tagline, .lead, .fine { text-shadow: 0 1px 14px rgb(var(--bg-rgb)), 0 0 3px rgb(var(--bg-rgb) / .9); }
.screen.is-out { animation: screen-out .28s ease both; pointer-events: none; }
@keyframes screen-in { from { opacity: 0; transform: translateY(20px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes screen-out { to { opacity: 0; transform: translateY(-12px) scale(.99); } }

/* ---------- Typography ---------- */
.h1 { margin: 6px 0 8px; font: 700 40px/1 var(--f-display); letter-spacing: .05em; text-transform: uppercase; text-shadow: 0 0 24px rgb(var(--a1-rgb) / .5); }
.h1 em { font-style: normal; color: var(--a3); text-shadow: 0 0 22px rgb(var(--a3-rgb) / .6); }
.h2 { display: flex; align-items: center; gap: 10px; margin: 30px 2px 12px; font: 600 12px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--a3); }
.h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgb(var(--a3-rgb) / .5), transparent); }
.lead { max-width: 36ch; color: var(--ink-dim); font-size: 16px; }
.lead b { color: var(--ink); font-weight: 600; }
.body-dim { color: var(--ink-dim); }
.fine { color: var(--ink-faint); font-size: 12.5px; line-height: 1.4; }
.center { text-align: center; margin-top: 18px; }
.note { margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgb(var(--a1-rgb) / .4); background: rgb(var(--a1-rgb) / .09); color: var(--ink-dim); font-size: 14px; line-height: 1.45; }
.note b { color: var(--ink); font-weight: 600; }
.inline-ico .ico { width: 18px; height: 18px; vertical-align: -3px; color: var(--a3); }
.mark { width: 22px; height: 22px; fill: none; stroke: var(--a3); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--a3)); }
.pulse-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--a3); box-shadow: 0 0 10px var(--a3); }
html[data-fx="2"] .pulse-dot, html[data-fx="3"] .pulse-dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }

/* ---------- Landing ---------- */
.landing { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding-bottom: calc(var(--safe-b) + 28px); }
.landing-top { display: flex; align-items: center; gap: 10px; color: var(--ink-dim); }
.spacer { flex: 1; }
.landing-mid { margin: auto 0; padding: 0 2px; }
.eyebrow { margin-bottom: 14px; color: var(--a3); letter-spacing: .26em; }
.logo { display: flex; flex-direction: column; margin: 0; font-family: var(--f-display); font-weight: 700; line-height: .88; text-transform: uppercase; }
.logo-a {
  font-size: clamp(54px, 21vw, 92px); letter-spacing: .2em;
  /* dark fill painted over the inner half of the stroke hides overlapping glyph contours: a clean neon outline */
  color: var(--bg); -webkit-text-stroke: 3.2px var(--a3); paint-order: stroke fill; filter: drop-shadow(0 0 8px rgb(var(--a3-rgb) / .9));
}
.logo-b {
  font-size: clamp(66px, 26vw, 112px); letter-spacing: .07em;
  color: #fff; text-shadow: 0 0 4px #fff, 0 0 16px var(--a1), 0 0 36px var(--a1), 0 0 76px var(--a2);
}
.tagline { margin-top: 22px; max-width: 30ch; color: var(--ink-dim); font-size: 17px; line-height: 1.45; }
.landing-bot { display: grid; gap: 14px; justify-items: center; }
.landing-bot .btn { font-size: 20px; min-height: 58px; }
.landing-bot .fine { max-width: 38ch; text-align: center; }
.install-chip { min-height: 44px; padding: 0 16px; }

.flick { font-style: normal; display: inline-block; }
html[data-fx="2"] .flick, html[data-fx="3"] .flick { animation: flick 5.5s linear infinite; }
@keyframes flick { 0%, 17%, 19%, 22%, 62%, 64%, 100% { opacity: 1; } 18%, 21%, 63% { opacity: .12; } 20% { opacity: .65; } }

/* RGB-split tear, triggered for ~300 ms by landing.js */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none; text-shadow: none;
}
.glitch::before { color: var(--hot); }
.glitch::after { color: var(--a3); }
.glitch.on::before { opacity: .9; animation: tear-a .32s steps(2) both; }
.glitch.on::after { opacity: .9; animation: tear-b .32s steps(2) both; }
@keyframes tear-a {
  0% { clip-path: inset(10% 0 70% 0); transform: translateX(-7px); } 25% { clip-path: inset(55% 0 20% 0); transform: translateX(6px); }
  50% { clip-path: inset(30% 0 45% 0); transform: translateX(-4px); } 75% { clip-path: inset(75% 0 5% 0); transform: translateX(7px); }
  100% { clip-path: inset(0 0 100% 0); transform: none; }
}
@keyframes tear-b {
  0% { clip-path: inset(60% 0 15% 0); transform: translateX(7px); } 30% { clip-path: inset(15% 0 65% 0); transform: translateX(-6px); }
  60% { clip-path: inset(45% 0 35% 0); transform: translateX(4px); } 100% { clip-path: inset(100% 0 0 0); transform: none; }
}

/* ---------- City ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 20px/1 var(--f-display); letter-spacing: .22em; }
.clock { text-align: right; line-height: 1.1; }
.clock b { display: block; font: 700 28px/1 var(--f-display); letter-spacing: .08em; text-shadow: 0 0 14px rgb(var(--a3-rgb) / .65); }
.clock small { color: var(--ink-faint); font-size: 11px; }

.rail { display: flex; gap: 12px; margin: 16px -16px 0; padding: 4px 16px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.district {
  --spot: 0; flex: none; width: 130px; padding: 8px; display: flex; flex-direction: column; gap: 3px;
  border-radius: 18px; text-align: left; scroll-snap-align: start;
  transition: transform .2s var(--ease), box-shadow .3s, border-color .3s, --spot .35s ease;
}
.district:active { transform: scale(.97); }
.district canvas { display: block; width: 112px; height: 200px; margin-bottom: 6px; border-radius: 12px; }
.district .d-name { font: 700 17px/1.05 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
.district .d-note { min-height: 2.6em; color: var(--ink-dim); font-size: 12.5px; line-height: 1.3; }
.district[aria-checked="true"] { border-color: var(--a3); box-shadow: 0 0 0 1px var(--a3), 0 0 28px -4px rgb(var(--a3-rgb) / .65); }
.district[aria-checked="true"] .d-name { color: var(--a3); }
.btn-row { display: flex; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hud { margin-top: 16px; padding: 16px; }
.hud-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--ink-dim); }
.hud-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 0; }
.hud-grid dt { color: var(--ink-faint); font-size: 11px; }
.hud-grid dd { margin: 3px 0 0; font: 600 16px/1.2 var(--f-body); }

/* ---------- Settings ---------- */
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme { --spot: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 18px; text-align: left; }
.theme .sw { display: block; height: 40px; margin-bottom: 8px; border-radius: 10px; background: linear-gradient(110deg, var(--c3), var(--c2) 50%, var(--c1)); box-shadow: 0 0 18px -4px var(--c1); }
.theme b { font: 700 18px/1.1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
.theme small { color: var(--ink-dim); font-size: 12.5px; line-height: 1.3; }
.theme[aria-checked="true"] { border-color: var(--c3); box-shadow: 0 0 0 1px var(--c3), 0 0 26px -4px var(--c3); }
.block { padding: 0; }
.pad { padding: 14px 14px 6px; }
.hint { min-height: 3.4em; padding: 10px 2px 8px; color: var(--ink-dim); font-size: 13.5px; line-height: 1.4; }
button.set-row:active, a.set-row:active { background: rgb(255 255 255 / .05); }
.set-row > .ico { width: 20px; height: 20px; color: var(--ink-faint); }
.legal-links a { color: var(--ink-dim); text-decoration: underline; text-underline-offset: 3px; }
.legal-links { padding: 8px 12px; }
