:root{color-scheme:light dark;font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,SF Pro Text,Segoe UI,Microsoft YaHei,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}*{box-sizing:border-box}body{margin:0;min-height:100vh;overflow:hidden}button,input{font:inherit}button{border:0}.app-shell{--bg: #f5f5f7;--surface: rgba(255, 255, 255, .86);--surface-solid: #ffffff;--surface-muted: #f1f2f6;--text: #1d1d1f;--text-muted: #6e6e73;--border: rgba(60, 60, 67, .14);--border-strong: rgba(60, 60, 67, .24);--primary: #007aff;--primary-contrast: #ffffff;--success: #107c41;--warning: #b45309;--danger: #d92d20;--shadow: 0 18px 60px rgba(0, 0, 0, .08);--shadow-soft: 0 8px 28px rgba(0, 0, 0, .06);background:var(--bg);color:var(--text);display:grid;grid-template-rows:72px 1fr;height:100vh}.app-shell.dark{--bg: #111114;--surface: rgba(30, 30, 34, .82);--surface-solid: #1c1c20;--surface-muted: #242428;--text: #f5f5f7;--text-muted: #a1a1a8;--border: rgba(235, 235, 245, .12);--border-strong: rgba(235, 235, 245, .22);--primary: #0a84ff;--success: #1f9d55;--warning: #ffd60a;--danger: #ff453a;--shadow: 0 18px 60px rgba(0, 0, 0, .36);--shadow-soft: 0 8px 28px rgba(0, 0, 0, .26)}.file-input{height:1px;left:-9999px;opacity:0;position:fixed;width:1px}.topbar,.brand,.topbar-actions,.api-pill,.button,.icon-button,.sidebar-header,.curve-item,.workbook-head,.curve-toggle,.view-toggle,.chart-toolbar,.toolbar-controls,.segmented-control,.chart-meta,.toast,.diagnostic-strip{align-items:center;display:flex}.topbar{border-bottom:1px solid var(--border);justify-content:space-between;padding:0 22px}.brand{gap:12px;min-width:220px}.brand-mark{align-items:center;background:linear-gradient(135deg,#0a84ff,#30d158);border-radius:8px;box-shadow:0 10px 24px #0a84ff3d;color:#fff;display:flex;height:42px;justify-content:center;width:42px}.brand h1,.brand p,.sidebar h2,.empty-state h2,.empty-state p{margin:0}.brand h1{font-size:17px;font-weight:750;letter-spacing:0}.brand p{color:var(--text-muted);font-size:12px;margin-top:2px}.topbar-actions{gap:10px;min-width:0}.api-pill{background:var(--surface-muted);border:1px solid var(--border);border-radius:999px;color:var(--text-muted);gap:6px;min-height:34px;padding:0 12px;white-space:nowrap}.api-pill.offline{color:var(--danger)}.button,.icon-button{border-radius:8px;cursor:pointer;justify-content:center;transition:background .18s ease,border-color .18s ease,color .18s ease,opacity .18s ease,transform .18s ease}.button{gap:8px;min-height:42px;padding:0 15px;font-size:14px;font-weight:650}.button.excel{background:var(--success);color:#fff}.button.secondary{background:var(--surface);border:1px solid var(--border);color:var(--text)}.button:hover:not(:disabled),.icon-button:hover:not(:disabled){transform:translateY(-1px)}.button.excel:hover:not(:disabled){background:#0e6b38}.dark .button.excel:hover:not(:disabled){background:#26b866}.button.secondary:hover:not(:disabled),.icon-button:hover:not(:disabled){background:var(--surface-solid);border-color:var(--border-strong)}.icon-button{background:var(--surface);border:1px solid var(--border);color:var(--text);height:42px;width:42px}.icon-button.subtle{height:36px;width:36px}.icon-button.tiny{flex:0 0 auto;height:30px;width:30px}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,input:focus-visible{outline:3px solid rgba(10,132,255,.34);outline-offset:2px}.export-menu{position:relative}.export-popover{background:var(--surface-solid);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow);display:grid;gap:4px;min-width:210px;padding:6px;position:absolute;right:0;top:calc(100% + 8px);z-index:40}.export-popover button{align-items:center;background:transparent;border-radius:7px;color:var(--text);cursor:pointer;display:flex;gap:9px;min-height:38px;padding:0 10px;text-align:left}.export-popover button:hover{background:var(--surface-muted)}.workspace{display:grid;gap:16px;grid-template-columns:360px 1fr;min-height:0;padding:16px}.sidebar,.chart-section{background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow-soft);min-height:0}.sidebar{display:grid;grid-template-rows:auto 1fr;overflow:hidden}.sidebar-header{justify-content:space-between;padding:18px}.sidebar h2{font-size:21px;letter-spacing:0}.control-block{padding:0 18px 14px}.control-title{color:var(--text-muted);font-size:12px;font-weight:650;margin-bottom:8px}.chip-row{display:flex;flex-wrap:wrap;gap:7px}.chip{background:var(--surface-muted);border:1px solid var(--border);border-radius:999px;color:var(--text);cursor:pointer;font-size:12px;font-weight:650;min-height:32px;padding:0 12px}.chip.active{background:var(--primary);border-color:var(--primary);color:#fff}.curve-list{border-top:1px solid var(--border);min-height:0;overflow:auto;padding:12px}.curve-item{background:var(--surface-solid);border:1px solid var(--border);border-radius:8px;gap:10px;margin-bottom:10px;padding:10px}.curve-item.muted{opacity:.55}.workbook-item{background:var(--surface-solid);border:1px solid var(--border);border-radius:8px;display:grid;gap:10px;margin-bottom:10px;padding:12px}.workbook-item.muted{opacity:.62}.workbook-head{gap:10px;justify-content:space-between;min-width:0}.view-toggle-row{display:grid;gap:7px;grid-template-columns:repeat(3,minmax(0,1fr))}.view-toggle{background:var(--surface-muted);border:1px solid var(--border);border-radius:8px;color:var(--text-muted);cursor:pointer;gap:5px;justify-content:center;min-height:34px;padding:0 6px;transition:background .16s ease,border-color .16s ease,color .16s ease,opacity .16s ease}.view-toggle.active{background:var(--surface-solid);border-color:var(--border-strong);color:var(--text);font-weight:700}.curve-toggle{background:transparent;color:var(--text);cursor:pointer;display:grid;flex:0 0 auto;gap:6px;grid-template-columns:auto auto;min-height:34px;place-items:center}.swatch{border-radius:999px;box-shadow:inset 0 0 0 1px #ffffff59;height:12px;width:12px}.curve-copy{flex:1;min-width:0}.curve-copy strong,.curve-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.curve-copy strong{font-size:13px;line-height:1.35}.curve-copy .curve-name{border-radius:4px;cursor:text;padding:1px 4px;margin:-1px -4px;transition:background .12s ease}.curve-copy .curve-name:hover{background:var(--surface-muted)}.curve-name-input{background:var(--surface-solid);border:1px solid var(--primary);border-radius:5px;color:var(--text);display:block;font-family:inherit;font-size:13px;font-weight:700;line-height:1.35;min-width:0;outline:none;padding:2px 6px;width:100%}.curve-copy span{color:var(--text-muted);font-size:12px;margin-top:3px}.empty-state{align-items:center;color:var(--text-muted);display:flex;flex-direction:column;justify-content:center;text-align:center}.chart-section{display:grid;grid-template-rows:auto 1fr;overflow:hidden}.chart-toolbar{border-bottom:1px solid var(--border);gap:14px;justify-content:space-between;padding:14px 16px}.toolbar-controls{gap:10px;min-width:0}.segmented-control{background:var(--surface-muted);border:1px solid var(--border);border-radius:8px;gap:4px;padding:4px}.segmented-control button{align-items:center;background:transparent;border-radius:7px;color:var(--text-muted);cursor:pointer;display:flex;gap:7px;min-height:34px;padding:0 12px;transition:background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;white-space:nowrap}.segmented-control button:hover:not(.active){color:var(--text)}.segmented-control button:active{transform:scale(.97)}.segmented-control button.active{background:var(--surface-solid);box-shadow:0 1px 4px #00000014;color:var(--text);font-weight:650}.chart-meta{color:var(--text-muted);flex-wrap:wrap;font-size:13px;gap:14px;justify-content:flex-end;min-width:0}.chart-frame{min-height:560px;position:relative}.chart-canvas{height:100%;min-height:560px;width:100%}.empty-state{gap:14px;height:100%;padding:36px}.empty-icon{align-items:center;background:var(--surface-muted);border:1px solid var(--border);border-radius:8px;color:var(--primary);display:flex;height:62px;justify-content:center;width:62px}.empty-state h2{color:var(--text);font-size:25px;letter-spacing:0}.empty-state p{line-height:1.6;max-width:560px}.empty-state-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:6px}.chart-tooltip{min-width:260px}.chart-tooltip-header{font-size:12px;font-weight:650;margin-bottom:6px;opacity:.75}.chart-tooltip-row{align-items:center;display:flex;font-size:13px;gap:18px;justify-content:space-between;line-height:1.6}.chart-tooltip-name{font-weight:650;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chart-tooltip-value{font-variant-numeric:tabular-nums;font-weight:750;white-space:nowrap}.drop-overlay{align-items:center;background:#007aff29;display:flex;justify-content:center;inset:0;position:fixed;z-index:20}.drop-overlay>div{align-items:center;-webkit-backdrop-filter:blur(22px) saturate(160%);backdrop-filter:blur(22px) saturate(160%);background:var(--surface);border:1px solid var(--border-strong);border-radius:8px;box-shadow:var(--shadow);color:var(--text);display:flex;flex-direction:column;gap:12px;min-width:280px;padding:30px}.toast,.diagnostic-strip{background:var(--surface-solid);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow);color:var(--text);gap:12px;max-width:min(720px,calc(100vw - 36px));padding:12px 12px 12px 15px;position:fixed;right:18px;z-index:30}.toast{bottom:18px}.diagnostic-strip{bottom:76px;color:var(--warning)}.toast span,.diagnostic-strip span{font-size:13px;line-height:1.45}.toast button{align-items:center;background:var(--surface-muted);border-radius:7px;color:var(--text-muted);cursor:pointer;display:flex;height:26px;justify-content:center;width:26px}@media(max-width:1120px){.workspace{grid-template-columns:320px 1fr}.chart-meta,.api-pill{display:none}}@media(max-width:860px){body{overflow:auto}.app-shell{grid-template-rows:auto 1fr;height:auto;min-height:100vh}.topbar{align-items:flex-start;flex-direction:column;gap:12px;height:auto;padding:14px}.topbar-actions,.toolbar-controls{flex-wrap:wrap}.workspace{grid-template-columns:1fr}.sidebar{max-height:520px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}
