:root{--theme-heading:#0b1f33;--theme-text:#41526a;--theme-soft:#eaf2ff;--theme-field:#fff;--theme-header:#0b1f33;--theme-hero:#163f67;--theme-action:#1f67d2;--theme-accent:#f47b20;--theme-tint:#f7f9fc;--theme-panel:#eef3fa;--theme-on-accent:#fff;--theme-good:#e9f8f1;--theme-good-text:#116447;--theme-bad:#fff0ee;--theme-bad-text:#a82920;--theme-court-line:#ffffff14}
:root[data-theme=dark]{color-scheme:dark;--bg:#10151e;--surface:#1b2431;--ink:#e9eef8;--muted:#acbbd0;--line:#354457;--blue:#91bfff;--blue-soft:#243954;--theme-heading:#f0f5ff;--theme-text:#bac9dd;--theme-soft:#263951;--theme-field:#131e2b;--theme-header:#0c121b;--theme-hero:#263b54;--theme-action:#376ddb;--theme-accent:#ffae66;--theme-tint:#151f2d;--theme-panel:#202f43;--theme-good:#173f32;--theme-good-text:#9ae5bf;--theme-bad:#48272b;--theme-bad-text:#ffc5bf;--shadow:0 16px 40px #0004}
:root[data-theme=royal]{color-scheme:dark;--bg:#09184c;--surface:#132967;--ink:#f2f5ff;--muted:#b8caf3;--line:#3655a2;--blue:#b0d0ff;--blue-soft:#203e88;--theme-heading:#fff;--theme-text:#c6d6f9;--theme-soft:#23418a;--theme-field:#0c2059;--theme-header:#071239;--theme-hero:#254fc3;--theme-action:#416ee9;--theme-accent:#a5d5ff;--theme-tint:#10235c;--theme-panel:#193578;--theme-good:#164b4f;--theme-good-text:#a9f0df;--theme-bad:#50284e;--theme-bad-text:#ffd1df;--shadow:0 16px 40px #020b2c66}
:root[data-theme=basket]{color-scheme:light;--bg:#fff4e6;--surface:#fffcf6;--ink:#332317;--muted:#7a614c;--line:#e8cbaa;--blue:#aa450b;--blue-soft:#ffead0;--theme-heading:#382313;--theme-text:#6b4c35;--theme-soft:#ffead0;--theme-field:#fffdf9;--theme-header:#291b13;--theme-hero:#71330f;--theme-action:#b94c0c;--theme-accent:#ff9b36;--theme-tint:#fff5e7;--theme-panel:#f9e5cb;--theme-good:#e5f2de;--theme-good-text:#326326;--theme-bad:#ffe4db;--theme-bad-text:#922c18;--shadow:0 16px 40px #733b121c}
/* Shared palette applies to all pages, forms, cards and the mobile composer. */
html[data-theme] body{background:var(--bg);color:var(--ink)}
html[data-theme] :is(h1,h2,h3,h4){color:var(--theme-heading)}
html[data-theme] p{color:var(--theme-text)}
html[data-theme] :is(label,.table span,.content-count,.preview-text,.sortable-copy small){color:var(--muted)}
html[data-theme] :is(input,select,textarea){background:var(--theme-field);color:var(--ink);border-color:var(--line)}
html[data-theme] input::placeholder,html[data-theme] textarea::placeholder{color:var(--muted);opacity:.8}
html[data-theme] :is(button,.button){background:var(--theme-action);color:var(--theme-on-accent)}
html[data-theme] :is(button,.button):hover{filter:brightness(1.1)}
html[data-theme] :is(.button.ghost,.danger){background:var(--surface);color:var(--blue);border-color:var(--line)}
html[data-theme] .danger{background:var(--theme-bad);color:var(--theme-bad-text)}
html[data-theme] :is(.features article,.cards article,.premium,.formbox,details,.category-manager,.filters,.inline-form,.table>div,.category-list>div,.library-card,.exercise-media,.exercise-copy,.dashboard-toolbar,.professional-stats a,.sortable-exercise,.ai-video-form,.ai-result,#cookie,.chosen-exercise,.picker-row,.ai-proposal){background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-theme] :is(summary,.library-card h3 a,.card-title-link,.professional-stats b){color:var(--theme-heading)}
html[data-theme] :is(.tabs,.workspace-tabs){background:var(--theme-panel)}
html[data-theme] .tabs a{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme] .tabs a:hover,html[data-theme] .tabs a[aria-current=page]{background:var(--theme-action);color:#fff;border-color:var(--theme-action)}
html[data-theme] :is(.meta-pill,.features b,.exercise-number,.ai-badge,.chosen-number){background:var(--theme-soft);color:var(--blue)}
html[data-theme] :is(.empty-state,.context-tip,.ai-video-note){background:var(--theme-tint);border-color:var(--line);color:var(--theme-text)}
html[data-theme] body>header{background:var(--theme-header)}
html[data-theme] :is(.workspace-head,.detail-hero,.court,.ai-video-intro){background:linear-gradient(120deg,var(--theme-header),var(--theme-hero));border-color:var(--line)}
html[data-theme] :is(.workspace-head,.detail-hero,.court,.ai-video-intro) :is(h1,h2,h3,p,strong){color:#fff}
html[data-theme] .eyebrow{color:var(--blue)}
html[data-theme] .workspace-head .eyebrow{color:var(--theme-accent)}
html[data-theme] .brand>span{background:var(--theme-accent)}
html[data-theme] :is(footer,.onboarding-guide summary,.workout-create>summary){background:var(--theme-header);color:#fff}
html[data-theme] footer p,html[data-theme] footer a{color:#e3ebf5}
html[data-theme] .onboarding-guide{background:var(--theme-tint);border-color:var(--line)}
html[data-theme] .onboarding-guide-body div{background:var(--surface);border-color:var(--line)}
html[data-theme] .onboarding-guide-body b{color:var(--theme-heading)}
html[data-theme] .onboarding-guide-body span{color:var(--theme-text)}
html[data-theme] .onboarding-guide-body a{color:var(--blue)}
html[data-theme] :is(.create-panel[open]>summary,.builder-intro){background:var(--theme-soft);color:var(--theme-heading);border-color:var(--line)}
html[data-theme] .workout-builder{background:var(--theme-tint);border-color:var(--line)}
html[data-theme] .ai-compose{background:var(--surface);border-color:var(--line)}
html[data-theme] :is(.ai-compose small,.picker-heading>span,.picker-pagination span,.picker-description,.ai-proposal>small,.ai-proposal li small,.picker-item p,.chosen-notes summary){color:var(--muted)}
html[data-theme] :is(.picker-item,.chosen-notes){background:transparent}
html[data-theme] :is(.selected-section,.builder-status:not(:empty)){background:var(--theme-panel);border-color:var(--line);color:var(--ink)}
html[data-theme] :is(.builder-emblem,.picker-add,.chosen-order button,.reorder-buttons button){background:var(--theme-soft);color:var(--blue)}
html[data-theme] .picker-add.is-selected{background:var(--theme-good);color:var(--theme-good-text)}
html[data-theme] .remove-exercise{background:var(--theme-bad);color:var(--theme-bad-text)}
html[data-theme] .text-button{background:transparent;color:var(--blue)}
html[data-theme] .notice{background:var(--theme-good);color:var(--theme-good-text)}
html[data-theme] .error{background:var(--theme-bad);color:var(--theme-bad-text)}
html[data-theme] .library-preview{background:linear-gradient(145deg,var(--theme-soft),var(--theme-tint))}
html[data-theme] .ai-result-text{color:var(--theme-text)}
html[data-theme] :is(.ad,.ai-result header){border-color:var(--line);color:var(--muted)}
html[data-theme] .ai-proposal h3{color:var(--blue)}
/* Court-inspired orange edition, with subtle court lines rather than busy images. */
html[data-theme=basket] body{background-image:repeating-linear-gradient(90deg,transparent 0,transparent 79px,#bd773409 80px,#bd773409 81px)}
html[data-theme=basket] :is(.workspace-head,.hero .court){background-image:radial-gradient(circle at 88% 50%,transparent 0 52px,#ffba6133 53px 55px,transparent 56px),linear-gradient(110deg,#291b13,#82400e);border-bottom:4px solid #ef8324}
html[data-theme=basket] .builder-intro{background-image:radial-gradient(circle at 105% 50%,transparent 0 65px,#c56b2333 66px 68px,transparent 69px)}
html[data-theme=basket] :is(.professional-stats a,.library-card){border-top:3px solid #eb8b35}
html[data-theme=basket] .workout-create>summary{background:linear-gradient(100deg,#74300c,#b64c0c)}
/* Theme chooser is always available in the main navigation. */
html[data-theme] .theme-picker{position:relative;padding:0;margin:0;border:0;box-shadow:none;background:transparent;color:#fff}
html[data-theme] .theme-picker>summary{padding:10px 12px;margin:0;font-size:.85rem;color:#e4edf8;white-space:nowrap;list-style:none;background:#ffffff12;border-radius:10px}
.theme-picker>summary::-webkit-details-marker{display:none}
.theme-choices{position:absolute;right:0;top:calc(100% + 10px);z-index:120;display:grid;grid-template-columns:repeat(2,1fr);gap:8px;padding:12px;width:260px;border:1px solid var(--line);background:var(--surface);border-radius:16px;box-shadow:var(--shadow)}
html[data-theme] .theme-choices button{display:flex;align-items:center;justify-content:flex-start;padding:10px 8px;gap:8px;background:var(--theme-tint);border:2px solid transparent;color:var(--ink);font-size:.8rem}
html[data-theme] .theme-choices button[aria-pressed=true]{border-color:var(--blue);background:var(--theme-soft)}
.theme-swatch{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;flex-shrink:0;border:1px solid #ffffff44;font-size:1rem}
.theme-swatch-light{background:#fff;color:#ac6d08}.theme-swatch-dark{background:#121a25;color:#d7e2f2}.theme-swatch-royal{background:#244bce;color:#fff}.theme-swatch-basket{background:#ee8526;color:#fff}
/* Exercise actions and filter controls. */
[data-exercise-card]{cursor:pointer}.library-card:focus-within,.cards article[data-exercise-card]:focus-within{outline:3px solid var(--blue);outline-offset:3px}
[data-exercise-card] .card-title-link:after{content:none!important}
.inline-category-editor{padding:18px;background:var(--theme-soft);border:1px solid var(--line);border-radius:14px}
.inline-category-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.inline-category-editor p{margin-bottom:0;font-size:.85rem}
.exercise-filters label{flex:1;min-width:160px}.exercise-filters select{min-width:0}
@media(max-width:850px){
 html[data-theme] body>header>nav{background:var(--theme-header)}
 html[data-theme] nav .workspace-tabs{background:transparent}
 html[data-theme] nav .workspace-tabs a{background:transparent;color:#e0ebf8}
 html[data-theme] nav .workspace-tabs a[aria-current=page]{background:#ffffff20}
 html[data-theme] .theme-picker{border-bottom:1px solid #ffffff22;padding-bottom:12px;margin-bottom:8px}
 .theme-choices{position:static;width:100%;margin-top:8px;box-shadow:none}
 html[data-theme] .theme-picker>summary{background:#ffffff10}
 .exercise-filters{gap:10px}.exercise-filters label{flex:1 1 100%;min-width:0}.exercise-filters>button,.exercise-filters>.button{flex:1}
}
@media print{
 html[data-theme]{color-scheme:light;--bg:#fff;--surface:#fff;--ink:#15232b;--theme-heading:#15232b;--theme-text:#34475b;--muted:#52646d;--line:#dfe7ec;--blue:#146b5b}
 html[data-theme] body{background:#fff!important;background-image:none!important;color:#15232b!important}.theme-picker{display:none!important}
 html[data-theme] .print-sheet :is(h1,h2,h3,p,span,strong){color:#15232b!important}
}
@media screen{
 html[data-theme] :is(.print-sheet,.printhead,.printitem){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-theme] :is(.print-objective,.print-meta span){background:var(--theme-soft);color:var(--ink)}
 html[data-theme] :is(.print-meta strong,.print-exercise-copy h2 span,.print-brand){color:var(--blue)}
 html[data-theme] .print-document-footer{background:var(--surface);color:var(--muted)}
}
