:root { color-scheme: light; --ink:#17212b; --muted:#667085; --line:#d9e2ec; --bg:#f7f9fb; --panel:#fff; --field:#fff; --field-line:#b9c6d3; --accent:#0b7fab; --accent-soft:#eaf6fb; --accent-ink:#075f80; --danger:#c24135; --danger-soft:#fff5f3; --danger-line:#efb1a8; --ok:#138a53; --ok-soft:#effaf4; --ok-line:#9bd6b8; --soft:#edf7fb; --shadow:0 8px 24px rgba(23,33,43,.06); --tab-bg:rgba(255,255,255,.96); --hero-bg:linear-gradient(180deg,#f4fbfe 0%,#fff 100%); --hero-line:#c6dde8; }
[data-theme="dark"] { color-scheme: dark; --ink:#e7eef5; --muted:#91a2b4; --line:#263544; --bg:#0d141b; --panel:#121c25; --field:#0f1821; --field-line:#34475a; --accent:#4fb4d8; --accent-soft:#112e3d; --accent-ink:#9bdcf0; --danger:#ff8d82; --danger-soft:#321a1d; --danger-line:#6b3030; --ok:#63d69a; --ok-soft:#10291d; --ok-line:#2d6847; --soft:#102633; --shadow:0 12px 30px rgba(0,0,0,.36); --tab-bg:rgba(15,24,33,.96); --hero-bg:linear-gradient(180deg,#12303e 0%,#121c25 100%); --hero-line:#25495a; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--ink); background:var(--bg); line-height:1.45; word-break:keep-all; overflow-wrap:break-word; }
header { border-bottom:1px solid var(--line); background:var(--panel); }
.wrap { max-width:1040px; margin:0 auto; padding:20px; }
.header-row { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.brand-block { min-width:0; }
h1 { margin:0; font-size:24px; }
h1 .brand-home { display:inline-flex; align-items:center; gap:9px; border:0; border-radius:0; background:transparent; color:inherit; padding:0; font:inherit; font-weight:800; min-height:auto; line-height:1.1; }
h1 .brand-home img { width:34px; height:34px; border:1px solid var(--line); border-radius:8px; background:var(--panel); object-fit:cover; flex:0 0 auto; }
h1 .brand-home:hover { color:var(--accent-ink); }
h2 { margin:0 0 14px; font-size:17px; }
.sub { margin:6px 0 0; color:var(--muted); font-size:14px; }
main { display:grid; grid-template-columns:360px 1fr; gap:20px; align-items:start; }
section, form { background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:16px; }
.view-panel { scroll-margin-top:18px; }
label { display:block; margin:12px 0 6px; font-size:13px; color:var(--muted); }
input, textarea, select { width:100%; border:1px solid var(--field-line); border-radius:6px; padding:10px; font:inherit; color:var(--ink); background:var(--field); }
textarea { min-height:76px; resize:vertical; }
.row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
button { display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--field-line); border-radius:6px; background:var(--field); color:var(--ink); padding:9px 12px; font:inherit; line-height:1.2; cursor:pointer; white-space:nowrap; word-break:normal; overflow-wrap:normal; }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
button.danger { border-color:var(--danger-line); color:var(--danger); }
button.active { background:var(--accent-soft); border-color:var(--accent); color:var(--accent-ink); }
button:disabled { opacity:.55; cursor:default; }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.toolbar.compact { align-items:center; margin-top:10px; }
.toolbar.compact button.active { background:var(--accent-soft); border-color:var(--accent); color:var(--accent-ink); }
.option-list { display:grid; gap:8px; margin-top:8px; }
.check-row { display:flex; align-items:center; gap:9px; min-height:40px; padding:4px 0; margin:0; color:var(--muted); }
.check-row input { width:18px; height:18px; flex:0 0 18px; }
.preset-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(80px,1fr)); gap:8px; margin-top:8px; }
.time-window-list { display:grid; gap:8px; margin-top:8px; }
.time-window-row { display:grid; grid-template-columns:minmax(84px,max-content) minmax(0,1fr); gap:10px; align-items:center; overflow:hidden; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--field); }
.time-window-row .check-row { min-height:auto; padding:0; color:var(--ink); }
.time-window-inputs { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; align-items:end; min-width:0; }
.time-input-field { display:grid; gap:5px; min-width:0; margin:0; color:var(--muted); font-size:12px; }
.time-input-field span { line-height:1.2; }
.time-window-row:not(.active) .time-window-inputs { opacity:.55; }
.time-window-row input[type="time"] { width:100%; min-width:0; min-height:42px; padding:8px; font-size:15px; font-variant-numeric:tabular-nums; }
.preset-cards { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin:12px 0 14px; }
.preset-card { display:block; min-height:88px; text-align:left; border-color:var(--line); background:var(--panel); white-space:normal; }
.preset-card strong { display:block; font-size:15px; }
.preset-card span { display:block; margin-top:6px; color:var(--muted); font-size:12px; line-height:1.45; }
.form-step { margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.form-step:first-of-type { margin-top:0; padding-top:0; border-top:0; }
.step-title { display:flex; align-items:center; gap:8px; margin-bottom:8px; font-weight:750; }
.step-title span { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:999px; background:var(--accent-soft); color:var(--accent-ink); font-size:12px; }
.step-copy { margin:0 0 10px; color:var(--muted); font-size:13px; line-height:1.5; }
.form-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.form-actions button { min-height:42px; }
.notify-setup-card { margin-bottom:16px; border:1px solid var(--accent); border-radius:8px; padding:14px; background:var(--accent-soft); }
.notify-setup-card h2 { margin:0; font-size:18px; }
.notify-setup-card p { margin:8px 0 0; color:var(--muted); font-size:13px; line-height:1.55; }
.topic-copy-box { display:grid; gap:4px; margin-top:12px; border:1px solid var(--hero-line); border-radius:8px; padding:11px; background:var(--panel); }
.topic-copy-box span { color:var(--muted); font-size:12px; }
.topic-copy-box strong { font-size:16px; line-height:1.25; overflow-wrap:anywhere; }
.notify-setup-actions { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:10px; }
.notify-setup-actions button { min-height:40px; }
.notify-setup-steps { margin:10px 0 0; padding-left:20px; color:var(--muted); font-size:13px; line-height:1.55; }
.notify-setup-steps li + li { margin-top:3px; }
.form-details { margin-top:12px; border:1px solid var(--line); border-radius:8px; background:var(--panel); overflow:hidden; }
.form-details summary { padding:12px; cursor:pointer; font-weight:700; }
.form-details summary::-webkit-details-marker { display:none; }
.form-details summary::after { content:"열기"; float:right; color:var(--muted); font-size:12px; font-weight:500; }
.form-details[open] summary::after { content:"닫기"; }
.form-details-body { padding:0 12px 12px; }
.monitor { border-top:1px solid var(--line); padding:14px 0; }
.monitor:first-child { border-top:0; padding-top:0; }
.monitor-card { border:1px solid var(--line); border-radius:8px; padding:14px; background:var(--panel); margin-top:10px; }
.monitor-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.monitor-title strong { font-size:16px; }
.notification-badges { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; }
.pill { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border-radius:999px; font-size:12px; border:1px solid var(--line); color:var(--muted); }
.pill.ok { color:var(--ok); border-color:var(--ok-line); background:var(--ok-soft); }
.pill.warn { color:var(--danger); border-color:var(--danger-line); background:var(--danger-soft); }
.meta { margin:8px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
pre { margin:10px 0 0; white-space:pre-wrap; background:var(--field); border:1px solid var(--line); border-radius:6px; padding:10px; font:13px ui-monospace,SFMono-Regular,Menlo,monospace; }
.empty { color:var(--muted); padding:18px 0; }
.empty-state { border:1px solid var(--line); border-radius:8px; padding:16px; background:var(--field); color:var(--muted); }
.empty-state strong { display:block; color:var(--ink); font-size:15px; }
.empty-state p { margin:8px 0 0; font-size:13px; line-height:1.55; }
.status { margin-top:12px; color:var(--muted); font-size:13px; min-height:20px; }
.app-tabs { display:none; }
.header-actions { justify-content:flex-end; }
.top-tabs { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.top-tabs button { min-height:38px; border-color:transparent; background:transparent; color:var(--muted); }
.top-tabs button.active { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-ink); }
.home-summary { margin-bottom:20px; }
.hero-panel { display:grid; grid-template-columns:1fr auto; gap:14px; align-items:center; padding:18px; border:1px solid var(--hero-line); border-radius:8px; background:var(--hero-bg); }
.home-summary .hero-panel { grid-template-columns:1fr; }
.eyebrow { display:block; margin-bottom:5px; color:var(--accent-ink); font-size:12px; font-weight:700; }
.hero-panel h2 { margin:0; font-size:24px; }
.home-first-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; min-width:0; }
.home-first-action { min-height:66px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:5px; text-align:left; white-space:normal; }
.home-first-action strong { font-size:15px; line-height:1.2; }
.home-first-action span { color:var(--muted); font-size:12px; line-height:1.35; }
.home-first-action.primary span { color:rgba(255,255,255,.82); }
.home-hint { margin-top:12px; border:1px solid var(--hero-line); border-radius:8px; padding:10px 12px; background:var(--accent-soft); color:var(--accent-ink); font-size:13px; line-height:1.45; }
.recommend-card { margin-top:12px; border:1px solid var(--line); border-radius:8px; padding:14px; background:var(--panel); }
.recommend-card.warn { border-color:var(--danger-line); background:var(--danger-soft); }
.recommend-card.ok { border-color:var(--ok-line); background:var(--ok-soft); }
.recommend-card h2 { margin:0; font-size:17px; }
.recommend-card p { margin:8px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.recommend-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.route-planner { margin-bottom:20px; }
.route-grid { display:grid; grid-template-columns:340px 1fr; gap:16px; }
.route-control-panel, .route-result-panel { min-width:0; }
.route-step { margin-top:12px; border:1px solid var(--line); border-radius:8px; padding:14px; background:var(--panel); }
.route-step:first-child { margin-top:0; }
.route-place-list { display:grid; gap:8px; margin-top:12px; }
.route-place { width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; text-align:left; white-space:normal; border-color:var(--line); background:var(--panel); }
.route-place strong { display:block; font-size:14px; line-height:1.3; }
.route-place span span { display:block; margin-top:4px; color:var(--muted); font-size:12px; line-height:1.4; }
.route-place.active { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-ink); }
.route-place-more { margin-top:-2px; padding:0; border:0; background:transparent; }
.route-selected-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start; border:1px solid var(--hero-line); border-radius:8px; padding:14px; background:var(--accent-soft); }
.route-selected-card h3 { margin:0; font-size:18px; }
.route-selected-card p { margin:6px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.route-provider-note { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; border:1px solid var(--line); border-radius:8px; padding:10px 12px; background:var(--field); }
.route-provider-note strong { font-size:14px; }
.route-provider-note span { color:var(--muted); font-size:12px; }
.route-card { margin-top:12px; border:1px solid var(--line); border-radius:8px; padding:14px; background:var(--panel); }
.route-card.featured { border-color:var(--accent); background:var(--accent-soft); }
.route-card.warn { border-color:var(--danger-line); background:var(--danger-soft); }
.route-card-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start; }
.route-card h3 { margin:0; font-size:17px; }
.route-card p { margin:6px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.route-station-pair { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.route-station-pair div { border:1px solid var(--line); border-radius:8px; padding:10px; background:var(--field); }
.route-station-pair span { display:block; color:var(--muted); font-size:12px; }
.route-station-pair strong { display:block; margin-top:4px; font-size:14px; line-height:1.35; }
.route-segments { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:10px; }
.route-segment { border:1px solid var(--line); border-radius:8px; padding:10px; background:var(--panel); }
.route-segment span, .route-segment small { display:block; color:var(--muted); font-size:12px; line-height:1.35; }
.route-segment strong { display:block; margin:4px 0; font-size:17px; }
.route-warnings { margin:10px 0 0; padding-left:20px; color:var(--danger); font-size:13px; line-height:1.5; }
.route-alt-toggle { margin-top:10px; }
.route-alt-toggle button { width:100%; min-height:42px; }
.route-actions { display:grid; grid-template-columns:1.5fr 1fr 1fr; }
.route-actions button { min-height:42px; }
.status.warn { color:var(--danger); }
.onboarding-card { margin-top:12px; border:1px solid var(--line); border-radius:8px; padding:14px; background:var(--panel); }
.onboarding-card h2 { margin:0; font-size:17px; }
.onboarding-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:12px; }
.onboarding-grid div { border:1px solid var(--line); border-radius:8px; padding:10px; background:var(--field); }
.onboarding-grid strong { display:block; font-size:13px; }
.onboarding-grid span { display:block; margin-top:5px; color:var(--muted); font-size:12px; line-height:1.4; }
.onboarding-card ol { margin:10px 0 0; padding-left:22px; color:var(--muted); font-size:13px; line-height:1.55; }
.onboarding-card li + li { margin-top:4px; }
.home-action-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
.home-action-grid button { min-height:44px; }
.mode-note { margin-bottom:12px; border:1px solid var(--accent); background:var(--accent-soft); color:var(--accent-ink); border-radius:8px; padding:10px; font-size:13px; line-height:1.5; }
.summary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px; }
.summary-card { border:1px solid var(--line); border-radius:8px; padding:12px; background:var(--panel); }
.summary-card span { display:block; color:var(--muted); font-size:12px; }
.summary-card strong { display:block; margin-top:5px; font-size:16px; }
.home-summary .summary-grid { display:none; }
.home-station-head { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-top:14px; }
.home-station-head strong { font-size:16px; }
.home-station-head span { color:var(--muted); font-size:12px; }
.home-favorites { display:grid; gap:8px; margin-top:12px; }
.home-station { min-height:74px; display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; border:1px solid var(--line); border-radius:8px; padding:12px; background:var(--panel); text-align:left; }
.home-station strong { display:block; font-size:15px; }
.home-station .pill { min-width:56px; justify-content:center; font-weight:750; }
.home-follow-actions { display:grid; grid-template-columns:1fr; gap:8px; margin-top:10px; }
.home-follow-actions button { min-height:42px; }
.dashboard { margin-bottom:20px; }
.analytics { margin-bottom:20px; }
.weather { margin-bottom:20px; }
.weather.compact { margin-top:-8px; }
.weather.compact .detail-section { margin-top:0; }
.weather-grid { display:grid; grid-template-columns:1.2fr 1fr; gap:14px; }
.weather-main { display:grid; grid-template-columns:auto 1fr; gap:14px; align-items:center; }
.weather-temp { font-size:34px; font-weight:750; line-height:1; }
.weather-facts { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.fact { border:1px solid var(--line); border-radius:6px; padding:9px; background:var(--panel); }
.fact strong { display:block; font-size:15px; }
.dash-grid { display:grid; grid-template-columns:340px 1fr; gap:16px; }
#station-detail { scroll-margin-top:96px; }
.station-tools { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; }
.station-quick-panel { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin:12px 0; }
.station-quick-panel button { min-height:58px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:4px; text-align:left; white-space:normal; }
.station-quick-panel strong { font-size:14px; }
.station-quick-panel span { color:var(--muted); font-size:12px; line-height:1.3; }
.station-quick-panel button.active span { color:var(--accent-ink); }
.station-filter-row { gap:6px; }
.station-filter-row button { padding:8px 10px; }
.filter-context { margin-top:8px; border:1px solid var(--line); border-radius:8px; padding:10px; background:var(--field); }
.filter-context-row { display:flex; flex-wrap:wrap; gap:6px; }
.filter-context p { margin:8px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.context-chip { display:inline-flex; align-items:center; min-height:24px; border:1px solid var(--line); border-radius:999px; padding:3px 8px; color:var(--muted); background:var(--panel); font-size:12px; }
.context-chip.active { border-color:var(--accent); color:var(--accent-ink); background:var(--accent-soft); }
.location-fallback-card { margin-top:8px; border:1px solid var(--hero-line); border-radius:8px; padding:12px; background:var(--accent-soft); color:var(--accent-ink); }
.location-fallback-card strong { display:block; font-size:14px; }
.location-fallback-card p { margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.station-compact-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:10px; background:var(--panel); border-top:1px solid var(--line); }
.station-compact-actions button:only-child { grid-column:1 / -1; }
.pattern-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.analysis-controls { display:grid; grid-template-columns:1.4fr 1fr 1fr auto; gap:8px; align-items:end; margin:12px 0 16px; }
.analytics-overview { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:0 0 14px; }
.insight-card { border:1px solid var(--line); border-radius:8px; padding:12px; background:var(--panel); min-height:112px; }
.insight-card.warn { border-color:var(--danger-line); background:var(--danger-soft); }
.insight-card.ok { border-color:var(--ok-line); background:var(--ok-soft); }
.insight-card strong { display:block; margin-top:5px; font-size:18px; line-height:1.25; }
.insight-card p { margin:7px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.analytics-focus { margin-bottom:14px; }
.analytics-section { border:1px solid var(--line); border-radius:8px; background:var(--panel); overflow:hidden; }
.analytics-section summary { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:12px; cursor:pointer; font-weight:700; }
.analytics-section summary::-webkit-details-marker { display:none; }
.analytics-section summary::after { content:"열기"; color:var(--muted); font-size:12px; font-weight:500; }
.analytics-section[open] summary::after { content:"닫기"; }
.analytics-section-body { padding:0 12px 12px; }
.pattern-list { display:grid; gap:8px; }
.pattern-item { border:1px solid var(--line); border-radius:6px; padding:10px; background:var(--panel); }
.bar { height:8px; border-radius:999px; background:var(--field); overflow:hidden; margin-top:8px; }
.bar span { display:block; height:100%; background:var(--accent); }
.bar.warn span { background:var(--danger); }
.metric-row { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; }
.favorite-strip { display:flex; gap:8px; flex-wrap:wrap; min-height:34px; margin-top:10px; }
.strip-label { display:inline-flex; align-items:center; color:var(--muted); font-size:12px; padding:0 2px; }
.favorite-chip { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-ink); }
.recent-chip { border-color:var(--line); background:var(--field); color:var(--ink); }
.station-list { max-height:520px; overflow:auto; border:1px solid var(--line); border-radius:6px; }
.station-btn { width:100%; display:grid; grid-template-columns:1fr auto; gap:8px; border:0; border-bottom:1px solid var(--line); border-radius:0; text-align:left; padding:10px 12px; }
.station-btn:last-child { border-bottom:0; }
.station-btn.active { background:var(--accent-soft); }
.station-label { display:flex; gap:6px; align-items:center; }
.star { color:#d39b00; font-weight:700; }
.count { font-weight:700; }
.count.low { color:var(--danger); }
.map-frame { width:100%; height:300px; border:1px solid var(--line); border-radius:8px; background:var(--field); }
.detail-head { display:flex; justify-content:space-between; gap:12px; align-items:start; margin-bottom:10px; }
.detail-head > div { min-width:0; }
.detail-head > button, .detail-head .toolbar { flex:0 0 auto; }
.station-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(88px,1fr)); gap:8px; margin:12px 0; }
.quick-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:12px 0; }
.official-flow-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; margin:12px 0; border:1px solid var(--accent); border-radius:8px; padding:13px; background:var(--accent-soft); }
.official-flow-card strong { display:block; color:var(--accent-ink); font-size:15px; }
.official-flow-card p { margin:5px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.station-map-section summary { color:var(--accent-ink); }
.station-map-section[open] summary::after { content:"접기"; }
.station-weather-compact { margin-top:10px; border:1px solid var(--line); border-radius:8px; padding:11px 12px; background:var(--panel); }
.station-weather-compact.warn { border-color:var(--danger-line); background:var(--danger-soft); }
.station-weather-compact.ok { border-color:var(--ok-line); background:var(--ok-soft); }
.station-weather-compact p { margin:6px 0 0; color:var(--ink); font-size:13px; line-height:1.45; }
.station-weather-compact span { display:block; margin-top:4px; color:var(--muted); font-size:12px; line-height:1.45; }
.station-weather-compact details { margin-top:8px; }
.station-weather-compact summary { cursor:pointer; color:var(--accent-ink); font-size:12px; font-weight:700; }
.status-card { margin:12px 0; border:1px solid var(--line); border-radius:8px; padding:13px; background:var(--panel); }
.status-card.warn { border-color:var(--danger-line); background:var(--danger-soft); }
.status-card.ok { border-color:var(--ok-line); background:var(--ok-soft); }
.status-card strong { display:block; font-size:16px; }
.status-card span { display:block; margin-top:6px; color:var(--muted); font-size:13px; line-height:1.5; }
.safe-note { margin:10px 0 0; border:1px solid var(--line); border-radius:8px; padding:10px; background:var(--field); color:var(--muted); font-size:13px; line-height:1.5; }
.safe-note.warn { border-color:var(--danger-line); background:var(--danger-soft); color:var(--danger); }
.monitor-counts { margin-top:10px; border:1px solid var(--line); border-radius:8px; padding:9px 10px; background:var(--field); color:var(--muted); font-size:13px; line-height:1.45; }
.role-badge { display:inline-flex; align-items:center; min-height:24px; border:1px solid var(--line); border-radius:999px; padding:3px 8px; color:var(--muted); font-size:12px; }
.role-badge.admin { border-color:var(--danger-line); color:var(--danger); background:var(--danger-soft); }
.role-badge.user { border-color:var(--ok-line); color:var(--ok); background:var(--ok-soft); }
.role-badge.viewer { border-color:var(--line); color:var(--muted); background:var(--field); }
.detail-card { border:1px solid var(--line); border-radius:8px; padding:11px; background:var(--panel); }
.detail-card span { display:block; color:var(--muted); font-size:12px; }
.detail-card strong { display:block; margin-top:4px; font-size:17px; }
.detail-card.warn strong { color:var(--danger); }
.detail-section { margin-top:10px; border:1px solid var(--line); border-radius:8px; background:var(--panel); overflow:hidden; }
.detail-section summary { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px; cursor:pointer; font-weight:700; }
.detail-section summary::-webkit-details-marker { display:none; }
.detail-section summary::after { content:"열기"; color:var(--muted); font-size:12px; font-weight:500; }
.detail-section[open] summary::after { content:"닫기"; }
.detail-section-body { padding:0 12px 12px; }
#review-form { border:0; border-radius:0; padding:0; background:transparent; box-shadow:none; }
.review-item { border-top:1px solid var(--line); padding:10px 0; }
.review-item:first-child { border-top:0; }
.note { color:var(--muted); font-size:13px; line-height:1.5; }
.audit-list { max-height:360px; overflow:auto; border-top:1px solid var(--line); }
.audit-item { padding:10px 0; border-bottom:1px solid var(--line); }
.audit-item:last-child { border-bottom:0; }
.timeline-list { display:grid; gap:10px; margin-top:10px; }
.timeline-item { border:1px solid var(--line); border-radius:8px; padding:12px; background:var(--panel); }
.timeline-item .monitor-title { align-items:flex-start; }
.operation-status { margin-top:12px; }
.operation-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; border:1px solid var(--line); border-radius:8px; padding:14px; background:var(--panel); }
.operation-head.warn { border-color:var(--danger-line); background:var(--danger-soft); }
.operation-head.ok { border-color:var(--ok-line); background:var(--ok-soft); }
.operation-head h3 { margin:0; font-size:20px; }
.operation-head p { margin:6px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.operation-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:10px; }
.operation-card { border:1px solid var(--line); border-radius:8px; padding:12px; background:var(--panel); min-height:142px; display:flex; flex-direction:column; gap:8px; }
.operation-card.warn { border-color:var(--danger-line); background:var(--danger-soft); }
.operation-card.ok { border-color:var(--ok-line); background:var(--panel); }
.operation-card .monitor-title { align-items:flex-start; }
.operation-card .monitor-title > span:first-child { color:var(--muted); font-size:12px; }
.operation-card strong { display:block; font-size:20px; line-height:1.2; }
.operation-card button { align-self:flex-start; margin-top:auto; min-height:34px; padding:7px 10px; }
.operation-foot { margin-top:10px; color:var(--muted); font-size:13px; line-height:1.5; }
.traffic-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.traffic-section { margin-top:12px; }
.traffic-section h3 { margin:0 0 8px; font-size:14px; }
.traffic-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; padding:8px 0; border-top:1px solid var(--line); }
.traffic-row:first-child { border-top:0; }
.traffic-bar { grid-column:1 / -1; height:7px; border-radius:999px; background:var(--field); overflow:hidden; }
.traffic-bar span { display:block; height:100%; background:var(--accent); }
.storage-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.admin-subnav { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin:12px 0; padding:6px; border:1px solid var(--line); border-radius:8px; background:var(--field); }
.admin-subnav button { border-color:transparent; background:transparent; }
.admin-subnav button.active { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-ink); }
.inline-details { margin-top:8px; }
.inline-details summary { cursor:pointer; color:var(--muted); font-size:13px; }
.history-input { margin-top:0; }
.help-backdrop { position:fixed; inset:0; z-index:80; display:none; align-items:flex-start; justify-content:center; padding:72px 16px 16px; background:rgba(23,33,43,.45); overflow:auto; }
.help-backdrop.open { display:flex; }
.help-note { width:min(520px,100%); max-height:calc(100dvh - 96px); overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; background:var(--panel); border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); padding:18px; }
.help-note h2 { margin-bottom:8px; }
.help-note h3 { margin:0; font-size:14px; }
.help-note [data-help-role][hidden] { display:none !important; }
.help-note ul { margin:8px 0 0; padding-left:20px; color:var(--muted); line-height:1.55; font-size:14px; }
.help-section { margin-top:10px; border:1px solid var(--line); border-radius:8px; background:var(--panel); overflow:hidden; }
.help-section summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; cursor:pointer; font-weight:700; }
.help-section summary::-webkit-details-marker { display:none; }
.help-section summary::after { content:"열기"; color:var(--muted); font-size:12px; font-weight:500; }
.help-section[open] summary::after { content:"닫기"; }
.help-section-body { padding:0 12px 12px; display:grid; gap:10px; }
.help-section-body h3 { padding:10px 12px 0; border:1px solid var(--line); border-bottom:0; border-radius:8px 8px 0 0; background:var(--field); }
.help-section-body h3 + ul { margin:-10px 0 0; padding:0 12px 12px 28px; border:1px solid var(--line); border-top:0; border-radius:0 0 8px 8px; background:var(--field); }
.help-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.menu-backdrop { position:fixed; inset:0; z-index:90; display:none; align-items:flex-start; justify-content:center; padding:72px 16px 16px; background:rgba(23,33,43,.35); }
.menu-backdrop.open { display:flex; }
.menu-panel { width:min(360px,100%); background:var(--panel); border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); padding:14px; }
.menu-actions { display:grid; gap:8px; margin-top:12px; }
.menu-actions button { width:100%; justify-content:flex-start; padding:12px; }
.preview-switch { border:1px solid var(--line); border-radius:8px; padding:10px; background:var(--field); }
.preview-buttons { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:8px; }
.menu-actions .preview-buttons button { width:auto; justify-content:center; padding:9px 6px; font-size:12px; }
.feedback-backdrop { position:fixed; inset:0; z-index:95; display:none; align-items:flex-start; justify-content:center; padding:72px 16px 16px; background:rgba(23,33,43,.42); overflow:auto; }
.feedback-backdrop.open { display:flex; }
.feedback-panel { width:min(480px,100%); background:var(--panel); border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); padding:16px; }
.feedback-form { display:grid; gap:10px; margin-top:12px; }
.feedback-form textarea { min-height:130px; resize:vertical; }
.feedback-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:4px; }
@media (max-width:840px) { main { grid-template-columns:1fr; } .wrap { padding:14px; } }
@media (max-width:840px) { .dash-grid { grid-template-columns:1fr; } .station-list { max-height:340px; } }
@media (max-width:840px) { .route-grid { grid-template-columns:1fr; } .route-segments { grid-template-columns:1fr; } }
@media (max-width:840px) { .pattern-grid { grid-template-columns:1fr; } }
@media (max-width:840px) { .analytics-overview { grid-template-columns:repeat(2,1fr); } }
@media (max-width:840px) { .weather-grid { grid-template-columns:1fr; } }
@media (max-width:840px) { .storage-grid { grid-template-columns:1fr; } }
@media (max-width:840px) { .operation-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:840px) { .onboarding-grid { grid-template-columns:1fr; } }
@media (max-width:520px) { .analysis-controls { grid-template-columns:1fr; } }
@media (max-width:520px) { .analytics-overview { grid-template-columns:1fr; } }
@media (max-width:520px) { .operation-grid { grid-template-columns:1fr; } .operation-head { grid-template-columns:1fr; } .operation-head button { width:100%; } }
@media (max-width:520px) { .header-row { align-items:flex-start; } h1 { font-size:21px; } .preset-row { grid-template-columns:repeat(2,1fr); } }
@media (max-width:760px) {
  body { padding-bottom:calc(104px + env(safe-area-inset-bottom)); }
  header { position:sticky; top:0; z-index:10; box-shadow:0 1px 0 rgba(23,33,43,.08); }
  .wrap { padding:12px; }
  .header-row { align-items:center; }
  .top-tabs { display:none; }
  h1 { font-size:20px; }
  h2 { font-size:16px; }
  .sub { font-size:12px; }
  .header-row .sub { display:none; }
  section, form { border-radius:8px; padding:14px; box-shadow:var(--shadow); }
  .help-backdrop { padding:58px 12px 12px; }
  .help-note { max-height:calc(100dvh - 70px); padding:16px; }
  main { display:block; }
  main > .view-panel { margin-bottom:12px; }
  .view-panel { scroll-margin-top:76px; }
  .view-panel { display:none; }
  .view-panel.active { display:block; }
  .app-tabs { position:fixed; left:10px; right:10px; bottom:calc(10px + env(safe-area-inset-bottom)); z-index:30; display:grid; grid-template-columns:repeat(6,1fr); gap:4px; padding:6px; border:1px solid var(--line); border-radius:8px; background:var(--tab-bg); box-shadow:0 14px 40px rgba(23,33,43,.20); backdrop-filter:blur(12px); }
  body[data-role="user"] .app-tabs { grid-template-columns:repeat(4,1fr); }
  body[data-role="viewer"] .app-tabs { grid-template-columns:repeat(3,1fr); }
  .app-tabs button { min-height:44px; border:0; border-radius:6px; padding:10px 2px; color:var(--muted); background:transparent; font-size:12px; }
  .app-tabs button.active { background:var(--accent); color:#fff; }
  .hero-panel { grid-template-columns:1fr; padding:16px; }
  .hero-panel h2 { font-size:22px; }
  .home-first-actions { grid-template-columns:1fr 1fr; min-width:0; }
  .home-first-action { min-height:68px; padding:10px; }
  .onboarding-card { display:none; }
  .route-step { padding:12px; }
  .route-control-panel .toolbar.compact { display:grid; grid-template-columns:1fr auto; }
  .route-control-panel .toolbar.compact button { min-height:44px; }
  .route-control-panel .toolbar.compact button:not(.primary) { min-width:92px; }
  .home-follow-actions { grid-template-columns:1fr 1fr; }
  .summary-grid { grid-template-columns:1fr 1fr; }
  .summary-grid .summary-card:first-child { grid-column:1 / -1; }
  .weather { display:block; }
  .weather-grid { gap:10px; }
  .weather.compact .detail-head { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; }
  .weather.compact .detail-head button { padding:8px 10px; min-width:max-content; }
  .preset-cards { grid-template-columns:1fr; }
  .time-window-row { grid-template-columns:1fr; align-items:stretch; gap:8px; padding:12px; }
  .time-window-row .check-row { min-height:32px; }
  .time-window-inputs { grid-template-columns:1fr; gap:8px; }
  .time-window-row input[type="time"] { min-height:48px; font-size:16px; }
  .notify-setup-actions { grid-template-columns:1fr 1fr; }
  .form-actions { display:grid; grid-template-columns:1fr 1fr; margin:16px 0 0; padding:0; border:0; background:transparent; box-shadow:none; backdrop-filter:none; }
  .form-actions button { width:100%; min-height:46px; }
  .dash-grid { gap:12px; }
  .route-grid { gap:12px; }
  .route-provider-note { display:grid; grid-template-columns:1fr; }
  .route-station-pair { grid-template-columns:1fr; }
  .route-segments { grid-template-columns:1fr; }
  .route-card { padding:12px; }
  .route-card h3 { font-size:16px; }
  .route-card-head { grid-template-columns:1fr; gap:8px; }
  .route-card-head .pill { width:max-content; }
  .route-actions { grid-template-columns:1fr 1fr; }
  .route-actions .primary { grid-column:1 / -1; }
  .station-list { max-height:none; }
  .map-frame { height:180px; }
  .station-tools { grid-template-columns:1fr; }
  .station-quick-panel { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .station-quick-panel button { min-height:62px; padding:9px; }
  .quick-actions { grid-template-columns:1fr; }
  .official-flow-card { grid-template-columns:1fr; }
  .official-flow-card button { width:100%; min-height:44px; }
  .traffic-grid { grid-template-columns:1fr; }
  .detail-card { padding:10px 8px; }
  .detail-card strong { font-size:16px; }
  .audit-list { max-height:none; }
  .detail-head { align-items:flex-start; }
}
@media (max-width:380px) { .station-metrics { grid-template-columns:1fr; } .home-first-actions { grid-template-columns:1fr; } .home-station { grid-template-columns:1fr; } .home-station .pill { width:100%; min-height:32px; } .notify-setup-actions { grid-template-columns:1fr; } }
