/* Visual Integration 1: presentation only. Real Leaflet geography, no mock world. */
:root {
  --bg: #111510;
  --surface: #14221c;
  --surface-2: #1d3028;
  --overlay: rgba(12, 23, 18, .96);
  --lime: #d2ff5a;
  --aqua: var(--lime);
  --aqua-dark: #a9d445;
  --yellow: #ffc27a;
  --purple: #c3a1ff;
  --text: #f4f5eb;
  --muted: #b1beb1;
  --quiet: #879687;
  --line: rgba(235, 247, 220, .16);
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'DM Mono', monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --radius-sm: 8px; --radius-md: 14px; --radius-lg: 22px;
  --shadow-panel: 0 16px 48px #0008;
  --fast: 140ms; --panel-time: 190ms; --reveal-time: 260ms;
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --nav-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  --nav-height: 60px;
  --hud-panel-top: calc(96px + env(safe-area-inset-top, 0px));
  font-family: var(--font-body);
  background: var(--bg);
}
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); }
button, input { font-family: var(--font-body); }
button { touch-action: manipulation; }
button:focus-visible, [tabindex]:focus-visible, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
button:disabled { cursor: not-allowed; }
button:active:not(:disabled) { scale: .97; }
[hidden] { display: none !important; }
.app-shell { position: fixed; inset: var(--ui-viewport-top,0px) 0 auto; width: 100%; height: var(--ui-viewport-height,100dvh); min-height: 0; max-width: none; margin: 0; border-radius: 0; box-shadow: none; background: var(--bg); }
.map-screen { display: block; z-index: 0; }
#map { background: var(--surface); }
.leaflet-tile { filter: saturate(.65) brightness(.76) contrast(1.12); }
.leaflet-container:after { background: radial-gradient(ellipse at center, transparent 45%, #0b18163d 100%); }
.leaflet-bottom { bottom: calc(var(--nav-height) + var(--nav-bottom) + 4px); }
.top-hud { display: grid; grid-template-columns: auto 1fr; gap: 1px 5px; padding: calc(3px + env(safe-area-inset-top)) 7px 0; max-width: 500px; }
.brand-chip { gap: 7px; height: 41px; min-height: 41px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--overlay); font: 22px/1 var(--font-display); letter-spacing: -.6px; }
.brand-chip > span { font: 16px var(--font-body); }
.hud-stats { justify-content: flex-end; min-width: 0; }
.hud-stat { height: 44px; min-width: 44px; padding: 0 7px; border-radius: var(--radius-sm); font: 700 12px var(--font-body); background: var(--overlay); }
.hud-stat.money { flex: 1; min-width: 0; }
.hud-stat b { overflow: hidden; text-overflow: ellipsis; }
.hud-stat span { font: 11px var(--font-mono); }
.hud-stat.money > span:first-child { flex: 0 0 auto; }
.hud-money-copy { min-width: 0; display: grid; align-content: center; justify-items: start; gap: 1px; line-height: 1; }
.hud-money-copy b { max-width: 100%; font: 700 12px/1 var(--font-body); white-space: nowrap; }
.hud-money-copy small { max-width: 100%; display: flex; align-items: baseline; gap: 3px; overflow: hidden; color: var(--lime); font: 700 7px/1 var(--font-mono); white-space: nowrap; }
.hud-money-copy small i, .hud-money-copy small em { overflow: hidden; font: inherit; font-style: normal; text-overflow: ellipsis; }
.hud-money-copy small i { flex: 0 0 auto; color: var(--quiet); }
.hud-progress-copy { min-width: 34px; display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 3px; line-height: 1; }
.hud-progress-copy b { display: flex; align-items: baseline; gap: 2px; }
.hud-progress-copy b i { font: inherit; font-style: normal; }
.hud-progress-copy small { color: var(--muted); font: 700 7px/1 var(--font-mono); }
.hud-mini-bar { grid-column: 1 / -1; width: 100%; height: 2px; margin-top: 3px; overflow: hidden; border-radius: 2px; background: #ffffff24; }
.hud-mini-bar em { display: block; width: 0; height: 100%; background: var(--lime); transition: width var(--fast) var(--ease-out); }
.hud-mini-bar.energy-bar em { background: var(--yellow); }
.hud-identity { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.hud-identity button { pointer-events: auto; min-height: 40px; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--overlay); max-width: calc(100% - 49px); text-align: left; }
.hud-identity b { font: 700 11px var(--font-body); display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-identity span { display: block; font: 9px var(--font-mono); color: var(--lime); margin-top: 2px; }
.hud-identity .hud-player { flex: 1; min-width: 0; max-width: calc(100% - 98px); }
.hud-player-copy b { max-width: 100%; }
.hud-quick-actions { display: flex !important; flex: 0 0 auto; gap: 6px; margin: 0 !important; }
.hud-identity .hud-quick-action { position: relative; display: grid; place-items: center; width: 44px; min-width: 44px; max-width: none; height: 44px; padding: 0; text-align: center; }
.hud-quick-action > span { margin: 0; color: var(--text); }
.hud-quick-action .ui-icon { width: 22px; height: 22px; }
.hud-quick-action:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.hud-inbox i { position: absolute; right: 2px; top: 1px; display: grid; place-items: center; min-width: 14px; height: 14px; padding: 0 2px; border-radius: 4px; background: var(--lime); color: var(--bg); font: 700 10px var(--font-body); font-style: normal; }
.hud-inbox i[hidden] { display: none; }
.map-copy { top: auto; bottom: calc(var(--nav-height) + var(--nav-bottom) + 70px); max-width: calc(100% - 24px); font-size: 9px; background: var(--overlay); }
/* Compact live GPS chip: decorative dot plus always-readable status. */
.map-copy.gps-active #locationLabel { display: none; }
.map-copy #locationLabel { min-width: 0; max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
.simulation-set-control { min-height: 28px; display: inline-flex; align-items: center; gap: 4px; margin: -4px -5px -4px 3px; padding: 4px 7px; border: 1px solid #d2ff5a66; border-radius: 7px; color: var(--lime); background: rgba(12,23,18,.62); box-shadow: none; }
.simulation-set-control .ui-icon { width: 13px; height: 13px; }
.simulation-set-control small { color: inherit; font: 800 8px/1 var(--font-mono); letter-spacing: .02em; word-spacing: .22em; white-space: nowrap; text-transform: uppercase; }
.simulation-set-control:disabled { color: var(--quiet); border-color: var(--line); background: transparent; opacity: .72; }
.map-controls { top: var(--hud-panel-top); right: 8px; gap: 5px; }
.map-control, .zoom-controls { background: rgba(12,23,18,.78); border-radius: 10px; box-shadow: 0 5px 16px #0005; }
.map-view-control { position: absolute; z-index: 900; top: var(--hud-panel-top); left: 10px; display: grid; grid-template-columns: 44px 44px; border: 1px solid var(--line); background: var(--overlay); border-radius: var(--radius-sm); }
.map-view-control > span, .map-view-control > button { min-height: 36px; display: grid; place-items: center; font: 11px var(--font-mono); }
.map-view-control > span { color: var(--lime); }
.map-view-control button { color: var(--quiet); }
.map-view-control small { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 0 4px 7px; font-size: 9px; }
.map-zone-presence { grid-column: 1 / -1; display: flex !important; min-height: 32px !important; gap: 6px; padding: 0 8px; border-top: 1px solid var(--line); color: var(--text) !important; white-space: nowrap; }
.map-zone-presence .status-dot { flex: 0 0 6px; background: var(--lime); box-shadow: 0 0 8px #d2ff5a99; }
.map-zone-presence span:last-child { min-height: 0; color: var(--muted); font: 700 9px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.explore-chip { bottom: calc(var(--nav-height) + var(--nav-bottom) + 12px); width: max-content; max-width: min(270px,calc(100% - 118px)); min-height: 46px; padding: 6px 12px; background: var(--lime); color: var(--bg); border-radius: var(--radius-sm); font: 700 12px var(--font-body); text-align: left; }
/* Full approved area label at narrow widths; other contextual CTAs keep their limits. */
.explore-chip[data-home-action="explore"] { max-width: min(270px,calc(100% - 40px)); }
.explore-chip > .ui-icon { width: 18px; height: 18px; }
.home-action-copy { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 6px; line-height: 1.05; }
.home-action-copy small { color: #3e5520; font: 800 7px var(--font-mono); letter-spacing: .07em; }
.home-action-copy b { overflow: hidden; font: 800 11px var(--font-body); white-space: nowrap; text-overflow: ellipsis; }
.home-action-copy em { grid-column: 1 / -1; margin-top: 3px; overflow: hidden; color: #29370f; font: 700 8px var(--font-mono); font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.income-campaign { display: block; margin-top: 4px; color: var(--lime); font: 700 9px var(--font-mono); text-transform: uppercase; }
.bottom-nav { position: absolute; left: 10px; right: 10px; bottom: var(--nav-bottom); height: var(--nav-height); padding: 5px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(13,24,19,.94); box-shadow: var(--shadow-panel); }
.nav-button { gap: 5px; border-radius: var(--radius-sm); min-height: 48px; }
.nav-button b { font: 700 11px var(--font-body); }
.nav-button span { font-size: 20px; }
.nav-button.active { color: var(--lime); background: #d2ff5a12; }
.nav-button.active span { text-shadow: none; }
.nav-button i { background: var(--lime); color: var(--bg); border: none; }
.panel-screen { z-index: 1050; top: var(--hud-panel-top); bottom: calc(var(--nav-height) + var(--nav-bottom) + 8px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-sm); background: var(--overlay); box-shadow: var(--shadow-panel); }
.panel-screen.active { display: flex; flex-direction: column; animation: game-panel-in var(--panel-time) var(--ease-out); }
.page-scroller { flex: 1; min-height: 0; height: auto; padding: 0 16px 20px; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
.panel-close { position: absolute; z-index: 2; top: 6px; right: 8px; width: 44px; height: 44px; font-size: 24px; color: var(--muted); background: var(--surface); border-radius: 50%; }
.page-header { padding-right: 42px; margin-bottom: 16px; }
.page-header h1, .profile-hero h1 { font: 38px/.98 var(--font-display); letter-spacing: -.4px; text-transform: uppercase; color: var(--text); }
.page-header > p, .profile-hero p { color: var(--lime); font: 10px var(--font-mono); }
.page-subtitle { font: 12px/1.4 var(--font-body); }
.section-head { margin-top: 18px; }
.section-head h2 { font: 22px var(--font-display); text-transform: uppercase; }
#pulseScreen { top: auto; height: min(490px,61dvh,calc(var(--ui-viewport-height,100dvh) - var(--hud-panel-top) - var(--nav-height) - var(--nav-bottom) - 8px)); }
.pulse-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 8px; scrollbar-width: thin; }
.pulse-card { flex: 0 0 88%; grid-template-columns: 32px 1fr; align-content: start; gap: 10px; scroll-snap-align: start; border-radius: var(--radius-md); background: var(--surface); box-shadow: none; }
.pulse-card.urgent { border-color: var(--lime); background: linear-gradient(120deg,#d2ff5a0d,var(--surface)); }
.pulse-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: #d2ff5a12; font-size: 18px; }
.pulse-copy h2 { font: 25px/1 var(--font-display); text-transform: uppercase; }
.pulse-copy p { font: 12px/1.4 var(--font-body); }
.pulse-copy small { font: 10px var(--font-mono); color: var(--lime); }
.pulse-card button { grid-column: 1 / -1; min-height: 44px; font-size: 12px; background: #d2ff5a12; color: var(--lime); border-color: var(--line); }
.pulse-changes { font: 11px/1.4 var(--font-body); color: var(--muted); margin: 0 0 10px; }
.run-card { border-radius: var(--radius-md); padding: 14px; background: var(--surface); }
.run-card h2 { font: 25px var(--font-display); text-transform: uppercase; }
.run-card > p { font: 12px/1.4 var(--font-body); }
.run-kicker { color: var(--lime); }
.run-actions { margin-top: 12px; }
.run-actions button { min-height: 44px !important; font: 700 11px var(--font-body); }
.run-actions .primary-action { background: var(--lime); color: var(--bg); }
.run-actions .secondary-action { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.app-shell:has(.panel-screen.active) .explore-chip, .app-shell:has(.panel-screen.active) .map-copy { visibility: hidden; }
.app-shell:has(.bottom-sheet.visible) .explore-chip, .app-shell:has(.bottom-sheet.visible) .map-copy { visibility: hidden; }
.identity-status-card span, .identity-status-card b, .xp-card > div:first-child, .profile-stats span { font-family: var(--font-body); }
.xp-card, .profile-stats { background: var(--surface); }
.journal-filters { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 8px; padding: 4px 1px; }
.journal-filters button { flex: 0 0 auto; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 12px; }
.journal-filters button[aria-pressed=true] { color: var(--lime); border-color: var(--lime); }
.mission-section { display: grid; gap: 8px; }
.mission-card { grid-template-columns: 32px minmax(0,1fr); padding: 14px; background: var(--surface); border-radius: var(--radius-md); }
.mission-icon { width: 32px; height: 32px; font-size: 17px; color: var(--purple); }
.mission-card h2 { font: 22px/1.1 var(--font-display); }
.mission-card p, .mission-objective b { font: 12px/1.4 var(--font-body); }
.mission-card-v2 .mission-reward { display: none; } /* V2 duplicates status/reward in mission-status; Local retains its claim control. */
.mission-status, .mission-objective small { font-size: 11px; }
.mission-progress .bar { height: 6px; }
.mission-progress .bar i { background: var(--purple); }
.mission-progress span { font-size: 10px; color: var(--purple); }
.mission-inline-actions { grid-template-columns: repeat(auto-fit,minmax(105px,1fr)); }
.mission-inline-actions .contextual-action-reason { display: block; }
.profile-hero { padding-right: 32px; gap: 12px; }
.profile-hero > div:not(.avatar) { flex:1; min-width:0; }
.profile-hero h1 { --profile-name-max:30; font-size:30px; line-height:1.08; overflow-wrap:normal; }
.profile-hero h1 > span { display:block; white-space:pre; }
.profile-hero .avatar { width: 48px; height: 48px; flex-basis: 48px; border-radius: var(--radius-md); background: var(--lime); border-color: var(--lime); color: var(--bg); box-shadow: none; }
.profile-hero > button { flex-shrink: 0; width: 44px; height: 44px; }
.identity-status-card { background: linear-gradient(140deg,#d2ff5a0f,var(--surface)); border-color: #d2ff5a66; border-radius: var(--radius-md); }
.identity-status-card strong { font: 54px/1 var(--font-display); color: var(--lime); }
.identity-status-card span, .identity-status-card b { color: var(--lime); }
.identity-badges { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.identity-badge { flex-direction: column; align-items: flex-start; border-radius: var(--radius-md); }
.identity-badge p { font: 11px/1.4 var(--font-body); }
.identity-title { min-height: 48px; gap: 8px; }
.identity-title.equipped { border-color: var(--lime); background: #d2ff5a12; }
.profile-stats b { font: 30px var(--font-display); }
.profile-stats span { font-size: 10px; }
.xp-bar i, .small-progress i { background: var(--lime); }
.bottom-sheet { position: fixed; left: 8px; right: 8px; bottom: calc(var(--nav-height) + var(--nav-bottom) + 8px); z-index: 1250; padding: 10px 16px 18px; max-height: calc(100dvh - 200px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--overlay); box-shadow: var(--shadow-panel); visibility: hidden; transition: transform var(--panel-time) var(--ease-out), visibility var(--panel-time); overscroll-behavior: contain; }
.bottom-sheet.visible { visibility: visible; }
.sheet-top > div:not(.sheet-icon) { flex: 1; min-width: 0; }
.sheet-top h2 { font: 28px/1.03 var(--font-display); overflow-wrap: anywhere; }
.sheet-top p { font-size: 10px; }
.sheet-close { flex: 0 0 44px; width: 44px; height: 44px; }
.sheet-stats { gap: 4px; }
.sheet-stats small { font-size: 9px; }
.sheet-stats b { font-size: 12px; overflow-wrap: anywhere; }
.sheet-stats .green, .sheet-distance { color: var(--lime); }
.sheet-note { font: 11px/1.5 var(--font-body); }
.mission-map-action { width: 100%; margin-top: 10px; }
.business-marker.mission-objective-marker .business-pin { outline: 3px solid var(--purple); outline-offset: 3px; }
.contextual-action-reason { font: 11px/1.35 var(--font-body); color: var(--yellow); }
.primary-action, .secondary-action { min-height: 44px; font: 700 12px var(--font-body); border-radius: var(--radius-sm); }
.primary-action { background: var(--lime); color: var(--bg); }
.app-shell button:disabled { opacity: 1; color: #bac5bc; background: #26362d; border-color: #58665c; box-shadow: none; text-shadow: none; cursor: not-allowed; }
.app-shell button:disabled:hover, .app-shell button:disabled:active { color: #bac5bc; background: #26362d; transform: none; scale: 1; }
.app-shell .event-btn:disabled { background: #26362d !important; color: #bac5bc !important; -webkit-text-fill-color: #bac5bc !important; border-color: #58665c; opacity: 1; box-shadow: none; cursor: not-allowed; }
.ui-icon { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; pointer-events: none; }
.hud-stat .ui-icon { width: 14px; height: 14px; }
.hud-identity .hud-inbox > span { margin: 0; color: inherit; }
.event-badge .ui-icon, .event-venue .ui-icon, .event-reward-tag .ui-icon, .friend-fuzzy-badge .ui-icon { width: 14px; height: 14px; }
.community-tabs .ui-icon { width: 16px; height: 16px; margin-right: 4px; }
.community-tabs { gap: 6px; }
.tab-pill { min-height: 44px; padding-inline: 8px; }
.add-friend-box input, .friend-info, .shop-item > div { min-width: 0; }
.shop-item h2 { overflow-wrap: anywhere; }
.shop-item > button { min-height: 44px; max-width: 100px; white-space: normal; }
.event-actions { flex-wrap: wrap; }
.modal-layer { position: fixed; padding: 12px; background: #08100caa; }
.modal { max-height: calc(100dvh - 50px); overflow-y: auto; background: var(--surface); border-radius: var(--radius-lg); }
.modal h2 { font: 30px var(--font-display); }
.modal p { font: 13px/1.5 var(--font-body); color: var(--muted); }
.modal-actions button { min-height: 44px; font-size: 12px; }
.modal-actions .modal-confirm { background: var(--lime); color: var(--bg); }
.settings-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.settings-row button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.settings-row button[aria-pressed=true] { border-color: var(--lime); color: var(--lime); }
.remote-boot-overlay { position:fixed; padding:clamp(16px,4vw,48px); background:#101912; backdrop-filter:none; transition:opacity .32s ease,visibility .32s; overflow:auto; }
.remote-boot-card { width:min(100%,470px); box-sizing:border-box; padding:clamp(28px,5vw,48px) clamp(22px,5vw,42px); background:linear-gradient(155deg,#1c2b22,#131e18); border:1px solid #36483a; border-radius:24px; box-shadow:0 20px 70px #0003; }
.remote-boot-logo { display:flex; justify-content:center; gap:6px; color:var(--text); font:clamp(46px,8vw,64px)/1 var(--font-display); letter-spacing:-1px; }
.remote-boot-logo span { color:var(--lime); }
.loading-kicker { display:block;margin-top:14px;font:9px/1.6 var(--font-mono);letter-spacing:2px;color:#9aaa9c; }
.remote-boot-card h2 { margin:38px 0 12px;font:26px/1.15 var(--font-display);letter-spacing:.4px;color:var(--text);text-wrap:balance; }
.remote-boot-card p { margin:0; min-height:44px;font:13px/1.6 var(--font-body);color:var(--muted); }
.loading-summary { display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:28px;font:11px/1.5 var(--font-mono);color:#b7c6b8; }
#loadingPercent { font-size:22px;letter-spacing:-1px;color:var(--lime); }
#loadingActivity { display:flex;align-items:center;gap:8px; }
#loadingActivity i { width:7px;height:7px;border-radius:50%;background:var(--lime);animation:loading-activity 1.2s ease-in-out infinite alternate; }
.remote-boot-progress { height:5px;margin:12px 0 18px;overflow:hidden;border-radius:4px;background:#354337; }
.remote-boot-progress span { display:block;height:100%;background:var(--lime);animation:none;transform:none;transition:width .18s; }
.remote-boot-card .loading-detail { min-height:0;margin-bottom:30px;font-size:11px;line-height:1.7;color:#90a294; }
#loadingRetry { padding:12px 22px;margin:0 0 24px;border:1px solid var(--lime);border-radius:8px;background:transparent;color:var(--lime);font:700 12px var(--font-body);cursor:pointer; }
#loadingRetry[hidden],.world-loading-status[hidden] { display:none; }
.remote-boot-overlay[data-state=error] #loadingActivity i { animation:none;background:#efbd78; }
.world-loading-status { position:absolute;z-index:910;bottom:calc(var(--nav-height,70px) + var(--nav-bottom,0px) + 30px);left:50%;transform:translateX(-50%);max-width:calc(100% - 100px);padding:8px 13px;border:1px solid #59705c;border-radius:8px;background:#15291eee;color:#dbe9dc;font:11px/1.4 var(--font-body);pointer-events:none;text-align:center; }
@keyframes loading-activity { to { opacity:.25; } }
@media(prefers-reduced-motion:reduce) { .remote-boot-overlay,.remote-boot-progress span {transition:none;} #loadingActivity i{animation:none;} }
html.reduce-motion .remote-boot-overlay,html.reduce-motion .remote-boot-progress span {transition:none;} html.reduce-motion #loadingActivity i{animation:none;}
.remote-boot-release { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; font: 10px/1.5 var(--font-mono); color: var(--quiet); }
.remote-boot-release [data-citylife-environment]:not([hidden]) { border: 1px solid var(--lime); border-radius: 4px; padding: 2px 5px; color: var(--lime); }
@media (prefers-reduced-motion: reduce) { .remote-boot-progress span { animation:none !important; transform:none; } }
html.reduce-motion .remote-boot-progress span { animation:none !important; transform:none; }
.remote-boot-spinner { border-top-color: var(--lime); }
/* One top status surface; never occupies the map CTA/navigation safe area. */
.toast { top: calc(112px + env(safe-area-inset-top)); bottom: auto; width: max-content; max-width: min(420px, calc(100% - 32px)); box-sizing: border-box; padding: 11px 14px; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; max-height: calc(100dvh - 300px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; font: 700 12px/1.5 var(--font-body); background: #102f36; color: #e2efee; border: 1px solid #66bfc9; pointer-events: none; transition: opacity .18s; }
/* Mobile map controls occupy the top row: reserve it before placing a toast. */
@media (max-width: 759px) {
  .app-shell:has(#mapScreen.active) .toast {
    top: calc(var(--hud-panel-top) + 92px);
    max-width: min(280px, calc(100% - 64px));
    max-height: calc(100dvh - var(--hud-panel-top) - 92px - var(--nav-height) - var(--nav-bottom) - 110px);
  }
}
/* Fixed icon box keeps animation and result transitions from moving the label. */
.toast { display: flex; align-items: flex-start; gap: 8px; text-align: left; }
.toast-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 14px; width: 14px; height: 14px; margin-top: 2px; box-sizing: border-box; line-height: 1; }
.toast-message { min-width: 0; overflow-wrap: anywhere; }
.toast[data-tone=loading] .toast-icon { font-size: 0; border: 2px solid rgba(102,191,201,.3); border-top-color: #92d4dc; border-radius: 50%; animation: citylife-toast-spin .8s linear infinite; }
@keyframes citylife-toast-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .toast[data-tone=loading] .toast-icon { animation: none; } }
html.reduce-motion .toast[data-tone=loading] .toast-icon { animation: none !important; }
.toast[data-tone=success] { border-color: #a9d960; color: #d5eeac; }
.toast[data-tone=warning] { border-color: #c8a45b; color: #f0d396; }
.toast[data-tone=error] { border-color: #ca7776; color: #f1b4b1; background: #32262d; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }


/* Visual Polish 2: social hub and shop stay inside the existing game panels. */
#communityScreen .page-scroller, #shopScreen .page-scroller { padding-top: 0; }
.community-tabs { display: flex; gap: 5px; margin: 0 0 14px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: #0c1712cc; scrollbar-width: none; }
.community-tabs::-webkit-scrollbar { display: none; }
.community-tabs .tab-pill { position: relative; flex: 1 0 70px; min-width: 70px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px; border-radius: var(--radius-sm); color: var(--muted) !important; font: 700 10px var(--font-body); white-space: nowrap; }
.community-tabs .tab-pill.active { color: var(--lime) !important; border-color: #d2ff5a55; background: #d2ff5a12 !important; box-shadow: none; }
.community-tabs .tab-pill > i { position: absolute; top: 2px; right: 3px; min-width: 15px; height: 15px; padding: 1px 4px; border-radius: 9px; background: var(--lime); color: var(--bg); font: 800 9px var(--font-body); font-style: normal; }
.community-view { animation: game-panel-in var(--fast) var(--ease-out); }
.events-toolbar { margin-bottom: 10px; }
.btn-create-event { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #d2ff5a55 !important; border-radius: var(--radius-sm); background: var(--lime) !important; color: var(--bg) !important; box-shadow: none; }
.presence-chip { color: var(--lime); border-color: #d2ff5a33; background: #d2ff5a0d; }
.event-card { position: relative; gap: 10px; padding: 14px; overflow: hidden; border-radius: var(--radius-md); background: var(--surface); box-shadow: none; }
.event-card.featured { border-color: #ffc27a88; background: radial-gradient(280px 130px at 100% 0,#ffc27a18,transparent 72%),var(--surface); }
.featured-event-label { display: flex; align-items: center; gap: 5px; width: fit-content; color: var(--yellow); font: 800 9px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.featured-event-label .ui-icon { width: 13px; height: 13px; }
.event-card h3 { font: 26px/.98 var(--font-display); letter-spacing: -.2px; text-transform: uppercase; overflow-wrap: anywhere; }
.event-card-header { align-items: flex-start; }
.event-venue { margin-top: 6px; color: var(--text); font: 600 11px/1.3 var(--font-body); }
.event-desc { display: -webkit-box; overflow: hidden; font: 12px/1.45 var(--font-body); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.event-meta > span { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 700 9px var(--font-mono); }
.event-meta .ui-icon { width: 12px; height: 12px; }
.event-meta .joined { color: var(--lime); border-color: #d2ff5a55; }
.event-badge { flex: 0 0 auto; border-radius: 999px; }
.event-badge.active, .event-badge.checked_in { color: var(--lime); border-color: #d2ff5a66; background: #d2ff5a12; }
.event-footer { align-items: flex-end; }
.event-reward-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--yellow); }
.event-footer > .event-actions { width: 100%; }
.event-actions.contextual-actions { grid-template-columns: repeat(auto-fit,minmax(118px,1fr)); }
.event-btn.secondary { min-height: 44px; gap: 5px; color: var(--text) !important; background: var(--surface-2) !important; }
.community-section-head { align-items: end; margin-top: 6px; }
.community-section-head small { color: var(--lime); font: 700 8px var(--font-mono); letter-spacing: .09em; }
.community-section-head h2 { margin-top: 4px; }
.my-code-card { border-color: #d2ff5a44; background: linear-gradient(135deg,#d2ff5a12,var(--surface)); }
.my-code-card strong, .btn-copy-code { color: var(--lime) !important; }
.add-friend-box input { min-height: 44px; border-radius: var(--radius-sm); background: var(--surface); }
.add-friend-box button { min-width: 88px; min-height: 44px; border-color: #d2ff5a55; border-radius: var(--radius-sm); background: var(--lime) !important; color: var(--bg) !important; }
.friend-card { min-height: 68px; border-radius: var(--radius-md); background: var(--surface); }
.friend-avatar, .request-avatar { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--bg); font: 800 17px var(--font-body); }
.friend-info h4 { font: 700 14px var(--font-body); }
.friend-presence { padding: 3px 6px; border-radius: 999px; color: var(--muted); background: #ffffff0a; font: 700 8px var(--font-mono); text-transform: uppercase; }
.friend-presence.online { color: var(--lime); background: #d2ff5a12; }
.friend-status-message { display: block; margin-top: 4px; color: var(--text); font: 11px/1.3 var(--font-body); }
.friend-fuzzy-badge { margin-top: 5px; color: var(--muted); }
.request-group + .request-group { margin-top: 18px; }
.request-group .section-head { margin: 10px 2px 8px; }
.request-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 9px; min-height: 66px; padding: 10px; border-color: var(--line); border-radius: var(--radius-md); background: var(--surface); }
.request-card.outgoing { border-color: #c3a1ff3d; }
.request-avatar { background: var(--lime); }
.request-card.outgoing .request-avatar { color: var(--purple); background: #c3a1ff14; }
.request-avatar .ui-icon { width: 18px; height: 18px; }
.request-copy { min-width: 0; }
.request-copy b { display: block; overflow: hidden; font: 700 13px/1.2 var(--font-body); text-overflow: ellipsis; white-space: nowrap; }
.request-copy small { display: block; margin-top: 4px; color: var(--muted); font: 9px/1.35 var(--font-mono); }
.request-actions button { min-width: 44px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 7px 9px; border-radius: var(--radius-sm); }
.request-actions .ui-icon { width: 14px; height: 14px; }
.btn-accept { background: var(--lime) !important; color: var(--bg) !important; }
.btn-reject { background: var(--surface-2) !important; color: var(--muted) !important; }
.community-empty { min-height: 72px; display: grid; place-items: center; gap: 6px; margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius-md); color: var(--muted); font: 11px var(--font-body); text-align: center; }
.community-empty .ui-icon { width: 22px; height: 22px; }
.community-empty.compact { min-height: 52px; }

.shop-header { min-height: 0; }
.shop-header .wallet-label { position: static; width: fit-content; min-width: 78px; display: flex; align-items: baseline; gap: 8px; margin-top: 9px; padding: 6px 9px; border: 1px solid #d2ff5a33; border-radius: var(--radius-sm); background: #d2ff5a0b; text-align: left; }
.shop-header .wallet-label > span { display: inline; margin: 0; }
.shop-header .wallet-label span:last-child { color: var(--lime); font-size: 14px; }
.shop-categories { display: flex; gap: 6px; margin: -2px 0 12px; overflow-x: auto; scrollbar-width: none; }
.shop-categories span { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--quiet); font: 700 9px var(--font-mono); text-transform: uppercase; }
.shop-categories .active { color: var(--lime); border-color: #d2ff5a55; background: #d2ff5a0d; }
.shop-list { gap: 9px; }
.shop-item { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 11px; min-height: 92px; padding: 13px; border-radius: var(--radius-md); background: var(--surface); }
.shop-item::after { content: attr(data-item-state); position: absolute; opacity: 0; pointer-events: none; }
.shop-item { position: relative; }
.shop-item > div > small { display: block; margin-bottom: 3px; color: var(--quiet); font: 700 8px var(--font-mono); letter-spacing: .08em; }
.shop-item h2 { font: 23px/1 var(--font-display); text-transform: uppercase; }
.shop-item p { margin-top: 5px; font: 11px/1.35 var(--font-body); }
.shop-item strong { color: var(--yellow); font-size: 12px; }
.shop-item > button { min-width: 76px; min-height: 44px; padding: 8px 10px; color: var(--lime); border-color: #d2ff5a44; border-radius: var(--radius-sm); background: #d2ff5a10; }
.shop-item[data-item-state="active"] { border-color: #d2ff5a66; background: linear-gradient(120deg,#d2ff5a0d,var(--surface)); }
.shop-item[data-item-state="unavailable"] { border-color: #c3a1ff2c; }
.shop-item[data-item-state="unavailable"] .shop-icon, .shop-item[data-item-state="unavailable"] strong { opacity: .58; }
.shop-item[data-item-state="unavailable"] > button { color: #cbd2c8; border-color: #59645b; background: #28332c; }
.metropolis-pass { position: relative; min-height: 112px; margin-top: 14px; padding: 16px; overflow: hidden; border-color: #c3a1ff55; border-radius: var(--radius-md); background: radial-gradient(220px 130px at 0 0,#c3a1ff29,transparent 70%),linear-gradient(120deg,#332648,var(--surface)); }
.metropolis-pass::after { content: ""; position: absolute; inset: -40% -15% auto 55%; width: 120px; height: 180px; border: 1px solid #c3a1ff2e; transform: rotate(25deg); }
.metropolis-pass .pass-emblem { z-index: 1; flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #c3a1ff55; border-radius: 50%; color: var(--purple); background: #c3a1ff12; }
.metropolis-pass .pass-emblem .ui-icon { width: 24px; height: 24px; }
.metropolis-pass div, .metropolis-pass button { z-index: 1; }
.metropolis-pass small { color: var(--purple); font: 700 8px var(--font-mono); letter-spacing: .08em; }
.metropolis-pass h2 { margin-top: 3px; font: 25px/1 var(--font-display); text-transform: uppercase; }
.metropolis-pass p { margin-top: 5px; font: 11px/1.35 var(--font-body); }
.metropolis-pass button { min-width: 70px; min-height: 44px; color: var(--purple); border-color: #c3a1ff55; border-radius: var(--radius-sm); background: #c3a1ff12; }
.income-card #incomeProjection { display: block; margin-top: 6px; color: var(--lime); font: 700 9px var(--font-mono); }

/* G.5 social gameplay uses the established game-panel language. */
.squad-panel { display:grid; gap:12px; padding-bottom:24px; }
.squad-identity,.party-card,.squad-run-card,.squad-create,.squad-invite { border:1px solid var(--line); border-radius:var(--radius-md); background:linear-gradient(145deg,rgba(9,31,29,.94),rgba(10,19,19,.92)); padding:14px; }
.squad-identity small,.party-card>small,.squad-run-card>small { color:var(--lime); font:700 10px var(--font-mono); letter-spacing:.12em; }
.squad-identity h2,.squad-create h2 { margin:4px 0; font:28px/1 var(--font-display); text-transform:uppercase; }
.squad-identity p { margin:6px 0 12px; color:var(--muted); }
.squad-members { display:grid; gap:7px; }
.squad-member { min-height:58px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:9px 10px; border:1px solid var(--line); border-radius:var(--radius-sm); background:rgba(9,24,24,.72); }
.squad-member>span { width:36px; height:36px; display:grid; place-items:center; border-radius:50%; color:var(--bg); background:var(--lime); font-weight:800; }
.squad-member small { display:block; color:var(--muted); font:9px var(--font-mono); text-transform:uppercase; }
.squad-member button { width:44px; height:44px; color:var(--muted); }
.squad-member .squad-player-link { width:100%; height:auto; min-height:44px; display:flex; gap:10px; text-align:left; align-items:center; min-width:0; color:var(--text); }
.squad-member-avatar { width:36px; height:36px; flex:none; }
.squad-member-copy { min-width:0; overflow-wrap:anywhere; }
.squad-member>div { display:flex; flex-wrap:wrap; }
.squad-player-link:disabled { opacity:1; cursor:default; }
[data-squad-action-key]:disabled { opacity:.5; cursor:wait; }
.squad-invite,.squad-invite-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.squad-invite div:last-child { display:flex; gap:6px; }
.squad-create { display:grid; gap:8px; }
.squad-create input { min-height:44px; border:1px solid var(--line); border-radius:var(--radius-sm); padding:0 12px; color:var(--text); background:#071512; }
.squad-run-card h3 { margin:6px 0; color:var(--lime); font:38px/1 var(--font-display); }
.squad-run-card p { margin:5px 0; color:var(--muted); font-size:12px; }
.profile-squad { display:grid; grid-template-columns:40px 1fr auto; align-items:center; gap:10px; margin-top:10px; padding:12px; border:1px solid rgba(210,255,90,.25); border-radius:var(--radius-md); background:rgba(210,255,90,.06); }
.profile-squad[hidden] { display:none; }
.profile-squad>span { color:var(--lime); }.profile-squad small,.profile-squad p { display:block; color:var(--muted); font:9px var(--font-mono); }.profile-squad b { display:block; font:20px var(--font-display); text-transform:uppercase; }
.danger-action { min-height:44px; border:1px solid rgba(255,116,91,.4); border-radius:var(--radius-sm); color:#ff9b86; background:rgba(255,116,91,.08); }

@media (max-width: 430px) {
  .event-card h3 { font-size: 23px; }
  .event-card-header { gap: 6px; }
  .request-actions button span { display: none; }
  .shop-item { grid-template-columns: 40px minmax(0,1fr) 76px; padding: 11px; }
  .shop-icon { width: 40px; height: 40px; flex-basis: 40px; }
}
@media (max-width: 350px) {
  .community-tabs .tab-pill { flex-basis: 68px; min-width: 68px; }
  .presence-chip { max-width: 105px; overflow: hidden; text-overflow: ellipsis; }
  .event-card { padding: 12px; }
  .event-badge { padding-inline: 6px; }
  .shop-item { grid-template-columns: 36px minmax(0,1fr); }
  .shop-icon { width: 36px; height: 36px; }
  .shop-item > button { grid-column: 1 / -1; width: 100%; max-width: none; }
  .metropolis-pass { align-items: flex-start; flex-wrap: wrap; }
  .metropolis-pass button { width: 100%; }
}
.game-menu { position:fixed; inset:0; width:min(440px,calc(100% - 20px)); height:fit-content; min-height:0; max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); margin:auto; padding:16px; border:1px solid var(--line); border-radius:16px; color:var(--text); background:#102523; overflow:hidden; box-sizing:border-box; }
.game-menu[open] { display:flex; flex-direction:column; animation:game-panel-in var(--reveal-time) var(--ease-out); }
.settings-content { min-height:0; overflow-y:auto; overscroll-behavior:none; }
.game-menu::backdrop { background:#08100caa; }
.game-menu > header { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.game-menu header h2 { margin:0; min-width:0; font:30px/1.08 var(--font-display); letter-spacing:-.4px; text-transform:uppercase; white-space:nowrap; }
.game-menu [data-close-game-menu] { display:grid; place-items:center; width:44px; height:44px; flex-shrink:0; border-radius:10px; color:var(--text); }
.settings-section { min-width:0; padding:10px 0; border-bottom:1px solid var(--line); }
.settings-section:last-child { border:0; padding-bottom:0; }
.settings-section > h3 { margin:0 0 4px; color:var(--muted); font:600 10px/1.4 var(--font-body); letter-spacing:.08em; }
.settings-section .settings-row { padding:8px 0; border:0; min-height:44px; min-width:0; font-size:12px; }
.settings-row > span { min-width:0; overflow-wrap:anywhere; }
.settings-row > div { display:flex; flex-shrink:0; gap:4px; }
.settings-row input { width:20px; height:20px; flex-shrink:0; accent-color:var(--lime); }
.settings-section .account-settings { display:block; margin:0; padding:0; border:0; }
.settings-section .account-settings h3,.settings-section .account-settings > p { display:none; }
.settings-section .account-settings button,.settings-action-row { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:44px; margin:0; padding:8px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; font:500 12px/1.4 var(--font-body); text-align:left; white-space:normal; background:transparent; color:var(--text); }
.settings-section .account-settings button:last-child { border-bottom:0; }
.settings-section [data-auth-action="logout"] { color:var(--text); }
.settings-section [data-auth-action="logout"] > span:last-child { display:grid; place-items:center; width:20px; height:20px; }
.settings-section [data-auth-action="logout"] svg { width:20px; height:20px; }
.settings-section [data-auth-action="logout"]:active,.settings-section [data-auth-action="logout"]:active > span:last-child { color:#d9a29b; }
@media (hover:hover) { .settings-section [data-auth-action="logout"]:hover,.settings-section [data-auth-action="logout"]:hover > span:last-child { color:#d9a29b; } }
.settings-action-row > span:last-child,.account-settings button > span:last-child { flex-shrink:0; font-size:20px; color:var(--muted); }
.settings-row input { appearance:none; width:34px; height:20px; border:1px solid var(--line); border-radius:20px; background:#233b38; position:relative; cursor:pointer; }
.settings-row input::before { content:""; position:absolute; width:12px; height:12px; top:3px; left:3px; border-radius:50%; background:var(--muted); }
.settings-row input:checked { background:#354b2c; border-color:var(--lime); }
.settings-row input:checked::before { left:17px; background:var(--lime); }
.settings-row input:disabled { opacity:.45; cursor:default; }
.settings-note { margin:7px 0 0; font:11px/1.4 var(--font-body); color:var(--muted); }
.settings-section .menu-release { padding:0; border:0; }
.game-menu button:focus-visible,.game-menu input:focus-visible { outline:2px solid var(--lime); outline-offset:2px; }
.game-menu.closing { opacity: 0; translate: 0 8px; transition: opacity var(--fast), translate var(--fast); }
.marker-label { display: none; background: var(--overlay); padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; font: 11px var(--font-body); text-shadow: none; }
.map-detail .marker-label, .leaflet-marker-icon:hover .marker-label, .leaflet-marker-icon:focus .marker-label { display: block; }
.business-pin.owned { background: var(--lime) !important; border-color: var(--lime); box-shadow: 0 0 0 5px #d2ff5a33,0 4px 15px #0008; }
.event-marker .business-pin { background: var(--yellow) !important; }
.poi-marker.owned > div { background: var(--lime) !important; box-shadow: 0 0 0 4px #d2ff5a44 !important; }
.poi-marker.mission-objective-marker > div { outline: 3px solid var(--purple); outline-offset: 3px; }
.leaflet-tooltip { background: var(--overlay); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.selection-ring { stroke: var(--lime); fill: var(--lime); fill-opacity: .12; }
@keyframes game-panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 760px) {
  .bottom-nav { width: 360px; left: 50%; right: auto; transform: translateX(-50%); }
  .panel-screen { width: 410px; left: 14px; right: auto; top: var(--hud-panel-top); border-radius: var(--radius-lg); }
  #pulseScreen { height: auto; top: var(--hud-panel-top); }
  .bottom-sheet { width: 410px; left: auto; right: 14px; max-height: calc(100dvh - 170px); }
  .map-view-control { left: auto; right: 64px; top: calc(8px + env(safe-area-inset-top)); }
  .map-controls { top: calc(8px + env(safe-area-inset-top)); }
  .game-menu { padding:16px; }
}
@media (max-width: 360px) {
  .brand-chip { font-size: 20px; gap: 5px; }
  .hud-stat { padding: 0 5px; }
  .hud-stat b { font-size: 11px; }
  .top-hud { padding-left: 8px; padding-right: 8px; column-gap: 5px; }
  .page-scroller { padding-left: 12px; padding-right: 12px; }
  .profile-hero { padding-right: 22px; gap: 8px; }
  .profile-hero h1 { --profile-name-max:26; font-size:26px; }
  .game-menu { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }

/* Explicit account entry: the gameplay stays locked until full hydration. */
.auth-entry { position: fixed; z-index: 1400; inset: 0; display: grid; overflow-y: auto; overscroll-behavior: contain; padding: calc(16px + env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); background: var(--bg); }
.auth-entry[hidden] { display: none; }
.auth-entry-panel { width: min(100%, 420px); min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; text-align: center; }
.auth-entry-panel header { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.auth-entry-main { margin: auto 0; padding: 38px 0 26px; }
.auth-entry .auth-brand { font-size: clamp(64px, 18vw, 88px); line-height: 1; gap: 8px; }
.auth-entry-panel header button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font: 11px var(--font-mono); }
.auth-entry-panel header button[aria-pressed="true"] { color: var(--lime, #c7f36b); }
.auth-entry-panel h1 { margin: 30px 0 10px; font: clamp(24px, 6vw, 30px)/1.15 var(--font-display); color: var(--text); letter-spacing: .5px; text-wrap: balance; }
.auth-entry-subtitle { margin: 0; color: var(--muted); font: 14px/1.6 var(--font-body); text-wrap: balance; }
.auth-entry-actions { display: grid; gap: 10px; margin: 32px 0 20px; }
.auth-primary, .auth-secondary { width: 100%; min-height: 50px; padding: 13px 16px; border-radius: 12px; font: 800 11px Manrope, sans-serif; cursor: pointer; }
.auth-primary { border: 1px solid var(--lime, #c7f36b); background: var(--lime, #c7f36b); color: #19220f; }
.auth-secondary { border: 1px solid #ffffff20; background: #ffffff05; color: #f1f5e9; }
.auth-secondary small { display: block; margin-top: 4px; color: #a2ab99; font-weight: 500; text-transform: none; }
.auth-entry-actions button { min-height: 54px; font: 700 12px var(--font-body); }
.auth-entry-actions .auth-secondary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; background: var(--surface); border-color: var(--line); }
.auth-entry-actions .auth-secondary small { margin: 0; font: 10px var(--font-mono); color: var(--quiet); }
.auth-entry-panel .auth-entry-main .auth-note { margin: 0 auto; max-width: 340px; font: 12px/1.6 var(--font-body); color: var(--quiet); text-wrap: balance; }
.auth-entry-error:empty { display: none; }
.auth-entry-release { padding-top: 8px; color: var(--quiet); font: 10px/1.5 var(--font-mono); }
.auth-entry-release [data-citylife-environment]:not([hidden])::before { content: ' · '; }
@media (max-height: 650px) { .auth-entry-main { padding-top: 24px; } .auth-entry .auth-brand { font-size: 60px; } .auth-entry-panel h1 { margin-top: 22px; } .auth-entry-actions { margin-top: 24px; } }
.auth-entry-panel .auth-note, .account-settings .auth-note { font: 500 11px/1.6 Manrope, sans-serif; color: #a2ab99; }
.auth-entry-error { color: #f0cf94 !important; }
.account-settings { margin-top: 20px; padding-top: 16px; border-top: 1px solid #ffffff19; text-align: left; }
.account-settings h3 { margin: 0 0 8px; }
.account-settings button { margin-top: 12px; }
.auth-signed-out #app > .screen, .auth-signed-out #app > .bottom-nav { visibility: hidden; }
.auth-entry button:focus-visible, .account-settings button:focus-visible { outline: 2px solid #f1f5e9; outline-offset: 3px; }

/* Guest remains visible, but communicates an explanatory unavailable action. */
.auth-entry-actions .auth-guest-unavailable { color: var(--muted); border-style: dashed; }
.auth-entry-actions .auth-guest-unavailable small { color: var(--muted); font-size: 9px; }
.guest-unavailable-panel .auth-entry-main { padding-top: 24px; }
.guest-unavailable-panel .auth-entry-subtitle p { margin: 0 0 14px; }
.guest-unavailable-panel h1 { font-size: clamp(23px,6vw,30px); }

/* Informational identity stays inside the menu, never over the game world. */
.menu-release { display:grid; gap:3px; padding-top:12px; border-top:1px solid var(--line); font:10px/1.5 var(--font-mono); color:var(--quiet); overflow-wrap:anywhere; }
.menu-release b { color:var(--muted); }

/* HUD typography 1.0: shared roles, existing fonts and presentation only. */
:root {
  --type-eyebrow: 600 10px/1.4 var(--font-mono);
  --type-screen: 38px/1.05 var(--font-display);
  --type-section: 22px/1.15 var(--font-display);
  --type-body: 400 13px/1.5 var(--font-body);
  --type-meta: 500 11px/1.4 var(--font-body);
  --type-value: 700 13px/1.15 var(--font-body);
  --type-button: 600 13px/1.3 var(--font-body);
  --type-tab: 700 12px/1.2 var(--font-body);
  --type-badge: 700 10px/1 var(--font-body);
}
.page-header h1 { font: var(--type-screen); }
.section-head h2 { font: var(--type-section); }
.page-header > p, .settings-section > h3 { font: var(--type-eyebrow); letter-spacing: .06em; }
.page-subtitle, .mission-card p, .friend-card p { font: var(--type-body); }
.settings-note, .section-head > span { font: var(--type-meta); }
.settings-action-row, .settings-section .account-settings button { font: var(--type-button); }
.panel-screen > .page-header {
  flex: 0 0 auto; margin: 0; padding: 24px 58px 12px 16px;
  background: #0c1712;
}
.panel-screen > .page-scroller:first-child { padding-top: 24px; }
@media (max-width: 360px) { .panel-screen > .page-header { padding-left: 12px; } }
.brand-chip { height: 44px; min-height: 44px; }
.hud-identity .hud-player { min-height: 44px; }
.hud-stat, .hud-money-copy b, .hud-progress-copy b { font: var(--type-value); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hud-money-copy small, .hud-progress-copy small { font-size: 9px; line-height: 1.2; }
.hud-identity b { font-size: 12px; line-height: 1.2; }
.hud-player-copy > span { font-size: 10px; line-height: 1.2; }
.hud-stat > span:first-child { color: var(--muted); }
.hud-stat.energy > span:first-child { color: var(--yellow); }
.nav-button { min-width: 0; color: var(--muted); }
.nav-button b, .community-tabs .tab-pill, .journal-filters button { font: var(--type-tab); }
.nav-button .ui-icon { width: 22px; height: 22px; flex-shrink: 0; }
.nav-button.active { box-shadow: inset 0 -2px var(--lime); }
.community-tabs .ui-icon { margin: 0; flex-shrink: 0; }
.community-tabs .tab-pill { -webkit-text-fill-color: var(--muted) !important; }
.community-tabs .tab-pill.active { -webkit-text-fill-color: var(--lime) !important; }
.hud-inbox i, .nav-button i, .community-tabs .tab-pill > i {
  width: auto; min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 6px;
  font: var(--type-badge); font-variant-numeric: tabular-nums;
  background: var(--lime); color: var(--bg); border: 0;
}
.nav-button i { top: 0; }
.section-head > button, .map-view-control > button { min-height: 44px; }
:is(.hud-stat, .hud-player, .hud-quick-action, .nav-button, .tab-pill, .journal-filters button, .settings-action-row) {
  transition: background-color var(--fast), color var(--fast), border-color var(--fast);
}
:is(.hud-stat, .hud-player, .hud-quick-action, .nav-button, .tab-pill, .journal-filters button, .settings-action-row):active:not(:disabled) {
  transform: none; scale: 1; background-color: #283923;
}
:is(.hud-stat, .hud-player, .hud-quick-action, .nav-button, .tab-pill, .journal-filters button, .settings-action-row):disabled {
  opacity: .5; box-shadow: none;
}
@media (hover: hover) {
  :is(.hud-stat, .hud-player, .hud-quick-action, .nav-button, .tab-pill, .journal-filters button, .settings-action-row):hover:not(:disabled) {
    background-color: #283923;
  }
}
@media (max-width: 360px) {
  .hud-stat, .hud-money-copy b, .hud-progress-copy b { font-size: 12px; }
  .nav-button b { font-size: 11px; }
}

/* Dedicated Level/Energy: read-only panels using the global HUD type roles. */
.progression-primary { padding: 16px 0 24px; border-bottom: 1px solid var(--line); }
.progression-primary > strong { display: flex; align-items: baseline; gap: 8px; font: 56px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.progression-primary > strong .ui-icon { align-self: center; width: 32px; height: 32px; color: var(--lime); }
.progression-primary > strong small { font: var(--type-section); color: var(--muted); }
.progression-primary > p { margin: 16px 0 12px; color: var(--muted); font: var(--type-value); font-variant-numeric: tabular-nums; }
.progression-bar { height: 8px; margin-top: 16px; overflow: hidden; border-radius: 4px; background: var(--surface-2); }
.progression-bar > i { display: block; width: 0; height: 100%; background: var(--lime); }
.progression-remaining { font: var(--type-body); color: var(--muted); }
.progression-remaining b { font: var(--type-value); color: var(--text); }
.progression-details { margin: 0; }
.progression-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.progression-details dt { min-width: 0; font: var(--type-body); color: var(--muted); }
.progression-details dd { margin: 0; font: var(--type-value); font-variant-numeric: tabular-nums; white-space: nowrap; }
.progression-shop { margin-top: 20px; padding-block: 12px; min-height: 48px; color: var(--lime); }

/* Wallet shares the Level/Energy panel language and existing currency data. */
.wallet-screen .progression-primary > strong { display: block; font-size: clamp(24px, 8vw, 48px); overflow-wrap: anywhere; white-space: normal; }
.wallet-income { font: var(--type-value); font-variant-numeric: tabular-nums; }
.wallet-income > span, .wallet-meta { color: var(--muted); font: var(--type-body); }
.wallet-action { min-height: 48px; padding-block: 12px; }

/* Keep the established wordmark while gameplay panels share readable type. */
.brand-chip { font-family: Impact, 'Arial Narrow', sans-serif; }
