:root{color-scheme:light;--bg:#eef2f1;--panel:#ffffff;--panel-soft:#f7faf8;--border:#d4ddd8;--border-strong:#aebbb4;--text:#18211d;--muted:#62706a;--accent:#0f766e;--accent-strong:#0b5f59;--danger:#b42318;--danger-soft:#fff0ee;--shadow:0 8px 24px rgb(21 35 30 / 10%);--safe-bottom:env(safe-area-inset-bottom,0px)}*{box-sizing:border-box}html{min-height:100%;background:var(--bg)}body{min-height:100%;margin:0;background:linear-gradient(180deg,#f9fbfa 0,var(--bg) 320px),var(--bg);color:var(--text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.45;-webkit-text-size-adjust:100%}button,input,select,textarea{font:inherit}button{min-height:38px;border:1px solid var(--border-strong);border-radius:7px;background:#ffffff;color:var(--text);padding:7px 12px;cursor:pointer;touch-action:manipulation}button:hover{border-color:var(--accent)}button:disabled{cursor:not-allowed;opacity:0.5}a{color:#0b5f9a;text-underline-offset:2px}h1,h2{margin:0;letter-spacing:0}h1{font-size:clamp(1.05rem,4vw,1.45rem);line-height:1.2}h2{font-size:0.95rem}.app-shell{display:grid;grid-template-areas:"top" "map" "ops" "charts" "memo" "data" "settings" "legal";gap:8px;width:min(1360px,100%);margin:0 auto;padding:8px 8px 14px}.panel{border:1px solid var(--border);border-radius:7px;background:var(--panel);box-shadow:var(--shadow);overflow:hidden}.app-top{grid-area:top;overflow:visible}.app-titlebar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:54px;padding:8px 10px 6px;background:var(--panel-soft)}.app-kicker{margin:0 0 2px;color:var(--accent);font-size:0.78rem;font-weight:800;letter-spacing:0.08em;text-transform:uppercase}.view-mode-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:0 8px;background:var(--panel-soft);border-top:1px solid var(--border)}.view-mode-bar button{min-width:0;min-height:36px;margin-bottom:-1px;border-color:transparent;border-bottom-color:var(--border-strong);border-radius:7px 7px 0 0;background:transparent;color:var(--muted);padding:6px 4px;font-size:clamp(0.74rem,2.7vw,0.88rem);font-weight:800}.view-mode-bar button.active,.view-mode-bar button[aria-pressed="true"]{border-color:var(--border-strong);border-bottom-color:#ffffff;background:#ffffff;color:var(--accent-strong)}.status-pill{flex:0 0 auto;border:1px solid var(--border);border-radius:999px;background:#ffffff;color:var(--muted);padding:5px 10px;font-size:0.86rem;font-weight:700;white-space:nowrap}.status-pill.recording{border-color:#9fd2c8;color:var(--accent-strong);background:#effaf7}.map-panel{grid-area:map}.map{width:100%;height:43svh;min-height:270px;max-height:680px;background:#d7ddd2}.map-point-icon{background:transparent;border:0}.map-point,.map-event-point{display:block;width:10px;height:10px;margin:2px;border-radius:999px;opacity:var(--point-opacity,1);box-shadow:0 1px 4px rgb(0 0 0 / 45%)}.map-point{background:var(--point-color,#0f766e)}.map-event-point{border:2px solid #8a1c1c;background:#ffffff}.ops-panel{grid-area:ops;overflow:visible}.control-bar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;position:sticky;bottom:0;z-index:600;padding:8px;border-bottom:1px solid var(--border);background:rgb(255 255 255 / 96%);backdrop-filter:blur(10px)}.control-bar button{min-width:0;font-weight:750}.primary-action{border-color:var(--accent);background:var(--accent);color:#ffffff}.primary-action:hover{border-color:var(--accent-strong);background:var(--accent-strong)}.danger-action{border-color:#e2aaa5;color:var(--danger);background:var(--danger-soft)}.error-message{margin:8px;border:1px solid #f1b3ad;border-radius:7px;background:var(--danger-soft);color:var(--danger);padding:8px 10px}.stats,.data-summary{display:grid;gap:1px;overflow:hidden;border:1px solid var(--border);border-radius:7px;background:var(--border)}.stats{grid-template-columns:repeat(5,minmax(0,1fr));margin:8px}.data-summary{grid-template-columns:repeat(7,minmax(0,1fr))}.metric{display:grid;grid-template-rows:auto 1fr;min-width:0;background:#ffffff}.metric-label{padding:4px 3px 2px;color:var(--muted);font-size:clamp(0.68rem,2.3vw,0.8rem);font-weight:700;text-align:center}.metric-value{display:grid;min-height:32px;place-items:center;padding:3px 2px 5px;font-size:clamp(0.9rem,3.5vw,1.16rem);font-weight:850;line-height:1}.charts-panel{grid-area:charts;display:grid;gap:8px}.chart-card{display:grid;grid-template-rows:auto minmax(0,1fr);height:var(--chart-height,170px);min-height:0;padding:0}.chart-header,.chart-modal-header{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:38px;padding:6px 8px;border-bottom:1px solid var(--border);background:var(--panel-soft)}.chart-actions{display:flex;align-items:center;gap:6px}.chart-stretch,.chart-maximize,.chart-modal-header button{min-height:28px;padding:3px 8px;font-size:0.78rem;font-weight:750}.chart-stretch[aria-pressed="true"]{border-color:var(--accent);background:#e6f5f2;color:var(--accent-strong)}.chart-expanded{height:calc(var(--chart-height,170px) * 2) !important;min-height:0 !important}.charts-panel:has(.chart-expanded),.data-chart-grid:has(.chart-expanded){height:auto !important;align-items:start}.chart-card canvas{display:block;width:100%;height:100%;min-height:0;contain:size}.data-panel{grid-area:data;padding-bottom:8px}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-bottom:1px solid var(--border);background:var(--panel-soft)}.compact-header{padding-block:7px}.data-dashboard{display:none;gap:8px;padding:8px}.data-chart-grid{display:grid;gap:8px}.data-chart-card{--chart-height:200px;height:var(--chart-height);min-height:0}textarea{display:block;width:calc(100% - 16px);min-height:86px;margin:8px;resize:vertical;border:1px solid var(--border-strong);border-radius:7px;background:#fbfcfb;color:var(--text);padding:8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:0.86rem}.data-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:0 8px}.screenshot-memo-panel{grid-area:memo;padding:8px 10px}#screenshotMemo{width:100%;min-height:34px;border:1px solid var(--border-strong);border-radius:7px;background:#ffffff;color:var(--text);padding:6px 8px}.memo-inline{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;color:var(--muted);font-size:0.9rem;font-weight:750}.memo-actions{display:grid;margin-top:8px}.memo-actions button{width:100%;font-weight:750}.settings-panel{grid-area:settings}.settings-toggle{width:100%;border:0;border-radius:0;border-bottom:1px solid var(--border);background:var(--panel-soft);text-align:left;font-weight:750}.settings{display:grid;grid-template-columns:1fr;gap:8px;padding:8px}.settings[hidden]{display:none}.settings label{display:grid;gap:5px;color:var(--muted);font-size:0.86rem;font-weight:650}.settings input,.settings select{width:100%;min-height:36px;border:1px solid var(--border-strong);border-radius:7px;background:#ffffff;color:var(--text);padding:6px 8px}.checkbox-row{display:flex !important;flex-direction:row;align-items:center;gap:8px}.checkbox-row input{width:auto}.legend-row{display:flex;align-items:center;gap:8px;min-height:34px;color:var(--muted);font-weight:700}.color-box{width:22px;height:22px;border:1px solid #4d5954;border-radius:5px;display:inline-block}#blueBox{background:rgb(0 0 255)}#redBox{background:rgb(255 0 0)}.legal-note{grid-area:legal;padding:0 8px 2px;color:var(--muted);font-size:0.84rem;text-align:center}.footer{display:flex;flex-wrap:wrap;gap:8px 14px;justify-content:center;padding:8px 12px calc(14px + var(--safe-bottom));color:var(--muted);font-size:0.86rem}.chart-modal[hidden]{display:none}.chart-modal{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:14px}.chart-modal-backdrop{position:absolute;inset:0;background:rgb(10 18 15 / 55%)}.chart-modal-panel{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr);width:min(1100px,100%);height:min(760px,calc(100svh - 28px));border:1px solid var(--border-strong);border-radius:8px;background:#ffffff;box-shadow:0 20px 70px rgb(0 0 0 / 28%);overflow:hidden}.chart-modal-panel canvas{width:100%;height:100%;min-height:300px}body.modal-open{overflow:hidden}@media (max-width:430px){.app-shell{padding:0 0 calc(12px + var(--safe-bottom));gap:8px}.panel{border-inline:0;border-radius:0}.app-titlebar{min-height:50px}.map{height:41svh;min-height:240px}.control-bar{margin-bottom:calc(-1 * var(--safe-bottom));padding-bottom:calc(10px + var(--safe-bottom))}.data-summary{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:640px){.app-shell{padding:10px}.map{border-radius:0}.control-bar{position:static}.settings{grid-template-columns:repeat(2,minmax(0,1fr))}.data-actions{grid-template-columns:repeat(4,minmax(0,1fr))}.chart-card{--chart-height:200px;height:var(--chart-height);min-height:0}}@media (min-width:700px) and (orientation:portrait){.app-shell{grid-template-columns:minmax(0,1fr);grid-template-areas:"top" "ops" "map" "charts" "memo" "settings" "data" "legal"}.map{height:min(52svh,585px);min-height:400px}.charts-panel{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:900px) and (orientation:landscape){.app-shell{--default-main-height:clamp(390px,calc(100svh - 190px),650px);--chart-height:calc((var(--default-main-height) - 8px) / 2);grid-template-columns:minmax(0,1fr) minmax(330px,0.34fr);grid-template-areas:"top top" "ops ops" "map charts" "memo memo" "settings settings" "data data" "legal legal";align-items:start}.map{height:var(--default-main-height);min-height:0}.charts-panel{grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr));height:var(--default-main-height)}.chart-card{height:var(--chart-height);min-height:0}.chart-expanded{height:calc(var(--chart-height) * 2) !important;min-height:0 !important}}@media (min-width:1100px) and (orientation:landscape){.app-shell{--default-main-height:clamp(410px,calc(100svh - 190px),690px);grid-template-columns:minmax(0,1fr) minmax(360px,0.32fr)}}@media (max-height:560px) and (orientation:landscape){.app-shell{--chart-height:calc((100svh - 86px) / 2);grid-template-columns:minmax(0,1fr) minmax(320px,38vw);grid-template-areas:"top top" "map charts" "ops charts" "data data" "settings settings"}.map{height:calc(100svh - 78px);min-height:260px}.chart-card{height:var(--chart-height);min-height:0}.legal-note,.footer{display:none}}body.view-mode-map{overflow:hidden}body.view-mode-map .app-shell{width:100%;min-height:100svh;padding:0;grid-template-columns:1fr;grid-template-areas:"top" "map"}body.view-mode-map .app-top{position:fixed;top:8px;left:8px;right:8px;z-index:1000;box-shadow:var(--shadow)}body.view-mode-map .map-panel{min-height:100svh;border:0;border-radius:0}body.view-mode-map .map{height:100svh;min-height:100svh;max-height:none}body.view-mode-map .ops-panel,body.view-mode-map .charts-panel,body.view-mode-map .data-panel,body.view-mode-map .settings-panel,body.view-mode-map .screenshot-memo-panel,body.view-mode-map .legal-note,body.view-mode-map .footer{display:none}body.view-mode-data .app-shell{grid-template-columns:1fr;grid-template-areas:"top" "ops" "data";width:min(1220px,100%)}body.view-mode-data .map-panel,body.view-mode-data .charts-panel,body.view-mode-data .settings-panel,body.view-mode-data .screenshot-memo-panel,body.view-mode-data .legal-note,body.view-mode-data .footer{display:none}body.view-mode-data .stats{display:none}body.view-mode-data .data-dashboard{display:grid}body.view-mode-data textarea{min-height:92px;max-height:22svh}body.view-mode-data .data-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,auto)}body.view-mode-data .data-chart-wide{grid-column:1 / -1}body.view-mode-data .data-chart-card{--chart-height:clamp(190px,calc((100svh - 270px) / 2),280px);height:var(--chart-height);min-height:0}body.view-mode-data .data-chart-wide{--chart-height:220px;height:var(--chart-height);min-height:0}body.view-mode-simple{background:#f6f8f7}body.view-mode-simple .app-shell{grid-template-areas:"top" "map" "ops" "charts" "memo"}body.view-mode-simple .map{height:56svh;min-height:360px}body.view-mode-simple .data-panel,body.view-mode-simple .settings-panel,body.view-mode-simple .legal-note,body.view-mode-simple .footer{display:none}body.view-mode-simple .charts-panel{grid-template-columns:1fr 1fr}body.view-mode-simple .chart-card{--chart-height:150px;height:var(--chart-height);min-height:0}body.view-mode-simple .control-bar{display:none}body.view-mode-simple .metric-value{min-height:32px;font-size:clamp(0.9rem,3vw,1.1rem)}@media (max-width:640px){body.view-mode-data .data-chart-grid{grid-template-columns:1fr}body.view-mode-simple .charts-panel{grid-template-columns:repeat(2,minmax(0,1fr))}body.view-mode-simple .chart-card{--chart-height:135px;height:var(--chart-height);min-height:0}body.view-mode-simple .chart-header{align-items:stretch;flex-direction:column;gap:4px}body.view-mode-simple .chart-actions{justify-content:stretch}body.view-mode-simple .chart-actions button{flex:1;padding-inline:4px}}@media (min-width:760px){body.view-mode-simple .app-shell{grid-template-columns:minmax(0,1fr) 340px;grid-template-areas:"top top" "map ops" "map memo" "charts charts"}body.view-mode-simple .map{height:min(72svh,760px);min-height:560px}}@media (min-width:1100px){body.view-mode-simple .app-shell{grid-template-columns:minmax(0,1fr) 360px;grid-template-areas:"top top" "map ops" "map memo" "charts memo"}body.view-mode-simple .map{height:calc(100svh - 104px);min-height:640px}}@media print{.control-bar,.footer,.chart-maximize{display:none !important}.app-shell{width:100%;padding:0}}