:root{color-scheme:dark;--bg:oklch(16% .016 220);--surface:oklch(20% .018 220);--raised:oklch(24% .02 220);--text:oklch(94% .008 100);--muted:oklch(76% .012 210);--line:oklch(36% .02 220);--soft-line:oklch(29% .018 220);--accent:oklch(84% .13 170);--accent-ink:oklch(20% .035 180);--comparison:oklch(83% .12 75);--danger:oklch(83% .11 25);font-family:-apple-system,BlinkMacSystemFont,"PingFang TC","Noto Sans TC",sans-serif;font-size:16px;line-height:1.6}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select{font:inherit}button,input,select,.file-button{min-height:48px;border:1px solid var(--line);border-radius:6px}button,.file-button{cursor:pointer;color:var(--text);background:var(--raised);padding:10px 16px;white-space:nowrap}button.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent);font-weight:600}button[aria-pressed=true]{border-color:var(--accent);background:oklch(29% .035 190)}input,select{background:var(--bg);color:var(--text);padding:8px 12px;max-width:100%;width:100%}input[type=range]{padding:0;accent-color:var(--accent);border:0}input[type=number]{font-variant-numeric:tabular-nums}label{display:block;color:var(--muted);font-size:14px;margin-bottom:8px}label span{display:block;font-size:12px;color:var(--muted)}a{color:var(--accent);text-underline-offset:4px}h1,h2,p{margin-top:0}h1{font-size:clamp(28px,3vw,42px);font-weight:600;letter-spacing:-.035em;line-height:1.3;margin-bottom:16px}h2{font-size:20px;line-height:1.4;font-weight:600;margin-bottom:16px}p{color:var(--muted);margin-bottom:16px}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible,.table-wrap:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.skip{position:absolute;top:-60px;left:16px;background:var(--accent);color:var(--accent-ink);padding:10px;z-index:9}.skip:focus{top:8px}.topbar{display:flex;align-items:center;justify-content:space-between;min-height:88px;padding:16px 32px;border-bottom:1px solid var(--line);background:var(--bg)}.brand{display:flex;gap:16px;align-items:center;text-decoration:none;color:var(--text);font-size:18px;letter-spacing:.06em;font-weight:600}.brand-mark{border:1px solid var(--accent);color:var(--accent);width:40px;height:48px;display:grid;place-items:center;font-size:24px}.brand small{display:block;font-size:10px;color:var(--muted);letter-spacing:.16em}.version{font-size:12px;color:var(--muted);display:flex;gap:12px;align-items:center}.dot{height:5px;width:5px;border-radius:50%;background:var(--accent)}.workspace{display:grid;grid-template-columns:272px minmax(0,1fr);max-width:1720px;margin:auto}.sidebar{padding:32px 16px;border-right:1px solid var(--line)}.aside-title{display:flex;justify-content:space-between;align-items:baseline;padding:0 8px}.aside-title span{color:var(--muted);font-size:14px}.sidebar>label,.sidebar>input{margin-left:8px;width:calc(100% - 16px)}.roster{display:flex;flex-direction:column;gap:4px;margin-top:24px}.roster button{text-align:left;white-space:normal;background:transparent;border-color:transparent;display:grid;grid-template-columns:32px 1fr;gap:8px;padding:12px 8px;border-radius:4px;min-height:68px}.roster button[aria-pressed=true]{background:var(--raised);border-color:var(--line);box-shadow:inset 3px 0 var(--accent)}.roster .index{font-size:11px;color:var(--muted);padding-top:4px}.roster strong{font-weight:500;font-size:14px;display:block}.roster small{color:var(--muted);font-size:11px;display:block}.aside-note{font-size:12px;padding:24px 8px}.workspace main{padding:40px;min-width:0}.eyebrow{font-size:11px;letter-spacing:.13em;color:var(--muted);margin-bottom:12px}.intro>p:last-child{max-width:56em}.panel{background:var(--surface);border:1px solid var(--soft-line);padding:24px;border-radius:8px;margin-bottom:24px}.settings{display:grid;grid-template-columns:1.5fr 1.2fr 1fr;gap:24px;align-items:end}.input-action{display:flex;gap:8px}.input-action input{min-width:0}.level-fields{display:flex;gap:12px;align-items:center}.level-fields input[type=number]{width:84px;flex-shrink:0}.character-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:40px 0 24px}.character-heading h2{font-size:36px;line-height:1.2;margin-bottom:16px;letter-spacing:-.025em}.character-heading p:last-child{margin-bottom:0;font-size:14px}.level-badge{text-align:right;min-width:120px}.level-badge span,.level-badge small{display:block;font-size:11px;color:var(--muted)}.level-badge strong{font-size:56px;line-height:1.1;font-weight:500;font-variant-numeric:tabular-nums}.notice{border-left:3px solid var(--comparison);background:var(--surface);padding:12px 16px;font-size:14px}.facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:24px 0;margin-bottom:32px}.facts span{display:block;font-size:12px;color:var(--muted)}.facts strong{font-size:22px;font-weight:500;font-variant-numeric:tabular-nums;display:block;margin-top:8px}.section-line{display:flex;gap:16px;justify-content:space-between;align-items:center;margin-bottom:16px}.section-line>h2{margin-bottom:0}.section-line>span{font-size:12px;color:var(--muted)}.section-line b{color:var(--comparison)}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--soft-line);border:1px solid var(--soft-line);border-radius:8px;overflow:hidden;margin-bottom:24px}.stat-card{background:var(--surface);padding:20px 24px}.stat-card header{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted)}.stat-card header em{font-style:normal;color:var(--text);font-size:10px;border:1px solid var(--line);padding:0 4px}.stat-card strong{display:block;font-size:30px;font-weight:500;font-variant-numeric:tabular-nums;margin:8px 0}.stat-card small{color:var(--muted);font-size:11px}.stat-card small b{color:var(--comparison);font-weight:500}.talent{display:grid;grid-template-columns:2fr 1fr 1fr;gap:24px;align-items:center}.talent p:last-child{font-size:13px;margin-bottom:0}.talent h2{margin-bottom:8px}.talent .eyebrow{margin-bottom:8px}.chart-controls{display:grid;grid-template-columns:repeat(2,minmax(100px,1fr));gap:4px 12px}.chart-controls label{grid-row:1;margin-bottom:0}.chart-controls select{grid-row:2;min-width:100px}.chart-panel svg{display:block;width:100%;height:auto;min-height:220px}.legend{display:flex;gap:24px;flex-wrap:wrap;font-size:12px;color:var(--muted)}.legend span{display:flex;align-items:center;gap:8px}.swatch{display:inline-block;width:24px;height:0;border-top:2px solid var(--accent)}.swatch.comparison{border-top:2px dashed var(--comparison)}.muted{font-size:12px;color:var(--muted);margin:12px 0 0}.derived>p{font-size:13px}.derived-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}.derived-grid span{display:block;font-size:11px;color:var(--muted)}.derived-grid strong{display:block;font-size:20px;font-weight:500;font-variant-numeric:tabular-nums}.table-wrap{max-width:100%;overflow-x:auto;border:1px solid var(--soft-line);border-radius:4px}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px;text-align:right;font-variant-numeric:tabular-nums}th,td{padding:12px;border-bottom:1px solid var(--soft-line)}th{font-weight:500;color:var(--muted);background:var(--raised)}th:first-child,td:first-child{text-align:left}tbody tr.current{background:oklch(28% .035 180)}tbody tr:last-child td{border-bottom:0}.pagination{display:flex;align-items:center;gap:8px;justify-content:flex-end;margin-top:16px;flex-wrap:wrap}.pagination button{font-size:12px;min-height:48px;padding:8px 12px}.pagination span{font-size:12px;color:var(--muted);padding:0 8px}.exp-test form{max-width:520px}.exp-test p{font-size:13px}.exp-test #exp-result{margin-top:16px;color:var(--text)}details>summary{cursor:pointer;font-size:18px;min-height:48px;font-weight:500}details[open]>summary{margin-bottom:16px}.exports p{font-size:13px}.button-row{display:flex;flex-wrap:wrap;gap:8px}.file-button{display:inline-flex;align-items:center;font-size:16px;margin:0;color:var(--text)}.file-button input{position:absolute;width:1px;height:1px;opacity:0;min-height:0}.file-button:focus-within{outline:3px solid var(--accent);outline-offset:3px}.status{font-size:13px;color:var(--muted);margin:16px 0;min-height:24px}.status.error{color:var(--danger)}footer{color:var(--muted);font-size:11px;padding:8px 0 24px;max-width:72em}
@media(hover:hover) and (pointer:fine){button:hover,.file-button:hover{border-color:var(--accent)}.roster button:hover{background:var(--raised)}}
@media(max-width:1150px){.workspace{grid-template-columns:224px minmax(0,1fr)}.workspace main{padding:32px 24px}.settings{grid-template-columns:1fr 1fr}.settings form{grid-column:1/-1}.talent{grid-template-columns:1fr 1fr}.talent>div:first-child{grid-column:1/-1}.facts strong{font-size:18px}.stat-card{padding:16px}.derived-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.topbar{padding:16px;min-height:72px}.version{display:none}.brand{font-size:15px}.workspace{display:block}.sidebar{border-right:0;border-bottom:1px solid var(--line);padding:16px}.aside-title h2{font-size:16px;margin-bottom:8px}.sidebar label,.aside-note{display:none}.roster{display:flex;flex-direction:row;overflow-x:auto;margin-top:12px;gap:8px;max-width:100%;padding-bottom:8px}.roster button{min-width:170px;min-height:64px;background:var(--surface);border:1px solid var(--soft-line)}.workspace main{padding:24px 16px}.intro h1{font-size:28px}.intro p{font-size:14px}.panel{padding:16px}.settings{gap:16px}.settings .input-action{flex-wrap:wrap}.settings .input-action input{flex-basis:100%}.settings .primary{width:100%}.character-heading{margin-top:32px}.character-heading h2{font-size:28px}.level-badge{min-width:88px}.level-badge strong{font-size:44px}.facts{grid-template-columns:1fr 1fr;gap:24px}.stat-grid{grid-template-columns:repeat(2,1fr)}.stat-card strong{font-size:28px}.section-line{align-items:flex-start;flex-wrap:wrap}.section-line>span{font-size:11px}.chart-controls{width:100%}.chart-panel svg{min-height:160px}.legend{gap:12px}.derived-grid{grid-template-columns:repeat(2,1fr)}.pagination{justify-content:flex-start}.pagination span{order:-1;width:100%}.button-row>button,.button-row>.file-button{width:100%;justify-content:center}.exports .muted{line-height:2}.brand-mark{width:32px;height:40px}.level-fields input[type=number]{width:72px}.talent{gap:16px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
