:root{--page:#ffffff;--surface:#ffffff;--subtle:#f8fafc;--soft:#f1f5f9;--text:#1f2937;--muted:#526174;--text-secondary:#334155;--placeholder:#64748b;--border:#d7e0e7;--input-border:#8292a2;--neutral-border:#94a3b8;--hover-outline:#7890a4;--primary:#0f766e;--primary-hover:#115e59;--on-primary:#ffffff;--accent:#0f766e;--accent-hover:#115e59;--accent-soft:#e7f5ef;--link:#075b9e;--link-hover:#064775;--blue:#1d4ed8;--blue-strong:#1e40af;--blue-soft:#eff6ff;--blue-hover:#dbeafe;--compare:#f0f7fa;--forecast:#eaf2ff;--disabled:#e2e8f0;--positive:#b42318;--negative:#157347;--notice:#805500;--danger-bg:#b42318;--ma5:#9a6700;--ma75:#7e22ce;--chart-axis:#526174;--chart-grid:#d7e0e7;--chart-up:#c4362f;--chart-down:#15803d;--chart-bar:#0f766e;--crosshair:#64748b;color-scheme:light}
:root[data-theme="blue"]{--page:#edf5ff;--surface:#ffffff;--subtle:#e5effb;--soft:#edf4fc;--compare:#edf5fb;--forecast:#dfecff}
:root[data-theme="beige"]{--page:#f7f2e8;--surface:#fffdf8;--subtle:#f1ebdf;--soft:#f5efe4;--border:#d9cdbb;--compare:#f2f0e6;--forecast:#eee9d9}
:root[data-theme="dark"]{--page:#0c1420;--surface:#132231;--subtle:#111e2c;--soft:#1a3041;--text:#e5edf4;--muted:#b3c3d2;--text-secondary:#dce6ee;--placeholder:#9db0c2;--border:#415970;--input-border:#7f95a8;--neutral-border:#71869a;--hover-outline:#9db0c2;--primary:#14735f;--primary-hover:#0f5c4c;--accent:#69e1bb;--accent-hover:#a7f3d0;--accent-soft:#193e39;--link:#8fc7ff;--link-hover:#c3e1ff;--blue:#8dbdff;--blue-strong:#a8cfff;--blue-soft:#1b354d;--blue-hover:#254765;--compare:#173d48;--forecast:#233a50;--disabled:#263b4d;--positive:#ff947d;--negative:#69e1bb;--notice:#f4cc82;--danger-bg:#b42318;--ma5:#f2c36b;--ma75:#c69cff;--chart-axis:#b3c3d2;--chart-grid:#415970;--chart-up:#f38585;--chart-down:#65d9ad;--chart-bar:#65c7ba;--crosshair:#c5d6e5;color-scheme:dark}
:root,body,main{background:var(--page);color:var(--text)}
:is(header,.site-footer) .theme-control{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-size:13px;color:var(--muted);margin:0}
.theme-control select{font:inherit;min-height:36px;width:auto;flex:none;padding:6px 8px;border:1px solid var(--input-border);border-radius:8px;background:var(--surface);color:var(--text)}
.theme-control select:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
header:not(.site-header){display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.brand-lockup{display:inline-flex;align-items:center;gap:12px;white-space:nowrap}
.brand-lockup img{display:block;width:48px;height:48px;object-fit:contain;flex:none}
@media(max-width:650px){.brand-lockup img{width:40px;height:40px}}
@media(max-width:650px){:is(header,.site-footer) .theme-control{max-width:100%;flex-wrap:wrap}.theme-control select{max-width:100%}}
.site-header,.site-footer{padding:12px max(18px,4vw)}
.header-inner,.footer-inner{max-width:1352px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{text-decoration:none;color:var(--accent);font-size:24px;font-weight:700;letter-spacing:.4px}
.site-footer{border-top:1px solid var(--border);background:var(--subtle);color:var(--muted);font-size:12px}
.footer-inner{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.site-footer p{margin:0;line-height:1.8}
.footer-copyright{text-align:center}
.brand-tagline{display:block;font-size:12px;font-weight:500;letter-spacing:normal;color:var(--muted)}
.site-header{background:var(--subtle);border-bottom:1px solid var(--border)}
:is(.site-header,.site-footer) .account{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px 12px;min-width:0}
.site-header span{margin:0}
.site-header .brand>span{color:var(--accent)}
.site-header .user-id{flex-basis:100%;min-width:0;text-align:right;font-size:13px;overflow-wrap:anywhere}
.site-header .user-id strong{color:var(--text);font-weight:500}
:is(.site-header,.site-footer) :is(#management,#logout,#footer-management,#footer-logout){display:inline-flex;align-items:center;flex-shrink:0;min-height:36px;padding:6px 14px;border:1px solid var(--input-border);border-radius:8px;font:inherit;font-size:13px;text-decoration:none;background:transparent}
:is(#management,#footer-management){box-sizing:border-box;color:var(--link)}
:is(#logout,#footer-logout){color:var(--accent);cursor:pointer}
:is(#management,#footer-management):hover{background:var(--soft)}
:is(#logout,#footer-logout):hover{background:var(--accent-soft)}
:is(.site-header,.site-footer) :is(.brand,#management,#logout,#footer-management,#footer-logout):focus-visible{outline:2px solid var(--accent);outline-offset:4px}
@media(max-width:850px){.footer-inner{grid-template-columns:auto minmax(0,1fr);gap:10px 16px}.footer-copyright{grid-column:1/-1;grid-row:2}}
@media(max-width:650px){.header-inner{flex-wrap:wrap;gap:10px 16px}.site-header .account{width:100%;justify-content:flex-start}.site-header .user-id{text-align:left}.footer-inner{grid-template-columns:minmax(0,1fr)}.footer-copyright{grid-row:3}}
