:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --ok: #22c55e;
  --error: #f87171;
  --border: rgba(148, 163, 184, 0.18);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: linear-gradient(180deg, #020617, #0f172a 30%, #0b1120); color: var(--text); font-family: Inter, system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
body { min-height: 100vh; }
.app-shell { width: 100%; max-width: 540px; margin: 0 auto; min-height: 100vh; padding-bottom: 90px; }
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); background: rgba(2, 6, 23, 0.9); padding: 16px 16px 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.topbar h1 { margin: 2px 0 0; font-size: 1.4rem; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.topbar-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.content { padding: 16px; }
.card, .hero-card { background: rgba(17, 24, 39, 0.92); border: 1px solid var(--border); border-radius: 24px; padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-grid { display: grid; gap: 14px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.stat-card strong { font-size: 1.4rem; margin-top: 6px; display: block; }
.label, .muted { color: var(--muted); }
.section-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.section-head h3, .card h3, .hero-card h2 { margin: 0 0 8px; }
.list-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.list-row:first-of-type { border-top: 0; padding-top: 0; }
.stack-form { display: grid; gap: 12px; }
.compact-grid { grid-template-columns: 1fr 1fr; }
.compact-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 0.92rem; }
input, textarea, select, button { width: 100%; border-radius: 16px; border: 1px solid var(--border); padding: 12px 14px; font: inherit; }
input, textarea, select { background: rgba(15, 23, 42, 0.9); color: var(--text); }
button { background: linear-gradient(135deg, #2563eb, #38bdf8); color: white; font-weight: 700; border: 0; cursor: pointer; }
.ghost-btn, .pill, .chip { border-radius: 999px; padding: 8px 12px; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.18); color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.danger-btn { background: rgba(248, 113, 113, 0.15); border: 1px solid rgba(248, 113, 113, 0.3); color: white; }
.actions-inline { display: flex; flex-direction: column; gap: 8px; min-width: 92px; }
.quick-links-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.hero-card { width: 100%; }
.flash-stack { display: grid; gap: 8px; margin-bottom: 14px; }
.flash { padding: 12px 14px; border-radius: 16px; }
.flash.success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.25); }
.flash.error { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.25); }
.bottom-nav { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(100% - 20px, 520px); background: rgba(15, 23, 42, 0.96); border: 1px solid var(--border); border-radius: 24px; display: grid; grid-template-columns: repeat(6, 1fr); padding: 10px 6px; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.bottom-nav a { color: var(--text); font-size: 0.78rem; text-align: center; padding: 8px 4px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.gallery img { border-radius: 16px; aspect-ratio: 1/1; object-fit: cover; }
.preserve-linebreaks { white-space: pre-wrap; }
.timeline-item { display: grid; grid-template-columns: 88px 1fr; gap: 12px; margin-bottom: 12px; }
.timeline-date { color: var(--muted); font-size: 0.84rem; padding-top: 8px; }
.timeline-card { background: rgba(31, 41, 55, 0.7); border: 1px solid var(--border); border-radius: 18px; padding: 12px; }
.transport .timeline-card { border-style: dashed; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.top-gap { margin-top: 10px; }
#map { height: 380px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); }
@media (max-width: 480px) {
  .compact-grid, .card-grid.two { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .topbar-actions { align-items: flex-start; }
  .actions-inline { min-width: 0; }
}

.media-row { align-items: flex-start; }
.media-copy { flex: 1; min-width: 0; }
.thumb-image { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.hero-image { width: 100%; max-height: 260px; object-fit: cover; border-radius: 20px; margin-bottom: 14px; border: 1px solid var(--border); }
.vertical-row { flex-direction: column; }
.city-hero .section-head { align-items: flex-start; }


.mode-toggle-form { width: 100%; }
.ios-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.ios-switch input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.ios-slider { position: relative; width: 50px; height: 30px; border-radius: 999px; background: rgba(148,163,184,0.35); border: 1px solid rgba(148,163,184,0.2); transition: background 0.2s ease; flex-shrink: 0; }
.ios-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3); transition: transform 0.2s ease; }
.ios-switch input[type="checkbox"]:checked + .ios-slider { background: #34c759; }
.ios-switch input[type="checkbox"]:checked + .ios-slider::after { transform: translateX(20px); }
.ios-switch-label { color: var(--text); font-size: 0.9rem; }
