/* A warm paper palette; original dark values remain in style.css fallbacks. */
:root[data-theme=light]{color-scheme:light;--tone-surface:#fff;--tone-surface-rgb:255 255 255;--tone-surface-muted:#f7f7f5;--tone-surface-muted-rgb:247 247 245;--tone-border:#e4e4df;--tone-border-rgb:228 228 223;--tone-text-muted:#78776f;--tone-text-muted-rgb:120 119 111;--tone-text-secondary:#60605a;--tone-text-secondary-rgb:96 96 90;--tone-text:#37352f;--tone-text-rgb:55 53 47;background:#f7f7f5;color:#37352f}
:root[data-theme=light] body{background:#f7f7f5;color:#37352f}
.header-title-row{display:flex;align-items:center;justify-content:flex-start;gap:12px}.site-header>div{flex:1}.header-title-row h1{margin:0 0 2px;min-width:0}.theme-control{position:relative;display:flex;align-items:center;flex:none;gap:0;color:var(--tone-text-secondary,#cfcec7)}#theme-toggle,#theme-menu-toggle{display:flex;align-items:center;justify-content:center;border:0;background:transparent;color:inherit;padding:0;cursor:pointer;border-radius:8px}#theme-toggle{width:36px;height:36px;position:relative}#theme-menu-toggle{width:17px;height:32px}#theme-toggle:hover,#theme-menu-toggle:hover{background:var(--tone-border,#333)}#theme-toggle:focus-visible,#theme-menu-toggle:focus-visible{outline:2px solid #719db5;outline-offset:2px}#theme-toggle:disabled{opacity:1;cursor:default}.theme-orbit{display:block;position:relative;width:32px;height:32px;overflow:hidden;isolation:isolate}.theme-orbit svg{position:absolute;left:5px;top:5px;width:22px;height:22px;transition:transform .55s cubic-bezier(.22,.7,.2,1),opacity .35s ease;will-change:transform;transform-origin:center}.theme-sun{transform:translate(-23px,28px) rotate(-65deg);opacity:0;color:#c18b36}.theme-moon{transform:translate(-23px,28px) rotate(-65deg);opacity:0;color:#bfcbd5}[data-theme-target=light] .theme-sun,[data-theme-target=dark] .theme-moon{transform:translate(0,0) rotate(0);opacity:1;transition-delay:.1s}[data-theme-target=dark] .theme-sun,[data-theme-target=light] .theme-moon{transform:translate(23px,28px) rotate(65deg);opacity:0;transition-delay:0s}.theme-system-dot{display:none;position:absolute;right:3px;bottom:3px;width:4px;height:4px;background:#7698ad;border-radius:50%}[data-theme-preference=system] .theme-system-dot{display:block}
#theme-menu{position:absolute;right:0;top:calc(100% + 8px);width:188px;padding:6px;border:1px solid var(--tone-border,#444);border-radius:10px;background:var(--tone-surface,#242424);box-shadow:0 8px 28px #0002;z-index:30}#theme-menu[hidden]{display:none}#theme-menu>span{display:block;font-size:11px;font-weight:500;color:var(--tone-text-muted,#aaa);padding:6px 8px}#theme-menu>button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:36px;padding:7px 9px;border:0;border-radius:6px;background:transparent;color:inherit;text-align:left;font-size:13px;cursor:pointer}#theme-menu>button:hover{background:var(--tone-surface-muted,#333)}#theme-menu>button[aria-pressed=true]::after{content:'✓';color:#6489a0}
.footer-thanks{margin:6px 0 10px;color:var(--tone-text-secondary,#b4b4ae);font-size:12px;line-height:1.8}.site-footer{flex-wrap:wrap}.site-footer>.footer-thanks{flex-basis:100%}.theme-changing body,.theme-changing :is(.panel,dialog,.library-kind,.result-item,.bonus-track,.result-tools,.check-bottom,.completion-editor-footer,input,select,.btn){transition:background-color .36s ease,color .36s ease,border-color .36s ease}
[data-theme=light] .site-header>.brand-logo,[data-theme=light] .evidence-dummy::before{filter:brightness(0);opacity:.8}[data-theme=light] .site-header>.brand-logo{opacity:.9}[data-theme=light] :is(.btn.primary,.result-dialog-footer>.primary,[data-calculation-save],[data-bonus-apply]){color:#fff}[data-theme=light] :is(.btn.primary,[data-calculation-save],[data-bonus-apply]):disabled{background:#b8cbd6;border-color:#a9becb;color:#fdfdfb}[data-theme=light] :is(.tier-use-name,.tier-result h3 strong,.count,.tier-eyebrow,#records-template,#record-load-options>summary,.tier-panel summary){color:#42657a}[data-theme=light] :is(.tier-switch,.rate-fill,.tier-range-fill){background:#6e95ac}[data-theme=light] :is(.tier-switch i,.rate-knob,.tier-range-thumb){background:#fff}[data-theme=light] :is(select,.field select,.bonus-load>select){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23696760' stroke-width='1.5'/%3E%3C/svg%3E")}[data-theme=light] :is(.tier-completion-editor,.tier-completion-wide,#record-check-dialog,.bonus-dialog){background:#fff}[data-theme=light] .result-item.is-review{background:#fbf7ee}[data-theme=light] .record-review-status{color:#9b6934}[data-theme=light] .bonus-track:has(input:checked){background:#edf2f5}[data-theme=light] .bonus-track[data-license=루키]{--license-color:#aa791f}[data-theme=light] .bonus-track[data-license=L3]{--license-color:#638735}[data-theme=light] .bonus-track[data-license=L2]{--license-color:#3c7ca6}[data-theme=light] .bonus-track[data-license=L1]{--license-color:#b05859}[data-theme=light] .theme-moon{color:#647b90}[data-theme=light] .theme-sun{color:#a67a2c}[data-theme=light] .selected-table-scroll :is(th,td){color:#45433d}[data-theme=light] .selected-table-scroll thead th{background:#f1f1ee}[data-theme=light] .table-license{filter:brightness(.72)}
@media(max-width:600px){.header-title-row{gap:5px}.header-title-row h1{font-size:clamp(16px,4.6vw,20px);line-height:1.35;letter-spacing:-.05em;white-space:nowrap}#theme-toggle{width:30px;height:32px}#theme-menu-toggle{width:13px}.theme-orbit{width:30px;height:30px}.theme-orbit svg{left:5px;top:5px;width:20px;height:20px}.site-header{gap:9px}.site-header p{font-size:11px}.footer-thanks{font-size:11px}}
@media(max-width:360px){.header-title-row h1{font-size:16px;white-space:normal;word-break:keep-all}.site-header>.brand-logo{width:44px;height:44px}}
@media(prefers-reduced-motion:reduce){.theme-orbit svg,.theme-changing body,.theme-changing :is(.panel,dialog,input,select,.btn){transition:none!important}}

[data-theme=light] :is(.table-close,.bonus-library-entry [data-delete],.btn.danger){background:#f4e7e7;color:#944d4d;border-color:#dbc2c2}[data-theme=light] :is(.exclude-selected-toggle:has(input:checked),.completion-empty:has(input:checked)){background:#eaf1f5;color:#3d647d;border-color:#91afc1}[data-theme=light] :is(.license-badge,.completion-track>.license-label){filter:brightness(.75)}

[data-theme=light] :is(#results,[data-snapshot-id=results],#record-check-dialog) .row-empty.is-empty{background:#deebf2;color:#365c73}[data-theme=light] .completion-empty:has(input:checked){background:#deebf2;color:#365c73}

.theme-changing .brand-logo,.theme-changing .evidence-dummy::before{transition:filter .36s ease,opacity .36s ease}@media(prefers-reduced-motion:reduce){.theme-changing .brand-logo,.theme-changing .evidence-dummy::before{transition:none}}

[data-theme=light] :is(.completion-error,.missing-error,.check-notice){color:#a24c42}[data-theme=light] .bonus-track[data-license=루키]{--license-color:#946817}[data-theme=light] .bonus-track[data-license=L3]{--license-color:#54772c}[data-theme=light] .bonus-track[data-license=L2]{--license-color:#316b94}[data-theme=light] .bonus-track[data-license=L1]{--license-color:#a24546}
/* Video states and analysis controls have their own light-mode treatment. */
[data-theme=light] #drop-zone[data-state=ready]{background:#edf3ee;border-color:#b4c6b8}
[data-theme=light] #drop-zone:is([data-state=loading],[data-state=checking]){background:#f0f3f6;border-color:#a6bece}
[data-theme=light] #drop-zone[data-state=error]{background:#fbf0ee;border-color:#d4ada5}
[data-theme=light] #drop-zone #upload-state-title{color:#37352f}
[data-theme=light] #drop-zone :is(.upload-replace-note,#video-preflight-status){color:#60605a}
[data-theme=light] #analysis-settings .analysis-actions>#pause-btn{background:#f1f1ee;color:#445c6b;border-color:#c4ccce}
[data-theme=light] #analysis-settings .analysis-actions>#pause-btn[aria-pressed=true]{background:#e1ecf3;color:#365e78}
[data-theme=light] #analysis-settings .analysis-actions>#run-btn.is-stopping{background:#f3e2e2!important;color:#914b4b;border-color:#d8b9b9!important}
[data-theme=light] #analysis-settings .analysis-actions{border-color:#c6cece}
[data-theme=light] .rate-heading>label{color:#60605a}
[data-theme=light] .rate-dot{background:#96aab7}
[data-theme=light] .exclude-panel>summary{color:#42657a}
/* Theme-aware review, filter chips and one select chevron. */
.header-title-row{justify-content:space-between}#theme-toggle{width:32px;height:32px}#theme-menu-toggle{width:15px}.theme-orbit{width:28px;height:28px}.theme-orbit svg{left:4px;top:4px;width:20px;height:20px}
[data-theme=light] #clear-btn.btn{background:#f4e7e7;color:#944d4d;border-color:#dbc2c2}[data-theme=light] #clear-btn.btn:hover:not(:disabled){background:#eedada;border-color:#cda6a6}
:root[data-theme=light] :is(#results,[data-snapshot-id=results]) .result-item.is-review{background:#fbf7ee}
:root[data-theme=light] :is(#result-filter-toggle,[data-snapshot-id=result-filter-toggle])[aria-expanded=true]{background:#e3edf2;color:#365c73}
:root[data-theme=light] :is(#license-filter,[data-snapshot-id=license-filter])>label{background:#f1f1ee;color:var(--license-ink,#60605a)}
:root[data-theme=light] :is(#license-filter,[data-snapshot-id=license-filter])>label:has(input:checked){background:color-mix(in srgb,var(--license-color,#8da9b9) 14%,#fff);color:var(--license-ink,#42657a)}
[data-theme=light] :is(#license-filter,[data-snapshot-id=license-filter])>label:has(input[value=루키]){--license-ink:#946817}[data-theme=light] :is(#license-filter,[data-snapshot-id=license-filter])>label:has(input[value=L3]){--license-ink:#54772c}[data-theme=light] :is(#license-filter,[data-snapshot-id=license-filter])>label:has(input[value=L2]){--license-ink:#316b94}[data-theme=light] :is(#license-filter,[data-snapshot-id=license-filter])>label:has(input[value=L1]){--license-ink:#a24546}
[data-theme=light] :is(#result-filter,[data-snapshot-id=result-filter])[data-view=attention],[data-theme=light] #result-filter-summary [data-filter-view=attention]{color:#946817}
[data-theme=light] :is(select,.field select,.bonus-load>select){background-repeat:no-repeat;background-position:right 12px center;background-size:16px 16px}
[data-theme=light] :is(select,.field select,.bonus-load>select) option{background:#fff;color:#37352f}
@media(max-width:600px){#theme-toggle{width:28px;height:30px}#theme-menu-toggle{width:12px}.theme-orbit{width:26px;height:26px}.theme-orbit svg{width:18px;height:18px}}

[data-theme=light] :is(.completion-license[data-license="루키"],.bonus-track[data-license="루키"]>.license-label,#exclude-tracks>label[data-license="루키"] .license-label,.result-item.license-rookie .license-badge){color:#946817;filter:none}
[data-theme=light] :is(.completion-license[data-license="L3"],.bonus-track[data-license="L3"]>.license-label,#exclude-tracks>label[data-license="L3"] .license-label,.result-item.license-l3 .license-badge){color:#54772c;filter:none}
[data-theme=light] :is(.completion-license[data-license="L2"],.bonus-track[data-license="L2"]>.license-label,#exclude-tracks>label[data-license="L2"] .license-label,.result-item.license-l2 .license-badge){color:#316b94;filter:none}
[data-theme=light] :is(.completion-license[data-license="L1"],.bonus-track[data-license="L1"]>.license-label,#exclude-tracks>label[data-license="L1"] .license-label,.result-item.license-l1 .license-badge){color:#a24546;filter:none}

[data-theme=light] #review-body>.review{color:#8f682f}[data-theme=light] #review-delete{color:#96585a}

/* Small controls and focus indicators follow the active palette too. */
[data-theme=light] #page-outline-toggle.is-scrubbing>[data-outline-mark]{text-shadow:0 1px 4px #fff,0 0 8px #fff}
[data-theme=light] #page-outline-toggle.is-scrubbing::before{background:linear-gradient(90deg,#fff0,#ffffffeb 30%,#fffffff5)}
[data-theme=light] #exclude-tracks input[type=checkbox]{background-color:#fff;border-color:#adb8bc}
[data-theme=light] #exclude-tracks input:checked{background-color:#537b91;border-color:#537b91}
[data-theme=light] #tier-file{background:#fff;border-color:#d9ddd9;color:#37352f}
[data-theme=light] #tier-file::file-selector-button{background:#edf1f3;border-color:#c9d3d8;color:#42657a}
[data-theme=light] #tier-file:hover:not(:disabled){border-color:#a9bcc7}
:root[data-theme=light] #analysis-settings .analysis-actions:has(#pause-btn:not([hidden])){border-color:#d5d9d7}
:root[data-theme=light] #analysis-settings .analysis-actions>#pause-btn:not([hidden]){border-right-color:#d5d9d7}
.analysis-actions>.btn:active{filter:none}
[data-theme=light] :is(#results,[data-snapshot-id=results]) .record-entry:focus-within,
[data-theme=light] .tier-completion-editor .completion-entry-controls:focus-within{outline:1px solid #a9c1cf;outline-offset:1px;box-shadow:0 0 0 2px #8bacbf14}
[data-theme=dark] :is(#results,[data-snapshot-id=results]) .record-entry:focus-within,
[data-theme=dark] .tier-completion-editor .completion-entry-controls:focus-within{outline:1px solid #718c9b;outline-offset:1px;box-shadow:none}
.analysis-stop-confirm{width:min(420px,calc(100vw - 32px));padding:24px;border:1px solid var(--tone-border,#4b4d47);border-radius:16px;background:var(--tone-surface,#242424);color:var(--tone-text,#eee)}
.analysis-stop-confirm h2{font-size:20px;margin:0 0 12px}.analysis-stop-confirm .hint{margin:0 0 22px}.analysis-stop-confirm .delete-confirm-actions{display:flex;gap:8px}.analysis-stop-confirm .btn{flex:1;min-width:0}
:root[data-theme=light] :is(#license-filter,[data-snapshot-id=license-filter])>label:has(input:checked){background:color-mix(in srgb,var(--license-color,#8da9b9) 34%,#fff);border-color:color-mix(in srgb,var(--license-ink,#42657a) 55%,#fff);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--license-ink,#42657a) 24%,transparent)}
