/* Visual system adapted from grasppy-labs/grasppy-capture (GPL-3.0). */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --window-bg: #f1f5f9;
  --card-bg: #ffffff;
  --card-muted: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #f59e0b;
  --accent-soft: #fffbeb;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --failure: #ef4444;
  --failure-soft: #fef2f2;
  --activity-tint: 9%;
  --activity-learning-color: #64748b;
  --activity-language-color: #6366f1;
  --activity-boxing-color: #dc2626;
  --activity-music-color: #d97706;
  --activity-movement-color: #db2777;
  --activity-computer-color: #0891b2;
  --activity-preparation-color: #059669;
  --activity-event-color: #a16207;
}

[data-theme="dark"] {
  color-scheme: dark;
  --window-bg: #0f172a;
  --card-bg: #1e293b;
  --card-muted: #172033;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --border: #334155;
  --border-strong: #475569;
  --primary-hover: #3b82f6;
  --accent-soft: rgba(245, 158, 11, .12);
  --success-soft: rgba(16, 185, 129, .12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, .12);
  --failure: #f87171;
  --failure-soft: rgba(239, 68, 68, .12);
  --activity-tint: 14%;
  --activity-learning-color: #94a3b8;
  --activity-language-color: #a5b4fc;
  --activity-boxing-color: #f87171;
  --activity-music-color: #fbbf24;
  --activity-movement-color: #f472b6;
  --activity-computer-color: #22d3ee;
  --activity-preparation-color: #34d399;
  --activity-event-color: #facc15;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { background: var(--window-bg); color: var(--text-primary); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .32);
  outline-offset: 2px;
}
h1, h2, p { margin: 0; }

.app-shell { min-height: 100vh; background: var(--window-bg); }
.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  min-height: 78px;
  padding: 0 24px;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; min-width: 0; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #fbbf24, #d97706);
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(217, 119, 6, .24);
  font-size: 12px;
  font-weight: 800;
}
.brand-mark::after {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  content: "";
  background: var(--primary);
  border: 3px solid var(--card-bg);
  border-radius: 999px;
}
.brand-copy { min-width: 0; }
.brand-title { overflow: hidden; font-size: 20px; font-weight: 760; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.brand-subtitle { margin-top: 3px; overflow: hidden; color: var(--text-secondary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.app-navigation {
  display: inline-flex;
  padding: 3px;
  justify-self: center;
  gap: 2px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.app-navigation-button {
  min-height: 34px;
  padding: 0 13px;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 720;
}
.app-navigation-button:hover, .app-navigation-button[aria-pressed="true"] {
  color: var(--text-primary);
  background: var(--card-bg);
  box-shadow: 0 3px 8px rgba(15, 23, 42, .08);
}
.header-actions { display: flex; justify-self: end; align-items: center; gap: 8px; }
.local-badge {
  display: inline-flex;
  height: 34px;
  padding: 0 12px;
  align-items: center;
  color: var(--text-secondary);
  background: var(--card-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}
.theme-button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
}
.theme-button:hover { color: var(--text-primary); background: var(--card-muted); border-color: var(--border); }
.primary, .secondary {
  display: inline-flex;
  min-height: 42px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 720;
}
.primary { color: #fff; background: var(--primary); border: 1px solid var(--primary); box-shadow: 0 7px 16px rgba(37, 99, 235, .2); }
.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.secondary { color: var(--text-primary); background: var(--card-bg); border: 1px solid var(--border-strong); }
.secondary:hover { background: var(--card-muted); }

.app-content { width: min(1500px, 100%); margin-inline: auto; padding: 22px 24px 42px; }
.section-heading { display: flex; margin: 22px 0 10px; align-items: center; justify-content: space-between; gap: 12px; }
.first-heading { margin-top: 0; }
.section-title { color: var(--text-secondary); font-size: 11px; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.section-meta { color: var(--text-secondary); font-size: 11px; }

.week-control-card {
  display: flex;
  min-height: 76px;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .035);
}
.week-switcher, .filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-switcher > div { min-width: 190px; text-align: center; }
.week-switcher span { display: block; margin-bottom: 3px; color: var(--text-secondary); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.week-switcher strong { display: block; font-size: 14px; }
.filter {
  min-height: 36px;
  padding: 0 13px;
  color: var(--text-secondary);
  background: var(--card-muted);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}
.filter[aria-pressed="true"] { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 5px 12px rgba(37, 99, 235, .18); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pulse-card {
  min-width: 0;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .035);
}
.pulse-card strong { display: block; font-size: 28px; font-weight: 760; letter-spacing: -.035em; }
.pulse-card span { display: block; margin-top: 5px; color: var(--text-secondary); font-size: 11px; line-height: 1.35; }
.action-panel {
  display: grid;
  min-height: 78px;
  margin-top: 12px;
  padding: 15px 16px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  background: var(--warning-soft);
  border: 1px solid rgba(245, 158, 11, .38);
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .035);
}
.action-mark { display: grid; width: 42px; height: 42px; place-items: center; color: var(--warning); background: rgba(245, 158, 11, .14); border-radius: 11px; font-size: 16px; font-weight: 800; }
.action-panel strong { color: var(--text-primary); font-size: 14px; }
.action-panel span { display: block; margin-top: 4px; color: var(--text-secondary); font-size: 11px; line-height: 1.45; }
.assistant-panel { margin-top: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.assistant-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.assistant-head h2 { margin: 3px 0 0; font-size: 20px; }
.assistant-summary { margin: 16px 0; color: var(--text-primary); font-weight: 700; }
.assistant-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.assistant-grid section { min-height: 112px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-subtle); }
.assistant-grid h3 { margin: 0 0 8px; font-size: 12px; color: var(--text-secondary); }
.assistant-grid ul { margin: 0; padding-left: 17px; }
.assistant-grid li, .assistant-empty { margin: 0 0 5px; font-size: 12px; line-height: 1.45; color: var(--text-primary); }
.assistant-empty { color: var(--text-secondary); }
.assistant-status { min-height: 18px; margin: 10px 0 0; color: var(--text-secondary); font-size: 12px; }
@media (max-width: 900px) { .assistant-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .assistant-head { align-items: flex-start; flex-direction: column; } .assistant-grid { grid-template-columns: 1fr; } }

.schedule-heading { margin-top: 24px; }
.schedule-card { overflow: hidden; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 5px 14px rgba(15, 23, 42, .035); }
.week { overflow-x: auto; }
.time-week { display: grid; min-width: 1220px; grid-template-columns: 62px repeat(7, minmax(164px, 1fr)); }
.time-corner, .time-day-head { position: sticky; z-index: 3; top: 0; min-height: 56px; padding: 11px 10px; background: var(--card-bg); border-bottom: 1px solid var(--border); }
.time-corner { color: var(--text-secondary); font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.time-day-head { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; border-left: 1px solid var(--border); }
.time-day-head strong { font-size: 12px; font-weight: 760; }
.time-day-head time { color: var(--text-secondary); font-size: 10px; }
.time-day-head.today { box-shadow: inset 0 3px 0 var(--primary); }
.time-axis { position: relative; height: 864px; color: var(--text-secondary); background: var(--card-bg); border-right: 1px solid var(--border); }
.time-axis span { position: absolute; right: 9px; top: calc(var(--hour) * 72px - 7px); font-size: 10px; font-variant-numeric: tabular-nums; }
.time-axis span:last-child { top: calc(var(--hour) * 72px - 13px); }
.time-day { position: relative; height: 864px; min-width: 0; background-color: var(--card-bg); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 71px, var(--border) 72px); border-right: 1px solid var(--border); }
.time-day:last-child { border-right: 0; }
.time-day.today { background-color: color-mix(in srgb, var(--primary) 2.5%, var(--card-bg)); }
.event {
  --person: var(--primary);
  display: block;
  padding: 8px;
  color: var(--text-primary);
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--person);
  border-radius: 9px;
  box-shadow: 0 3px 9px rgba(15, 23, 42, .04);
}
.event:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.activity-learning { --activity-color: var(--activity-learning-color); }
.activity-language { --activity-color: var(--activity-language-color); }
.activity-boxing { --activity-color: var(--activity-boxing-color); }
.activity-music { --activity-color: var(--activity-music-color); }
.activity-movement { --activity-color: var(--activity-movement-color); }
.activity-computer { --activity-color: var(--activity-computer-color); }
.activity-preparation { --activity-color: var(--activity-preparation-color); }
.activity-event { --activity-color: var(--activity-event-color); }
.timeline-event { position: absolute; z-index: 1; top: var(--top); left: calc(6px + var(--column) * ((100% - 12px) / var(--columns))); width: calc((100% - 12px) / var(--columns) - 4px); height: var(--height); min-height: 28px; padding: 0; overflow: hidden; background: color-mix(in srgb, var(--activity-color) var(--activity-tint), var(--card-bg)); border-left-width: 4px; }
.timeline-event.is-uncertain { border-style: dashed; }
.event-open { display: flex; width: 100%; height: 100%; padding: 4px 22px 4px 5px; flex-direction: column; color: inherit; text-align: left; background: transparent; border: 0; }
.event-remove { position: absolute; z-index: 2; top: 2px; right: 2px; display: grid; width: 18px; height: 18px; padding: 0; place-items: center; color: var(--text-secondary); background: color-mix(in srgb, var(--card-bg) 82%, transparent); border: 0; border-radius: 6px; font-size: 15px; line-height: 1; }
.event-remove:hover { color: var(--failure); background: color-mix(in srgb, var(--failure) 10%, var(--card-bg)); }
.event-summary { display: flex; min-width: 0; align-items: center; gap: 4px; color: var(--person); }
.event-time { overflow: hidden; font-size: 10px; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.activity-icon { display: inline-grid; width: 14px; height: 14px; flex: 0 0 auto; place-items: center; color: var(--activity-color, var(--person)); }
.activity-icon svg, .passport-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.activity-icon .pointe-icon { font-size: 13px; line-height: 1; }
.flag-icon { font-size: 14px; line-height: 1; }
.math-icon { font-size: 9px; font-weight: 800; letter-spacing: -.08em; line-height: 1; }
.event-title { display: block; margin-top: 4px; font-size: 12px; font-weight: 760; line-height: 1.2; }
.event-meta { display: block; margin-top: 6px; color: var(--text-secondary); font-size: 10px; line-height: 1.35; }
.timeline-tag { display: inline-block; margin-top: 5px; padding: 2px 5px; color: var(--text-secondary); background: var(--card-muted); border-radius: 999px; font-size: 9px; font-weight: 700; }
.travel-row { display: flex; margin-top: 3px; align-items: center; gap: 4px; }
.travel-leg { display: inline-flex; min-width: 0; height: 13px; align-items: center; gap: 2px; color: var(--text-secondary); font-size: 8px; font-weight: 750; line-height: 1; }
.travel-leg b { display: inline-grid; width: 12px; height: 12px; place-items: center; color: var(--person); background: color-mix(in srgb, var(--person) 10%, var(--card-bg)); border: 1px solid color-mix(in srgb, var(--person) 24%, var(--border)); border-radius: 999px; font-size: 7px; }
.travel-arrow { font-size: 10px; }
.transport-icon { display: inline-grid; width: 11px; height: 11px; place-items: center; }
.transport-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.mode-unknown { color: var(--text-dim); }

.route-registry-section { margin-top: 22px; }
.route-registry-section .section-heading > div { display: grid; gap: 3px; }
.route-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.route-empty { grid-column: 1 / -1; margin: 0; padding: 16px; color: var(--text-secondary); background: var(--card-bg); border: 1px dashed var(--border-strong); border-radius: 12px; font-size: 12px; }
.route-card { display: grid; min-width: 0; min-height: 76px; padding: 12px; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 5px 14px rgba(15, 23, 42, .035); }
.route-mode { display: grid; width: 30px; height: 30px; place-items: center; color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--card-bg)); border-radius: 9px; }
.route-mode svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.route-copy { display: grid; min-width: 0; gap: 3px; }
.route-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.route-copy span, .route-copy small { color: var(--text-secondary); font-size: 10px; line-height: 1.3; }
.route-map { padding: 7px 8px; color: var(--primary); border-radius: 8px; font-size: 11px; font-weight: 750; text-decoration: none; }
.route-map:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }

.resources { margin-top: 24px; }
.adult-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.adult { position: relative; min-height: 64px; padding: 14px 14px 14px 42px; color: var(--text-primary); background: var(--card-bg); border: 1px solid var(--border) !important; border-radius: 12px; box-shadow: 0 5px 14px rgba(15, 23, 42, .035); font-size: 13px; font-weight: 720; }
.adult::before { position: absolute; left: 16px; top: 26px; width: 8px; height: 8px; content: ""; background: var(--success); border-radius: 999px; }
.adult::after { display: block; margin-top: 3px; content: "может сопровождать"; color: var(--text-secondary); font-size: 10px; font-weight: 500; }
.adult-busy { display: block; margin-top: 5px; color: var(--warning); font-size: 10px; font-weight: 700; }

dialog { width: min(620px, calc(100% - 24px)); padding: 22px; color: var(--text-primary); background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 28px 76px rgba(2, 6, 23, .3); }
dialog::backdrop { background: rgba(15, 23, 42, .48); backdrop-filter: blur(3px); }
.dialog-head { display: flex; margin-bottom: 18px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-kicker { color: var(--text-secondary); font-size: 10px; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.dialog-head h2, #detail-content h2 { margin-top: 6px; font-size: 22px; letter-spacing: -.025em; }
.event-passport { display: flex; margin-bottom: 18px; align-items: flex-start; gap: 12px; }
.event-passport h2 { margin-bottom: 0; }
.passport-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; color: var(--activity-color, var(--primary)); background: color-mix(in srgb, var(--activity-color, var(--primary)) 10%, var(--card-bg)); border: 1px solid color-mix(in srgb, var(--activity-color, var(--primary)) 20%, var(--border)); border-radius: 12px; }
.passport-icon .flag-icon { font-size: 25px; }
.passport-icon .math-icon { font-size: 15px; }
.passport-icon .pointe-icon { font-size: 24px; line-height: 1; }
.text-button { padding: 7px 9px; color: var(--primary); background: transparent; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; }
.text-button:hover { background: rgba(37, 99, 235, .08); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 6px; color: var(--text-primary); font-size: 11px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 10px; color: var(--text-primary); background: var(--card-muted); border: 1px solid var(--border-strong); border-radius: 9px; }
textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; margin-top: 18px; justify-content: flex-end; gap: 8px; }
.form-error { min-height: 18px; margin-top: 8px; color: var(--failure); font-size: 12px; }
#detail-content dl { display: grid; grid-template-columns: 120px 1fr; gap: 9px; font-size: 13px; }
#detail-content dt { color: var(--text-secondary); }
#detail-content dd { margin: 0; }
.event-contacts { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.event-contacts h3 { margin: 0 0 10px; font-size: 12px; }
.event-contacts > p { color: var(--text-secondary); font-size: 12px; }
.event-contacts ul { display: grid; margin: 0; padding: 0; gap: 8px; list-style: none; }
.event-contacts li { display: flex; padding: 9px 10px; align-items: center; justify-content: space-between; gap: 12px; background: var(--card-muted); border: 1px solid var(--border); border-radius: 9px; }
.event-contacts li span { display: grid; gap: 2px; font-size: 12px; }
.event-contacts li small { color: var(--text-secondary); font-size: 10px; }
.event-contacts a { color: var(--primary); font-size: 12px; font-weight: 720; text-decoration: none; white-space: nowrap; }
.contact-form { display: grid; margin-top: 12px; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 8px; align-items: end; }
.contact-form .secondary { min-height: 42px; padding-inline: 11px; font-size: 11px; }
.contact-form .form-error { grid-column: 1 / -1; margin: 0; }
.escort-editor { display: grid; margin-top: 20px; padding-top: 18px; gap: 8px; border-top: 1px solid var(--border); }
.escort-editor-head { display: flex; margin-bottom: 4px; align-items: end; justify-content: space-between; gap: 12px; }
.escort-editor h3 { margin: 0; font-size: 12px; }
.escort-editor p { margin: 3px 0 0; color: var(--text-secondary); font-size: 10px; }
.escort-editor-head label { min-width: 170px; }
.escort-role { display: grid; padding: 10px; grid-template-columns: 120px repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; background: var(--card-muted); border: 1px solid var(--border); border-radius: 9px; }
.escort-role > strong { align-self: center; font-size: 11px; }
.escort-role input, .escort-role select, .escort-editor-head select { min-height: 38px; padding: 7px 8px; font-size: 11px; }
.detail-controls { display: grid; margin-top: 20px; padding-top: 18px; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--border); }
.move-summary { margin: 0 0 16px; color: var(--text-secondary); font-size: 13px; }
.close-detail { float: right; margin-top: 18px; }

.display-mode .filters, .display-mode .resources, .display-mode .local-badge, .display-mode .section-meta { display: none; }
.display-mode .event-remove { display: none; }
.display-mode .event-open { padding-right: 5px; }
.display-mode #add-route { display: none; }
.display-mode .app-header { grid-template-columns: 1fr auto 1fr; }
.display-mode .app-content { width: 100%; }

@media (max-width: 980px) {
  .app-header { grid-template-columns: 1fr auto; gap: 12px; }
  .app-navigation { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-list { grid-template-columns: 1fr 1fr; }
  .week-control-card { align-items: stretch; flex-direction: column; }
  .filters { justify-content: flex-end; }
}

@media (max-width: 640px) {
  .app-header { min-height: 70px; padding: 10px 14px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-subtitle, .local-badge, .theme-button { display: none; }
  .brand-title { font-size: 16px; }
  .escort-editor-head { align-items: stretch; flex-direction: column; }
  .escort-editor-head label { min-width: 0; }
  .escort-role { grid-template-columns: 1fr 1fr; }
  .escort-role > strong { grid-column: 1 / -1; }
  .header-actions .primary { min-height: 38px; padding: 0 11px; font-size: 11px; }
  .app-content { padding: 14px 12px 30px; }
  .section-meta { text-align: right; }
  .week-switcher { display: grid; grid-template-columns: auto 1fr auto; }
  .week-switcher > div { min-width: 0; }
  .filters { justify-content: stretch; }
  .filter { flex: 1; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pulse-card strong { font-size: 24px; }
  .route-list { grid-template-columns: 1fr; }
  .week { overflow-x: auto; }
  .adult-list { grid-template-columns: 1fr; }
  .form-grid, .detail-controls, .contact-form { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  #detail-content dl { grid-template-columns: 92px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
