/* Stitch reference: visual styling only. Existing controls and event handlers stay intact. */
:root {
  --navy:#0f172a;
  --blue:#334155;
  --soft-blue:#f1f5f9;
  --line:#e2e8f0;
  --muted:#64748b;
  --surface:#fff;
  --primary:#020617;
  --shadow:0 2px 8px rgba(2,6,23,.04);
  --radius-control:20px;
  background:#f8fafc;
  color:#0f172a;
  font-size:24.48px;
}
body { background:#f8fafc; color:#0f172a; line-height:1.6; letter-spacing:-.02em; -webkit-font-smoothing:antialiased; }
.app-shell { min-height:100dvh; }
.page { padding:calc(22px + env(safe-area-inset-top,0px)) 22px 32px; animation:none; }
.topbar { min-height:54px; gap:12px; margin-bottom:22px; padding:0 2px; }
.header-logo { width:48px; height:48px; border-radius:14px; }
.brand { font-size:max(15.84px, 1.35rem); font-weight:750; color:#0f172a; letter-spacing:-.045em; }
.eyebrow { font-size:max(15.84px, .76rem); font-weight:500; color:#64748b; }
.card { border:1px solid #e2e8f0; border-radius:32px; background:#fff; padding:22px; margin-bottom:16px; box-shadow:var(--shadow); }
.hero { padding:26px; background:#fff; }
.hero h2 { font-size:max(15.84px, 1.45rem); font-weight:750; color:#020617; margin:12px 0; }
.hero-kicker { background:#f1f5f9; color:#475569; border:1px solid #e2e8f0; font-size:max(15.84px, .74rem); padding:4px 10px; }
.home-clock { display:inline-block; padding:7px 12px; border:1px solid #e2e8f0; border-radius:999px; background:#f8fafc; font-size:max(15.84px, .85rem); color:#475569; font-weight:600; }
.hero .muted { font-size:max(15.84px, .86rem); margin-top:16px; }
.stats { gap:12px; }
.stat { border:1px solid #e2e8f0; border-radius:32px; box-shadow:var(--shadow); padding:22px; color:#64748b; font-size:max(15.84px, .87rem); font-weight:600; }
.stat strong { font-size:max(15.84px, 2.1rem); color:#020617; font-weight:750; }
.stat-primary { background:#020617; border-color:#1e293b; color:#cbd5e1; min-height:118px; padding:26px; box-shadow:0 4px 14px rgba(2,6,23,.08); }
.stat-primary strong { color:white; font-size:max(15.84px, 2.7rem); }
.stat-completed strong { color:#0f172a; }
.home-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:22px; }
.shortcut { border-radius:999px; min-height:62px; padding:12px 16px; gap:10px; border:1px solid #e2e8f0; box-shadow:var(--shadow); color:#020617; }
.shortcut:first-child { background:#020617; color:#fff; border-color:#1e293b; box-shadow:0 4px 14px rgba(2,6,23,.12); }
.shortcut-icon { width:28px; height:28px; border-radius:999px; background:transparent; color:inherit; }
.shortcut-icon svg { width:22px; height:22px; }
.shortcut strong { font-size:max(15.84px, .86rem); font-weight:700; }
.shortcut small { font-size:max(15.84px, .7rem); color:#64748b; }
.shortcut:first-child small { color:#cbd5e1; }
.shortcut > span:last-child { color:inherit; }
.bottom-nav { border-radius:999px; background:rgba(255,255,255,.96); border:1px solid #e2e8f0; padding:8px; bottom:calc(16px + env(safe-area-inset-bottom,0px)); box-shadow:0 12px 36px rgba(15,23,42,.12); gap:3px; }
.nav-btn { color:#7b8ca4; border-radius:999px; min-height:54px; font-size:max(15.84px, .7rem); font-weight:600; gap:3px; padding:8px 2px; }
.nav-btn.active { background:#020617; color:white; box-shadow:0 4px 12px rgba(2,6,23,.15); font-weight:700; }
.nav-btn .icon svg { width:21px; height:21px; }
.btn { background:#020617; color:white; box-shadow:0 3px 10px rgba(2,6,23,.1); font-size:max(15.84px, .88rem); font-weight:650; border-radius:999px; min-height:46px; padding:12px 18px; }
.btn.secondary, .btn.ghost { background:#f8fafc; color:#334155; border:1px solid #e2e8f0; box-shadow:none; }
.btn.danger { background:#a82f43; border-color:#a82f43; color:#fff; }
.btn:focus-visible, button:focus-visible { outline:3px solid #64748b; outline-offset:3px; }
input, select, textarea { background:#f8fafc; color:#0f172a; border:1px solid #e2e8f0; font-size:max(15.84px, .9rem); padding:12px 14px; min-height:46px; border-radius:20px; }
input::placeholder, textarea::placeholder { color:#64748b; }
input:focus, select:focus, textarea:focus { background:#fff; outline:3px solid rgba(71,85,105,.14); border-color:#64748b; }
input:disabled, select:disabled { color:#94a3b8; background:#f1f5f9; }
.field { gap:8px; margin-bottom:18px; }
.field label { color:#334155; font-size:max(15.84px, .82rem); font-weight:650; }
.hint { font-size:max(15.84px, .76rem); color:#64748b; line-height:1.65; }
.char-count { font-size:max(15.84px, .72rem); font-variant-numeric:tabular-nums; }
.filters { gap:12px; padding:18px; }
.status-filter { border:0; box-shadow:none; padding:0; background:transparent; }
.segmented { background:#f1f5f9; border:1px solid #e2e8f0; padding:5px; border-radius:999px; gap:3px; }
.segmented button { min-height:42px; border-radius:999px; font-size:max(15.84px, .78rem); font-weight:600; color:#64748b; padding:9px 3px; }
.segmented button.active { background:#020617; color:white; box-shadow:0 2px 6px rgba(2,6,23,.08); }
.search-bar { padding:12px; border-radius:999px; }
.search-bar input { background:transparent; border:0; }
.search-button { width:46px; flex-basis:46px; padding:0; min-height:46px; }
.schedule { padding:22px; border-radius:32px; border-left:4px solid var(--marker,#020617); }
.schedule-title { font-size:max(15.84px, 1.08rem); font-weight:750; color:#0f172a; }
.badge { border:1px solid #e2e8f0; background:#f8fafc; border-radius:999px; font-size:max(15.84px, .72rem); font-weight:650; }
.meta { color:#64748b; font-size:max(15.84px, .85rem); gap:8px; margin:16px 0 20px; }
.meta strong { color:#334155; font-weight:600; }
.schedule .actions .btn { font-size:max(15.84px, .82rem); padding:10px 14px; min-width:90px; }
.count { font-size:max(15.84px, .78rem); font-weight:500; }
#schedule-form { background:transparent; padding:0; border:0; box-shadow:none; }
#schedule-form > .field, #schedule-form > .row { padding:18px; background:#fff; border:1px solid #e2e8f0; border-radius:28px; box-shadow:var(--shadow); margin-bottom:14px; }
#schedule-form > .row .field { margin-bottom:0; }
#schedule-form textarea { min-height:128px; border-radius:24px; line-height:1.7; }
#schedule-form > .btn { min-height:52px; margin-top:4px; }
#schedule-form input[readonly] { background:#f8fafc; }
#map { min-height:390px; border:1px solid #e2e8f0; border-radius:32px; box-shadow:var(--shadow); }
.map-placeholder { border-radius:32px; background:#f1f5f9; }
.map-toolbar { gap:14px; padding:18px; }
.map-date-row { border-radius:20px; }
.map-date-row .btn { box-shadow:none; min-height:46px; padding:0; }
.map-summary { padding:9px 12px; background:#f1f5f9; border:1px solid #e2e8f0; border-radius:20px; font-size:max(15.84px, .78rem); }
.map-legend { gap:6px; margin-bottom:12px; }
.map-legend span { padding:4px 8px; border:1px solid #e2e8f0; border-radius:12px; background:#fff; font-size:max(15.84px, .72rem); }
.map-toolbar .switch-row { color:#475569; font-size:max(15.84px, .85rem); padding-top:12px; }
.switch { background:#cbd5e1; }
.switch:checked { background:#020617; }
.map-sheet { background:#fff; border:1px solid #e2e8f0; border-radius:32px; box-shadow:0 -8px 30px rgba(2,6,23,.1); }
.sheet-handle { background:#cbd5e1; }
.sheet-header h2 { font-size:max(15.84px, 1.15rem); font-weight:750; }
.map-list-item { background:#f8fafc; border:1px solid #e2e8f0; border-radius:22px; color:#0f172a; }
.modal { border-radius:32px; background:#fff; color:#0f172a; box-shadow:0 20px 60px rgba(2,6,23,.18); }
.modal-body { padding:24px; }
.profile-save-button { border-radius:16px; padding:0; }
.card.switch-row strong { font-size:max(15.84px, .95rem); }
.card.warning { border-color:#fde68a; background:#fffbeb; color:#92400e; }
.onboarding .panel { border-radius:32px; padding:30px; animation:none; }
.onboarding h1 { color:#020617; font-size:max(15.84px, 1.85rem); }
.onboarding-progress span.active { background:#020617; }
.onboarding-features div { border:1px solid #e2e8f0; background:#f8fafc; border-radius:24px; padding:16px; }
.welcome-preview span { background:#f1f5f9; color:#475569; border:1px solid #e2e8f0; }
.onboarding .privacy-warning { border:1px solid #fecdd3; border-left:4px solid #be123c; background:#fff1f2; color:#9f1239; border-radius:24px; }
.onboarding .privacy-warning strong { color:#9f1239; }
.update-banner { background:#020617; border-radius:24px; }
.toast { background:#020617; border-radius:999px; font-size:max(15.84px, .85rem); }
@media (max-width:560px) {
  :root { font-size:23.04px; }
  .page { padding-inline:14px; padding-top:calc(18px + env(safe-area-inset-top,0px)); }
  .topbar { margin-bottom:18px; gap:10px; }
  .header-logo { width:44px; height:44px; }
  .brand { font-size:max(15.84px, 1.35rem); }
  .card { padding:18px; }
  .hero { padding:22px; }
  .hero h2 { font-size:max(15.84px, 1.45rem); }
  .stat { padding:20px; }
  .stat-primary { min-height:112px; padding:22px; }
  .home-shortcuts { grid-template-columns:1fr; gap:10px; }
  .shortcut { min-height:58px; padding:12px 18px; }
  .shortcut strong { font-size:max(15.84px, .9rem); }
  .status-filter { padding:0; }
  .search-bar { padding:10px; }
  .segmented button { font-size:max(15.84px, .77rem); }
  .nav-btn { font-size:max(15.84px, .69rem); }
  .schedule { padding:20px; }
  .schedule .actions .btn { min-width:76px; padding-inline:10px; }
  #schedule-form > .field, #schedule-form > .row { padding:16px; }
  .map-date-range { gap:6px; }
  .map-date-range .map-date-row { grid-template-columns:24px minmax(0,1fr) 24px; gap:2px; }
  .map-date-range input { font-size:17.28px; padding-inline:2px; }
  .map-toolbar { padding:14px; }
  .onboarding .panel { padding:24px; }
}

/* Updated Stitch home reference. Other screens keep their existing theme. */
.home-welcome { padding:18px 22px; }
.home-welcome h2 { font-size:max(15.84px, 1.18rem); margin:0 0 10px; color:#020617; }
.home-welcome .muted { font-size:max(15.84px, .78rem); margin:10px 0 0; }
.home-overview { display:grid; gap:12px; }
.home-priority { background:#020617; color:#fff; border:1px solid #1e293b; border-radius:32px; padding:22px; box-shadow:0 2px 8px rgba(2,6,23,.05); }
.priority-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.priority-kicker { display:inline-block; font-size:max(15.84px, .73rem); color:#cbd5e1; border:1px solid #334155; background:#1e293b; border-radius:999px; padding:3px 10px; }
.priority-heading h2 { font-size:max(15.84px, 1.12rem); margin:8px 0 0; color:#fff; }
.priority-icon { width:44px; height:44px; display:grid; place-items:center; border:1px solid #334155; background:#1e293b; border-radius:16px; }
.priority-icon svg { width:25px; height:25px; }
.priority-numbers { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-top:20px; }
.priority-numbers > div { display:flex; align-items:baseline; gap:8px; }
.priority-numbers strong { font-size:max(15.84px, 2.5rem); font-weight:750; line-height:1.1; font-variant-numeric:tabular-nums; }
.priority-numbers > div > span { color:#94a3b8; font-size:max(15.84px, .78rem); }
.overdue-note { color:#fda4af; background:#450b19; border:1px solid #7f1d1d; border-radius:999px; padding:5px 10px; font-size:max(15.84px, .75rem); }
.priority-note { color:#94a3b8; font-size:max(15.84px, .75rem); }
.home-progress { height:6px; background:#1e293b; border-radius:999px; margin-top:18px; overflow:hidden; }
.home-progress > span { display:block; height:100%; background:#fff; border-radius:999px; }
.home-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.home-metric { border-radius:28px; padding:20px; margin-bottom:0; }
.home-metric > div { display:flex; justify-content:space-between; align-items:center; gap:6px; font-size:max(15.84px, .83rem); color:#64748b; font-weight:600; }
.metric-icon { width:30px; height:30px; display:grid; place-items:center; background:#f1f5f9; border:1px solid #e2e8f0; border-radius:12px; flex-shrink:0; color:#334155; }
.metric-icon svg { width:18px; height:18px; }
.home-metric p { display:flex; align-items:baseline; gap:5px; margin:16px 0 0; }
.home-metric strong { font-size:max(15.84px, 2rem); line-height:1.2; font-variant-numeric:tabular-nums; color:#020617; }
.home-metric small { color:#64748b; font-size:max(15.84px, .78rem); }
.home-quick, .home-queue { margin-top:24px; }
.home-section-heading, .home-section-heading > div { display:flex; align-items:center; gap:8px; }
.home-section-heading { justify-content:space-between; margin-bottom:12px; }
.home-section-heading h2 { font-size:max(15.84px, .97rem); margin:0; color:#0f172a; }
.home-section-heading > span { font-size:max(15.84px, .75rem); color:#94a3b8; }
.home-quick-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.home-quick-buttons .btn { display:flex; justify-content:center; align-items:center; gap:7px; padding:14px 10px; font-size:max(15.84px, .81rem); min-height:52px; }
.home-quick-buttons svg { width:20px; height:20px; flex-shrink:0; }
.home-count { font-size:max(15.84px, .75rem); border-radius:999px; padding:3px 10px; color:white; background:#020617; }
.home-view-all { border:0; background:transparent; color:#475569; font-size:max(15.84px, .82rem); font-weight:600; padding:10px 0 10px 12px; min-height:44px; }
.home-queue-card { padding:20px; }
.queue-time { font-size:max(15.84px, .8rem); color:#64748b; margin-left:8px; }
.home-queue-card h3 { font-size:max(15.84px, 1.03rem); margin:12px 0 6px; }
.home-queue-card p { font-size:max(15.84px, .84rem); color:#64748b; margin:0 0 14px; overflow-wrap:anywhere; }
.home-queue-card .btn { min-height:42px; font-size:max(15.84px, .8rem); }
.home-empty { border:1px dashed #e2e8f0; border-radius:28px; padding:28px 18px; text-align:center; color:#64748b; font-size:max(15.84px, .85rem); }
.app-shell:has(.home-page) > .offline { margin:18px 22px 0; padding:16px; border:1px solid #e2e8f0; border-radius:32px; background:white; color:#475569; text-align:left; }
@media(max-width:560px) {
 .home-priority { padding:20px; }
 .home-metric { padding:16px; }
 .home-metric > div { font-size:max(15.84px, .8rem); }
 .home-quick-buttons .btn { font-size:max(15.84px, .8rem); padding:12px 8px; gap:5px; }
 .app-shell:has(.home-page) > .offline { margin-inline:14px; }
}

/* Regional analysis: Stitch control card and compact, soft detail groups. */
.regional-page .map-toolbar { margin:0 0 14px; padding:12px; gap:10px; border-radius:16px; box-shadow:0 3px 12px rgba(15,23,42,.035); }
.regional-page .map-date-range { gap:12px; }
.regional-page .map-date-row { background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; gap:0; grid-template-columns:28px minmax(0,1fr) 28px; }
.regional-page .map-date-row .btn { background:transparent; border:0; color:#64748b; min-height:54px; border-radius:10px; font-size:31.68px; }
.regional-date { display:flex; flex-direction:column; min-width:0; align-items:center; padding:5px 0; }
.regional-date span, .regional-staff>span { color:#94a3b8; font-size:17.28px; font-weight:600; }
.regional-page .regional-date input { border:0; background:transparent; padding:0; min-height:25px; width:100%; font-size:18.72px; font-weight:700; text-align:center; box-shadow:none; }
.regional-page .row.three { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.regional-staff { min-width:0; padding:8px 9px; border:1px solid #e2e8f0; border-radius:12px; background:#f8fafc; display:flex; flex-direction:column; gap:2px; }
.regional-staff>span { font-size:15.84px; white-space:nowrap; }
.regional-page .regional-staff select { border:0; border-radius:0; background:transparent; min-height:27px; padding:0; font-size:21.6px; font-weight:600; width:100%; }
.regional-toggles { display:flex; align-items:center; gap:8px; }
.regional-page .map-toolbar .switch-row { display:flex; gap:6px; padding:7px 8px; border:1px solid #e2e8f0; border-radius:8px; font-size:18.72px; }
.regional-toggles .switch { width:32px; height:20px; min-height:20px; }
.regional-toggles .switch:before { width:14px; height:14px; }
.regional-toggles .switch:checked:before { transform:translateX(12px); }
.regional-toggles #reset-map { margin-left:auto; padding:6px 2px; min-height:40px; color:#64748b; font-size:18.72px; white-space:nowrap; }
.regional-page .map-summary { margin:0; border:1px solid #e2e8f0; border-radius:12px; padding:10px 12px; font-size:18.72px; background:#f8fafc; }
.regional-page .map-summary span:first-child { color:#0f172a; font-weight:700; }
.regional-page .map-legend { flex-wrap:nowrap; overflow-x:auto; gap:6px; margin:0 0 14px; padding:1px 1px 3px; }
.regional-page .map-legend span { flex-shrink:0; border-radius:8px; padding:7px 9px; font-size:18.72px; }
.regional-page #map, .regional-page .map-placeholder { border-radius:16px; height:360px; border:1px solid #e2e8f0; }
.app-shell:has(.regional-page) .bottom-nav { border-radius:16px; }
.app-shell:has(.regional-page) .nav-btn { border-radius:12px; }
.map-sheet:has(.regional-detail) { border-radius:16px; color:#0f172a; }
.regional-detail { gap:10px; }
.regional-detail-pair { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.regional-detail-pair, .regional-address, .regional-memo { padding:12px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; }
.regional-detail-pair>div, .regional-address, .regional-memo { display:flex; flex-direction:column; gap:5px; min-width:0; }
.regional-detail-pair small { color:#94a3b8; font-size:17.28px; }
.regional-detail-pair span { font-size:21.6px; font-weight:600; overflow-wrap:anywhere; }
.regional-memo .sheet-memo { margin:2px 0 0; background:white; border:1px solid #e2e8f0; border-radius:8px; padding:10px; font-size:21.6px; }
.map-sheet:has(.regional-detail) .sheet-actions .btn { border-radius:12px; }

/* More: grouped settings, platform guidance and a separate data section. */
.more-page .card { padding:20px; border-radius:32px; margin-bottom:16px; box-shadow:0 2px 3px rgba(15,23,42,.035); }
.more-page .more-heading { justify-content:flex-start; min-height:82px; gap:12px; }
.more-page .more-heading .brand { font-size:27.36px; }
.more-section-title { display:flex; gap:9px; align-items:center; margin:0 0 18px; font-size:23.04px; font-weight:700; color:#0f172a; }
.more-section-title svg { width:20px; height:20px; flex-shrink:0; color:#475569; }
.more-page .field { margin:0; }
.more-page .field label { font-size:18.72px; }
.more-page .profile-name-row input { min-height:44px; border-radius:16px; font-size:23.04px; }
.more-page .profile-save-button { width:44px; height:44px; min-height:44px; border-radius:16px; }
.more-page .switch-row { gap:16px; margin-bottom:20px; align-items:flex-start; }
.more-page .switch-row strong { font-size:23.04px; }
.more-page .hint { font-size:18.72px; line-height:1.7; margin-top:5px; }
.more-page .switch { flex-shrink:0; margin-top:3px; }
.more-page .more-guide { width:100%; min-height:44px; border-radius:16px; display:flex; justify-content:flex-start; gap:9px; padding:10px 14px; font-size:18.72px; background:#f8fafc; }
.more-guide svg { width:20px; height:20px; }
.more-guide span:last-child { margin-left:auto; color:#94a3b8; font-size:31.68px; }
.more-install { margin-top:16px; padding-top:14px; border-top:1px solid #f1f5f9; }
.more-page h3 { font-size:18.72px; margin:0 0 9px; }
.more-platforms { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.more-platforms details { min-width:0; background:#f8fafc; border:1px solid #e2e8f0; border-radius:16px; }
.more-platforms summary { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:8px; padding:12px 5px; min-height:80px; cursor:pointer; text-align:center; font-size:17.28px; font-weight:600; list-style:none; }
.more-platforms summary::-webkit-details-marker { display:none; }
.more-platforms summary svg { width:23px; height:23px; }
.more-platforms details[open] { grid-column:1/-1; }
.more-platforms details p { padding:0 12px 12px; margin:0; font-size:18.72px; }
.more-page .more-security>p { color:#64748b; font-size:18.72px; line-height:1.8; }
.more-page .more-security .warning { display:flex; gap:8px; align-items:flex-start; border-radius:24px; padding:14px; background:#f8fafc; border:1px solid #fde68a; color:#92400e; font-size:18.72px; line-height:1.8; }
.more-security .warning svg { flex-shrink:0; width:20px; height:20px; color:#d97706; }
.more-page .more-danger { border-color:#fecdd3; }
.more-danger .more-section-title { color:#be123c; border-bottom:1px solid #ffe4e6; padding-bottom:10px; }
.more-danger .more-section-title svg { color:inherit; }
.more-danger-item { background:#f8fafc; border:1px solid #e2e8f0; border-radius:24px; padding:16px; margin-top:14px; }
.more-danger-item p { font-size:17.28px; color:#64748b; line-height:1.7; margin:5px 0 12px; }
.more-danger-item:last-child h3, .more-confirm-note strong { color:#e11d48; }
.more-danger-item .btn { min-height:40px; border-radius:12px; font-size:18.72px; width:100%; }
.more-version { padding:8px 0 20px; text-align:center; font-size:18.72px; color:#64748b; }

/* Schedule management: compact Stitch cards, labelled filters and clear actions. */
.manage-page .card { border-radius:16px; padding:16px; box-shadow:0 2px 8px rgba(15,23,42,.04); margin-bottom:16px; }
.manage-filter-title { display:flex; align-items:center; gap:9px; font-size:25.92px; margin:0 0 3px; padding-bottom:12px; border-bottom:1px solid #f1f5f9; }
.manage-filter-title>span { display:grid; place-items:center; width:28px; height:28px; background:#020617; color:white; border-radius:8px; font-size:31.68px; }
.manage-page .filters { gap:14px; }
.manage-field { display:flex; flex-direction:column; gap:7px; min-width:0; }
.manage-field>span { font-size:18.72px; color:#64748b; font-weight:600; }
.manage-page .row.three { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.manage-page .row.three .manage-field>span { font-size:15.84px; white-space:nowrap; }
.manage-page input, .manage-page select { border-radius:12px; min-height:44px; font-size:21.6px; padding:10px; width:100%; }
.manage-page .row.three select { padding:8px; }
.manage-page .hint { font-size:17.28px; line-height:1.6; margin:0; }
.manage-page #apply-filters { border-radius:12px; min-height:44px; font-size:21.6px; }
.manage-page .status-filter { padding:12px; }
.manage-page .segmented { border-radius:12px; background:#f1f5f9; padding:4px; border:1px solid #e2e8f0; gap:3px; }
.manage-page .segmented button { min-height:40px; border-radius:8px; font-size:18.72px; padding:6px 2px; }
.manage-page .search-bar { padding:6px; gap:6px; }
.manage-page .search-button { border-radius:12px; width:44px; height:44px; min-height:44px; }
.manage-page #list>.count { text-align:left; color:#0f172a; font-size:24.48px; font-weight:700; padding:4px 3px 12px; }
.manage-page #list>.count:before { content:'일정 목록 · '; }
.manage-page .schedule { border-left:6px solid var(--marker); padding:16px; overflow:hidden; }
.manage-page .schedule-head { justify-content:flex-start; flex-wrap:wrap; gap:8px; align-items:center; }
.manage-page .schedule-head .badge { order:-1; background:var(--marker); color:#fff; border-radius:6px; border:0; padding:4px 8px; font-size:18.72px; }
.manage-page .schedule-title { font-size:21.6px; color:#475569; }
.manage-page .meta { gap:7px; font-size:18.72px; margin:14px 0; }
.manage-page .meta>strong { font-size:23.04px; color:#334155; }
.manage-page .meta>small { color:#94a3b8; font-size:18.72px; }
.manage-page .manage-codes { padding:10px 12px; border:1px solid #e2e8f0; border-radius:12px; background:#f8fafc; margin-top:5px; }
.manage-page .manage-memo { padding:10px 12px; border:1px solid #fecdd3; border-radius:12px; background:#fff7f8; }
.manage-page .manage-memo strong { color:#b91c1c; }
.manage-page .schedule .actions { justify-content:flex-end; border-top:1px solid #f1f5f9; padding-top:10px; gap:8px; }
.manage-page .schedule .actions .btn { min-height:36px; border-radius:12px; font-size:18.72px; padding:8px 12px; }
.manage-page .filters>.row:not(.three) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.manage-page .filters>.row:not(.three) input { min-width:0; padding:8px; font-size:18.72px; }

.regional-page #map-wrap { margin-bottom:14px; }

/* Creation and editing: Stitch field cards, code prefixes and soft controls. */
.create-page .brand { font-size:28.8px; }
.create-page #schedule-form>.field, .create-page #schedule-form>.row { border-radius:16px; padding:18px; margin-bottom:16px; box-shadow:0 2px 4px rgba(15,23,42,.04); }
.create-page #schedule-form>.field { position:relative; }
.create-page #schedule-form label { font-size:21.6px; color:#334155; }
.create-page #schedule-form small { font-size:17.28px; color:#94a3b8; font-weight:400; }
.create-page #schedule-form input, .create-page #schedule-form select, .create-page #schedule-form textarea { border-radius:12px; min-height:46px; font-size:23.04px; padding:12px; background:#f8fafc; }
.create-page #schedule-form .char-count { font-size:17.28px; color:#94a3b8; }
.create-page .form-hint { font-size:17.28px; color:#94a3b8; margin:0; line-height:1.6; }
.create-page #address-search { border-radius:12px; background:#020617; color:white; min-height:38px; font-size:18.72px; padding:9px 14px; }
.create-page .form-address .actions { justify-content:flex-end; margin-top:-28px; margin-bottom:4px; }
.create-page #schedule-form input[readonly] { font-size:18.72px; color:#475569; }
.create-page .form-visit { display:flex; flex-direction:column; gap:14px; }
.create-page #schedule-form h2 { font-size:21.6px; margin:0; color:#334155; }
.create-page .form-visit .time-inputs { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.create-page .form-staff { display:flex; flex-direction:column; gap:10px; }
.create-page .form-staff h2 { margin-bottom:6px !important; }
.create-page #schedule-form .required-note { color:#f43f5e; font-weight:600; }
.create-page .form-staff .field { display:grid; grid-template-columns:125px minmax(0,1fr); align-items:center; gap:10px; }
.create-page .form-staff .field label { font-size:18.72px !important; }
.create-page .code-input { display:flex; overflow:hidden; border-radius:12px; border:1px solid #e2e8f0; background:#f8fafc; }
.create-page .code-input>span { display:grid; place-items:center; padding:0 13px; background:#0f172a; color:#fff; font-size:18.72px; font-weight:700; }
.create-page #schedule-form .code-input input { border:0; border-radius:0; min-width:0; width:100%; }
.create-page #schedule-form textarea { min-height:112px; line-height:1.7; }
.create-page .form-privacy { margin:0; background:#fffbeb; border:1px solid #fde68a; border-radius:12px; padding:12px; color:#b45309; font-size:18.72px; }
.create-page #schedule-form>.btn { border-radius:16px; min-height:52px; font-size:24.48px; width:100%; }
.app-shell:has(.create-page) .bottom-nav { border-radius:16px; }
.app-shell:has(.create-page) .nav-btn { border-radius:12px; }
.create-page .form-address .actions { align-self:flex-end; width:auto; }
.create-page .form-address #address-search { width:auto; }

.page:not(.home-page) .topbar { justify-content:center; }
.page:not(.home-page) .topbar .brand { text-align:center; margin-inline:auto; }
.create-page .code-input>span { flex:0 0 44px; width:44px; padding:0; }

.home-welcome { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.home-welcome h2 { margin:0; font-size:max(15.84px, 1rem); flex:1; }
.home-welcome .home-clock { margin:0; padding:0; border:0; background:transparent; border-radius:0; font-size:17.28px; text-align:right; flex:0 0 auto; }
@media(max-width:440px) { .home-welcome { padding:16px 14px; gap:8px; } .home-welcome h2 { font-size:21.6px; } .home-welcome .home-clock { font-size:15.84px; } }

/* Shared home-based design scale across all menus and the start guide. */
:root { --app-card-radius:32px; --app-control-radius:24px; font-size:23.04px; }
.page .card, .page #schedule-form>.field, .page #schedule-form>.row,
.page .home-priority, .onboarding .panel, .map-sheet { border-radius:var(--app-card-radius) !important; }
.page .topbar { background:#fff; border:1px solid #e2e8f0; border-radius:var(--app-card-radius); padding:18px 20px; min-height:82px; margin-bottom:18px; box-shadow:0 2px 4px rgba(15,23,42,.035); }
.page .topbar .brand { font-size:27.36px; }
.page .btn, .page .segmented, .page .segmented button, .page input:not(.switch), .page select, .page textarea,
.page .code-input, .page .map-date-row, .page .regional-staff, .page .map-summary,
.page .manage-codes, .page .manage-memo, .page .more-danger-item, .page .more-platforms details,
.map-sheet .btn, .onboarding .btn { border-radius:var(--app-control-radius) !important; }
.page .code-input input { border-radius:0 !important; }
.bottom-nav { border-radius:999px !important; }
.bottom-nav .nav-btn { border-radius:999px !important; font-size:15.84px; }
.page label, .page .meta, .page .hint, .page .form-hint { line-height:1.65; }
.page .home-clock { font-size:15.84px; }
.page .row.three .manage-field>span, .regional-staff>span { white-space:normal; line-height:1.4; min-height:30px; }
.page, .onboarding .panel { animation:app-enter .32s cubic-bezier(.22,.7,.25,1) both; }
@keyframes app-enter { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.btn, .nav-btn, .segmented button { transition:background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
.btn:active, .nav-btn:active { transform:scale(.98); }
@media(max-width:440px) { :root { font-size:23.04px; } .page .topbar { padding:16px; } .home-welcome { gap:8px; } .home-welcome h2 { font-size:20.16px; } .create-page .form-staff .field { grid-template-columns:120px minmax(0,1fr); } }
@media(prefers-reduced-motion:reduce) { .page, .onboarding .panel { animation:none; } .btn, .nav-btn, .segmented button { transition:none; } }

.bottom-nav .nav-pill { position:absolute; pointer-events:none; background:#020617; border-radius:999px; box-shadow:0 4px 12px rgba(2,6,23,.15); z-index:0; transform-origin:center; }
.bottom-nav .nav-btn { position:relative; z-index:1; }
.bottom-nav .nav-btn.active { background:transparent; box-shadow:none; }
@media(prefers-reduced-motion:reduce) { .bottom-nav .nav-pill { animation:none; } }

.manage-page .schedule { border-left:1px solid #e2e8f0; }
.manage-page .filters>.row:not(.three) { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px; align-items:end; }
.manage-page .filter-toggle { width:40px; min-height:44px; padding:10px; }
.filter-toggle svg { width:20px; height:20px; transition:transform .45s cubic-bezier(.22,.8,.25,1); }
.filter-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
.filter-collapse { display:grid; grid-template-rows:0fr; opacity:0; transition:grid-template-rows .45s cubic-bezier(.22,.8,.25,1),opacity .3s ease; }
.filter-collapse.expanded { grid-template-rows:1fr; opacity:1; }
.filter-collapse-inner { min-height:0; overflow:hidden; display:flex; flex-direction:column; gap:14px; }
.manage-page .filters { gap:0; }
.manage-page .filters #apply-filters { margin-top:14px; }
.filter-collapse-inner>.row { margin-top:14px; }
@media(prefers-reduced-motion:reduce) { .filter-collapse, .filter-toggle svg { transition:none; } }

.manage-page .filters>.row:not(.three) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.manage-page .row.three .manage-field>span { font-size:17.28px; min-height:0; }
.manage-page .manage-field { gap:3px; }
.manage-page .filter-toggle { align-self:center; margin:10px auto 0; border-radius:50% !important; width:44px; height:44px; min-height:44px; padding:12px; background:#020617; color:white; border:0; }
.home-welcome .home-clock { font-size:17.28px; white-space:normal; flex:0 1 48%; line-height:1.5; }
.more-page .more-guide { align-items:center; line-height:1.4; }
.more-guide span { display:flex; align-items:center; }
.more-guide span:last-child { line-height:1; }
.more-platforms { display:flex; flex-wrap:wrap; gap:8px; }
.more-platforms details { flex:1 1 calc((100% - 16px)/3); transition:flex-basis .5s cubic-bezier(.22,.85,.25,1),background-color .25s; }
.more-platforms details[open] { flex-basis:100%; }
.more-platforms details[open] p { animation:install-tip-enter .4s ease both; }
@keyframes install-tip-enter { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
.bottom-nav .nav-btn .icon svg { width:27px; height:27px; stroke-width:2.4; }
.bottom-nav .nav-btn { min-height:66px; gap:4px; }
.create-page .form-staff .field { grid-template-columns:140px minmax(0,1fr); }
.regional-page .row.three { gap:6px; }
@media(max-width:440px) { .home-welcome { flex-wrap:wrap; } .home-welcome h2 { flex:1 1 45%; } .home-welcome .home-clock { font-size:17.28px; } .create-page .form-staff .field { grid-template-columns:140px minmax(0,1fr); } }
@media(prefers-reduced-motion:reduce) { .more-platforms details { transition:none; } .more-platforms details[open] p { animation:none; } }
.bottom-nav .nav-btn>span:last-child { white-space:nowrap; }

/* Address label and search action each keep their own space. */
.create-page .form-address .actions { margin-top:0; align-self:flex-end; }
.home-map h2 { font-size:21.6px; margin:0 0 12px; }
.home-map #map { height:360px; border-radius:24px; }
.home-map #map-wrap { cursor:pointer; margin-top:12px; }
.switch { transition:background-color .32s ease, box-shadow .32s ease; }
.switch::before { transition:transform .45s cubic-bezier(.34,1.56,.64,1),width .25s ease; }
.regional-toggles #reset-map { width:40px; font-size:28.8px; }
@media(prefers-reduced-motion:reduce) { .switch,.switch::before { transition:none; } }

.home-page .topbar .brand { flex-shrink:0; margin:0; }
.home-page .topbar .home-tagline { margin-left:auto; text-align:right; font-size:15.84px; line-height:1.5; max-width:48%; }
.home-page .header-logo { width:48px; height:48px; object-fit:contain; flex-shrink:0; }
.home-page .home-map { margin-bottom:18px; }
@media(max-width:440px) { .home-page .topbar { gap:8px; padding:14px; } .home-page .header-logo { width:38px; height:38px; } .home-page .topbar .brand { font-size:25.2px; } .home-page .topbar .home-tagline { max-width:46%; } }
.home-page .topbar .home-tagline { white-space:normal; overflow:visible; text-overflow:clip; }

/* Compact home header and map leave the priority card above the fixed menu. */
.home-page { padding-top:calc(8px + env(safe-area-inset-top,0px)); }
.home-page .topbar { background:transparent; border:0; box-shadow:none; border-radius:0; min-height:54px; padding:0 2px; margin-bottom:12px; }
.home-page .home-tagline { white-space:normal; }
.home-page .home-welcome { flex-wrap:nowrap; padding:12px 14px; }
.home-page .home-welcome h2 { flex:1 1 auto; min-width:0; font-size:18.0px; }
.home-page .home-clock { white-space:nowrap; flex:0 0 auto; font-size:15.84px; }
.home-page .home-map #map-summary { display:none; }
.home-page .home-map { padding:10px; margin-bottom:12px; }
.home-page .home-map #map-wrap { margin-top:0; }
.home-page .home-map #map { height:clamp(100px,calc(100dvh - 490px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)),280px); }
.home-page .home-priority { padding:18px; }
@media(max-width:440px) {
 .home-page .topbar .home-tagline { max-width:none; font-size:13.2px; line-height:1.5; }
 .home-page .home-welcome { gap:6px; }
 .home-page .home-welcome h2 { font-size:15.84px; }
 .home-page .home-clock { font-size:13.2px; }
}
.home-page .home-map #map { min-height:0; }
.map-period-field { display:flex; align-items:center; gap:12px; font-size:16.8px; color:#64748b; }
.map-period-field select { flex:1; min-width:0; }
.more-platforms .install-guide-button { flex:1 1 calc((100% - 16px)/3); min-width:0; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:8px; padding:12px 5px; min-height:90px; border:1px solid #e2e8f0; border-radius:24px; background:#f8fafc; color:#0f172a; font:inherit; font-size:15.84px; font-weight:600; text-align:center; cursor:pointer; }
.install-guide-button svg { width:25px; height:25px; }

/* Semantic typography: title, key information, body and supporting copy. */
:root { --text-title:26.4px; --text-section:21.6px; --text-body:19.2px; --text-support:16.8px; --text-caption:15.84px; --ink-primary:#0f172a; --ink-secondary:#64748b; }
.page, .onboarding, .modal, .map-sheet { font-size:var(--text-body); color:var(--ink-primary); line-height:1.6; }
.page .brand, .sheet-header h2, .modal h3 { font-size:var(--text-title) !important; font-weight:750 !important; color:var(--ink-primary); line-height:1.3; }
.onboarding h1 { font-size:33.6px; font-weight:750; line-height:1.3; }
.page h2:not(.brand), .page #schedule-form h2, .page .more-section-title, .home-section-heading h2 { font-size:var(--text-section) !important; font-weight:700 !important; line-height:1.4; }
.page .home-welcome h2 { font-size:var(--text-body) !important; }
.page h3, .schedule-title, .home-queue-card h3, .page .switch-row strong, .page .meta>strong, .regional-detail-pair span { font-size:var(--text-body) !important; font-weight:700 !important; }
.page input:not(.switch), .page select, .page textarea { font-size:var(--text-body) !important; font-weight:400; }
.page label, .page #schedule-form label, .page .form-staff .field label, .manage-field>span, .regional-staff>span, .regional-date>span { font-size:var(--text-support) !important; font-weight:600 !important; color:#334155; }
.page .hint, .page .form-hint, .page .muted, .page .meta>small, .page .more-security>p, .page .more-danger-item p, .page .more-version, .onboarding .muted { font-size:var(--text-support) !important; color:var(--ink-secondary); font-weight:400; line-height:1.65; }
.page .char-count, .page small, .page .home-tagline { font-size:var(--text-caption) !important; color:var(--ink-secondary); font-weight:400; }
.page .meta, .page .sheet-memo, .page .manage-memo, .page .manage-codes, .modal p { font-size:var(--text-body) !important; }
.page .btn, .page .more-guide, .install-guide-button, .onboarding .btn, .modal .btn { font-size:var(--text-support) !important; font-weight:650; }
.page .home-clock { font-size:var(--text-caption) !important; font-weight:500; }
.page .warning, .onboarding .warning { font-size:var(--text-support); font-weight:500; }
.page .warning strong, .onboarding .warning strong, .more-confirm-note strong { font-weight:700; }
.home-priority h2 { color:white; }
.priority-kicker, .priority-note, .overdue-note { font-size:var(--text-caption) !important; }
.home-priority .priority-numbers strong, .home-metric strong { font-weight:750; }
.install-popup[open] { animation:install-popup-enter .28s cubic-bezier(.22,.8,.25,1) both; }
.install-popup::backdrop { animation:install-backdrop-enter .22s ease both; }
@keyframes install-popup-enter { from { opacity:0; transform:translateY(12px) scale(.96); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes install-backdrop-enter { from { opacity:0; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) { .install-popup[open], .install-popup::backdrop { animation:none; } }
.bottom-nav .nav-btn .icon svg { width:37.4px; height:37.4px; stroke-width:2.1; }
.bottom-nav .nav-btn { min-height:78px; padding:8px 0; gap:3px; }
.bottom-nav .nav-btn>span:last-child { font-size:15.84px; }
.manage-page .row.three .manage-field>span, .regional-staff>span { white-space:normal; }
.home-page .home-map #map { height:clamp(80px,calc(100dvh - 560px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)),250px); }
.home-page .home-welcome h2 { overflow-wrap:anywhere; }

.home-page .home-welcome h2 { word-break:keep-all; }

/* Icon-only navigation keeps accessible menu names. */
.bottom-nav .nav-btn { gap:0; justify-content:center; }
.bottom-nav .nav-btn .icon { display:flex; align-items:center; justify-content:center; }

.onboarding { align-items:start; }
.onboarding .panel { animation:none; box-sizing:border-box; }
.onboarding .privacy-warning { border-left-width:1px; }
.onboarding-welcome .onboarding-body { text-align:center; }
.onboarding-welcome .logo { display:block; margin:0 auto; }
.onboarding-welcome .welcome-preview { justify-content:center; text-align:center; }

.onboarding-welcome .onboarding-lead { word-break:keep-all; }

.onboarding .visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
