@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;700&family=Manrope:wght@400;600;700;800&display=swap");

:root {
  --ink:        #e8edf2;
  --ink-dim:    #9aabb8;
  --muted:      #5a6e80;
  --line:       #1e2d3d;
  --line-soft:  #253447;
  --panel:      #0f1923;
  --panel-2:    #131f2b;
  --panel-3:    #192736;
  --bg:         #080e14;
  --brand:      #00c896;
  --brand-dim:  #009e78;
  --warn:       #ff4455;
  --warn-dim:   #cc2233;
  --bus:        #f59e0b;
  --train:      #3b82f6;
  --boat:       #06b6d4;
  --plane:      #a78bfa;
  --accent-1:   #00c896;
  --accent-2:   #3b82f6;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  margin: 0;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--bg);
  user-select: none;
  -webkit-user-select: none;
}

html, body, .app, svg, .map-panel, .map-panel * { -webkit-user-drag: none; }

.app {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 10px;
}

/* ── Panels ───────────────────────────────────────────────── */
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px;
}

/* Hide all detail panels by default; only show the one with the active class */
.detail-panel { 
  display: none; 
}
.detail-panel.mobile-active { 
  display: block; 
}

h2 {
  margin: 0 0 10px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, #0a1828, #0d1f30, #0a1520); border-color: var(--line-soft); }
.hero h1 {
  margin: 2px 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-family: "Chakra Petch", sans-serif;
  background: linear-gradient(90deg, #00c896, #3b82f6, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.04em;
}
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--brand);
  font-weight: 700;
}
.lead { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }

/* ── Stats ────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent-2));
  border-radius: 99px 99px 0 0;
}
.stat span { text-transform: uppercase; color: var(--muted); font-size: 0.65rem; letter-spacing: 0.08em; }
.stat strong { font-size: 1.1rem; font-family: "Chakra Petch", sans-serif; color: var(--ink); }

/* ── Time Bar ─────────────────────────────────────────────── */
.time-bar-wrap { display: grid; gap: 3px; margin-bottom: 8px; }
.time-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-dim);
  font-family: "Chakra Petch", sans-serif;
  letter-spacing: 0.06em;
}
.time-bar-track {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.time-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--accent-2));
  transition: width 0.25s linear, background 0.5s ease;
  box-shadow: 0 0 8px rgba(0,200,150,0.4);
}
.time-bar-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  color: var(--muted);
}
.time-bar-ends span:nth-child(2) {
  font-weight: 800;
  font-family: "Chakra Petch", sans-serif;
  color: var(--ink);
}

/* ── Controls ─────────────────────────────────────────────── */
.controls { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.mobile-tip { display: none; }
.mobile-drawer-nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr)); /* 7 columns for your 7 tabs */
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 0;
  background: rgba(8, 14, 20, 0.94);
  backdrop-filter: blur(8px);
}

/* ── Legend ───────────────────────────────────────────────── */
.legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}
.legend-item { display: flex; align-items: center; gap: 5px; }

/* ── Buttons ──────────────────────────────────────────────── */
label { display: grid; gap: 4px; font-size: 0.88rem; color: var(--ink-dim); }
select {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  background: var(--panel-2);
  color: var(--ink);
}
button {
  border: 0;
  border-radius: 8px;
  padding: 7px 13px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s, box-shadow 0.12s;
  letter-spacing: 0.02em;
}
button:active { transform: scale(0.96); }
button.secondary {
  border: 1px solid var(--line-soft);
  background: var(--panel-3);
  color: var(--ink-dim);
}
button.secondary:hover:not(:disabled) {
  background: var(--line-soft);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--brand);
}
button.danger { border: 1px solid #3d1420; background: #1a0810; color: #ff6677; }
button.danger:hover:not(:disabled) { background: #2a1018; }
button:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Map ──────────────────────────────────────────────────── */
#map {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #060d14;
  touch-action: none;
  display: block;
}

/* ── SVG Map Elements ─────────────────────────────────────── */
.land { fill: #1a2632; stroke: #243444; stroke-width: 0.6; }
.country-fill { cursor: pointer; }
.country-fill.country-hover { fill: rgba(0,200,150,0.12) !important; }
.country-border { fill: none; stroke: rgba(100,140,180,0.2); stroke-width: 0.35; pointer-events: none; }

.city-node { cursor: pointer; transition: fill 0.3s, stroke 0.3s; }
.city-node.route-selected { stroke: #f59e0b !important; stroke-width: 2 !important; }
.city-node:hover { filter: brightness(1.3); }
.city-label {
  font-size: 2px;
  fill: #b0c8dc;
  font-weight: 700;
  pointer-events: none;
  transition: opacity 0.25s;
  text-shadow: 0 1px 2px #000;
}

.route-line { stroke: #2a4a6a; stroke-width: 0.9; opacity: 0.9; fill: none; }
.route-line:hover { stroke: #4a8aaa; stroke-width: 1.6; opacity: 1; cursor: pointer; }
.route-line.route-train { stroke: #3b82f6; }
.route-line.route-plane { stroke: #a78bfa; stroke-dasharray: 4 2; }
.route-line.route-boat { stroke: #06b6d4; stroke-width: 1.1; stroke-dasharray: 3 1.8; opacity: 0.9; }
.route-line.route-boat:hover { stroke-width: 2; opacity: 1; }
.route-line.route-detour { stroke-dasharray: 2.5 1.4; opacity: 0.82; }
.ghost-line {
  stroke: var(--brand);
  stroke-width: 1.0;
  stroke-dasharray: 2.5 1.5;
  opacity: 0.7;
  stroke-linecap: round;
}

/* ── Vehicles ─────────────────────────────────────────────── */
.vehicle-group {
  filter: drop-shadow(0 0 1.5px rgba(0,0,0,0.9));
  transition: filter 0.12s;
}
.vehicle-group:hover {
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.7));
  cursor: pointer;
}
.vehicle-badge {
  font-family: "Chakra Petch", monospace;
  dominant-baseline: central;
}

/* ── Stack & Route List ───────────────────────────────────── */
.stack { display: grid; gap: 8px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.route {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--panel-2);
  display: grid;
  gap: 5px;
}
.route strong { color: var(--ink); }

/* ── City Grid ────────────────────────────────────────────── */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 7px;
}
.city-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  background: var(--panel-2);
  display: grid;
  gap: 3px;
}
.city-card strong { color: var(--ink); font-size: 0.88rem; }
.capacity-bar-wrap {
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin: 3px 0;
}
.capacity-bar { height: 100%; border-radius: 99px; transition: width 0.4s, background 0.4s; }
.over { color: var(--warn); font-weight: 700; }

/* ── Country Panel ────────────────────────────────────────── */
.country-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  background: var(--panel-2);
  gap: 8px;
  flex-wrap: wrap;
}
.country-row strong { color: var(--ink); }

/* ── Log ──────────────────────────────────────────────────── */
.log {
  min-height: 80px;
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--line-soft) transparent;
}
.log p { margin: 0 0 5px; font-size: 0.82rem; line-height: 1.45; color: var(--ink-dim); }
.log p:first-child { color: var(--ink); }
.meta { color: var(--muted); margin: 0; font-size: 0.83rem; }
input[type="text"], input[type="color"] { user-select: text; }
input[type="text"] {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 7px 10px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
}
input[type="text"]:focus { outline: 1px solid var(--brand); border-color: var(--brand); }

/* ── Modals ───────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,8,14,0.75);
  display: grid;
  place-items: center;
  z-index: 20;
  backdrop-filter: blur(4px);
}
.modal-card {
  width: min(94vw, 480px);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel);
  padding: 20px;
  display: grid;
  gap: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px var(--line);
}
.modal-card h2 { margin: 0; font-family: "Chakra Petch", sans-serif; font-size: 1.2rem; color: var(--ink); }
.overlay[hidden] { display: none; }

/* ── Overflow Banner ──────────────────────────────────────── */
.overflow-banner {
  border: 1px solid var(--warn-dim);
  color: var(--warn);
  background: linear-gradient(90deg, #1a0508, #200810);
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  animation: pulse-warn 0.9s infinite;
}
@keyframes pulse-warn {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,68,85,0); }
  50%      { opacity: 0.85; box-shadow: 0 0 12px 2px rgba(255,68,85,0.3); }
}

/* ── Events Bar ───────────────────────────────────────────── */
.events-bar { display: flex; flex-wrap: wrap; gap: 7px; }
.event-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #2a3a20;
  background: #0d1810;
  border-radius: 8px;
  padding: 6px 10px;
  flex: 1;
  min-width: 180px;
}
.event-pill-title { font-size: 0.77rem; font-weight: 700; color: #7ec87e; white-space: nowrap; flex-shrink: 0; }
.event-pill-bar-wrap { flex: 1; height: 4px; background: #1a2a18; border-radius: 99px; overflow: hidden; }
.event-pill-bar { height: 100%; border-radius: 99px; transition: width 0.5s linear; }
.event-pill-time { font-size: 0.74rem; font-weight: 800; font-family: "Chakra Petch", sans-serif; color: #7ec87e; white-space: nowrap; flex-shrink: 0; }

/* ── Station Tier Badge ───────────────────────────────────── */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #0d1f38;
  color: #60a5fa;
  border: 1px solid #1e3a5f;
}

/* ── Event Modal ──────────────────────────────────────────── */
.event-flavor { font-size: 0.9rem; color: var(--ink-dim); line-height: 1.55; padding: 4px 0; }
.event-stakes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.event-stake { border-radius: 8px; padding: 9px 10px; display: grid; gap: 3px; font-size: 0.82rem; }
.event-stake span { font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.event-stake strong { font-size: 0.95rem; font-family: "Chakra Petch", sans-serif; }
.event-stake em { font-style: normal; font-size: 0.72rem; color: var(--muted); }
.event-stake.win { background: #071510; border: 1px solid #164430; }
.event-stake.win span { color: #4ade80; }
.event-stake.lose { background: #130a08; border: 1px solid #3d1a10; }
.event-stake.lose span { color: #f87171; }
.event-tag { background: #1a1500 !important; border-color: #3d3000 !important; color: #fbbf24 !important; font-size: 0.73rem !important; }

/* ── Toasts ───────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column-reverse; gap: 7px;
  z-index: 100; pointer-events: none;
}
.toast {
  padding: 10px 16px; border-radius: 10px; font-size: 0.85rem; font-weight: 700;
  max-width: 320px; box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  opacity: 0; transform: translateX(24px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.toast.toast-show { opacity: 1; transform: translateX(0); }
.toast.toast-success { background: #071510; border: 1px solid #166534; color: #4ade80; }
.toast.toast-fail    { background: #130608; border: 1px solid #7f1d1d; color: #f87171; }
.toast.toast-info    { background: #080f1f; border: 1px solid #1e3a5f; color: #60a5fa; }

/* ── Live Modal ───────────────────────────────────────────── */
.live-stat-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.87rem; }
.live-stat-row span { color: var(--muted); }
.live-stat-row strong { color: var(--ink); }
.live-bar-wrap { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 2px 0 6px; }
.live-bar { height: 100%; border-radius: 99px; transition: width 0.3s ease, background 0.3s ease; }
.live-dest-grid { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.live-dest {
  font-size: 0.76rem;
  background: var(--panel-3);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--ink-dim);
}
#route-modal-sub { display: grid; gap: 7px; }

/* ── Game Over ────────────────────────────────────────────── */
.gameover-overlay { background: rgba(2,4,8,0.9); }
.gameover-card {
  text-align: center; gap: 16px; max-width: 420px;
  border: 1px solid var(--warn-dim);
  box-shadow: 0 0 60px rgba(255,68,85,0.25), 0 20px 60px rgba(0,0,0,0.7);
  animation: go-in 0.45s cubic-bezier(0.34,1.56,0.64,1);
  background: #0a0508;
}
@keyframes go-in { from { transform: scale(0.75) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.gameover-icon { font-size: 3rem; line-height: 1; animation: go-shake 0.5s 0.35s ease both; }
@keyframes go-shake { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-10deg)} 75%{transform:rotate(10deg)} }
.gameover-title { font-family: "Chakra Petch", sans-serif; font-size: 2rem; margin: 0; color: var(--warn); letter-spacing: 0.08em; }
.gameover-reason { color: var(--muted); font-size: 0.9rem; margin: 0; }
.gameover-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; width: 100%; }
.go-stat { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel-2); display: flex; flex-direction: column; gap: 2px; text-align: left; }
.go-stat span { font-size: 0.68rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
.go-stat strong { font-size: 1rem; font-family: "Chakra Petch", sans-serif; color: var(--ink); }
.gameover-btn { width: 100%; padding: 11px; font-size: 0.95rem; border: 1px solid var(--warn-dim); background: #1a0508; color: var(--warn); }
.gameover-btn:hover { background: #220810; }

/* ── City Unlock Notification ─────────────────────────────── */
.city-unlock-notif {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: linear-gradient(135deg, #071510, #0a1f18);
  border: 1px solid var(--brand);
  color: var(--brand);
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.92rem;
  font-family: "Chakra Petch", sans-serif;
  z-index: 200;
  box-shadow: 0 0 20px rgba(0,200,150,0.3);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.4s;
  opacity: 0;
  pointer-events: none;
}
.city-unlock-notif.notif-show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── Fare Tier ─────────────────────────────────────────────── */
.fare-tier-panel { display: flex; gap: 8px; flex-wrap: wrap; }
.fare-btn {
  flex: 1;
  min-width: 140px;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  font-size: 0.88rem !important;
  border: 1px solid var(--line) !important;
  background: var(--panel-2) !important;
  color: var(--ink-dim) !important;
  transition: border-color 0.15s, background 0.15s !important;
}
.fare-btn:hover:not(:disabled) { border-color: var(--brand) !important; background: var(--panel-3) !important; color: var(--ink) !important; }
.fare-btn.fare-active { border-color: var(--brand) !important; background: #071510 !important; color: var(--brand) !important; box-shadow: 0 0 0 1px var(--brand); }
.fare-note { font-size: 0.72rem; font-weight: 400; color: var(--muted); }

/* ── Stats Panel ──────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 10px; }
.stat-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.stat-card-label { font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.stat-card-value { font-size: 1.1rem; font-family: "Chakra Petch", sans-serif; color: var(--ink); font-weight: 700; }
.stat-highlight {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  margin-bottom: 7px;
  display: grid;
  gap: 2px;
}
.stat-highlight.warn { border-color: #3d1a10; background: #130a08; }
.stat-highlight.ok { border-color: #164430; background: #071510; }
.stat-hl-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.stat-highlight strong { color: var(--ink); font-size: 0.9rem; }
.stats-route-table { display: grid; gap: 4px; margin-top: 8px; }
.stats-route-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.82rem;
}
.stats-route-row span:first-child { color: var(--ink); }

/* ── Achievements ─────────────────────────────────────────── */
.ach-summary { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; font-weight: 700; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 7px; }
.ach-card {
  border-radius: 9px;
  padding: 10px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  text-align: center;
}
.ach-unlocked { background: linear-gradient(135deg, #071510, #0a1f18); border-color: #164430; }
.ach-locked   { background: var(--panel-2); opacity: 0.45; }
.ach-icon { font-size: 1.5rem; line-height: 1; }
.ach-name { font-size: 0.78rem; font-weight: 700; color: var(--ink); }
.ach-desc { font-size: 0.68rem; color: var(--muted); line-height: 1.3; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 850px) {
  body { -webkit-tap-highlight-color: transparent; }
  .app { max-width: none; padding: 10px; gap: 8px; }
  .desktop-tip { display: none; }
  .mobile-tip { display: block; }
  .mobile-drawer-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 6px 0;
    background: rgba(8,14,20,0.94);
    backdrop-filter: blur(8px);
  }
  .mobile-drawer-nav button {
    min-height: 38px;
    padding: 6px 4px;
    font-size: 0.72rem;
  }
  .mobile-drawer-nav button.mobile-active {
    color: var(--ink);
    border-color: var(--brand);
    box-shadow: 0 0 0 1px rgba(0,200,150,0.35);
  }
  .map-panel { order: -1; }
  .stats, .events-bar, .overflow-banner, .mobile-drawer-nav { order: -2; }
  .panel { border-radius: 10px; padding: 10px; }
  .hero h1 { font-size: 1.45rem; }
  .lead { font-size: 0.8rem; line-height: 1.4; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { min-height: 62px; padding: 9px 10px; }
  .controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }
  button, select, input[type="text"], input[type="color"] {
    min-height: 42px;
    font-size: 0.9rem;
  }
  #map {
    height: min(68vh, 560px);
    min-height: 360px;
  }
  .legend { gap: 8px; font-size: 0.72rem; }
  .events-bar { display: grid; grid-template-columns: 1fr; }
  .event-pill {
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }
  .event-pill-title {
    white-space: normal;
    line-height: 1.25;
  }
  .event-stakes { grid-template-columns: 1fr; }
  .modal-card {
    width: min(94vw, 520px);
    max-height: 88vh;
    overflow: auto;
    padding: 16px;
  }
  .toast-container {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  .toast { max-width: none; }
  .city-grid { grid-template-columns: 1fr 1fr; }
  .fare-tier-panel { display: grid; grid-template-columns: 1fr; }
  .stats-route-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
@media (max-width: 500px) {
  .app { padding: 8px; }
  .hero { display: none; }
  .city-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat strong { font-size: 0.95rem; }
  .map-panel { padding: 8px; }
  #map {
    min-height: 390px;
    height: 66vh;
    border-radius: 9px;
  }
  .mobile-drawer-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .controls button {
    min-height: 36px;
    padding: 5px 4px;
    font-size: 0.68rem;
  }
  .controls button:last-child { grid-column: 1 / -1; }
  .time-bar-ends { font-size: 0.6rem; }
  .legend { display: grid; grid-template-columns: repeat(2, 1fr); }
  .route, .country-row, .city-card { padding: 9px; }
  .row-actions { display: grid; grid-template-columns: 1fr; }
  .gameover-stats { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   SPLASH SCREEN
══════════════════════════════════════════════════════════════ */
.splash-screen {
  position: fixed;
  inset: 0;
  background: #04080e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  animation: splash-fade 3.6s ease forwards;
  pointer-events: none;
}
@keyframes splash-fade {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}
.splash-logo {
  width: min(280px, 55vw);
  filter: drop-shadow(0 0 40px rgba(0,200,150,0.35));
  animation: splash-logo-scale 3.6s ease forwards;
}
@keyframes splash-logo-scale {
  0%   { transform: scale(0.82); }
  25%  { transform: scale(1.0); }
  100% { transform: scale(1.04); }
}
.splash-tagline {
  margin-top: 16px;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #00c896;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0;
  animation: splash-tag-fade 3.6s ease forwards;
}
@keyframes splash-tag-fade {
  0%,18% { opacity: 0; transform: translateY(6px); }
  35%     { opacity: 1; transform: translateY(0); }
  70%     { opacity: 1; }
  100%    { opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   TITLE / MENU SCREEN
══════════════════════════════════════════════════════════════ */
.title-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.title-screen.visible { opacity: 1; }
.title-screen[hidden] { display: none !important; }

.title-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.title-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
}

.title-logo-wrap {
  margin-bottom: 4px;
}
.title-logo {
  width: min(160px, 30vw);
  filter: drop-shadow(0 0 30px rgba(0,200,150,0.4)) drop-shadow(0 4px 20px rgba(0,0,0,0.8));
  animation: title-logo-float 4s ease-in-out infinite;
}
@keyframes title-logo-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.title-game-name {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #ffffff 0%, #00c896 45%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 20px rgba(0,200,150,0.4));
  line-height: 1;
}
.title-subtitle {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(0.75rem, 2.5vw, 1rem);
  letter-spacing: 0.5em;
  color: #00c896;
  text-transform: uppercase;
  opacity: 0.8;
}

.title-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(300px, 85vw);
  margin-top: 20px;
}

.title-btn {
  border: 0;
  border-radius: 10px;
  padding: 13px 24px;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  background: rgba(15,25,40,0.85);
  border: 1px solid rgba(0,200,150,0.25);
  color: #c8dde8;
  backdrop-filter: blur(12px);
  transition: background 0.18s, border-color 0.18s, transform 0.12s, color 0.18s;
  width: 100%;
}
.title-btn:hover {
  background: rgba(0,200,150,0.15);
  border-color: #00c896;
  color: #fff;
  transform: translateY(-2px);
}
.title-btn:active { transform: translateY(0); }
.title-btn-primary {
  background: linear-gradient(135deg, rgba(0,200,150,0.25), rgba(59,130,246,0.2));
  border-color: #00c896;
  color: #fff;
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  box-shadow: 0 0 30px rgba(0,200,150,0.2);
}
.title-btn-primary:hover {
  background: linear-gradient(135deg, rgba(0,200,150,0.4), rgba(59,130,246,0.3));
  box-shadow: 0 0 40px rgba(0,200,150,0.35);
}

.title-version {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(150,170,190,0.45);
  letter-spacing: 0.08em;
  margin-top: 8px;
}

/* Demo route lines on title screen */
.title-route { stroke: #1a3a5a; stroke-width: 1.2; fill: none; opacity: 0.8; }
.title-route-plane { stroke: #a78bfa; stroke-dasharray: 4 2; opacity: 0.7; }
.title-route-boat  { stroke: #06b6d4; stroke-dasharray: 3 2; opacity: 0.7; }
.title-city { fill: #00c896; stroke: #003d2e; stroke-width: 0.5; }
.title-city-capital { fill: #fff; stroke: #00c896; stroke-width: 0.8; }
.title-vehicle { opacity: 0.9; }

/* ══════════════════════════════════════════════════════════════
   SETTINGS MODAL
══════════════════════════════════════════════════════════════ */
.settings-card { max-width: 420px; }
.settings-section {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.settings-label {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.settings-toggle-row { display: flex; gap: 8px; }
.theme-btn {
  flex: 1;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  background: var(--panel-3);
  color: var(--ink-dim);
  transition: all 0.15s;
}
.theme-btn:hover { border-color: var(--brand); color: var(--ink); }
.theme-btn.theme-active { border-color: var(--brand); background: rgba(0,200,150,0.1); color: var(--brand); }

.feedback-form { display: grid; gap: 8px; }
.feedback-input {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  resize: none;
  min-height: 80px;
  display: block;
}
.feedback-input:focus { outline: 1px solid var(--brand); border-color: var(--brand); }
.feedback-thanks { color: #4ade80; font-weight: 700; font-size: 0.88rem; margin: 0; }

/* ══════════════════════════════════════════════════════════════
   FADE OVERLAY  (transitions between screens)
══════════════════════════════════════════════════════════════ */
.fade-overlay {
  position: fixed;
  inset: 0;
  background: #04080e;
  z-index: 8999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.fade-overlay.fade-in  { opacity: 1; pointer-events: all; }

/* ══════════════════════════════════════════════════════════════
   LIGHT THEME — comprehensive overrides
══════════════════════════════════════════════════════════════ */
body.theme-light {
  --ink:        #0f1f2d;
  --ink-dim:    #3a5268;
  --muted:      #6a7e8e;
  --line:       #c8d8e8;
  --line-soft:  #b8ccdc;
  --panel:      #ffffff;
  --panel-2:    #f0f6fc;
  --panel-3:    #e4f0f8;
  --bg:         #d8ecf8;
  --brand:      #006d77;
  --brand-dim:  #004f56;
  --warn:       #cc0020;
  --warn-dim:   #990018;
  background: #d8ecf8;
}

/* Fix the mobile dark strip — html and body must fill the full viewport */
html, body { min-height: 100%; }
body.theme-light { background: #d8ecf8 !important; }

/* Map */
body.theme-light #map { background: #b8d8f0; }
body.theme-light .land { fill: #c8d8b8; stroke: #9aaa8a; }
body.theme-light .country-fill { fill: rgba(180,200,180,0.3); }
body.theme-light .country-fill.country-hover { fill: rgba(0,109,119,0.18) !important; }
body.theme-light .country-border { stroke: rgba(60,90,110,0.3); }
body.theme-light .route-line { stroke: #4a7a9a; }
body.theme-light .city-label { fill: #0f2c45; }
body.theme-light .ghost-line { stroke: #006d77; }

/* Panels */
body.theme-light .panel { background: #ffffff; border-color: var(--line); }
body.theme-light .stat { background: #f0f6fc; border-color: var(--line); }
body.theme-light .stat strong { color: #0f1f2d; }
body.theme-light .city-card { background: #f8fbff; border-color: var(--line); }
body.theme-light .route { background: #f8fbff; border-color: var(--line); }
body.theme-light .country-row { background: #f8fbff; border-color: var(--line); }
body.theme-light .log { background: #f0f6fc; }
body.theme-light .log p { color: #3a5268; }

/* Buttons */
body.theme-light button.secondary { background: #e8f2fc; border-color: #b8ccdc; color: #1a3a5a; }
body.theme-light button.secondary:hover:not(:disabled) { background: #d0e8f8; }

/* Time bar */
body.theme-light .time-bar-track { background: #c8d8e8; }
body.theme-light .time-bar-label { color: #3a5268; }
body.theme-light .time-bar-ends { color: #6a7e8e; }

/* Events bar */
body.theme-light .event-pill { background: #fffbe8; border-color: #e8d888; }
body.theme-light .event-pill-title { color: #7a6000; }
body.theme-light .event-pill-bar-wrap { background: #e8d888; }
body.theme-light .event-pill-time { color: #7a6000; }

/* Overflow banner */
body.theme-light .overflow-banner { background: #fff0f0; border-color: #e8a0a0; color: #a00020; }

/* Live modal */
body.theme-light .live-dest { background: #f0f6fc; border-color: var(--line); color: #1a3a5a; }
body.theme-light #route-modal-sub { color: #0f1f2d; }
body.theme-light .live-stat-row span { color: var(--muted); }
body.theme-light .live-stat-row strong { color: #0f1f2d; }

/* Modals */
body.theme-light .modal-card { background: #ffffff; border-color: var(--line); }
body.theme-light .overlay { background: rgba(20,40,60,0.45); }

/* Stats panel */
body.theme-light .stat-card { background: #f0f6fc; border-color: var(--line); }
body.theme-light .stat-card-value { color: #0f1f2d; }
body.theme-light .stat-highlight { background: #f0f6fc; border-color: var(--line); }
body.theme-light .stats-route-row { background: #f8fbff; border-color: var(--line); }

/* Achievements */
body.theme-light .ach-card { border-color: var(--line); }
body.theme-light .ach-unlocked { background: #f0fff8; border-color: #a0d8b8; }
body.theme-light .ach-locked { background: #f0f6fc; }
body.theme-light .ach-name { color: #0f1f2d; }

/* Title screen in light mode */
body.theme-light .title-btn { background: rgba(240,248,255,0.9); border-color: rgba(0,109,119,0.3); color: #1a3a5a; }
body.theme-light .title-btn:hover { background: rgba(0,109,119,0.15); border-color: #006d77; color: #003d45; }
body.theme-light .title-subpanel { background: rgba(240,248,255,0.95); border-color: rgba(0,109,119,0.25); }
body.theme-light .settings-section { background: #f0f6fc; border-color: var(--line); }
body.theme-light .settings-label { color: var(--muted); }
body.theme-light .theme-btn { background: #e8f2fc; border-color: var(--line); color: #1a3a5a; }
body.theme-light .feedback-input { background: #f8fbff; border-color: var(--line); color: #0f1f2d; }
body.theme-light .changelog-entry { background: rgba(0,0,0,0.03); border-color: rgba(0,109,119,0.15); }
body.theme-light .changelog-ver { color: #006d77; }
body.theme-light .changelog-list li { color: #3a5268; }

/* Hero */
body.theme-light .hero { background: linear-gradient(135deg, #e0f0ff, #d8ecf8, #d0e8f0); }
body.theme-light .eyebrow { color: #006d77; }
body.theme-light .lead { color: var(--muted); }

/* ── Title sub-panels (Load, Settings, Changelog) ────────────────────────── */
#title-main-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.title-subpanel {
  width: min(420px, 90vw);
  background: rgba(8, 14, 22, 0.92);
  border: 1px solid rgba(0,200,150,0.2);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  gap: 10px;
  backdrop-filter: blur(16px);
  max-height: 80vh;
  overflow-y: auto;
}
.title-subpanel[hidden] { display: none !important; }
.title-subpanel-title {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.15rem;
  color: #00c896;
  margin: 0;
  letter-spacing: 0.06em;
}
.title-subpanel-list {
  display: grid;
  gap: 8px;
}

/* ── Changelog ───────────────────────────────────────────────────────────── */
.changelog-scroll {
  display: grid;
  gap: 12px;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 4px;
}
.changelog-entry {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,200,150,0.12);
  border-radius: 10px;
  padding: 12px 14px;
}
.changelog-ver {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.9rem;
  color: #00c896;
  font-weight: 700;
  margin-bottom: 8px;
}
.changelog-date {
  font-size: 0.75rem;
  color: rgba(150,180,200,0.5);
  font-weight: 400;
  margin-left: 8px;
}
.changelog-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
.changelog-list li {
  font-size: 0.83rem;
  color: rgba(200,220,235,0.8);
  line-height: 1.4;
}

/* ── Title screen — hide game UI flash ──────────────────────────────────── */
/* Game starts invisible; only shown after title screen fades away */
/* .title-screen-active .app — removed, splash z-index covers game UI */

/* ══════════════════════════════════════════════════════════════
   TITLE SCREEN SCROLLING + MOBILE DARK STRIP FIX
══════════════════════════════════════════════════════════════ */

/* Fix mobile dark strip — html/body must cover the full viewport */
html {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
}
body {
  min-height: 100%;
  min-height: 100dvh;
}

/* Title screen is fixed and independently scrollable */
.title-screen {
  overflow-y: auto;
  overscroll-behavior: contain; /* traps scroll inside title, doesn't bleed to game */
  -webkit-overflow-scrolling: touch;
}

/* Title content can grow taller than the viewport on small screens */
.title-content {
  min-height: 100%;
  padding: 24px 16px 40px;
  justify-content: flex-start;  /* allow natural stacking rather than centering when tall */
}

/* On tall enough screens, still centre everything */
@media (min-height: 700px) {
  .title-content { justify-content: center; }
}

/* Sub-panels are also independently scrollable */
.title-subpanel {
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: 85dvh;
}

/* ══════════════════════════════════════════════════════════════
   PAN / ZOOM SLIDERS
══════════════════════════════════════════════════════════════ */
.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.slider-min, .slider-max {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.settings-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}
.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  border: 2px solid var(--panel);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.settings-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  border: 2px solid var(--panel);
}
.slider-val {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand);
  min-width: 2.8ch;
  text-align: right;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════════
   REAL MAP AS TITLE BACKGROUND
══════════════════════════════════════════════════════════════ */

/* When title screen is active, show the map SVG through a portal effect */
/* The map-panel is still hidden (part of .app), but we hoist #map visually */
/* .title-screen-active .app — removed, splash z-index covers game UI */
/* The #map SVG itself is always visible — title screen sits above it */
.title-screen-active #map {
  visibility: visible;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border-radius: 0;
  border: none;
  z-index: 8900;
  /* Force map background to fill — prevents the black strip on mobile light mode */
  background: #060d14 !important;
}
body.theme-light .title-screen-active #map,
body.theme-light.title-screen-active #map {
  background: #0a1828 !important;
}

/* Title screen vignette overlay — sits between the map and the content */
.title-screen::before {
  content: "";
  position: fixed;  /* fixed so it covers viewport even when sub-panels scroll */
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(4,8,16,0.45) 0%, rgba(4,8,16,0.88) 100%);
  z-index: 1;
  pointer-events: none;
}
/* Title content sits above the vignette */
.title-content {
  position: relative;
  z-index: 2;
}

/* Remove old title-map CSS (no longer needed) */
.title-map { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   CHANGELOG DETAILS/SUMMARY
══════════════════════════════════════════════════════════════ */
.changelog-entry {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,200,150,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.changelog-entry summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.changelog-entry summary::-webkit-details-marker { display: none; }
.changelog-entry[open] .changelog-list { margin-top: 8px; }

/* ══════════════════════════════════════════════════════════════
   VEHICLE SCALE (zoom-aware via CSS transform)
══════════════════════════════════════════════════════════════ */
.vehicle-group {
  /* transform-box and transform-origin let JS scale around the vehicle centre */
  transform-box: fill-box;
  transform-origin: center;
}


/* ══════════════════════════════════════════════════════════════
   ACCOUNT / CLOUD SAVE UI
══════════════════════════════════════════════════════════════ */

/* Auth bar on title screen */
.title-auth-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 4px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,200,150,0.15);
  border-radius: 10px;
  width: min(360px, 90vw);
}
.title-auth-name {
  font-size: 0.78rem;
  color: rgba(200,220,235,0.6);
  font-family: "Chakra Petch", sans-serif;
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.title-btn-auth {
  font-size: 0.78rem !important;
  padding: 6px 12px !important;
  flex-shrink: 0;
}
.title-btn-auth-out {
  font-size: 0.78rem !important;
  padding: 6px 12px !important;
  flex-shrink: 0;
  border-color: rgba(255,68,85,0.3) !important;
  color: #ff6677 !important;
}

/* Save/load panel rows */
.save-slot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
}
.save-slot-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.save-slot-info strong {
  font-size: 0.88rem;
  color: var(--ink);
}
.save-slot-info .meta {
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Save notices (auth status banner) */
.save-notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.save-notice-ok {
  border-color: rgba(0,200,150,0.25);
  background: rgba(0,200,150,0.06);
  color: #7dd3b0;
}

/* Netlify Identity modal z-index fix — widget spawns its own overlay */
[data-netlify-identity-button],
.netlify-identity-loginBtn,
#netlify-modal {
  z-index: 10000 !important;
}

.auth-form {
  display: grid;
  gap: 10px;
}
.auth-form input {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  background: var(--panel-2);
  color: var(--ink);
}
.auth-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.auth-mode-row .theme-btn {
  justify-content: center;
}
.auth-error {
  color: #f87171;
  font-size: 0.8rem;
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  width: 100%;
  padding-right: 42px;
}
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-dim);
  display: grid;
  place-items: center;
  font-size: 1rem;
}
.password-toggle:hover,
.password-toggle.password-visible {
  background: var(--panel-3);
  color: var(--ink);
}
