* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; }
html, body, #game-root {
  width: 100%; height: 100%; overflow: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0a0f18; color: #f4f7fb;
}
#game-canvas { display: block; width: 100%; height: 100%; touch-action: none; }

/* Subtle GTA-6 Cinematic Viewport Vignette */
.cinematic-vignette {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(ellipse at 50% 48%, rgba(0,0,0,0) 62%, rgba(4,7,14,0.38) 100%);
}

.hidden { display: none !important; }

/* Visual-First 3D Property Tour Mode: hides ALL business/numbers clutter so players inspect the real 3D space! */
body.tour-mode #top-hud,
body.tour-mode #left-stack,
body.tour-mode #goal-bar,
body.tour-mode #bottom-dock,
body.tour-mode #camera-dock,
body.tour-mode #paused-banner,
body.tour-mode #live-inspector-banner,
body.tour-mode #yt-mini-wrap,
body.tour-mode #design-mode-bar,
body.tour-mode #heli-hud,
body.tour-mode #stat-info-popover,
body.tour-mode #visual-preview-panel,
body.tour-mode #peek-return-bar,
body.tour-mode #upgrade-card { display: none !important; }

.tour-bar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 42;
  width: min(760px, 95vw); padding: 12px 16px 14px; border-radius: 18px;
  background: linear-gradient(170deg, rgba(11, 18, 32, 0.94), rgba(6, 10, 20, 0.97));
  border: 1.5px solid rgba(244, 186, 52, 0.58);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 240, 200, 0.16);
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column; gap: 9px;
}
.tour-top-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10); padding-bottom: 6px;
}
.tour-eyebrow { font-size: 10px; font-weight: 900; letter-spacing: 1.2px; color: #7dd3fc; }
.tour-cam-mini { display: flex; gap: 5px; }
.tour-cam-btn {
  padding: 3px 9px; border-radius: 999px; font-size: 9.5px; font-weight: 900; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.20); background: rgba(255,255,255,0.06); color: #cbd5e1;
}
.tour-cam-btn.active { background: #0e9f96; border-color: #2dd4bf; color: #ffffff; }
.tour-main-row { display: flex; align-items: center; gap: 10px; }
.tour-nav-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(244, 186, 52, 0.45);
  background: rgba(244, 186, 52, 0.12); color: #fde68a; font-size: 15px; font-weight: 900;
  cursor: pointer; flex-shrink: 0;
}
.tour-nav-btn:hover { background: rgba(244, 186, 52, 0.28); color: #ffffff; }
.tour-info { flex: 1; text-align: center; }
.tour-title-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tour-crest { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(244, 186, 52, 0.65); }
.tour-prop-name { font-family: Georgia, serif; font-size: 19px; font-weight: 900; color: #fde68a; letter-spacing: 0.6px; }
.tour-prop-sub { font-size: 12px; color: #cbd5e1; margin-top: 3px; font-weight: 600; }
.tour-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 5px; }
@keyframes signLeaseJump {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 2px rgba(254, 240, 138, 0.45), 0 8px 24px rgba(245, 158, 11, 0.55);
  }
  38% {
    transform: translateY(-7px) scale(1.035);
    box-shadow: 0 0 0 5px rgba(254, 240, 138, 0.65), 0 16px 36px rgba(245, 158, 11, 0.85);
  }
  58% {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 0 0 2px rgba(254, 240, 138, 0.42), 0 8px 22px rgba(245, 158, 11, 0.52);
  }
  74% {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 0 0 3px rgba(254, 240, 138, 0.52), 0 12px 28px rgba(245, 158, 11, 0.72);
  }
}
@keyframes signLeaseShine {
  0%   { left: -75%; }
  45%, 100% { left: 135%; }
}
.tour-btn-primary {
  position: relative; overflow: hidden;
  flex: 1.3; min-width: 210px; padding: 11px 14px !important; font-size: 13px !important; font-weight: 900 !important;
  background: linear-gradient(135deg, #f59e0b 0%, #fde047 50%, #eab308 100%) !important; color: #0b1120 !important;
  border: 2.5px solid #fef9c3 !important;
  animation: signLeaseJump 1.35s ease-in-out infinite;
}
.tour-btn-primary::after, .bp-buy-btn::after {
  content: ''; position: absolute; top: 0; left: -75%; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-22deg);
  animation: signLeaseShine 2.2s ease-in-out infinite;
  pointer-events: none;
}
.tour-btn-primary:hover, .bp-buy-btn:hover {
  animation-play-state: paused;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 0 0 5px rgba(254, 240, 138, 0.75), 0 16px 36px rgba(245, 158, 11, 0.92);
}
.tour-btn-secondary {
  flex: 1; min-width: 190px; padding: 11px 14px !important; font-size: 12px !important; font-weight: 900 !important;
  background: rgba(14, 165, 233, 0.24) !important; border: 1.5px solid #38bdf8 !important; color: #e0f2fe !important;
}

.clean-widget {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 10px; border-radius: 10px; font-size: 11px; font-weight: 800;
  background: rgba(8, 30, 38, 0.95); border: 1.5px solid #2dd4bf; color: #ccfbf1;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}
.clean-go-btn {
  padding: 4px 8px; border: none; border-radius: 6px; font-size: 10px; font-weight: 900;
  background: #14b8a6; color: #042f2e; cursor: pointer; white-space: nowrap;
}
.clean-go-btn:hover { background: #2dd4bf; }

/* Luxury Metallic Crest Loading Overlay */
#loading-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(circle at 50% 30%, #152238 0%, #09101d 55%, #04070d 100%);
  display: flex; align-items: center; justify-content: center;
}
.loader-card {
  width: min(500px, 92vw); padding: 30px 34px 28px; border-radius: 24px;
  background: linear-gradient(165deg, rgba(13, 20, 34, 0.97), rgba(7, 11, 20, 0.99));
  border: 1.5px solid rgba(229, 184, 88, 0.60);
  text-align: center;
  box-shadow: 0 36px 90px rgba(0,0,0,0.82), 0 0 42px rgba(244, 186, 52, 0.14), inset 0 1px 0 rgba(255, 240, 195, 0.16);
}
.loader-crest-wrap {
  position: relative; width: 124px; height: 124px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.loader-crest-glow {
  position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 186, 52, 0.36) 0%, rgba(244, 186, 52, 0.0) 70%);
  animation: crestPulse 2.6s ease-in-out infinite;
}
@keyframes crestPulse { 0%,100% { transform: scale(0.95); opacity: 0.72; } 50% { transform: scale(1.08); opacity: 1; } }
.loader-crest-img {
  position: relative; width: 116px; height: 116px; border-radius: 22px; object-fit: cover;
  border: 1.5px solid rgba(244, 186, 52, 0.65);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.68), inset 0 0 18px rgba(244, 186, 52, 0.22);
}
.loader-kicker {
  font-size: 10.5px; font-weight: 900; letter-spacing: 3.1px; color: #7dd3fc;
  text-transform: uppercase; margin-bottom: 6px;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}
.loader-title-3d {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(24px, 5vw, 31px); font-weight: 900; letter-spacing: 2.2px;
  margin-bottom: 10px; line-height: 1.1;
  background: linear-gradient(180deg, #fff8dc 0%, #f8cf68 38%, #d6982b 62%, #ffe8a1 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(70, 44, 8, 0.92)) drop-shadow(0 8px 18px rgba(244, 186, 52, 0.32));
}
.loader-card p { font-size: 13px; color: #b8c6d8; margin-bottom: 16px; font-weight: 600; }
.loader-bar {
  width: 100%; height: 10px; background: rgba(255,255,255,0.09); border-radius: 999px;
  overflow: hidden; border: 1px solid rgba(244, 186, 52, 0.28);
}
#loader-fill {
  width: 10%; height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #f4ba34, #fef08a);
  box-shadow: 0 0 14px rgba(244, 186, 52, 0.55); transition: width 0.2s;
}
.loader-footnote {
  margin-top: 12px; font-size: 10px; font-weight: 800; letter-spacing: 1.8px; color: #94a3b8;
}
.bp-brand-lockup { display: flex; align-items: center; gap: 11px; }
.bp-mini-crest {
  width: 44px; height: 44px; border-radius: 10px; object-fit: cover;
  border: 1.5px solid rgba(244, 186, 52, 0.65); box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

/* =========================================================================
   Interactive Architectural Property Blueprint & Bank Loan Showroom
   ========================================================================= */
.bp-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: radial-gradient(circle at 30% 20%, rgba(12, 26, 48, 0.96), rgba(5, 10, 20, 0.98));
  backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  padding: 14px; overflow-y: auto; overflow-x: hidden;
}
.bp-shell {
  width: min(1240px, 100%); max-width: 100%; max-height: 96vh; overflow-y: auto; overflow-x: hidden;
  background: linear-gradient(165deg, rgba(10, 19, 34, 0.98), rgba(7, 13, 24, 0.98));
  border: 1.5px solid rgba(214, 168, 78, 0.45);
  border-radius: 18px; padding: 12px 18px 14px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.80), inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 9px;
}
.bp-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(56, 189, 248, 0.20); padding-bottom: 8px;
}
.bp-kicker { font-size: 10px; font-weight: 900; letter-spacing: 2px; color: #38bdf8; }
.bp-topbar h1, .bp-topbar h2 { font-size: 19px; font-weight: 900; letter-spacing: 0.6px; color: #f8fafc; margin-top: 1px; }
.bp-top-right { display: flex; align-items: center; gap: 10px; }
.bp-seed-pill {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 6px 12px; border-radius: 10px;
  background: rgba(244, 186, 52, 0.12); border: 1px solid rgba(244, 186, 52, 0.45);
}
.bp-seed-pill span { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: #fde68a; }
.bp-seed-pill strong { font-size: 18px; font-weight: 900; color: #4ade80; line-height: 1.1; }

.bp-switch-guide {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 11px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(244, 186, 52, 0.16), rgba(56, 189, 248, 0.10));
  border: 1px solid rgba(244, 186, 52, 0.42);
}
.bp-switch-step {
  padding: 2px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 900; letter-spacing: 0.8px;
  background: #f4ba34; color: #09111f; flex-shrink: 0;
}
.bp-switch-text { font-size: 11.5px; font-weight: 800; color: #fef3c7; }
.bp-prop-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 4px; padding-bottom: 6px;
}
@media (max-width: 860px) { .bp-prop-tabs { grid-template-columns: repeat(2, 1fr); } }
.bp-tab-card {
  position: relative; text-align: left; padding: 11px 12px 10px; border-radius: 13px; cursor: pointer;
  background: linear-gradient(160deg, rgba(22, 42, 74, 0.92), rgba(11, 22, 42, 0.96));
  border: 1.5px solid rgba(96, 165, 250, 0.42);
  color: #e2e8f0;
  box-shadow: 0 5px 0 rgba(7, 14, 28, 0.85), 0 8px 18px rgba(0, 0, 0, 0.42);
  transition: transform 0.15s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.bp-tab-card:hover {
  background: linear-gradient(160deg, rgba(28, 56, 98, 0.98), rgba(15, 31, 58, 0.98));
  border-color: #38bdf8;
  transform: translateY(-4px);
  box-shadow: 0 8px 0 rgba(7, 14, 28, 0.90), 0 14px 26px rgba(56, 189, 248, 0.24);
}
.bp-tab-card.active {
  background: linear-gradient(145deg, rgba(28, 66, 118, 0.98), rgba(16, 36, 68, 0.98));
  border: 2px solid #facc15; color: #ffffff;
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 7px 0 rgba(161, 98, 7, 0.55), 0 14px 30px rgba(244, 186, 52, 0.34), inset 0 0 0 1px rgba(254, 240, 138, 0.40);
  z-index: 2;
}
.bp-tab-card.active::after {
  content: ''; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%) rotate(45deg);
  width: 14px; height: 14px; background: #142a4f;
  border-right: 2px solid #facc15; border-bottom: 2px solid #facc15;
}
.bp-tab-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.bp-tab-title { font-size: 13.5px; font-weight: 900; color: #ffffff; }
.bp-tab-size { font-size: 11px; font-weight: 800; color: #7dd3fc; }
.bp-tab-meta { font-size: 11px; color: #cbd5e1; display: flex; justify-content: space-between; gap: 6px; margin-top: 3px; }
.bp-tab-cta {
  margin-top: 7px; padding-top: 5px; border-top: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 10px; font-weight: 900; letter-spacing: 0.4px; color: #7dd3fc;
  display: flex; align-items: center; justify-content: space-between;
}
.bp-tab-card.active .bp-tab-cta { color: #fde047; border-top-color: rgba(250, 204, 21, 0.35); }
.bp-tab-card:hover:not(.active) .bp-tab-cta { color: #ffffff; }
.bp-tab-risk { font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 99px; letter-spacing: 0.4px; }
.risk-low  { background: rgba(22, 163, 74, 0.26); color: #86efac; border: 1px solid #22c55e; }
.risk-med  { background: rgba(217, 119, 6, 0.26); color: #fde68a; border: 1px solid #f59e0b; }
.risk-high { background: rgba(234, 88, 12, 0.30); color: #fdba74; border: 1px solid #f97316; }
.risk-ext  { background: rgba(220, 38, 38, 0.30); color: #fca5a5; border: 1px solid #ef4444; }

.bp-grid {
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; align-items: start;
}
@media (max-width: 960px) { .bp-grid { grid-template-columns: 1fr; } }

.bp-canvas-panel {
  background: #061326; border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px; padding: 12px;
  box-shadow: inset 0 0 40px rgba(14, 165, 233, 0.08);
}
.bp-canvas-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.bp-prop-name { font-size: 17px; font-weight: 900; color: #f4ba34; letter-spacing: 0.4px; }
.bp-prop-sub { font-size: 12px; color: #93c5fd; margin-top: 1px; }
.bp-risk-badge { padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: 0.6px; }

.bp-canvas-wrap {
  position: relative; width: 100%; aspect-ratio: 960 / 580;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: #051020;
}
#blueprint-canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.bp-hover-tip {
  position: absolute; left: 12px; bottom: 12px; z-index: 4; pointer-events: none;
  padding: 7px 12px; border-radius: 9px; font-size: 12px; font-weight: 700;
  background: rgba(7, 15, 28, 0.94); border: 1px solid #f4ba34; color: #fef3c7;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55); max-width: 92%;
}
.bp-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px;
  font-size: 11px; color: #94a3b8;
}
.leg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.leg-inc { background: #f4ba34; box-shadow: 0 0 6px #f4ba34; }
.leg-pad { background: #38bdf8; }
.leg-desk { background: #a78bfa; }
.leg-locked { border: 1.5px dashed #64748b; background: transparent; }
.bp-legend-hint { margin-left: auto; color: #60a5fa; font-style: italic; }

.bp-finance-panel {
  background: rgba(12, 20, 34, 0.92); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px; padding: 11px 13px; display: flex; flex-direction: column; gap: 6px;
}
.bp-section-head { font-size: 10px; font-weight: 900; letter-spacing: 1.2px; color: #38bdf8; margin-top: 1px; }
.bp-brand-input { padding: 7px 11px !important; font-size: 14px !important; }
.bp-loan-card, .bp-ops-card {
  background: rgba(4, 10, 20, 0.65); border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px; padding: 8px 11px; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px;
}
.bp-kv { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.bp-kv:last-child { border-bottom: none; }
.bp-kv span { color: #cbd5e1; }
.bp-kv strong { font-weight: 800; color: #f8fafc; }
.bp-kv strong.good { color: #4ade80; }
.bp-kv strong.gold { color: #f4ba34; }
.bp-kv strong.warn { color: #fb923c; }
.bp-kv strong.bad  { color: #f87171; }

.bp-risk-meter-wrap {
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px; padding: 8px 11px;
}
.bp-risk-meter-head { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; color: #94a3b8; margin-bottom: 5px; }
.bp-risk-track { width: 100%; height: 7px; border-radius: 99px; background: rgba(255,255,255,0.10); overflow: hidden; }
.bp-risk-fill { height: 100%; width: 25%; border-radius: 99px; transition: width 0.25s, background 0.25s; }
.bp-risk-advice { font-size: 11px; color: #cbd5e1; line-height: 1.35; margin-top: 5px; }
.bp-buy-btn {
  position: relative; overflow: hidden;
  padding: 11px 14px !important; font-size: 13px !important; font-weight: 900 !important;
  letter-spacing: 0.6px; background: linear-gradient(135deg, #f59e0b 0%, #fde047 50%, #eab308 100%) !important;
  color: #0b1120 !important; border: 2.5px solid #fef9c3 !important;
  margin: 6px 0 2px !important;
  animation: signLeaseJump 1.35s ease-in-out infinite;
}

/* Top Business HUD: Slim Luxury Glass Bar */
#top-hud {
  position: fixed; top: 8px; left: 12px; right: 12px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 14px; border-radius: 12px;
  background: rgba(11, 15, 23, 0.88); border: 1px solid rgba(214, 168, 78, 0.36);
  backdrop-filter: blur(12px);
}
.hud-left { flex: 0 0 auto; white-space: nowrap; }
.cash-big { font-size: 23px; font-weight: 800; color: #f4ba34; line-height: 1.05; }
.cash-big.negative { color: #ef4444; }
.profit-sub { font-size: 11px; font-weight: 700; color: #34d399; white-space: nowrap; }
.profit-sub.negative { color: #f87171; }

.hud-center { flex: 1 1 210px; min-width: 180px; text-align: center; max-width: 430px; overflow: hidden; }
.city-row-top { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.hud-crest-mini {
  width: 22px; height: 22px; border-radius: 5px; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(244, 186, 52, 0.7);
}
.brand-badge {
  font-family: Georgia, 'Times New Roman', serif; white-space: nowrap; flex-shrink: 0;
  font-size: 12.5px; font-weight: 900; letter-spacing: 1.0px; color: #161108;
  background: linear-gradient(180deg, #fff0b8 0%, #f4ba34 55%, #c78b1f 100%);
  padding: 2px 9px; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(244, 186, 52, 0.35), inset 0 1px 0 rgba(255,255,255,0.65);
}
.vip-mini-badge {
  font-size: 9.5px; font-weight: 900; letter-spacing: 0.9px; color: #111827;
  background: linear-gradient(135deg, #fef08a, #f59e0b); padding: 2px 6px; border-radius: 999px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.55);
}
.sync-hud-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 900; cursor: pointer;
  background: rgba(16, 185, 129, 0.16); border: 1px solid rgba(52, 211, 153, 0.62); color: #a7f3d0;
  letter-spacing: 0.5px; transition: background 0.15s, box-shadow 0.2s;
}
.sync-hud-btn:hover { background: rgba(16, 185, 129, 0.34); color: #ffffff; }
.sync-hud-btn.pulsing { box-shadow: 0 0 14px rgba(52, 211, 153, 0.72); border-color: #6ee7b7; }
.sync-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #34d399;
  box-shadow: 0 0 8px #34d399;
}
.prop-mini-badge {
  font-size: 10px; font-weight: 900; letter-spacing: 0.6px; color: #7dd3fc;
  background: rgba(14, 165, 233, 0.18); border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 2px 7px; border-radius: 6px;
}
.icon-mini-btn {
  border: 1px solid rgba(214, 168, 78, 0.5); background: rgba(255,255,255,0.08);
  color: #fde68a; border-radius: 6px; width: 22px; height: 22px; font-size: 12px; cursor: pointer;
}
.city-title { font-size: 13px; font-weight: 800; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-sub { font-size: 11px; color: #cbd5e1; margin: 2px 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-progress-track { width: 100%; height: 5px; border-radius: 99px; background: rgba(255,255,255,0.14); overflow: hidden; }
#day-progress-fill { width: 0%; height: 100%; background: linear-gradient(90deg, #d6a84e, #fde68a); }

.hud-right { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; align-items: center; flex: 0 1 auto; }
.bp-hud-btn {
  padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; cursor: pointer;
  background: rgba(14, 165, 233, 0.22); border: 1px solid #38bdf8; color: #bae6fd;
  letter-spacing: 0.4px;
}
.bp-hud-btn:hover { background: rgba(14, 165, 233, 0.42); color: #ffffff; }
.stat-pill {
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(214, 168, 78, 0.16); border: 1px solid rgba(214, 168, 78, 0.45); color: #fde68a;
}
.stat-pill.warn { background: rgba(239, 68, 68, 0.25); border-color: #ef4444; color: #fca5a5; }
.stat-pill.crowd-pill { cursor: pointer; font-family: inherit; transition: border-color 0.18s, background 0.18s, transform 0.14s; }
.stat-pill.crowd-pill:hover { border-color: rgba(244, 186, 52, 0.65); background: rgba(30, 41, 59, 0.92); transform: translateY(-1px); }
.stat-pill.crowd-pill.busy { background: rgba(245, 158, 11, 0.22); border-color: rgba(251, 191, 36, 0.72); color: #fde68a; }
.register-pill {
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; cursor: pointer;
  background: rgba(22, 163, 74, 0.22); border: 1px solid #22c55e; color: #86efac;
}
.register-pill.has-cash { background: #16a34a; color: #fff; box-shadow: 0 0 12px rgba(34,197,94,0.6); }
.alert-pill {
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: #dc2626; color: #fff; animation: pulse 1s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Slim Next Goal Tracker */
.goal-bar {
  position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%); z-index: 21;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; border-radius: 999px; max-width: min(640px, 92vw);
  background: rgba(11, 16, 26, 0.92); border: 1px solid rgba(214, 168, 78, 0.55);
  box-shadow: 0 8px 24px rgba(0,0,0,0.48); backdrop-filter: blur(8px);
}
.goal-tag {
  font-size: 10px; font-weight: 900; letter-spacing: 0.8px; color: #111827;
  background: #f4ba34; padding: 3px 7px; border-radius: 999px; white-space: nowrap;
}
.goal-text { font-size: 12px; font-weight: 700; color: #f8fafc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-go-btn {
  padding: 4px 12px; border: none; border-radius: 999px; font-size: 11px; font-weight: 900;
  background: #0e9f96; color: #fff; cursor: pointer; white-space: nowrap;
}
.goal-go-btn:hover { opacity: 0.9; }

/* Left Stack: Cash Register POS + Holding Hands Indicator (always cleanly below dynamic --hud-h!) */
#left-stack {
  position: fixed; left: 14px; top: var(--hud-h, 74px); z-index: 21;
  display: flex; flex-direction: column; gap: 8px; width: 212px;
  max-height: calc(100vh - var(--hud-h, 74px) - 228px);
  overflow-y: auto; scrollbar-width: none;
}
#left-stack > * { flex-shrink: 0; }
#left-stack::-webkit-scrollbar { display: none; }
.register-widget {
  padding: 10px 12px; border-radius: 12px;
  background: rgba(11, 16, 26, 0.90); border: 1.5px solid rgba(214, 168, 78, 0.48);
  backdrop-filter: blur(10px); box-shadow: 0 10px 26px rgba(0,0,0,0.48);
}
.reg-header { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: #d6a84e; }
.reg-total { font-size: 24px; font-weight: 900; color: #4ade80; font-family: 'Consolas', monospace; margin: 2px 0; }
.reg-tx { font-size: 11px; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reg-btn { width: 100%; margin-top: 8px; padding: 7px 8px; font-size: 11px; }

.hands-widget {
  display: flex; flex-direction: column; gap: 5px;
  padding: 7px 9px; border-radius: 10px;
  background: rgba(12, 22, 36, 0.95); border: 1.5px solid #38bdf8;
  font-size: 11px; font-weight: 800; color: #e0f2fe;
}
.hands-widget.hands-alert {
  border-color: #f59e0b; box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}
.hands-top-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hands-busy-note {
  font-size: 10px; font-weight: 800; color: #fde68a; line-height: 1.3;
  background: rgba(245, 158, 11, 0.14); border-radius: 6px; padding: 3px 6px;
}
.hands-btn-row { display: flex; gap: 5px; }
.hands-drop-btn, .hands-return-btn {
  flex: 1; padding: 4px 6px; border: none; border-radius: 6px; font-size: 9.5px; font-weight: 900;
  cursor: pointer; white-space: nowrap;
}
.hands-drop-btn { background: #dc2626; color: #fff; }
.hands-return-btn { background: #0f766e; color: #f0fdfa; }
.plea-quote {
  margin: 10px 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(245, 158, 11, 0.12); border-left: 3px solid #f59e0b;
  font-size: 13px; font-style: italic; font-weight: 700; color: #fef3c7; line-height: 1.45;
}
.temp-fiery { background: rgba(239, 68, 68, 0.22); color: #fca5a5; border: 1px solid #ef4444; }
.temp-sensitive { background: rgba(56, 189, 248, 0.22); color: #bae6fd; border: 1px solid #38bdf8; }
.temp-desperate { background: rgba(245, 158, 11, 0.22); color: #fde68a; border: 1px solid #f59e0b; }
.temp-pro { background: rgba(34, 197, 94, 0.20); color: #bbf7d0; border: 1px solid #22c55e; }
.closed-widget {
  padding: 8px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; line-height: 1.35;
  background: rgba(24, 18, 42, 0.94); border: 1.5px solid #a78bfa; color: #ede9fe;
}
.page-widget {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 9px 10px; border-radius: 10px; font-size: 11px; font-weight: 800;
  background: rgba(18, 12, 6, 0.96); border: 1.5px solid #f59e0b; color: #fef3c7;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65);
  animation: pulse 1.2s infinite;
}
.page-call-btn {
  padding: 4px 8px; border: none; border-radius: 6px; font-size: 10px; font-weight: 900;
  background: #f59e0b; color: #111827; cursor: pointer; white-space: nowrap;
}
.profit-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px; padding: 2px 7px; margin-top: 2px; cursor: pointer;
  text-align: left; display: inline-block; transition: background 0.15s, border-color 0.15s;
}
.profit-btn:hover { background: rgba(244,186,52,0.18); border-color: #f4ba34; }
.net-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
@media (max-width: 680px) { .net-columns { grid-template-columns: 1fr; } }
.net-col { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); border-radius: 10px; padding: 10px; }
.itemized-list { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.item-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.07); gap: 8px; }
.item-row.total { border-top: 1.5px solid rgba(244,186,52,0.45); border-bottom: none; padding-top: 8px; margin-top: 4px; font-weight: 900; font-size: 13px; }
.item-in { color: #4ade80; font-weight: 800; }
.item-out { color: #f87171; font-weight: 800; }
.trait-pill { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 900; margin-left: 5px; }
.trait-star { background: rgba(245,158,11,0.28); color: #fde68a; border: 1px solid #f59e0b; }
.trait-slacker { background: rgba(220,38,38,0.28); color: #fca5a5; border: 1px solid #ef4444; }
.trait-reliable { background: rgba(20,184,166,0.22); color: #99f6e4; border: 1px solid #14b8a6; }
.trait-raise { background: rgba(168,85,247,0.32); color: #e9d5ff; border: 1px solid #c084fc; }
.yt-mini-wrap {
  position: fixed; right: 14px; bottom: 92px; z-index: 23;
  background: rgba(12, 16, 26, 0.94); border: 1.5px solid #d6a84e; border-radius: 10px;
  overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,0.55);
}
.yt-mini-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px; font-size: 10px; font-weight: 900; color: #fde68a; background: #101622;
}
.uniform-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px;
  background: rgba(255,255,255,0.05); padding: 10px; border-radius: 10px;
}
.uniform-grid label {
  display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: #cbd5e1;
}
.uniform-grid input[type="color"] {
  width: 100%; height: 32px; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; background: #0d131f; cursor: pointer;
}
.text-input-sm, .select-input {
  padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: #0d131f; border: 1px solid rgba(214, 168, 78, 0.5); color: #ffffff;
  user-select: text; -webkit-user-select: text;
}

/* Camera Mode Switcher */
#camera-dock {
  position: fixed; right: 14px; top: var(--hud-h, 74px); z-index: 21;
  display: flex; flex-direction: column; gap: 6px;
}
.cam-pill {
  padding: 7px 12px; border-radius: 10px; font-size: 11px; font-weight: 800; cursor: pointer;
  background: rgba(11, 16, 26, 0.90); border: 1px solid rgba(255,255,255,0.22); color: #cbd5e1;
  backdrop-filter: blur(8px); transition: transform 0.1s, border-color 0.15s;
}
.cam-pill.active { background: #0e9f96; border-color: #2dd4bf; color: #fff; box-shadow: 0 4px 14px rgba(14,159,150,0.4); }
.cam-pill.cam-gold { border-color: #f4ba34; color: #fde68a; }
.cam-pill.cam-gold.active { background: linear-gradient(135deg, #d97706, #f4ba34); color: #111827; }
.cam-pill.cam-recenter { background: rgba(37, 99, 235, 0.92); border-color: #93c5fd; color: #ffffff; }

/* Helicopter Exterior Overlay */
.heli-hud {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 30;
  padding: 14px 24px; border-radius: 16px; text-align: center;
  background: rgba(10, 14, 24, 0.92); border: 1.5px solid #f4ba34;
  box-shadow: 0 18px 48px rgba(0,0,0,0.70); backdrop-filter: blur(10px);
}
.heli-title { font-size: 15px; font-weight: 900; letter-spacing: 1px; color: #f4ba34; }
.heli-sub { font-size: 12px; color: #cbd5e1; margin: 4px 0 10px; }

/* Live Toast (always cleanly above modals AND below wrapped mobile top HUD; hover pauses timer!) */
.toast {
  position: fixed; top: var(--hud-h, 74px); left: 50%; transform: translateX(-50%); z-index: 95;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 16px; border-radius: 10px; font-size: 12.5px; font-weight: 800; line-height: 1.3;
  background: rgba(15, 23, 42, 0.98); border: 2px solid #f4ba34; color: #fef08a;
  pointer-events: auto; max-width: min(88vw, 660px); text-align: left;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.72), 0 0 18px rgba(244, 186, 52, 0.25);
}
.toast.hidden { display: none !important; }
.toast-close {
  flex-shrink: 0; border: 1px solid rgba(254, 240, 138, 0.45); background: rgba(255, 255, 255, 0.08);
  color: #fef08a; font-size: 11px; font-weight: 900; border-radius: 6px; padding: 2px 6px; cursor: pointer;
}
.toast-close:hover { background: rgba(244, 186, 52, 0.28); color: #ffffff; }
.badge-gold { background: #d6a84e; color: #111827; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; }

/* Virtual Joystick */
#joystick-zone {
  position: fixed; left: 22px; bottom: 88px; z-index: 20;
  display: flex; flex-direction: column; align-items: center; touch-action: none;
}
#joystick-base {
  width: 106px; height: 106px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.22);
  position: relative; display: flex; align-items: center; justify-content: center;
}
#joystick-handle {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.78); box-shadow: 0 4px 12px rgba(0,0,0,0.45);
  transform: translate(0, 0); pointer-events: none;
}
.joy-caption { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.68); margin-top: 5px; }

/* Click-to-Open Upgrade Card */
.floating-card {
  position: fixed; right: 16px; bottom: 118px; z-index: 24;
  width: min(320px, 88vw); padding: 14px; border-radius: 14px;
  background: rgba(14, 20, 32, 0.96); border: 1.5px solid #f4ba34;
  box-shadow: 0 14px 36px rgba(0,0,0,0.58);
}
.card-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 15px; color: #f4ba34; margin-bottom: 4px; }
.card-head-right { display: flex; align-items: center; gap: 6px; }
.mini-close {
  width: 24px; height: 24px; border: none; border-radius: 6px;
  background: #dc2626; color: #fff; font-weight: 900; font-size: 12px; cursor: pointer;
}
.card-sub { font-size: 12px; color: #cbd5e1; margin-bottom: 10px; }
.card-actions { display: flex; flex-direction: column; gap: 8px; }
.upg-btn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 9px 11px; }
.upg-title { font-size: 13px; font-weight: 800; }
.upg-desc { font-size: 11px; font-weight: 500; opacity: 0.9; margin-top: 2px; }

/* Sculpted Luxury Icon Console Bottom Dock */
#bottom-dock {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 25;
  display: flex; gap: 7px; padding: 7px 9px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 23, 37, 0.94), rgba(8, 12, 21, 0.97));
  border: 1.5px solid rgba(214, 168, 78, 0.42);
  width: min(840px, 97vw); backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 240, 200, 0.14);
}
.dock-btn {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 7px 6px 6px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, rgba(30, 41, 62, 0.78), rgba(14, 20, 33, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-bottom: 2.5px solid var(--dock-accent, #d6a84e);
  color: #f1f5f9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.dock-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(40, 55, 82, 0.92), rgba(18, 26, 42, 0.98));
  border-color: var(--dock-accent, #f4ba34);
  box-shadow: 0 8px 20px rgba(0,0,0,0.55), 0 0 16px var(--dock-glow, rgba(244,186,52,0.28));
}
.dock-btn:active { transform: translateY(0) scale(0.97); }
.dock-ico {
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  color: var(--dock-accent, #f4ba34);
  filter: drop-shadow(0 0 6px var(--dock-glow, rgba(244, 186, 52, 0.45)));
}
.dock-ico svg { width: 20px; height: 20px; display: block; }
.dock-lbl {
  font-size: 10px; font-weight: 900; letter-spacing: 0.95px; color: #f8fafc;
  text-shadow: 0 1px 4px rgba(0,0,0,0.75); white-space: nowrap;
}
.dock-teal   { --dock-accent: #2dd4bf; --dock-glow: rgba(45, 212, 191, 0.40); }
.dock-coral  { --dock-accent: #fb7185; --dock-glow: rgba(251, 113, 133, 0.40); }
.dock-blue   { --dock-accent: #60a5fa; --dock-glow: rgba(96, 165, 250, 0.40); }
.dock-amber  { --dock-accent: #fbbf24; --dock-glow: rgba(251, 191, 36, 0.40); }
.dock-gold   {
  --dock-accent: #f4ba34; --dock-glow: rgba(244, 186, 52, 0.50);
  background: linear-gradient(180deg, rgba(78, 56, 16, 0.62), rgba(28, 20, 9, 0.95));
  border-color: rgba(244, 186, 52, 0.45);
}
.dock-purple { --dock-accent: #c084fc; --dock-glow: rgba(192, 132, 252, 0.40); }
.sale-dot {
  position: absolute; top: -6px; right: 4px; padding: 1px 6px; border-radius: 999px;
  background: linear-gradient(135deg, #fde047, #f59e0b); color: #111827;
  font-size: 8.5px; font-weight: 900; letter-spacing: 0.6px;
  border: 1.5px solid #0b111d; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.55);
}
.alert-dot {
  position: absolute; top: -6px; right: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; border: 2px solid #0f141e;
}

/* Pro Shop, VIP Pass, Seasonal Event & Cloud Sync Modal Styles */
.modal-title-lockup { display: flex; align-items: center; gap: 9px; }
.modal-crest-sm {
  width: 28px; height: 28px; border-radius: 7px; object-fit: cover;
  border: 1px solid rgba(244, 186, 52, 0.65);
}
.event-strip {
  padding: 7px 16px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.3px;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.24), rgba(14, 165, 233, 0.22));
  border-bottom: 1px solid rgba(244, 186, 52, 0.32); color: #fef3c7;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.vip-hero-card {
  background: linear-gradient(145deg, rgba(58, 42, 12, 0.85), rgba(15, 23, 42, 0.96));
  border: 1.5px solid rgba(244, 186, 52, 0.65); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 240, 195, 0.16);
}
.vip-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.vip-hero-title { font-family: Georgia, serif; font-size: 18px; font-weight: 900; color: #fde68a; letter-spacing: 0.5px; }
.vip-price-tag {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 900;
  background: linear-gradient(135deg, #fde047, #d97706); color: #111827;
}
.vip-perks { list-style: none; display: flex; flex-direction: column; gap: 5px; margin: 8px 0 12px; font-size: 12.5px; color: #e2e8f0; }
.sync-code-row, .sync-link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sync-code-display {
  flex: 1; min-width: 150px; padding: 10px 14px; border-radius: 10px; text-align: center;
  font-family: 'Consolas', monospace; font-size: 19px; font-weight: 900; letter-spacing: 2.5px;
  background: #070d18; border: 1.5px solid #34d399; color: #6ee7b7;
}
.sync-link-row input { flex: 1; min-width: 200px; }

/* Buttons */
.btn {
  padding: 10px 12px; border: none; border-radius: 9px; font-size: 13px; font-weight: 700;
  color: #fff; cursor: pointer; transition: opacity 0.15s, transform 0.1s;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-teal { background: #0e9f96; }
.btn-coral { background: #f05336; }
.btn-blue { background: #2563eb; }
.btn-purple { background: #7c3aed; }
.btn-green { background: #16a34a; }
.btn-danger { background: #dc2626; }
.btn-gold { background: #d97706; }
.btn-slate { background: #334155; }
.full-width { width: 100%; margin: 6px 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.btn-row .btn { flex: 1; min-width: 110px; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }

/* Modals (strictly layered so urgent overlays always appear cleanly above normal panels!) */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(5, 9, 16, 0.74);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
#modal-fire-plea  { z-index: 60; }
#modal-club-event { z-index: 62; }
#modal-absence    { z-index: 65; }
#modal-bankrupt   { z-index: 70; }
.modal-card {
  width: min(650px, 95vw); max-height: 86vh; display: flex; flex-direction: column;
  background: #141c2a; border-radius: 16px; border: 1.5px solid rgba(255,255,255,0.16);
  box-shadow: 0 24px 60px rgba(0,0,0,0.70); overflow: hidden;
}
.modal-card.modal-compact { width: min(440px, 94vw); }
.modal-card.modal-danger { border-color: #ef4444; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: linear-gradient(180deg, #101827, #0b111d);
  border-bottom: 1px solid rgba(214, 168, 78, 0.25);
}
.modal-header h2 { font-size: 16px; font-weight: 800; color: #f4ba34; letter-spacing: 0.6px; text-shadow: 0 2px 8px rgba(0,0,0,0.45); }
.modal-close {
  width: 34px; height: 34px; border: none; border-radius: 8px;
  background: #dc2626; color: #fff; font-weight: 900; cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}
.modal-tabs {
  display: flex; gap: 6px; padding: 10px 14px 8px; flex-shrink: 0; min-height: 46px;
  background: #0c121e; border-bottom: 1px solid rgba(255,255,255,0.1);
  overflow-x: auto; align-items: center;
}
.tab-btn {
  flex: 1 0 auto; min-width: 100px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
  color: #cbd5e1; font-size: 12px; font-weight: 800; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.tab-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.tab-btn.active {
  background: linear-gradient(135deg, rgba(214, 168, 78, 0.26), rgba(244, 186, 52, 0.14));
  border-color: #f4ba34; color: #fef08a;
  box-shadow: 0 4px 14px rgba(244, 186, 52, 0.22);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.panel-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
.card-hint { font-size: 12px; color: #94a3b8; margin-bottom: 10px; line-height: 1.45; }
.tall-list { max-height: 44vh !important; }
.shift-pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.shift-pill {
  padding: 5px 9px; border-radius: 7px; font-size: 11px; font-weight: 800; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.16); background: #1e293b; color: #94a3b8;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.shift-pill:hover { background: #334155; color: #fff; }
.shift-pill.active {
  background: #0e9f96; border-color: #2dd4bf; color: #ffffff;
  box-shadow: 0 3px 10px rgba(14, 159, 150, 0.35);
}
.role-card, .roster-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26);
}
.role-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.roster-card.slacker-card { border-color: rgba(245, 158, 11, 0.55); }
.roster-card.fire-card { border-color: rgba(239, 68, 68, 0.65); background: rgba(127, 29, 29, 0.16); }
.roster-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.roster-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 7px 0; font-size: 11px; color: #cbd5e1; }
.meta-chip {
  padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.1); font-weight: 700;
}
.meta-chip.warn { background: rgba(217,119,6,0.22); border-color: rgba(245,158,11,0.5); color: #fde68a; }
.meta-chip.danger { background: rgba(220,38,38,0.25); border-color: rgba(239,68,68,0.6); color: #fecaca; }
.meta-chip.good { background: rgba(22,163,74,0.22); border-color: rgba(74,222,128,0.5); color: #bbf7d0; }
.busy-wrap { position: relative; cursor: help; margin: 6px 0 8px; }
.busy-label-row { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; color: #94a3b8; margin-bottom: 3px; }
.busy-track { width: 100%; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.12); overflow: hidden; }
.busy-fill { height: 100%; border-radius: 99px; transition: width 0.3s, background 0.3s; }
.busy-tooltip {
  position: absolute; left: 0; bottom: 100%; margin-bottom: 6px; z-index: 12;
  padding: 6px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; line-height: 1.4;
  background: rgba(8, 14, 26, 0.97); border: 1px solid #f4ba34; color: #fef3c7;
  box-shadow: 0 8px 20px rgba(0,0,0,0.65); pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity 0.14s, transform 0.14s;
  max-width: 100%; white-space: normal;
}
.busy-wrap:hover .busy-tooltip { opacity: 1; transform: translateY(0); }

.cw-title { font-size: 11px; font-weight: 900; letter-spacing: 0.4px; margin-bottom: 3px; }
.cw-sub { font-size: 10.5px; line-height: 1.35; opacity: 0.92; margin-bottom: 6px; }
.cw-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.mini-pill-btn {
  border: 1px solid rgba(255,255,255,0.22); border-radius: 6px; padding: 4px 7px;
  font-size: 10px; font-weight: 900; cursor: pointer; background: rgba(14, 159, 150, 0.85); color: #fff;
}
.mini-pill-btn.gold { background: linear-gradient(135deg, #d97706, #f4ba34); color: #111827; border-color: #fde68a; }
.mini-pill-btn.muted { background: rgba(51, 65, 85, 0.85); color: #cbd5e1; }
.nudge-widget {
  background: rgba(14, 30, 56, 0.94); border: 1.5px solid #38bdf8; border-radius: 11px;
  padding: 9px 10px; color: #e0f2fe; box-shadow: 0 10px 26px rgba(0,0,0,0.52);
  backdrop-filter: blur(8px);
}
.breakin-widget {
  background: rgba(127, 29, 29, 0.95); border: 2px solid #ef4444; border-radius: 11px;
  padding: 9px 10px; color: #fee2e2; box-shadow: 0 0 26px rgba(239, 68, 68, 0.65);
  animation: breakInFlash 0.65s infinite alternate;
}
@keyframes breakInFlash {
  from { border-color: #ef4444; box-shadow: 0 0 14px rgba(239, 68, 68, 0.45); }
  to   { border-color: #fde047; box-shadow: 0 0 28px rgba(239, 68, 68, 0.90); }
}
@keyframes strategyBounce {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35); }
  45%      { transform: translateY(-5px) scale(1.03); box-shadow: 0 10px 26px rgba(251, 191, 36, 0.65); }
}
.btn-strategy-bounce {
  animation: strategyBounce 1.15s ease-in-out infinite;
  border: 2px solid #fde047 !important;
}
.credit-box {
  background: rgba(0, 0, 0, 0.34); border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 9px; padding: 8px 10px; font-size: 12px; font-weight: 800; color: #e2e8f0;
  margin-bottom: 6px; line-height: 1.45;
}
.credit-bar-track { width: 100%; height: 9px; border-radius: 99px; background: rgba(255,255,255,0.12); overflow: hidden; }
.credit-bar-fill { height: 100%; border-radius: 99px; background: #22c55e; transition: width 0.3s, background 0.3s; }
.schedule-note { font-size: 11.5px; color: #93c5fd; margin-top: 7px; line-height: 1.4; }
.perk-explain-list {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: #cbd5e1; line-height: 1.38;
}
.roster-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.roster-counts-strip { font-size: 11px; font-weight: 800; color: #fde68a; }
.busy-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px;
  padding: 6px 9px; border-radius: 8px; background: rgba(0,0,0,0.28); font-size: 10.5px; color: #cbd5e1;
}
.leg-chip { padding: 2px 6px; border-radius: 99px; font-weight: 800; }
.leg-chip.good { background: rgba(34,197,94,0.18); color: #86efac; }
.leg-chip.warn { background: rgba(245,158,11,0.18); color: #fde68a; }
.leg-chip.bad  { background: rgba(239,68,68,0.18); color: #fca5a5; }
.leg-hint { color: #94a3b8; font-style: italic; }
.roster-group-hdr {
  font-size: 11px; font-weight: 900; letter-spacing: 0.9px; text-transform: uppercase;
  color: #38bdf8; background: rgba(14, 165, 233, 0.12); border-left: 3px solid #38bdf8;
  padding: 5px 10px; border-radius: 6px; margin: 10px 0 7px;
}
.shift-breakdown-line {
  font-size: 11px; color: #93c5fd; margin-top: 4px; font-weight: 700;
}
.trait-reformed { background: rgba(14, 159, 150, 0.28); color: #5eead4; border: 1px solid rgba(45, 212, 191, 0.55); }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.text-input {
  width: 100%; padding: 12px 14px; border-radius: 10px; font-size: 16px; font-weight: 800;
  background: #0a101b; border: 1.5px solid #d6a84e; color: #ffffff; outline: none;
  user-select: text; -webkit-user-select: text;
}
.ledger-box {
  background: rgba(0,0,0,0.32); padding: 12px 14px; border-radius: 10px;
  font-size: 13px; line-height: 1.55; margin-bottom: 10px; white-space: pre-line;
}
.attack-box {
  background: rgba(185, 28, 28, 0.25); border: 1.5px solid #ef4444; border-radius: 10px;
  padding: 12px; margin-bottom: 12px; font-size: 13px; line-height: 1.5;
}
.multiplayer-note {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.45;
  background: rgba(37, 99, 235, 0.16); border: 1px solid rgba(96, 165, 250, 0.45); color: #dbeafe;
}
.section-label { font-size: 12px; font-weight: 800; color: #94a3b8; text-transform: uppercase; margin: 10px 0 6px; }
.report-text {
  font-family: inherit; white-space: pre-wrap; font-size: 14px; line-height: 1.55;
  background: rgba(0,0,0,0.32); padding: 14px; border-radius: 10px; margin-bottom: 14px;
}
.staff-row, .city-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,0.06); padding: 11px; border-radius: 10px; margin-bottom: 9px;
}
.city-row.active { background: rgba(14, 159, 150, 0.25); border: 1px solid #14a39b; }
.city-row.owned { background: rgba(22, 163, 74, 0.18); border: 1px solid #22c55e; }
.row-title { font-size: 14px; font-weight: 800; color: #fff; }
.row-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.map-note { font-size: 12px; color: #cbd5e1; margin-bottom: 10px; }
.city-list { max-height: 46vh; overflow-y: auto; }
.mini-list { max-height: 220px; overflow-y: auto; margin-bottom: 10px; }

/* Responsive layouts: Compact Mobile / Folded Cover, Unfolded Foldable Inner Screen & Landscape Mobile */

/* Shared Compact Top Bar below 1160px so HUD stays crisp and NEVER wraps vertically into a huge block */
@media (max-width: 1160px) {
  #top-hud { padding: 5px 10px; gap: 6px; flex-wrap: wrap; row-gap: 4px; }
  .cash-big { font-size: 18px; }
  .profit-sub { font-size: 10px; }
  .brand-badge { font-size: 11px; padding: 2px 7px; }
  .city-title { font-size: 11px; }
  .day-sub { font-size: 10px; margin: 1px 0 2px; }
  .stat-pill, .register-pill, .bp-hud-btn, .sync-hud-btn { padding: 3px 7px; font-size: 10px; }
  #sync-hud-label { display: none; }
}

/* 1. Compact Phone / Folded Cover Screen (<= 580px wide, e.g. 390x844, 344x882) */
@media (max-width: 580px) {
  #top-hud { top: 6px; left: 6px; right: 6px; padding: 5px 7px; gap: 4px; }
  .hud-left { order: 0; }
  .hud-right { order: 1; gap: 3px; }
  .hud-center { order: 2; flex: 1 1 100%; max-width: 100%; }
  .cash-big { font-size: 16px; }
  .profit-sub { font-size: 9px; padding: 1px 5px; }
  .hud-crest-mini, .prop-mini-badge { display: none; }
  .brand-badge { font-size: 10px; padding: 1px 6px; }
  .city-title { font-size: 10px; }
  .day-sub { font-size: 9px; }
  .stat-pill, .register-pill, .bp-hud-btn, .sync-hud-btn { padding: 3px 5px; font-size: 9px; }
  #left-stack { width: 134px; top: var(--hud-h, 118px); left: 6px; gap: 5px; }
  .register-widget { padding: 6px 8px; }
  .reg-header { font-size: 8.5px; }
  .reg-total { font-size: 16px; }
  .reg-tx { font-size: 9px; }
  #camera-dock {
    right: 6px; top: var(--hud-h, 118px); flex-direction: row; flex-wrap: wrap;
    max-width: calc(100vw - 150px); justify-content: flex-end; gap: 3px;
  }
  .cam-pill { padding: 4px 6px; font-size: 9px; }
  #joystick-zone { left: 8px; bottom: 112px; }
  #joystick-base { width: 68px; height: 68px; }
  #joystick-handle { width: 30px; height: 30px; }
  .joy-caption { font-size: 8px; }
  .goal-bar { bottom: 72px; padding: 4px 8px; gap: 5px; max-width: 96vw; }
  .goal-tag { display: none; }
  .goal-text { font-size: 10px; }
  .goal-go-btn { padding: 4px 8px; font-size: 9.5px; }
  #bottom-dock { width: 97vw; bottom: 6px; padding: 4px; gap: 4px; }
  .dock-btn { padding: 5px 2px 4px; }
  .dock-ico svg { width: 16px; height: 16px; }
  .dock-lbl { font-size: 7.5px; letter-spacing: 0.2px; }
  #property-tour-bar { width: 96vw; padding: 8px 10px; bottom: 8px; }
  .tour-prop-name { font-size: 14px; }
  .tour-prop-sub { font-size: 10px; }
  .tour-actions { flex-wrap: nowrap; gap: 6px; }
  .tour-btn-primary, .tour-btn-secondary { min-width: 0 !important; flex: 1 1 0; font-size: 10.5px !important; padding: 8px 8px !important; }
}

/* 1b. Ultra-Narrow Folded Phone Cover Screen (<= 380px wide, e.g. 344x882 Galaxy Z Fold Cover) */
@media (max-width: 380px) {
  #camera-dock {
    top: var(--hud-h, 138px); left: 6px; right: 6px; max-width: none;
    flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px;
  }
  .cam-pill { padding: 3px 5px; font-size: 8px; white-space: nowrap; }
  #left-stack { top: calc(var(--hud-h, 138px) + var(--cam-h, 58px)); width: 132px; }
}

/* 2. Unfolded Foldable Phone & Square/Compact Tablet (581px..1050px wide AND >= 460px tall: e.g. 717x512, 768x840, 884x1104, 1024x768)
      Relocates Bottom Navigation to a slim Left Vertical Rail so the ENTIRE center & bottom 3D gym stays unobstructed! */
@media (min-width: 581px) and (max-width: 1050px) and (min-height: 460px) {
  #top-hud { top: 6px; left: 8px; right: 8px; padding: 5px 10px; flex-wrap: wrap; row-gap: 4px; }
  .hud-center { flex: 1 1 160px; min-width: 135px; }
  .hud-right { flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
  .hud-crest-mini, .prop-mini-badge { display: none; }
  /* Slim Vertical Left Navigation Rail (frees the entire bottom of the unfolded foldable screen!) */
  #bottom-dock {
    left: 8px; top: calc(var(--hud-h, 74px) + 2px); bottom: 10px; transform: none;
    width: 66px; flex-direction: column; justify-content: space-between; padding: 6px 4px; gap: 5px;
    border-radius: 14px;
  }
  .dock-btn { width: 100%; flex: 1; padding: 5px 2px; }
  .dock-ico svg { width: 18px; height: 18px; }
  .dock-lbl { font-size: 7.5px; letter-spacing: 0.2px; }
  /* Tuck Cash Register neatly top-left clear of the side rail & below dynamic --hud-h! */
  #left-stack { left: 82px; top: var(--hud-h, 74px); width: 162px; }
  .register-widget { padding: 7px 9px; }
  .reg-total { font-size: 18px; }
  /* Keep Camera Controls cleanly at Top-Right horizontal row (zero conflict with Goal Bar at bottom!) */
  #camera-dock {
    right: 10px; top: var(--hud-h, 74px); bottom: auto; flex-direction: row; flex-wrap: wrap;
    max-width: calc(100vw - 262px); justify-content: flex-end; gap: 4px;
  }
  .cam-pill { padding: 5px 8px; font-size: 10px; white-space: nowrap; }
  /* Goal Bar centered along the unobstructed bottom edge! */
  .goal-bar { bottom: 10px; left: calc(50% + 34px); transform: translateX(-50%); max-width: calc(100vw - 190px); padding: 5px 11px; }
  .goal-tag { display: none; }
  #joystick-zone { left: 96px; bottom: 52px; }
  #joystick-base { width: 68px; height: 68px; }
  #joystick-handle { width: 28px; height: 28px; }
  .joy-caption { display: none; }
  #upgrade-card { bottom: 54px; right: 12px; left: auto; transform: none; }
}

/* 3. Landscape Phone (short height <= 459px, e.g. 844x390) */
@media (max-height: 459px) and (orientation: landscape) {
  #top-hud { top: 4px; left: 6px; right: 6px; padding: 3px 8px; gap: 5px; flex-wrap: wrap; row-gap: 2px; }
  .hud-center { flex: 1 1 130px; min-width: 115px; }
  .hud-right { flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
  .hud-crest-mini, .prop-mini-badge, .day-progress-track { display: none; }
  .cash-big { font-size: 15px; }
  .profit-sub { font-size: 9px; padding: 1px 4px; }
  .brand-badge { font-size: 10px; padding: 1px 6px; }
  .city-title { font-size: 10px; }
  .day-sub { font-size: 9px; margin: 0; }
  .stat-pill, .register-pill, .bp-hud-btn, .sync-hud-btn { padding: 2px 5px; font-size: 9px; }
  #left-stack {
    top: var(--hud-h, 52px); left: 6px; width: 148px; gap: 4px;
    max-height: calc(100vh - var(--hud-h, 52px) - 66px);
    overflow-y: auto; pointer-events: auto;
  }
  .register-widget, .closed-widget, .nudge-widget, .fumes-widget, .event-widget { padding: 5px 7px; font-size: 10px; }
  .reg-total { font-size: 15px; }
  .reg-tx, .cw-sub { font-size: 9px; line-height: 1.25; }
  .register-widget .btn, .closed-widget .mini-pill-btn, .nudge-widget .mini-pill-btn { padding: 4px 6px; font-size: 9.5px; }
  #camera-dock {
    top: var(--hud-h, 52px); right: 6px; flex-direction: row; flex-wrap: wrap;
    max-width: calc(100vw - 166px); justify-content: flex-end; gap: 3px;
  }
  .cam-pill { padding: 4px 6px; font-size: 9px; }
  .goal-bar { left: 230px; right: 8px; transform: none; max-width: none; bottom: 62px; padding: 3px 9px; gap: 6px; }
  .goal-tag { display: none; }
  .goal-text { font-size: 10px; }
  .goal-go-btn { padding: 3px 8px; font-size: 9.5px; }
  #bottom-dock { bottom: 4px; padding: 3px 5px; gap: 4px; }
  .dock-btn { padding: 4px 2px 3px; }
  .dock-ico svg { width: 14px; height: 14px; }
  .dock-lbl { font-size: 7px; }
  #joystick-zone { bottom: 62px; left: 162px; }
  #joystick-base { width: 58px; height: 58px; }
  #joystick-handle { width: 24px; height: 24px; }
  .joy-caption { display: none; }
}

/* v5.4: 3D Design Mode Studio, Paint Fumes Widget, Wall/Floor Swatches & Poster Gallery */
.cam-design { border-color: rgba(56, 189, 248, 0.55) !important; color: #bae6fd !important; }
.cam-design.active { background: linear-gradient(135deg, #0ea5e9, #2563eb) !important; color: #fff !important; border-color: #7dd3fc !important; }
.fumes-widget {
  padding: 7px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; line-height: 1.3;
  background: rgba(24, 34, 22, 0.94); border: 1.5px solid #a3e635; color: #ecfccb;
}
.design-bar {
  position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); z-index: 26;
  width: min(900px, 94vw); padding: 9px 12px; border-radius: 14px;
  background: rgba(9, 15, 27, 0.96); border: 1.5px solid #38bdf8;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65); pointer-events: auto;
}
.design-bar-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.design-title { font-size: 12px; font-weight: 900; color: #7dd3fc; letter-spacing: 0.4px; }
.design-sub { font-size: 10.5px; color: #cbd5e1; }
.design-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-pill-btn.green { background: #16a34a; color: #fff; border-color: #4ade80; }
.mini-pill-btn.danger { background: #b91c1c; color: #fff; border-color: #f87171; }
.design-palette {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 5px;
  scrollbar-width: thin; scrollbar-color: rgba(56, 189, 248, 0.45) rgba(15, 23, 42, 0.35);
}
.design-palette::-webkit-scrollbar { height: 6px; }
.design-palette::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.45); border-radius: 99px; }
.design-palette::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.45); border-radius: 99px; }
.design-palette::-webkit-scrollbar-thumb:hover { background: rgba(56, 189, 248, 0.75); }
.des-chip {
  flex: 0 0 auto; padding: 6px 9px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0; font-size: 10.5px; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.des-chip.active { background: rgba(14, 165, 233, 0.28); border-color: #38bdf8; color: #fff; }
.des-chip.mach { border-color: rgba(244, 186, 52, 0.40); color: #fef3c7; }
.swatch-sub-label { font-size: 11px; font-weight: 800; color: #cbd5e1; margin-bottom: 5px; }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 6px; }
.swatch-btn {
  display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(148, 163, 184, 0.25);
  color: #f1f5f9; font-size: 10.5px; font-weight: 800; cursor: pointer; text-align: left;
}
.swatch-btn.active { border-color: #2dd4bf; background: rgba(20, 184, 166, 0.20); }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid rgba(255, 255, 255, 0.5); }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.poster-card {
  display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.22);
}
.poster-card.active { border-color: #f4ba34; background: rgba(244, 186, 52, 0.14); }
.poster-title { font-size: 11.5px; font-weight: 900; color: #f8fafc; }
.poster-meta { font-size: 10px; color: #94a3b8; }
.poster-tag-free { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 9px; font-weight: 900; background: rgba(34, 197, 94, 0.24); color: #86efac; border: 1px solid #22c55e; margin-left: 4px; }
.poster-tag-pro { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 9px; font-weight: 900; background: rgba(244, 186, 52, 0.24); color: #fde68a; border: 1px solid #f4ba34; margin-left: 4px; }
@media (min-width: 581px) and (max-width: 1050px) and (min-height: 460px) {
  .design-bar { left: calc(50% + 36px); bottom: 12px; width: calc(100vw - 104px); }
}
@media (max-width: 580px) {
  .design-bar { bottom: 64px; width: 96vw; padding: 7px 8px; }
}
@media (max-height: 459px) and (orientation: landscape) {
  .design-bar { bottom: 60px; padding: 5px 8px; width: min(680px, 94vw); }
}

/* v5.5: Live Club Event Banner, Milestones, Challenges, Staff Certifications & Clear Affordability Feedback */
.btn-unaffordable { opacity: 0.72; filter: saturate(0.65); }
.event-widget {
  padding: 7px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; line-height: 1.3;
  background: rgba(16, 28, 46, 0.95); border: 1.5px solid #38bdf8; color: #e0f2fe;
}
.challenge-card {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px;
  background: rgba(14, 165, 233, 0.10); border: 1.5px solid rgba(56, 189, 248, 0.45);
}
.challenge-bar {
  width: 100%; height: 8px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 3px;
}
.challenge-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #38bdf8, #4ade80);
  transition: width 0.25s ease;
}
.milestone-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.milestone-row.done { border-color: #22c55e; background: rgba(34, 197, 94, 0.12); }
.milestone-row.claimable { border-color: #f4ba34; background: rgba(244, 186, 52, 0.16); }
.cert-badge {
  display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 9.5px; font-weight: 900;
  background: rgba(56, 189, 248, 0.22); color: #7dd3fc; border: 1px solid #38bdf8; margin-left: 4px;
}

/* v5.6: Live 3D City Health Inspector Top Banner, Corporate Contract SLA Widget & Real Artist Poster Thumbnails */
.inspector-banner {
  position: fixed; top: var(--hud-h, 74px); left: 50%; transform: translateX(-50%); z-index: 36;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap;
  max-width: min(760px, calc(100vw - 380px)); padding: 6px 12px; border-radius: 12px;
  background: linear-gradient(170deg, rgba(16, 26, 44, 0.96), rgba(9, 14, 24, 0.98));
  border: 1.5px solid #f4ba34; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}
.insp-left { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; min-width: 0; }
.insp-title { font-size: 10.5px; font-weight: 900; letter-spacing: 0.35px; color: #fde68a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insp-mood-pill {
  padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; white-space: nowrap; flex-shrink: 0;
  background: rgba(34, 197, 94, 0.20); border: 1px solid #22c55e; color: #86efac;
}
.insp-mood-pill.warn { background: rgba(245, 158, 11, 0.22); border-color: #f59e0b; color: #fde68a; }
.insp-mood-pill.danger { background: rgba(239, 68, 68, 0.24); border-color: #ef4444; color: #fca5a5; }
.insp-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.contract-widget {
  padding: 8px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; line-height: 1.3;
  background: rgba(15, 25, 42, 0.95); border: 1.5px solid #d6a84e; color: #fef3c7;
}
.contract-widget.sla-risk { border-color: #ef4444; background: rgba(48, 16, 20, 0.95); color: #fecaca; }
.poster-card-row { display: flex; align-items: flex-start; gap: 8px; }
.poster-thumb {
  width: 46px; height: 61px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
  border: 1.5px solid rgba(244, 186, 52, 0.55); background: #0f172a;
}
.poster-thumb-fallback {
  width: 46px; height: 61px; border-radius: 6px; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; font-size: 18px;
  border: 1.5px solid rgba(148, 163, 184, 0.40);
}
@media (min-width: 581px) and (max-width: 1050px) and (min-height: 460px) {
  .inspector-banner {
    top: calc(var(--hud-h, 74px) + var(--cam-h, 60px)); right: 10px; left: auto; bottom: auto; transform: none;
    max-width: calc(100vw - 266px); padding: 5px 8px; gap: 5px; flex-wrap: wrap;
  }
  .insp-left { flex-wrap: wrap; }
  .insp-title { font-size: 9.5px; white-space: normal; }
  .insp-mood-pill { font-size: 9px; padding: 1px 6px; }
  .insp-actions .mini-pill-btn { padding: 3px 6px; font-size: 9px; }
}
@media (max-width: 580px) {
  body.tour-mode #joystick-zone { bottom: 186px; left: 14px; }
  /* Dock right of #joystick-zone and above #goal-bar so zero overlap on 390x844 & 344x882! */
  .inspector-banner { left: 116px; right: 8px; transform: none; max-width: none; top: auto; bottom: 114px; padding: 5px 7px; gap: 4px; flex-wrap: wrap; }
  body.design-mode-active .inspector-banner { left: 8px; right: 8px; top: calc(var(--hud-h, 88px) + var(--cam-h, 82px)); bottom: auto; }
  body.design-mode-active #left-stack { display: none !important; }
  .insp-title { font-size: 9.5px; white-space: normal; }
  .insp-mood-pill { font-size: 9px; padding: 1px 6px; }
  .insp-actions .mini-pill-btn { padding: 3px 6px; font-size: 9px; }
}
@media (max-height: 459px) and (orientation: landscape) {
  .inspector-banner { left: 50%; right: auto; transform: translateX(-50%); top: calc(var(--hud-h, 52px) + var(--cam-h, 30px)); bottom: auto; max-width: min(440px, calc(100vw - 320px)); padding: 4px 8px; }
  body.design-mode-active #left-stack { display: none !important; }
}

/* v5.9: Manual Pause Control, Inner Menu Exclamation Badges, Furnish Sub-Tabs, Crowded Nudge, Coach & Manager Scorecard */
.cam-pause { border-color: rgba(245, 158, 11, 0.65) !important; color: #fde68a !important; }
.cam-pause.paused { background: linear-gradient(135deg, #16a34a, #15803d) !important; color: #ffffff !important; border-color: #86efac !important; }
.paused-banner {
  position: fixed; top: var(--hud-h, 74px); left: 50%; transform: translateX(-50%); z-index: 38;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 14px; border-radius: 12px; max-width: min(560px, 92vw);
  background: linear-gradient(170deg, rgba(24, 34, 54, 0.97), rgba(11, 16, 28, 0.98));
  border: 1.5px solid #f59e0b; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65); pointer-events: auto;
}
.paused-left { display: flex; flex-direction: column; gap: 1px; }
.paused-title { font-size: 11.5px; font-weight: 900; color: #fde68a; letter-spacing: 0.4px; }
.paused-sub { font-size: 10px; color: #cbd5e1; }
.crowded-widget {
  padding: 7px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; line-height: 1.3;
  background: rgba(54, 24, 16, 0.95); border: 1.5px solid #f97316; color: #ffedd5;
}
.tab-btn { position: relative; }
.tab-alert-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 5px; border-radius: 999px;
  background: #ef4444; color: #ffffff; font-size: 10px; font-weight: 900; line-height: 1;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.75); vertical-align: middle;
}
.inline-alert-pill {
  display: inline-flex; align-items: center; padding: 1px 7px; margin-left: 6px; border-radius: 999px;
  background: rgba(239, 68, 68, 0.22); border: 1px solid #ef4444; color: #fecaca;
  font-size: 9.5px; font-weight: 900; letter-spacing: 0.3px; vertical-align: middle;
}
.subtab-bar {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; padding: 6px; border-radius: 11px;
  background: rgba(15, 23, 42, 0.78); border: 1px solid rgba(148, 163, 184, 0.22);
}
.subtab-btn {
  flex: 1 1 auto; padding: 7px 10px; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1; font-size: 11px; font-weight: 800; transition: all 0.15s ease;
}
.subtab-btn.active {
  background: linear-gradient(135deg, rgba(214, 168, 78, 0.28), rgba(245, 158, 11, 0.20));
  border-color: #f4ba34; color: #fef3c7;
}
.subtab-pane { display: none; }
.subtab-pane.active { display: block; }
.coach-promo-card { border-color: rgba(244, 186, 52, 0.48) !important; background: rgba(30, 26, 16, 0.45) !important; }
.coach-finding {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.24);
}
.coach-finding.high { border-color: rgba(239, 68, 68, 0.55); background: rgba(127, 29, 29, 0.18); }
.coach-finding.med { border-color: rgba(245, 158, 11, 0.55); background: rgba(120, 53, 15, 0.16); }
.coach-finding.good { border-color: rgba(34, 197, 94, 0.50); background: rgba(20, 83, 45, 0.16); }
.mgr-eval-box {
  margin-top: 6px; padding: 7px 9px; border-radius: 8px; font-size: 10.5px; line-height: 1.38;
  background: rgba(14, 24, 42, 0.85); border: 1px solid rgba(56, 189, 248, 0.35); color: #e2e8f0;
}
.mgr-eval-box.poor { border-color: rgba(239, 68, 68, 0.60); background: rgba(69, 18, 22, 0.65); color: #fecaca; }
.mgr-grade-pill {
  display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 900; margin-right: 6px;
  background: rgba(34, 197, 94, 0.24); color: #86efac; border: 1px solid #22c55e;
}
.mgr-grade-pill.warn { background: rgba(245, 158, 11, 0.24); color: #fde68a; border-color: #f59e0b; }
.mgr-grade-pill.bad { background: rgba(239, 68, 68, 0.26); color: #fca5a5; border-color: #ef4444; }
.shift-board-card { border-color: rgba(56, 189, 248, 0.40) !important; background: rgba(12, 24, 42, 0.55) !important; }
body.game-paused .inspector-banner { top: calc(var(--hud-h, 74px) + 54px); }
@media (min-width: 581px) and (max-width: 1050px) and (min-height: 460px) {
  .paused-banner { top: calc(var(--hud-h, 74px) + var(--cam-h, 60px)); left: auto; right: 10px; transform: none; max-width: calc(100vw - 266px); padding: 5px 10px; }
  body.game-paused .inspector-banner { top: calc(var(--hud-h, 74px) + var(--cam-h, 60px) + 56px); }
}
@media (max-height: 459px) and (orientation: landscape) {
  .paused-banner { top: calc(var(--hud-h, 52px) + var(--cam-h, 30px)); padding: 4px 10px; max-width: min(440px, calc(100vw - 320px)); }
  body.game-paused .inspector-banner { top: calc(var(--hud-h, 52px) + var(--cam-h, 30px) + 46px); }
}
@media (max-width: 580px) {
  .paused-banner { top: auto; bottom: 114px; left: 116px; right: 8px; transform: none; max-width: none; padding: 5px 8px; }
  body.game-paused .inspector-banner { top: auto; bottom: 170px; }
  body.design-mode-active .paused-banner { left: 8px; right: 8px; top: calc(var(--hud-h, 88px) + var(--cam-h, 82px)); bottom: auto; }
  body.design-mode-active.game-paused .inspector-banner { top: calc(var(--hud-h, 88px) + var(--cam-h, 82px) + 56px); bottom: auto; }
}

/* v5.12: Clickable Stat Info Popover, Maintenance Close, Visual Option Grids, Jumping Recommendations, Adaptive Preview Overlay, Compact Roster & Uniform Studio */
.stat-info-btn {
  cursor: pointer; font-family: inherit; transition: border-color 0.16s, background 0.16s, transform 0.12s;
}
.stat-info-btn:hover {
  border-color: rgba(244, 186, 52, 0.70); background: rgba(30, 41, 59, 0.94); transform: translateY(-1px);
}
.stat-info-btn.active-pop {
  border-color: #f4ba34; background: rgba(244, 186, 52, 0.22); color: #fef3c7;
}
.stat-info-popover {
  position: fixed; top: var(--hud-h, 74px); right: 12px; z-index: 54; width: min(320px, calc(100vw - 20px));
  padding: 11px 13px; border-radius: 13px; pointer-events: auto;
  background: linear-gradient(170deg, rgba(16, 23, 38, 0.98), rgba(9, 13, 24, 0.98));
  border: 1.5px solid rgba(244, 186, 52, 0.65); box-shadow: 0 16px 38px rgba(0, 0, 0, 0.68);
}
.stat-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.stat-pop-title { font-size: 13px; font-weight: 900; color: #fde68a; }
.stat-pop-val { font-size: 12px; font-weight: 800; color: #4ade80; margin-bottom: 5px; }
.stat-pop-val.warn { color: #fbbf24; }
.stat-pop-val.danger { color: #f87171; }
.stat-pop-desc { font-size: 11.5px; color: #e2e8f0; line-height: 1.4; margin-bottom: 6px; }
.stat-pop-tips {
  font-size: 10.5px; color: #cbd5e1; line-height: 1.38; padding: 6px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(148, 163, 184, 0.20); margin-bottom: 8px;
}
.stat-pop-actions { display: flex; justify-content: flex-end; gap: 6px; }

.cam-maint { border-color: rgba(251, 146, 60, 0.62) !important; color: #fed7aa !important; }
.cam-maint.active {
  background: linear-gradient(135deg, #ea580c, #c2410c) !important;
  color: #ffffff !important; border-color: #fdba74 !important;
  box-shadow: 0 0 12px rgba(234, 88, 12, 0.55);
}
.maint-widget {
  padding: 7px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; line-height: 1.3;
  background: rgba(67, 26, 10, 0.96); border: 1.5px solid #fb923c; color: #ffedd5;
}

/* 2-Column Visual Option Grids for Space & Wings and Furnishings */
.opt-grid-2 {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px;
}
@media (max-width: 560px) {
  .opt-grid-2 { grid-template-columns: 1fr; }
}
.opt-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  padding: 9px 10px; border-radius: 11px; text-align: left;
  background: rgba(15, 23, 42, 0.74); border: 1.5px solid rgba(148, 163, 184, 0.28);
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease;
}
.opt-card:hover { border-color: rgba(244, 186, 52, 0.55); background: rgba(23, 35, 58, 0.88); }
.opt-card.opt-applied {
  border-color: rgba(34, 197, 94, 0.65); background: rgba(16, 48, 34, 0.42);
}
.opt-card.just-applied {
  border-color: #22c55e !important; background: rgba(22, 101, 52, 0.55) !important;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.45), 0 8px 22px rgba(34, 197, 94, 0.35);
}
.opt-card.opt-done {
  opacity: 0.84; background: rgba(15, 23, 42, 0.52); border-color: rgba(148, 163, 184, 0.22);
}
.opt-card.rec-jump {
  border: 2px solid #fef08a !important;
  background: linear-gradient(155deg, rgba(113, 63, 18, 0.52), rgba(30, 27, 16, 0.85)) !important;
  animation: signLeaseJump 1.45s ease-in-out infinite;
  z-index: 2;
}
.subtab-btn.rec-glow {
  border-color: #facc15 !important; color: #fef08a !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}
.opt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.opt-title { font-size: 12px; font-weight: 900; color: #f8fafc; line-height: 1.25; }
.opt-badge {
  display: inline-block; padding: 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 900;
  white-space: nowrap; flex-shrink: 0;
}
.opt-badge.rec { background: #facc15; color: #0f172a; }
.opt-badge.applied { background: rgba(34, 197, 94, 0.25); border: 1px solid #22c55e; color: #86efac; }
.opt-badge.locked { background: rgba(100, 116, 139, 0.28); color: #cbd5e1; }
.opt-badge.price { background: rgba(244, 186, 52, 0.20); border: 1px solid rgba(244, 186, 52, 0.55); color: #fde68a; }
.opt-desc { font-size: 10.5px; color: #cbd5e1; line-height: 1.34; }
.opt-benefit { font-size: 10px; font-weight: 800; color: #7dd3fc; }
.opt-footer { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.opt-footer .btn { padding: 5px 8px; font-size: 10.5px; flex: 1 1 auto; }
.opt-undo-btn {
  padding: 4px 7px !important; font-size: 9.5px !important; font-weight: 800 !important;
  background: rgba(148, 163, 184, 0.14) !important; border: 1px solid rgba(148, 163, 184, 0.35) !important;
  color: #cbd5e1 !important;
}
.opt-undo-btn:hover { background: rgba(245, 158, 11, 0.22) !important; border-color: #f59e0b !important; color: #fde68a !important; }
.completed-drawer {
  margin-top: 10px; padding: 7px 9px; border-radius: 10px;
  background: rgba(15, 23, 42, 0.62); border: 1px solid rgba(148, 163, 184, 0.26);
}
.completed-drawer summary {
  cursor: pointer; font-size: 11px; font-weight: 800; color: #94a3b8; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.completed-drawer summary::after { content: '▾'; font-size: 12px; color: #cbd5e1; }
.completed-drawer[open] summary::after { content: '▴'; }
.completed-drawer[open] summary { color: #86efac; }

/* Adaptive Live Visual Preview & Confirm Panel (Side on Desktop/Unfolded >= 680px, Bottom on Mobile < 680px!) */
.visual-preview-panel {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 56;
  width: 312px; max-height: 88vh; overflow-y: auto; padding: 12px 13px; border-radius: 15px;
  background: linear-gradient(170deg, rgba(16, 24, 40, 0.98), rgba(8, 12, 22, 0.99));
  border: 2px solid #f4ba34; box-shadow: 0 20px 54px rgba(0, 0, 0, 0.78); pointer-events: auto;
}
.visual-preview-panel.vp-confirmed {
  border-color: #22c55e; box-shadow: 0 20px 54px rgba(22, 163, 74, 0.35);
}
@media (min-width: 680px) {
  body.preview-open .modal-backdrop { padding-right: 336px; justify-content: center; }
  body.preview-open .modal-card { max-width: calc(100vw - 360px); }
}
@media (max-width: 679px) {
  .visual-preview-panel {
    left: 8px; right: 8px; top: auto; bottom: 8px; transform: none;
    width: auto; max-height: 54vh; padding: 10px 11px; border-radius: 14px;
  }
  body.preview-open .modal-backdrop { align-items: flex-start; padding-top: 8px; padding-bottom: 50vh; }
  body.preview-open .modal-card { max-height: 44vh; }
}
.vp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.vp-head-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vp-badge {
  padding: 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 900;
  background: rgba(244, 186, 52, 0.22); border: 1px solid #f4ba34; color: #fde68a; flex-shrink: 0;
}
.vp-badge.applied { background: rgba(34, 197, 94, 0.24); border-color: #22c55e; color: #86efac; }
.vp-title { margin: 0; font-size: 13px; font-weight: 900; color: #f8fafc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-canvas-box {
  position: relative; width: 100%; border-radius: 10px; overflow: hidden; margin-bottom: 8px;
  background: #0b1220; border: 1px solid rgba(148, 163, 184, 0.28);
  display: flex; align-items: center; justify-content: center; min-height: 144px;
}
#preview-canvas { display: block; width: 100%; height: auto; max-height: 162px; }
.vp-poster-img { max-height: 158px; max-width: 100%; object-fit: contain; padding: 4px; border-radius: 8px; }
.vp-desc { font-size: 11px; color: #cbd5e1; line-height: 1.38; margin-bottom: 7px; }
.vp-stats {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px;
}
.vp-stat-chip {
  padding: 3px 7px; border-radius: 7px; font-size: 10px; font-weight: 800;
  background: rgba(30, 41, 59, 0.85); border: 1px solid rgba(148, 163, 184, 0.30); color: #e2e8f0;
}
.vp-stat-chip.good { border-color: rgba(34, 197, 94, 0.55); color: #86efac; background: rgba(20, 83, 45, 0.35); }
.vp-stat-chip.gold { border-color: rgba(244, 186, 52, 0.55); color: #fde68a; background: rgba(113, 63, 18, 0.35); }
.vp-actions { display: flex; flex-direction: column; gap: 6px; }
.vp-sub-actions { display: flex; gap: 6px; }
.vp-sub-actions .btn { flex: 1; padding: 6px 8px; font-size: 10.5px; }

.peek-return-bar {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); z-index: 55;
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(10, 16, 28, 0.98));
  border: 2px solid #22c55e; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.72); pointer-events: auto;
  max-width: 94vw;
}
@media (max-width: 580px) { .peek-return-bar { bottom: 76px; } }
.peek-label { font-size: 11.5px; font-weight: 800; color: #bbf7d0; }

/* Compact, Scannable Roster & Evaluations Cards (Larger Portrait & Name, Subtle Fire, 4 History Percentages) */
.roster-head-row { display: flex; align-items: center; gap: 10px; }
.roster-identity { flex: 1; min-width: 0; }
.roster-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.roster-name-lg { font-size: 15.5px; font-weight: 900; color: #f8fafc; letter-spacing: 0.2px; }
.roster-role-sub { font-size: 11px; font-weight: 700; color: #94a3b8; }
.roster-history-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 7px;
}
@media (max-width: 460px) {
  .roster-history-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.hist-chip {
  padding: 4px 6px; border-radius: 7px; font-size: 10px; font-weight: 800; text-align: center;
  background: rgba(15, 23, 42, 0.75); border: 1px solid rgba(148, 163, 184, 0.24); color: #cbd5e1;
}
.hist-chip.good { border-color: rgba(34, 197, 94, 0.45); color: #86efac; background: rgba(20, 83, 45, 0.24); }
.hist-chip.warn { border-color: rgba(245, 158, 11, 0.50); color: #fde68a; background: rgba(120, 53, 15, 0.24); }
.hist-chip.bad  { border-color: rgba(239, 68, 68, 0.50); color: #fca5a5; background: rgba(127, 29, 29, 0.24); }
.hist-chip.blue { border-color: rgba(56, 189, 248, 0.45); color: #7dd3fc; background: rgba(12, 74, 110, 0.24); }
.roster-actions-compact {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; align-items: center;
}
.roster-actions-compact .btn {
  padding: 4px 8px !important; font-size: 10px !important; border-radius: 7px !important; font-weight: 800 !important;
}
.btn-fire-subtle {
  background: transparent !important; border: 1px solid rgba(148, 163, 184, 0.34) !important;
  color: #94a3b8 !important; box-shadow: none !important; margin-left: auto;
}
.btn-fire-subtle:hover {
  border-color: rgba(248, 113, 113, 0.65) !important; color: #fca5a5 !important; background: rgba(127, 29, 29, 0.25) !important;
}
.btn-fire-subtle.urgent-fire {
  border-color: rgba(248, 113, 113, 0.72) !important; color: #fecaca !important; background: rgba(153, 27, 27, 0.42) !important;
}

/* Live Interactive 3D Uniform Preview Studio */
.uniform-studio-layout {
  display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 12px; align-items: start;
}
@media (max-width: 640px) {
  .uniform-studio-layout { grid-template-columns: 1fr; }
}
.uniform-preview-box {
  display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px;
  background: rgba(10, 16, 28, 0.85); border: 1px solid rgba(244, 186, 52, 0.36);
}
.uni-role-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.uni-role-tabs .shift-pill { padding: 3px 6px; font-size: 9.5px; }
.uni-canvas-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: radial-gradient(circle at 50% 35%, #1e293b, #0b1120);
  border: 1px solid rgba(148, 163, 184, 0.22); padding: 4px;
}
#uniform-preview-canvas { display: block; width: 100%; max-width: 210px; height: auto; }
.uni-flip-btn { position: absolute; right: 6px; bottom: 6px; padding: 3px 7px !important; font-size: 9.5px !important; }
.uni-caption { text-align: center; font-size: 10px; font-weight: 800; color: #fde68a; }
.uniform-controls-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.uniform-studio-layout .uniform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.uniform-studio-layout .uniform-grid label { min-width: 0; }
.uniform-studio-layout .text-input-sm,
.uniform-studio-layout .select-input { width: 100%; min-width: 0; box-sizing: border-box; }
.uni-family-box {
  padding: 8px 9px; border-radius: 10px; background: rgba(15, 23, 42, 0.70);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.uni-family-title { font-size: 10.5px; font-weight: 900; color: #cbd5e1; margin-bottom: 6px; }
.uni-shades-list { display: flex; flex-direction: column; gap: 5px; }
.uni-shade-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10.5px; font-weight: 700; color: #e2e8f0; }
.uni-shade-pills { display: flex; gap: 4px; }
.uni-swatch-chip {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.22);
  cursor: pointer; transition: transform 0.12s, border-color 0.12s;
}
.uni-swatch-chip.active { border-color: #fde047; transform: scale(1.12); box-shadow: 0 0 8px rgba(250, 204, 21, 0.65); }

/* v5.13: Real 3D Studio Staff Portraits, Compact Role-Explicit Hire Buttons & Instant Hover Explanation Tooltips */
.roster-avatar {
  width: 54px; height: 54px; border-radius: 12px; flex-shrink: 0; overflow: hidden;
  border: 1.5px solid rgba(244, 186, 52, 0.58); background: radial-gradient(circle at 50% 35%, #1e293b, #090e1a);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.roster-avatar img, .roster-avatar svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hire-role-head { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
.hire-avatar {
  width: 48px; height: 48px; border-radius: 11px; flex-shrink: 0; overflow: hidden;
  border: 1.5px solid rgba(244, 186, 52, 0.48); background: radial-gradient(circle at 50% 35%, #1e293b, #090e1a);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.40);
}
.hire-avatar img, .hire-avatar svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.btn-hire-compact {
  padding: 5px 10px !important; font-size: 10.5px !important; font-weight: 800 !important;
  border-radius: 8px !important; white-space: nowrap !important; line-height: 1.2 !important;
  flex: 0 0 auto !important; align-self: center;
}
@media (max-width: 560px) {
  .role-card-top { flex-wrap: wrap; }
  .role-card-top .row-btns { width: 100%; justify-content: flex-end; margin-top: 6px; }
}
.uni-canvas-wrap { cursor: grab; user-select: none; touch-action: none; }
.uni-canvas-wrap.dragging { cursor: grabbing; }
.ui-tooltip {
  position: fixed; z-index: 95; pointer-events: none; max-width: min(272px, calc(100vw - 20px));
  padding: 7px 10px; border-radius: 9px; font-size: 11px; font-weight: 600; line-height: 1.38;
  color: #f1f5f9; background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(8, 13, 24, 0.98));
  border: 1px solid rgba(244, 186, 52, 0.65); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.72);
  transition: opacity 0.12s ease;
}
/* v5.14: Game Speed Toggle, Quick Audio Toggle & Screen-Reader / AEO Accessibility Class */
.cam-speed { border-color: rgba(56, 189, 248, 0.55) !important; color: #e0f2fe !important; }
.cam-speed.fast { background: linear-gradient(135deg, rgba(14, 165, 233, 0.36), rgba(37, 99, 235, 0.42)) !important; border-color: #38bdf8 !important; color: #ffffff !important; }
.cam-audio { border-color: rgba(168, 85, 247, 0.45) !important; color: #f3e8ff !important; }
.cam-audio.muted { opacity: 0.72; border-color: rgba(148, 163, 184, 0.35) !important; color: #94a3b8 !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* v5.15: Option-Level Clickable Exclamations & Auto-Clearing Live Evaluation Panels */
.inline-alert-pill.alert-clickable {
  cursor: pointer; font-family: inherit; transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  gap: 4px; padding: 2px 8px;
}
.inline-alert-pill.alert-clickable:hover {
  transform: translateY(-1px); background: rgba(239, 68, 68, 0.34); box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}
.inline-alert-pill.alert-clickable.open {
  background: rgba(239, 68, 68, 0.38); box-shadow: 0 0 0 1.5px rgba(254, 202, 202, 0.55);
}
.inline-alert-pill.warn-pill {
  background: rgba(245, 158, 11, 0.22); border-color: #f59e0b; color: #fde68a;
}
.inline-alert-pill.warn-pill:hover, .inline-alert-pill.warn-pill.open {
  background: rgba(245, 158, 11, 0.36); box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}
.inline-alert-pill.good-pill {
  background: rgba(34, 197, 94, 0.22); border-color: #22c55e; color: #bbf7d0;
}
.inline-alert-pill.good-pill:hover, .inline-alert-pill.good-pill.open {
  background: rgba(34, 197, 94, 0.36); box-shadow: 0 0 10px rgba(34, 197, 94, 0.45);
}
.inline-alert-pill.tip-pill {
  background: rgba(244, 186, 52, 0.20); border-color: #f4ba34; color: #fef08a;
}
.inline-alert-pill.tip-pill:hover, .inline-alert-pill.tip-pill.open {
  background: rgba(244, 186, 52, 0.34); box-shadow: 0 0 10px rgba(244, 186, 52, 0.45);
}
.alert-header-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 7px 10px; margin-bottom: 8px; border-radius: 10px;
  background: rgba(127, 29, 29, 0.34); border: 1.5px solid rgba(239, 68, 68, 0.65);
}
.alert-strip-title { font-size: 11px; font-weight: 900; color: #fecaca; }
.shift-alert-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; margin-bottom: 4px; padding: 7px 10px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.34), rgba(120, 53, 15, 0.28));
  border: 1.5px solid rgba(245, 158, 11, 0.62); color: #fef3c7; font-size: 11px; line-height: 1.35;
}
.shift-alert-banner.sev-danger {
  border-color: rgba(239, 68, 68, 0.72); background: linear-gradient(135deg, rgba(127, 29, 29, 0.42), rgba(69, 10, 10, 0.38));
}
.shift-alert-banner-msg { flex: 1 1 180px; min-width: 0; font-weight: 700; }
.shift-alert-banner-msg strong { color: #fde68a; font-weight: 900; }
.shift-alert-banner .btn-alert-mini {
  padding: 4px 9px; border-radius: 7px; border: 1px solid rgba(254, 240, 138, 0.55);
  background: rgba(245, 158, 11, 0.24); color: #fef9c3; font-size: 10px; font-weight: 900;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.shift-alert-banner .btn-alert-mini:hover { background: rgba(245, 158, 11, 0.40); }
.opt-alert-btn {
  display: inline-flex; align-items: center; gap: 3px; padding: 1.5px 6px 1.5px 3.5px; border-radius: 999px;
  cursor: pointer; font-family: inherit; font-size: 9.5px; font-weight: 900; line-height: 1.15;
  background: rgba(239, 68, 68, 0.22); border: 1.5px solid #ef4444; color: #fecaca;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease; vertical-align: middle;
}
.opt-alert-btn:hover, .opt-alert-btn.open {
  transform: translateY(-1px); background: rgba(239, 68, 68, 0.36); box-shadow: 0 0 10px rgba(239, 68, 68, 0.52);
}
.opt-alert-btn.sev-warn {
  background: rgba(245, 158, 11, 0.22); border-color: #f59e0b; color: #fde68a;
}
.opt-alert-btn.sev-warn:hover, .opt-alert-btn.sev-warn.open {
  background: rgba(245, 158, 11, 0.36); box-shadow: 0 0 10px rgba(245, 158, 11, 0.48);
}
.opt-alert-btn.sev-good {
  background: rgba(34, 197, 94, 0.20); border-color: #22c55e; color: #bbf7d0;
}
.opt-alert-btn.sev-good:hover, .opt-alert-btn.sev-good.open {
  background: rgba(34, 197, 94, 0.35); box-shadow: 0 0 10px rgba(34, 197, 94, 0.48);
}
.opt-alert-bang {
  display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
  border-radius: 999px; background: #ef4444; color: #ffffff; font-size: 10px; font-weight: 900;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.75); flex-shrink: 0;
}
.opt-alert-btn.sev-warn .opt-alert-bang { background: #f59e0b; color: #0f172a; box-shadow: 0 0 6px rgba(245, 158, 11, 0.75); }
.opt-alert-btn.sev-good .opt-alert-bang { background: #22c55e; color: #052e16; box-shadow: 0 0 6px rgba(34, 197, 94, 0.75); }
.opt-alert-chev { font-size: 9px; opacity: 0.88; }
.meta-chip.alert-chip-btn {
  cursor: pointer; font-family: inherit; transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.meta-chip.alert-chip-btn:hover { transform: translateY(-1px); box-shadow: 0 0 8px rgba(239, 68, 68, 0.45); }
.role-card.has-alert-danger, .staff-row.has-alert-danger, .milestone-row.has-alert-danger {
  border-color: rgba(239, 68, 68, 0.62) !important; box-shadow: inset 3px 0 0 #ef4444;
}
.role-card.has-alert-warn, .staff-row.has-alert-warn, .milestone-row.has-alert-warn {
  border-color: rgba(245, 158, 11, 0.58) !important; box-shadow: inset 3px 0 0 #f59e0b;
}
.staff-row.has-alert-col { flex-direction: column; align-items: stretch; gap: 6px; }
.staff-row-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
@media (max-width: 560px) {
  .staff-row-main { flex-wrap: wrap; }
  .staff-row-main .row-btns { width: 100%; justify-content: flex-end; }
}
.eval-slot { margin-top: 6px; margin-bottom: 8px; }
.eval-note-box {
  margin-top: 8px; padding: 9px 11px; border-radius: 10px; text-align: left;
  background: linear-gradient(165deg, rgba(22, 32, 52, 0.96), rgba(11, 16, 28, 0.98));
  border: 1.5px solid rgba(239, 68, 68, 0.60); border-left: 4px solid #ef4444;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42); font-size: 11px; line-height: 1.42; color: #e2e8f0;
}
.eval-note-box.sev-warn {
  border-color: rgba(245, 158, 11, 0.58); border-left-color: #f59e0b;
}
.eval-note-box.sev-good {
  border-color: rgba(34, 197, 94, 0.55); border-left-color: #22c55e;
}
.eval-note-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px;
}
.eval-note-title { font-size: 11.5px; font-weight: 900; color: #fecaca; }
.eval-note-box.sev-warn .eval-note-title { color: #fde68a; }
.eval-note-box.sev-good .eval-note-title { color: #bbf7d0; }
.eval-note-close {
  background: rgba(148, 163, 184, 0.16); border: 1px solid rgba(148, 163, 184, 0.34); color: #cbd5e1;
  border-radius: 6px; padding: 1px 6px; font-size: 10px; font-weight: 800; cursor: pointer; flex-shrink: 0; font-family: inherit;
}
.eval-note-close:hover { background: rgba(239, 68, 68, 0.25); color: #ffffff; border-color: #ef4444; }
.eval-note-row { margin-top: 4px; color: #dbeafe; }
.eval-note-row strong { color: #f8fafc; font-weight: 800; }
.eval-note-row.impact strong { color: #fca5a5; }
.eval-note-box.sev-warn .eval-note-row.impact strong { color: #fcd34d; }
.eval-note-box.sev-good .eval-note-row.impact strong { color: #86efac; }
.eval-note-row.fix strong { color: #4ade80; }
.eval-note-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.eval-note-actions .btn { padding: 5px 10px !important; font-size: 10.5px !important; }
@media (max-width: 460px) {
  .eval-note-box { padding: 8px 9px; font-size: 10.5px; }
  .shift-alert-banner { padding: 6px 8px; font-size: 10.5px; }
}

/* v5.16: Color-Coded Machine Status, Compact Staff Filters, Independent Uniform Picker, Daily Streak Grid & Rep Feedback */
.compact-filters { gap: 4px !important; margin-top: 4px !important; margin-bottom: 6px !important; }
.compact-filters .shift-pill { padding: 4px 8px !important; font-size: 10px !important; }
.staff-row.mach-top { border: 1.5px solid rgba(34, 197, 94, 0.55); background: rgba(20, 83, 45, 0.22); }
.staff-row.mach-upgrade { border: 1.5px solid rgba(56, 189, 248, 0.55); background: rgba(12, 74, 110, 0.20); }
.staff-row.mach-worn { border: 1.5px solid rgba(245, 158, 11, 0.65); background: rgba(120, 53, 15, 0.24); }
.staff-row.mach-broken { border: 1.5px solid rgba(239, 68, 68, 0.72); background: rgba(127, 29, 29, 0.28); }
.staff-row.mach-buy-avail { border: 1.5px solid rgba(244, 186, 52, 0.45); background: rgba(120, 53, 15, 0.14); }
.staff-row.mach-buy-locked { border: 1px dashed rgba(148, 163, 184, 0.35); background: rgba(15, 23, 42, 0.45); opacity: 0.84; }
.leg-chip.blue { background: rgba(56, 189, 248, 0.20); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.45); }
.uni-custom-role-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px;
}
.uni-custom-role-row label {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: #e2e8f0;
}
.uni-custom-role-row .btn { padding: 5px 9px !important; font-size: 10.5px !important; }
.rep-feedback-banner {
  margin-top: 5px; padding: 5px 8px; border-radius: 7px; font-size: 10.5px; font-weight: 800; line-height: 1.35;
  background: rgba(245, 158, 11, 0.16); border: 1px solid rgba(245, 158, 11, 0.55); color: #fde68a;
}
.rep-feedback-banner.good { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.55); color: #bbf7d0; }
.rep-feedback-banner.danger { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.60); color: #fecaca; }
.daily-streak-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 6px;
}
.streak-day-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 6px 3px; border-radius: 8px; text-align: center;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.24);
}
.streak-day-cell.claimed { background: rgba(34, 197, 94, 0.16); border-color: #22c55e; color: #bbf7d0; }
.streak-day-cell.today { background: rgba(244, 186, 52, 0.22); border-color: #f4ba34; box-shadow: 0 0 10px rgba(244, 186, 52, 0.35); color: #fef08a; }
.streak-day-num { font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.3px; opacity: 0.85; }
.streak-day-amt { font-size: 10.5px; font-weight: 900; color: #f8fafc; }
.streak-day-cell.today .streak-day-amt { color: #fde047; }
.energy-mini-bar { width: 100%; height: 5px; border-radius: 99px; background: rgba(255,255,255,0.12); overflow: hidden; margin-top: 3px; }
.energy-mini-fill { height: 100%; border-radius: 99px; transition: width 0.25s ease; }
@media (max-width: 560px) {
  .daily-streak-grid { grid-template-columns: repeat(4, 1fr); }
}
.bp-preview-notice {
  margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; font-size: 11px; line-height: 1.4;
  background: rgba(245, 158, 11, 0.14); border: 1.5px solid rgba(245, 158, 11, 0.55); color: #fef3c7;
}
.bp-preview-notice strong { color: #fde047; }
.bp-buy-btn.btn-coral {
  background: linear-gradient(135deg, #be123c 0%, #f43f5e 52%, #e11d48 100%) !important;
  color: #fff1f2 !important;
  border: 2px solid #fda4af !important;
  animation: none !important;
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.35) !important;
}
.bp-buy-btn.btn-coral:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.50), 0 12px 28px rgba(225, 29, 72, 0.65) !important;
}
.bp-buy-btn.btn-coral::after { display: none; }
@media (max-width: 520px) {
  .bp-overlay { padding: 8px; }
  .bp-shell { padding: 10px 12px 12px; }
  .bp-prop-tabs { grid-template-columns: 1fr; }
}

/* Persistent Crucial Alerts Dropdown (Never auto-vanishes while hovering; stays until fixed or clicked off!) */
.alert-center-widget {
  width: 100%; border-radius: 11px; overflow: hidden;
  background: rgba(12, 19, 34, 0.96); border: 1.5px solid rgba(245, 158, 11, 0.72);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
  pointer-events: auto;
}
.alert-center-widget.has-danger { border-color: rgba(239, 68, 68, 0.85); }
.ac-header {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 8px; background: rgba(245, 158, 11, 0.16);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}
.alert-center-widget.has-danger .ac-header {
  background: rgba(220, 38, 38, 0.22); border-bottom-color: rgba(239, 68, 68, 0.32);
}
.ac-toggle-btn {
  background: none; border: none; color: #fef08a; font-size: 11px; font-weight: 900;
  letter-spacing: 0.4px; cursor: pointer; padding: 2px 4px; text-align: left; flex: 1;
}
.alert-center-widget.has-danger .ac-toggle-btn { color: #fecaca; }
.ac-clear-btn {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.22);
  color: #cbd5e1; font-size: 9.5px; font-weight: 800; border-radius: 6px; padding: 2px 6px; cursor: pointer;
}
.ac-clear-btn:hover { background: rgba(255, 255, 255, 0.18); color: #ffffff; }
.ac-list { display: flex; flex-direction: column; gap: 5px; padding: 6px; }
.ac-dropdown { max-height: min(38vh, 250px); overflow-y: auto; border-top: 1px solid rgba(148, 163, 184, 0.2); }
.ac-item {
  border-radius: 8px; padding: 6px 8px; font-size: 10.5px; line-height: 1.32;
  background: rgba(30, 41, 59, 0.78); border: 1px solid rgba(148, 163, 184, 0.26); color: #e2e8f0;
}
.ac-item.danger { background: rgba(127, 29, 29, 0.42); border-color: rgba(248, 113, 113, 0.55); color: #fee2e2; }
.ac-item.warn { background: rgba(120, 53, 15, 0.40); border-color: rgba(251, 191, 36, 0.52); color: #fef3c7; }
.ac-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.ac-item-title { font-weight: 900; font-size: 11px; color: #ffffff; }
.ac-item.warn .ac-item-title { color: #fde047; }
.ac-item.danger .ac-item-title { color: #fca5a5; }
.ac-item-body { margin-top: 2px; font-size: 10px; opacity: 0.94; }
.ac-item-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ac-dismiss {
  flex-shrink: 0; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1; border-radius: 5px; padding: 1px 5px; font-size: 9.5px; font-weight: 900; cursor: pointer;
}
.ac-dismiss:hover { background: rgba(239, 68, 68, 0.45); color: #ffffff; }
@media (max-width: 580px) {
  .toast {
    top: auto; bottom: 112px; left: 118px; right: 8px;
    transform: none; max-width: none; padding: 7px 10px; font-size: 11px;
  }
  .ac-header { padding: 4px 5px; gap: 3px; }
  .ac-toggle-btn { font-size: 9.5px; }
  .ac-clear-btn { font-size: 8.5px; padding: 1px 4px; }
  .ac-list { padding: 4px; gap: 4px; }
  .ac-item { padding: 5px 6px; font-size: 9.5px; }
  .ac-item-title { font-size: 9.5px; }
  .ac-item-body { font-size: 9px; }
}
@media (min-width: 581px) and (max-width: 1050px) and (min-height: 460px) {
  .toast {
    top: calc(var(--hud-h, 74px) + var(--cam-h, 64px) + 6px);
    left: auto; right: 10px; transform: none;
    max-width: calc(100vw - 266px); padding: 7px 12px; font-size: 11.5px;
  }
}

/* v5.18 Top-HUD Multi-Property Switcher Dropdown, Cross-Training Badge & Top Roster Evaluations */
.city-switcher-btn {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 8px; cursor: pointer; font-family: inherit;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(214, 168, 78, 0.45);
  color: #ffffff; max-width: 240px; transition: background 0.16s, border-color 0.16s, transform 0.14s;
}
.city-switcher-btn:hover, .city-switcher-btn.open {
  background: rgba(214, 168, 78, 0.22); border-color: #fde68a; transform: translateY(-1px);
}
#city-display-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-chev { font-size: 11px; color: #fde68a; flex-shrink: 0; }
.city-alert-dot {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 16px; height: 16px; border-radius: 999px; font-size: 10.5px; font-weight: 900;
  background: #ef4444; color: #ffffff; box-shadow: 0 0 10px rgba(239, 68, 68, 0.85);
  animation: pulseDot 1.35s ease-in-out infinite;
}
.city-alert-dot.warn-only { background: #f59e0b; color: #0f172a; box-shadow: 0 0 10px rgba(245, 158, 11, 0.85); }
.city-switcher-popover {
  position: fixed; top: var(--hud-h, 74px); left: 50%; transform: translateX(-50%);
  z-index: 56; width: min(440px, calc(100vw - 16px)); max-height: min(68vh, 500px);
  display: flex; flex-direction: column; padding: 11px 12px; border-radius: 14px;
  background: linear-gradient(170deg, rgba(16, 23, 38, 0.985), rgba(9, 13, 24, 0.99));
  border: 1.5px solid rgba(244, 186, 52, 0.68); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.78);
  pointer-events: auto;
}
.city-sw-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.city-sw-title { font-size: 13px; font-weight: 900; color: #fde68a; }
.city-sw-summary { font-size: 10.5px; color: #cbd5e1; margin-bottom: 8px; line-height: 1.32; }
.city-sw-list {
  display: flex; flex-direction: column; gap: 7px; overflow-y: auto; padding-right: 2px; flex: 1 1 auto;
}
.city-sw-row {
  border-radius: 11px; padding: 8px 10px;
  background: rgba(30, 41, 59, 0.74); border: 1.5px solid rgba(148, 163, 184, 0.28);
  display: flex; flex-direction: column; gap: 5px;
}
.city-sw-row.active {
  border-color: rgba(56, 189, 248, 0.78); background: rgba(14, 116, 144, 0.22);
}
.city-sw-row.has-danger { border-color: rgba(239, 68, 68, 0.72); box-shadow: inset 3px 0 0 #ef4444; }
.city-sw-row.has-warn { border-color: rgba(245, 158, 11, 0.68); box-shadow: inset 3px 0 0 #f59e0b; }
.city-sw-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.city-sw-name { font-size: 12px; font-weight: 900; color: #f8fafc; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.city-sw-meta { font-size: 10.5px; color: #cbd5e1; line-height: 1.35; }
.city-sw-alerts { display: flex; flex-wrap: wrap; gap: 4px; }
.city-sw-alert-pill {
  font-size: 9.5px; font-weight: 800; padding: 2px 6px; border-radius: 999px;
  background: rgba(245, 158, 11, 0.22); border: 1px solid rgba(245, 158, 11, 0.65); color: #fde68a;
}
.city-sw-alert-pill.danger {
  background: rgba(239, 68, 68, 0.26); border-color: #ef4444; color: #fecaca;
}
.city-sw-foot {
  display: flex; justify-content: flex-end; gap: 6px; margin-top: 9px; padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.eval-top-slot {
  display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px;
  padding: 6px; border-radius: 11px;
  background: rgba(15, 23, 42, 0.72); border: 1.5px solid rgba(244, 186, 52, 0.48);
}
.cert-badge.cross-badge {
  background: rgba(56, 189, 248, 0.22); border-color: #38bdf8; color: #bae6fd;
}
.attitude-chip {
  font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 999px;
  background: rgba(34, 197, 94, 0.18); border: 1px solid rgba(34, 197, 94, 0.5); color: #86efac;
}
.attitude-chip.mid { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.5); color: #fde68a; }
.attitude-chip.low { background: rgba(239, 68, 68, 0.22); border-color: rgba(239, 68, 68, 0.55); color: #fca5a5; }
@media (max-width: 580px) {
  .city-switcher-btn { max-width: 155px; padding: 1.5px 6px; font-size: 11px; }
  .city-switcher-popover { max-height: 62vh; padding: 9px 10px; }
}
