:root {
  color-scheme: light;
  font-family: "DM Sans", "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  color: #20252c;
  background: #f2f3ee;
  --surface: #f9faf6;
  --surface-strong: #fff;
  --surface-muted: #eef0eb;
  --text: #20252c;
  --text-soft: #697078;
  --line: #dfe2dc;
  --blue: #2864dc;
  --blue-dark: #164cae;
  --green: #1f9d6a;
  --orange: #e49b18;
  --red: #e6543b;
  --shadow: 0 18px 50px rgba(31, 37, 44, 0.14);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(40, 100, 220, 0.25); outline-offset: 2px; }

.app-shell { width: 100%; height: 100%; display: flex; flex-direction: column; color: var(--text); background: var(--surface); }
.topbar { height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.96); z-index: 1000; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 20px; letter-spacing: -0.5px; }
.brand strong span { font-weight: 500; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--blue); transform: rotate(-5deg); }
.brand-mark svg { width: 22px; height: 22px; transform: rotate(5deg); fill: currentColor; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.connection-state { display: inline-flex; align-items: center; gap: 7px; margin-right: 8px; color: var(--text-soft); font-size: 12px; font-weight: 600; }
.connection-state > i { width: 7px; height: 7px; border-radius: 50%; background: #a9b0ad; box-shadow: 0 0 0 4px rgba(169,176,173,0.13); }
.connection-state.active > i { background: #27a66e; box-shadow: 0 0 0 4px rgba(39,166,110,0.12); }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: transparent; font-size: 18px; }
.icon-button:hover { background: var(--surface-muted); }
.settings-button, .settings-sheet-handle { display: none; }
.settings-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.workspace { min-width: 0; min-height: 0; flex: 1; display: flex; position: relative; overflow: hidden; }
.control-panel { width: 392px; flex: 0 0 392px; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface-strong); z-index: 800; }
.panel-scroll { min-height: 0; overflow-y: auto; padding: 28px 26px 20px; scrollbar-width: thin; overscroll-behavior: contain; }
.panel-heading-row { display: flex; align-items: center; justify-content: space-between; }
.panel-heading-row h2 { margin: 0; color: var(--text); font-size: 20px; letter-spacing: -0.02em; }
.panel-heading-row h2 span { margin-left: 7px; color: var(--text-soft); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: 10px; line-height: 1; font-weight: 700; letter-spacing: 1.7px; }
.mobile-close { display: none; }

.category-section, .notification-section, .input-section { margin-top: 25px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.section-title-row h2 { margin: 0; font-size: 13px; }
.section-title-row > span { color: var(--text-soft); font-size: 11px; }
.section-help { margin: 0 0 11px; color: var(--text-soft); font-size: 10px; line-height: 1.55; }
.hazard-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.hazard-chips button { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-soft); background: var(--surface); font-size: 11px; font-weight: 600; }
.hazard-chips button[aria-pressed="true"] { border-color: rgba(40,100,220,0.42); color: var(--blue); background: rgba(40,100,220,0.09); }

.permission-status { margin: 0 0 9px; padding: 8px 9px; border-radius: 9px; color: var(--text-soft); background: var(--surface-muted); font-size: 8px; line-height: 1.45; }
.permission-status[data-state="ready"] { color: #166044; background: #edf8f3; }
.permission-status[data-state="error"], .permission-status[data-state="unavailable"] { color: #9d402e; background: #fff2ee; }
.notification-setting-row { width: 100%; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 9px; min-height: 58px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: transparent; }
.notification-setting-row:hover { background: rgba(40,100,220,0.035); }
.setting-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-muted); }
.notification-setting-row > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.notification-setting-row strong { font-size: 10px; }
.notification-setting-row small { color: var(--text-soft); font-size: 8px; }
.setting-switch { width: 82px; height: 32px; position: relative; display: flex; align-items: center; flex: 0 0 82px; border: 1px solid rgba(105,112,120,0.2); border-radius: 18px; background: #e8ebe9; box-shadow: inset 0 1px 3px rgba(32,37,44,0.12); overflow: hidden; }
.setting-switch span { width: 50%; position: relative; z-index: 2; color: #737b80; text-align: center; font-size: 8px; font-weight: 900; transition: color 160ms ease; }
.setting-switch i { width: 36px; height: 26px; position: absolute; z-index: 1; left: 3px; top: 2px; border-radius: 14px; background: #7b838a; box-shadow: 0 2px 5px rgba(32,37,44,0.2); transition: transform 180ms ease,background 180ms ease; }
.setting-switch[data-state="off"] span:first-child, .setting-switch[data-state="on"] span:nth-child(2) { color: #fff; }
.setting-switch[data-state="on"] i { transform: translateX(39px); background: var(--green); }

.source-status { margin: 10px 0 0; color: var(--text-soft); font-size: 9px; line-height: 1.45; }
.source-status[data-state="ready"] { color: #166044; font-weight: 700; }
.source-status[data-state="unavailable"] { color: #a43a2c; font-weight: 700; }

.map-stage { min-width: 0; flex: 1; position: relative; overflow: hidden; background: #e9eeec; }
.map-canvas, .mapbox-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.report-location-picker { position: absolute; z-index: 700; inset: 0; pointer-events: none; }
.report-location-crosshair { width: 48px; height: 48px; position: absolute; left: 50%; top: 50%; display: grid; place-items: center; transform: translate(-50%,-50%); color: #fff; border: 3px solid #fff; border-radius: 50%; background: rgba(25,103,210,0.92); box-shadow: 0 5px 18px rgba(32,37,44,0.38); font-size: 34px; font-weight: 500; line-height: 1; }
.report-location-picker-panel { position: absolute; left: 50%; bottom: max(24px,env(safe-area-inset-bottom)); width: min(420px,calc(100% - 28px)); transform: translateX(-50%); padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.98); box-shadow: 0 12px 34px rgba(32,37,44,0.28); pointer-events: auto; }
.report-location-picker-panel p { margin: 0 0 9px; color: #374047; text-align: center; font-size: 10px; font-weight: 700; }
.report-location-picker-panel p[data-state="error"] { color: var(--red); }
.report-location-picker-panel > div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.report-location-picker-panel button { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); font-size: 11px; font-weight: 800; }
#confirm-report-location { border-color: #1967d2; color: #fff; background: #1967d2; }
#confirm-report-location:disabled { opacity: 0.58; }
.map-load-state { position: absolute; z-index: 4; left: 50%; top: 50%; margin: 0; transform: translate(-50%,-50%); padding: 10px 13px; border-radius: 10px; color: #26364a; background: rgba(255,255,255,0.94); box-shadow: 0 7px 20px rgba(38,54,74,0.15); font-size: 10px; font-weight: 700; }
.map-load-state.error { display: grid; width: min(360px,calc(100% - 32px)); gap: 10px; color: #a14b1d; text-align: center; }
.map-load-state button { min-height: 38px; border: 0; border-radius: 10px; color: #fff; background: #1967d2; font: inherit; cursor: pointer; }

.hazard-marker, .user-report-marker { position: absolute; z-index: 3; display: grid; place-items: center; transform: translate(-50%,-50%); border: 4px solid #fff; border-radius: 50%; color: #fff; box-shadow: 0 7px 19px rgba(31,37,44,0.36),0 0 0 2px rgba(32,37,44,0.08); font-weight: 800; }
.hazard-marker { width: 48px; height: 48px; font-size: 19px; }
.user-report-marker { width: 44px; height: 44px; font-size: 16px; }
.shared-data-marker { width: 38px; height: 38px; display: grid; place-items: center; border: 4px solid #fff; border-radius: 50%; color: #fff; box-shadow: 0 6px 16px rgba(31,37,44,0.4),0 0 0 2px rgba(32,37,44,0.1); cursor: pointer; }
.shared-data-marker > span { line-height: 1; font-size: 19px; }
.shared-data-marker.shared-underpass { background: #007bff; }
.shared-data-marker.shared-police { background: #7540c8; }
.shared-data-marker.selected { transform: scale(1.35); box-shadow: 0 0 0 4px rgba(255,173,0,0.35), 0 4px 12px rgba(31,37,44,0.35); }
.road-flooding { background: #008cff; }
.river-flooding { background: #1f9aaa; }
.landslide { background: #a86b2e; }
.tsunami { background: #7c5ce5; }
.police-enforcement { background: #9b5cff; }
.flood { background: #008cff; }.accident { background: #ff4f5e; }.roadwork { background: #ffad00; }.police { background: #9b5cff; }
.object { background: #e37a23; }.broken-down { background: #e0574f; }.congestion { background: #d9485f; }.road-damage { background: #795548; }
.hail { background: #7c63d9; }.heavy-rain { background: #3478d4; }.strong-wind { background: #1f9aaa; }.heavy-snow { background: #4e86d8; }
.low-visibility { background: #66788a; }.animal { background: #8a6b3f; }.wrong-way { background: #d33939; }.sign-issue { background: #d98b18; }
.hazard-marker.selected, .user-report-marker.selected { box-shadow: 0 0 0 5px rgba(255,173,0,0.32), 0 7px 18px rgba(31,37,44,0.28); }
.user-location { width: 42px; height: 42px; z-index: 20; display: grid; place-items: center; }
.user-location-halo { position: absolute; inset: 0; border-radius: 50%; background: rgba(66,133,244,0.18); animation: location-pulse 2s ease-out infinite; }
.user-location-arrow { position: relative; width: 30px; height: 30px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; color: #fff; background: #1967d2; box-shadow: 0 3px 10px rgba(25,103,210,0.45); transform-origin: center; transition: transform 180ms linear; will-change: transform; }
.user-location-arrow svg { width: 19px; height: 19px; fill: currentColor; }
.user-location-label { position: absolute; top: 43px; left: 50%; transform: translateX(-50%); padding: 2px 6px; border: 1px solid rgba(25,103,210,0.18); border-radius: 6px; color: #174ea6; background: rgba(255,255,255,0.95); box-shadow: 0 2px 6px rgba(32,37,44,0.14); white-space: nowrap; font-size: 9px; font-weight: 900; }
.user-report-map-marker { z-index: 30; }
.user-report-map-marker-button { width: 32px; height: 32px; position: relative; display: block; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.user-report-map-marker-button:focus-visible { outline: 3px solid rgba(25,103,210,0.42); outline-offset: 3px; }
.user-report-map-marker-icon { width: 32px; height: 32px; display: block; }
.user-report-map-marker-count { min-width: 18px; height: 18px; position: absolute; top: -7px; right: -8px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; border-radius: 999px; color: #fff; background: #e53935; box-shadow: 0 2px 7px rgba(32,37,44,0.3); font-size: 10px; font-weight: 900; line-height: 1; }
.continuous-demo-vehicle { width: 48px; height: 48px; position: relative; display: grid; place-items: center; pointer-events: none; }
.continuous-demo-vehicle-graphic { width: 38px; height: 38px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; color: #fff; background: #ff6b20; box-shadow: 0 4px 14px rgba(184,63,10,0.42); transform-origin: center; will-change: transform; }
.continuous-demo-vehicle-graphic svg { width: 28px; height: 28px; fill: currentColor; }
.continuous-demo-vehicle-graphic .vehicle-window { fill: #28323d; }
.continuous-demo-vehicle-label { position: absolute; top: 46px; left: 50%; transform: translateX(-50%); padding: 3px 7px; border-radius: 8px; color: #7c2b09; background: rgba(255,255,255,0.96); box-shadow: 0 2px 7px rgba(32,37,44,0.16); white-space: nowrap; font-size: 9px; font-weight: 900; }
.continuous-demo-vehicle-overlay { position: absolute; z-index: 525; top: 50%; left: 50%; transform: translate(-50%,-50%); }
@keyframes location-pulse { 0% { transform: scale(0.7); opacity: 0.9; } 70%,100% { transform: scale(1.45); opacity: 0; } }
.mapboxgl-ctrl-attrib { font-size: 8px; }

.map-floating-actions { position: absolute; right: 22px; top: 22px; display: grid; gap: 9px; z-index: 500; }
.map-action { width: 52px; height: 52px; min-width: 52px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(32,37,44,0.12); border-radius: 50%; color: #20252c; background: rgba(255,255,255,0.96); font-size: 11px; font-weight: 800; box-shadow: 0 8px 22px rgba(32,37,44,0.13); }
.map-action:disabled { cursor: not-allowed; opacity: 0.66; }
.map-action.large-input-icon { width: 72px; height: 72px; min-width: 72px; }
.current-location-control { border-color: rgba(60,64,67,0.16); color: #4285f4; background: #fff; box-shadow: 0 2px 5px rgba(60,64,67,0.22),0 5px 14px rgba(60,64,67,0.14); transition: transform 120ms ease,box-shadow 120ms ease,background 120ms ease; }
.current-location-control:hover { background: #f8fbff; box-shadow: 0 3px 7px rgba(60,64,67,0.24),0 7px 18px rgba(60,64,67,0.17); transform: translateY(-1px); }
.current-location-control:active { background: #edf4ff; box-shadow: 0 1px 3px rgba(60,64,67,0.24); transform: translateY(0); }
.current-location-control svg { width: 25px; height: 25px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.current-location-control.large-input-icon svg { width: 35px; height: 35px; }
.current-location-control .location-dot { fill: currentColor; stroke: #fff; stroke-width: 1.1; }
.compass-control { border-color: rgba(60,64,67,0.16); color: #49535d; background: #fff; box-shadow: 0 2px 5px rgba(60,64,67,0.22),0 5px 14px rgba(60,64,67,0.14); }
.compass-control[aria-pressed="true"] { color: #fff; background: #1967d2; }
.compass-control-content { display: grid; grid-template: 9px 24px 9px / 1fr; place-items: center; line-height: 1; }
.compass-control-content strong { font-size: 8px; font-weight: 900; }
.compass-control-content svg { width: 24px; height: 24px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.4; }
.compass-control-content .compass-needle-north { fill: #e34b4b; stroke: #e34b4b; }
.compass-control[aria-pressed="true"] .compass-needle-north { fill: #fff; stroke: #fff; }
.compass-control-content .compass-needle-south { fill: currentColor; stroke: currentColor; opacity: 0.45; }
.compass-control-content small { font-size: 7px; font-weight: 900; white-space: nowrap; }
.compass-control.large-input-icon .compass-control-content { grid-template: 14px 34px 12px / 1fr; }
.compass-control.large-input-icon .compass-control-content strong { font-size: 13px; }
.compass-control.large-input-icon .compass-control-content svg { width: 34px; height: 34px; stroke-width: 1.6; }
.compass-control.large-input-icon .compass-control-content small { font-size: 9px; }
.map-action.report { color: #fff; background: #20252c; }
.map-action.report.large-input-icon .report-action-label > span:first-child { font-size: 26px; }
.map-action.report.large-input-icon .report-action-label > span:last-child { font-size: 12px; }
.report-action-label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1; }
.report-action-label > span:first-child { font-size: 17px; font-weight: 500; }
.report-action-label > span:last-child { font-size: 10px; font-weight: 900; }
.map-action.demo-playback { color: #fff; background: #1967d2; }
.map-action.demo-playback.running { background: #d9485f; }
.demo-playback-label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1; }
.demo-playback-label > span:first-child { font-size: 9px; font-weight: 700; }
.demo-playback-label > span:last-child { font-size: 11px; font-weight: 900; }
.map-action.demo-playback.large-input-icon .demo-playback-label > span:first-child { font-size: 11px; }
.map-action.demo-playback.large-input-icon .demo-playback-label > span:last-child { font-size: 14px; }
.demo-playback-status { position: absolute; z-index: 520; top: 22px; left: 50%; margin: 0; transform: translateX(-50%); padding: 8px 12px; border-radius: 18px; color: #fff; background: rgba(25,103,210,0.92); box-shadow: 0 7px 20px rgba(32,37,44,0.22); font-size: 10px; font-weight: 800; transition: transform 180ms ease,background 180ms ease; }
.demo-playback-status.focused { transform: translateX(-50%) scale(1.06); background: rgba(255,107,32,0.95); }
.location-status { position: absolute; z-index: 520; top: 184px; right: 20px; max-width: 220px; margin: 0; padding: 7px 10px; border-radius: 12px; color: #174ea6; background: rgba(255,255,255,0.96); box-shadow: 0 5px 16px rgba(32,37,44,0.16); font-size: 9px; font-weight: 700; }
.mapboxgl-popup { z-index: 650; }
.mapboxgl-popup-content { padding: 12px 14px; border: 1px solid rgba(32,37,44,0.1); border-radius: 12px; color: var(--text); background: rgba(255,255,255,0.97); box-shadow: 0 10px 30px rgba(32,37,44,0.18); }
.mapboxgl-popup-close-button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--text-soft); font-size: 20px; }
.coachgo-hazard-popup { display: grid; gap: 5px; padding-right: 18px; }
.coachgo-hazard-popup small { color: var(--blue); font-size: 9px; font-weight: 800; }
.coachgo-hazard-popup small.unverified { color: #ad6812; }
.coachgo-hazard-popup strong { font-size: 13px; line-height: 1.4; }
.coachgo-hazard-popup p { margin: 0; color: var(--text-soft); font-size: 9px; line-height: 1.5; }
.coachgo-hazard-popup .popup-message { margin-top: 2px; color: #374047; }
.delete-own-report { width: 100%; min-height: 38px; margin-top: 8px; border: 1px solid #d93025; border-radius: 10px; color: #d93025; background: #fff; font-size: 10px; font-weight: 800; }
.delete-own-report[data-confirm="true"] { color: #fff; background: #d93025; }

.notification-preview { position: fixed; z-index: 2000; top: 12px; left: 50%; width: min(520px,calc(100% - 24px)); display: grid; grid-template-columns: 38px 1fr 28px; gap: 10px; transform: translateX(-50%); padding: 12px; border: 1px solid rgba(255,255,255,0.75); border-radius: 16px; background: rgba(255,255,255,0.96); box-shadow: 0 18px 45px rgba(31,37,44,0.25); }
.notification-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--blue); font-weight: 800; }
.notification-preview p { margin: 0 0 2px; color: var(--text-soft); font-size: 8px; }
.notification-preview strong { display: block; font-size: 11px; }
.notification-preview small { display: block; margin-top: 3px; color: #4d555b; font-size: 9px; line-height: 1.4; }
.notification-preview button { border: 0; background: transparent; font-size: 18px; }

.registration-dialog { width: min(520px,calc(100% - 28px)); max-height: calc(100vh - 40px); overflow-y: auto; border: 0; border-radius: 22px; padding: 20px; color: var(--text); background: var(--surface-strong); box-shadow: 0 24px 80px rgba(0,0,0,0.28); }
.registration-dialog::backdrop { background: rgba(20,25,30,0.48); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.dialog-heading h2 { margin: 0; font-size: 22px; }
.registration-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.registration-methods button { min-height: 42px; border: 1px solid var(--line); border-radius: 12px; color: var(--text-soft); background: var(--surface); font-size: 11px; font-weight: 800; }
.registration-methods button[aria-pressed="true"] { border-color: #1967d2; color: #174ea6; background: #eaf2ff; box-shadow: inset 0 0 0 1px #1967d2; }
.dialog-help { margin: 9px 0 16px; color: var(--text-soft); font-size: 10px; }
.voice-report { margin: 0 0 14px; padding: 10px; border: 1px solid color-mix(in srgb,var(--blue) 22%,var(--line)); border-radius: 15px; background: color-mix(in srgb,var(--blue) 5%,var(--surface)); }
.voice-report-button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; text-align: left; color: var(--text); background: transparent; }
.voice-report-button > span:last-child { display: grid; gap: 2px; }
.voice-report-button strong { font-size: 13px; }.voice-report-button small { color: var(--text-soft); font-size: 9px; }
.voice-report-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; border-radius: 50%; color: #fff; background: var(--blue); font-size: 20px; box-shadow: 0 5px 14px color-mix(in srgb,var(--blue) 28%,transparent); }
.voice-report-button[aria-pressed="true"] .voice-report-icon { animation: voice-pulse 1s ease-in-out infinite; background: var(--red); }
.voice-report-button:disabled { cursor: not-allowed; opacity: 0.48; }
.voice-report-status { margin: 7px 0 0 50px; color: var(--text-soft); font-size: 9px; line-height: 1.45; }
.voice-report-status[data-state="error"] { color: var(--red); }.voice-report-status[data-state="registered"] { color: var(--green); font-weight: 700; }
.voice-report-transcript { margin: 6px 0 0 50px; padding: 6px 8px; border-radius: 8px; color: var(--text); background: var(--surface-strong); font-size: 10px; }
@keyframes voice-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 7px color-mix(in srgb,var(--red) 14%,transparent); } }
.registration-dialog label { display: grid; gap: 6px; margin-top: 12px; color: var(--text-soft); font-size: 10px; font-weight: 700; }
.registration-dialog input,.registration-dialog select,.registration-dialog textarea { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: var(--surface); }
.form-error { min-height: 16px; margin: 7px 0; color: var(--red); font-size: 9px; }
.submit-report { width: 100%; height: 46px; border: 0; border-radius: 12px; color: #fff; background: #20252c; font-size: 11px; font-weight: 700; }
.dialog-handle { display: none; }
.hazard-report-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.hazard-report-grid button { --report-color: #697078; min-height: 86px; display: grid; place-items: center; gap: 4px; padding: 9px 6px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb,var(--report-color) 8%,var(--surface)); }
.hazard-report-grid button:hover { border-color: var(--report-color); }
.hazard-report-grid button span { font-size: 27px; }.hazard-report-grid button strong { font-size: 12px; }
.hazard-report-grid [data-report-category="FLOOD"] { --report-color:#008cff; }.hazard-report-grid [data-report-category="ACCIDENT"] { --report-color:#ff4f5e; }
.hazard-report-grid [data-report-category="ROADWORK"] { --report-color:#ffad00; }.hazard-report-grid [data-report-category="POLICE"] { --report-color:#9b5cff; }
.hazard-report-grid [data-report-category="OBJECT"] { --report-color:#e37a23; }.hazard-report-grid [data-report-category="BROKEN_DOWN"] { --report-color:#e0574f; }
.hazard-report-grid [data-report-category="CONGESTION"] { --report-color:#d9485f; }.hazard-report-grid [data-report-category="ROAD_DAMAGE"] { --report-color:#795548; }
.hazard-report-grid [data-report-category="HAIL"] { --report-color:#7c63d9; }.hazard-report-grid [data-report-category="HEAVY_RAIN"] { --report-color:#3478d4; }
.hazard-report-grid [data-report-category="STRONG_WIND"] { --report-color:#1f9aaa; }.hazard-report-grid [data-report-category="HEAVY_SNOW"] { --report-color:#4e86d8; }
.hazard-report-grid [data-report-category="LOW_VISIBILITY"] { --report-color:#66788a; }.hazard-report-grid [data-report-category="ANIMAL"] { --report-color:#8a6b3f; }
.hazard-report-grid [data-report-category="WRONG_WAY"] { --report-color:#d33939; }.hazard-report-grid [data-report-category="SIGN_ISSUE"] { --report-color:#d98b18; }
.show-all-reports { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--blue); background: var(--surface); font-size: 11px; font-weight: 800; }
.show-all-reports[aria-expanded="true"] span { transform: rotate(90deg); }
.privacy-note { margin: 10px 0 0; display: flex; justify-content: center; align-items: center; gap: 5px; color: var(--text-soft); font-size: 9px; }
.microphone-permission-dialog { width: min(440px,calc(100% - 28px)); border: 0; border-radius: 22px; padding: 24px; color: var(--text); background: var(--surface-strong); box-shadow: 0 24px 80px rgba(0,0,0,0.32); }
.microphone-permission-dialog::backdrop { background: rgba(20,25,30,0.58); backdrop-filter: blur(4px); }
.microphone-permission-heading { display: flex; align-items: center; gap: 12px; }
.microphone-permission-heading h2 { margin: 0; font-size: 22px; }
.microphone-permission-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 48px; border-radius: 50%; color: #fff; background: var(--blue); font-size: 23px; box-shadow: 0 7px 20px color-mix(in srgb,var(--blue) 30%,transparent); }
.microphone-permission-description { margin: 16px 0 10px; font-size: 13px; font-weight: 700; line-height: 1.6; }
.microphone-permission-guidance { padding: 12px 14px; border-radius: 13px; color: #214f77; background: #eef7ff; font-size: 11px; line-height: 1.65; white-space: pre-line; }
.microphone-permission-guidance[data-state="denied"], .microphone-permission-guidance[data-state="disabled"] { color: #7b3427; background: #fff2ee; }
.microphone-permission-actions { display: grid; gap: 8px; margin-top: 16px; }
.microphone-permission-actions button { width: 100%; min-height: 46px; border-radius: 12px; font-size: 12px; font-weight: 800; }
.grant-microphone-permission { border: 0; color: #fff; background: var(--blue); }
.grant-microphone-permission:disabled { opacity: 0.55; }
.close-microphone-permission { border: 1px solid var(--line); color: var(--text-soft); background: var(--surface); }
.microphone-permission-note { margin: 12px 0 0; color: var(--text-soft); font-size: 9px; line-height: 1.55; text-align: center; }
.coachgo-legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.coachgo-legal-links a { padding: 7px 10px; border-radius: 999px; color: var(--blue); background: var(--surface-muted); text-decoration: none; font-size: 9px; font-weight: 800; }
.undo-report-toast { position: fixed; z-index: 2100; left: 50%; bottom: 28px; min-width: 360px; display: flex; align-items: center; gap: 10px; transform: translateX(-50%); padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-strong); box-shadow: var(--shadow); }
.toast-check { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 31px; border-radius: 10px; color: #fff; background: var(--green); }
.undo-report-toast > span:nth-child(2) { flex: 1; display: grid; }.undo-report-toast strong { font-size: 12px; }.undo-report-toast small { color: var(--text-soft); font-size: 9px; }
.undo-report-toast button { border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 700; }
.panel-backdrop { display: none; }

@media (max-width: 760px) {
  .topbar { height: calc(56px + env(safe-area-inset-top)); flex-basis: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 13px 0; }
  .brand { font-size: 18px; }.brand-mark { width: 34px; height: 34px; }
  .topbar-actions { gap: 5px; }
  .connection-state { margin: 0; font-size: 9px; }
  .settings-button { width: 38px; height: 38px; display: inline-grid; border: 1px solid rgba(32,37,44,0.08); border-radius: 50%; background: var(--surface); }
  .settings-button[aria-expanded="true"] { color: #fff; background: var(--blue); }
  .workspace { flex-direction: column; }
  .control-panel { --sheet-drag-y: 0px; width: 100%; height: auto; max-height: calc(100% - clamp(64px,12vh,96px)); position: absolute; inset: clamp(64px,12vh,96px) 0 0; flex: none; border: 0; border-radius: 24px 24px 0 0; background: rgba(255,255,255,0.98); box-shadow: 0 -14px 42px rgba(31,37,44,0.2); transform: translateY(calc(100% + 28px)); visibility: hidden; pointer-events: none; transition: transform 260ms cubic-bezier(.2,.8,.2,1),visibility 0s linear 260ms; z-index: 900; }
  .control-panel.open { transform: translateY(var(--sheet-drag-y)); visibility: visible; pointer-events: auto; transition: transform 260ms cubic-bezier(.2,.8,.2,1),visibility 0s; }
  .control-panel.dragging { transition: none; }
  .panel-scroll { width: 100%; min-height: 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); overscroll-behavior-y: contain; }
  .settings-sheet-handle { width: 42px; height: 5px; display: block; margin: 2px auto 10px; border-radius: 5px; background: #c8cdc9; }
  .panel-heading-row { display: flex; align-items: center; }
  .mobile-close { display: inline-grid; flex: 0 0 40px; color: var(--text-soft); background: var(--surface-muted); }
  .category-section { margin-top: 18px; }
  .notification-section, .input-section { display: block; margin-top: 24px; padding-bottom: 8px; }
  .map-floating-actions { top: 14px; right: 13px; }
  .mapboxgl-popup { max-width: calc(100vw - 34px) !important; }
  .location-status { top: 184px; right: 13px; }
  .demo-playback-status { top: 105px; width: max-content; max-width: calc(100% - 140px); text-align: center; }
  .registration-dialog { align-self: end; width: 100%; max-width: none; margin: 0; border-radius: 22px 22px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .microphone-permission-dialog { width: calc(100% - 24px); padding: 20px; }
  .dialog-handle { display: block; width: 38px; height: 4px; margin: 0 auto 13px; border-radius: 4px; background: var(--line); }
  .hazard-report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .undo-report-toast { width: calc(100% - 24px); min-width: 0; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .panel-backdrop { position: fixed; inset: calc(56px + env(safe-area-inset-top)) 0 0; display: block; border: 0; background: rgba(20,25,30,0.16); z-index: 850; }
}

@media (max-width: 380px) {
  .connection-state { font-size: 8px; }
}
