:root{color-scheme:dark;}
html[data-theme="light"]{
 --bg:#f4f6fa;--stage:#fff;--card:#f0f3f8;--panel:#e8edf5;
 --fg:#182435;--muted:#526176;--dim:#64748b;--border:#cdd6e3;--code:#f8fafc;
 --accent:#2563eb;--accent-2:#6545d7;--green:#15803d;--amber:#946200;--red:#c52b25;
 color-scheme:light;
}
html[data-theme="dark"]{color-scheme:dark;}
.theme-control{display:inline-flex;align-items:center;flex:none;max-width:100%;}
.theme-control select{min-height:36px;max-width:150px;border:1px solid var(--border);border-radius:999px;padding:6px 25px 6px 12px;background:var(--card);color:var(--fg);font:500 12px var(--font);cursor:pointer;}
.theme-control select:hover{border-color:var(--accent);}
.theme-control select:focus-visible{outline:2px solid var(--accent);outline-offset:3px;}
.theme-control-floating{position:fixed;right:70px;top:16px;z-index:100;}
html[data-theme="light"] header.nav{background:rgba(255,255,255,.9);}
html[data-theme="light"] :is(.wake-tip,.note-banner){color:#274c9b;}
html[data-theme="light"] :is(.file-card .fic,.acc-av){background:linear-gradient(135deg,#e2eafb,#d7e1f5);}
html[data-theme="light"] :is(.feature-card,.feature-card:hover){background:var(--stage);}
html[data-theme="light"] .feature-card .feature-icon{background:#e5edff;color:#2953aa;}
html[data-theme="light"] :is(.tool-nav a[aria-current],.step-number,.creation-actions a,.managed-link-actions .action-primary,.billing-actions #billingUpgrade){background:#e5edff;border-color:#aec3e9;color:#254e9b;}
html[data-theme="light"] .form-field label{color:var(--fg);}
html[data-theme="light"] .file-choice{background:#f0f5ff;border-color:#8ba9d3;}
html[data-theme="light"] :is(.file-choice-icon,.dropzone:not(.off) .upload-icon){color:#2953aa;}
html[data-theme="light"] :is(.file-choice.has-file,.share-result){background:#edf8f1;border-color:#94c2a5;}
html[data-theme="light"] .file-choice.has-file .file-choice-icon{color:#1c6940;}
html[data-theme="light"] .danger-action{color:#b52b25!important;border-color:#dba8a5!important;}
html[data-theme="light"] .history-actions #clearTransferHistory{color:#b52b25;}
html[data-theme="light"] .tool-page #billingUpgrade{color:#254e9b;border-color:#aec3e9;}
html[data-theme="light"] .usage-tile .usage-notice{background:#fff3d9;color:#785100;}
html[data-theme="light"] .connection-recovery{background:#edf3ff;border-color:#a3bce2;}
html[data-theme="light"] .connection-recovery:is([data-phase="failed"],[data-phase="peerChanged"]){background:#fff3d9;border-color:#d9bd7b;}
html[data-theme="light"] .action-more[open] .action-more-items{background:var(--stage);box-shadow:0 12px 30px #18243522;}
html[data-theme="light"] .nav-item.active{color:#254e9b;background:#e5edff;}
html[data-theme="light"] .nav-item.active .ni{color:#254e9b;}
html[data-theme="light"] .mini:hover{color:var(--accent);}
@media(max-width:600px){.theme-control select{min-height:44px;max-width:130px;padding-left:10px;font-size:12px;}.nav-inner{gap:10px;}.nav-sp{gap:8px;}.theme-control-floating{top:16px;}}

@media(max-width:720px){html .nav-inner{height:auto;min-height:62px;flex-wrap:wrap;gap:10px;padding-top:10px;padding-bottom:10px;}html .nav-links{gap:8px;flex-wrap:wrap;align-items:center;}html .nav-sp{flex-wrap:wrap;gap:8px;}html .nav-cta{padding:8px 12px;}}

/* One shared compact header scale for the homepage, app, tools and legal pages. */
:root{--header-control-height:32px;--header-control-radius:10px;}
html :is(.lang-btn,.acc-btn,.theme-control select,.nav-cta){box-sizing:border-box;height:var(--header-control-height);min-height:var(--header-control-height);border-radius:var(--header-control-radius);padding:0 10px;font-size:12px;font-weight:500;line-height:1.2;letter-spacing:0;white-space:nowrap;}
html :is(.lang-btn,.acc-btn,.nav-cta){display:inline-flex;align-items:center;justify-content:center;}
html .lang-btn{min-width:44px;}
html .acc-btn{width:80px;min-width:80px;max-width:80px;overflow:hidden;text-overflow:ellipsis;}
html .theme-control select{width:100px;min-width:100px;max-width:100px;padding-right:22px;}
html .theme-control{height:var(--header-control-height);align-items:center;}
@media(max-width:640px){:root{--header-control-height:40px;}}
/* One click switches the resolved theme; a fresh preference follows the system. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 11px;border:1px solid var(--border);border-radius:10px;background:var(--card);color:var(--fg);font:500 12px var(--font);cursor:pointer;white-space:nowrap;}
.theme-toggle svg{width:17px;height:17px;flex:none;}
.theme-toggle:hover{border-color:var(--accent);color:var(--accent);}
.theme-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px;}
.theme-control .theme-toggle{height:var(--header-control-height);min-height:var(--header-control-height);}
.tool-mobile-utilities .theme-toggle{min-height:44px;}
@media(max-width:640px){.theme-control .theme-toggle{min-height:44px;height:44px;}}
