:root{color-scheme:light}
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#e8ece4;
  --muted:#a2ad9f;
  --paper:#151b16;
  --white:#202920;
  --green:#b9ed63;
  --deep:#38583b;
  --line:#303b31;
  --orange:#eb865e;
  background:#151b16;
}

html[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .video-card,
html[data-theme="dark"] .session-card,
html[data-theme="dark"] .player-category-card,
html[data-theme="dark"] .player-row,
html[data-theme="dark"] .session-details-form,
html[data-theme="dark"] .session-video-item,
html[data-theme="dark"] .session-video-choice,
html[data-theme="dark"] .session-pick-option,
html[data-theme="dark"] .search,
html[data-theme="dark"] .field-input,
html[data-theme="dark"] .dialog,
html[data-theme="dark"] dialog{background:#202920;color:var(--ink);border-color:#354235}
html[data-theme="dark"] .sidebar{border-right-color:#303b31;border-bottom-color:#303b31}
html[data-theme="dark"] .brand-mark{background:#405e3d;color:#d1f49a}
html[data-theme="dark"] .brand-dot{color:#b9ed63}
html[data-theme="dark"] .side-label,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .count,
html[data-theme="dark"] .field-hint,
html[data-theme="dark"] .card-note,
html[data-theme="dark"] .footnote,
html[data-theme="dark"] .session-card-focus,
html[data-theme="dark"] .session-card-footer,
html[data-theme="dark"] .session-items-heading span,
html[data-theme="dark"] .sessions-heading p,
html[data-theme="dark"] .nav-count,
html[data-theme="dark"] .sidebar-bottom small{color:#a2ad9f}
html[data-theme="dark"] .breadcrumb strong{color:#d4ddcf}
html[data-theme="dark"] .breadcrumb span{color:#657263}
html[data-theme="dark"] .nav-item,
html[data-theme="dark"] .workspace-nav-item,
html[data-theme="dark"] .nav-folder-root,
html[data-theme="dark"] .nav-coach-folder{color:#c1cbbb}
html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .workspace-nav-item:hover,
html[data-theme="dark"] .nav-folder-root:hover,
html[data-theme="dark"] .nav-coach-folder:hover{background:#29352a}
html[data-theme="dark"] .nav-item.active,
html[data-theme="dark"] .workspace-nav-item.active{background:#2c3b2c;color:#e8ece4}
html[data-theme="dark"] .nav-folder-root{background:#263327}
html[data-theme="dark"] .nav-tree-group,
html[data-theme="dark"] .nav-folder-content{border-color:#3a4939}
html[data-theme="dark"] .intro-ball{color:#263127}
html[data-theme="dark"] h1 em{color:#a8d47a}
html[data-theme="dark"] .intro p,
html[data-theme="dark"] .sessions-heading p{color:#aab4a7}
html[data-theme="dark"] .session-card-date,
html[data-theme="dark"] .session-card-footer span:last-child,
html[data-theme="dark"] .session-pick-option>span:last-child{color:#b9df91}
html[data-theme="dark"] .tag-filter-heading,
html[data-theme="dark"] .existing-tags-heading{color:#a2ad9f}
html[data-theme="dark"] .eyebrow{color:#a0b390}
html[data-theme="dark"] .online-dot{background:#9bd46a}
html[data-theme="dark"] .search{color:#a2ad9f}
html[data-theme="dark"] .search input,
html[data-theme="dark"] .session-title-input,
html[data-theme="dark"] .session-details-form>label input,
html[data-theme="dark"] .session-note-label .field-input{background:#182119;color:#e8ece4;border-color:#39463a}
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .workspace-tab{border-color:#3a4939;color:#c0cabb}
html[data-theme="dark"] .filter-chip.active,
html[data-theme="dark"] .workspace-tab.active,
html[data-theme="dark"] .session-video-choice:has(input:checked){background:#30432e;border-color:#617c4d;color:#e6f2dc}
html[data-theme="dark"] .tag{background:#2e3b2d;color:#c6e7a4}
html[data-theme="dark"] .existing-tag{background:#2e3b2d;color:#c6e7a4}
html[data-theme="dark"] .existing-tag small{color:#a2ad9f}
html[data-theme="dark"] .tag-manager-modes{background:#29352a}
html[data-theme="dark"] .tag-manager-modes button{color:#b9c5b4}
html[data-theme="dark"] .tag-manager-modes button.active{background:#3b4c3a;color:#eef4e9;box-shadow:0 1px 4px #0004}
html[data-theme="dark"] .tag-delete-actions>p{color:#a2ad9f}
html[data-theme="dark"] .tag-delete-footer [role="status"]{color:#b9df91}
html[data-theme="dark"] .delete-selected-button{background:#333a34;color:#b0b6ae}
html[data-theme="dark"] .delete-selected-button:enabled{background:#54332e;color:#ffd2c4}
html[data-theme="dark"] .delete-selected-button:enabled:hover{background:#684039}
html[data-theme="dark"] .tag-muted{background:#303733;color:#c0c8bc}
html[data-theme="dark"] .video-card{border-color:#303b31}
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .session-card-footer{border-color:#354235}
html[data-theme="dark"] .card-actions button[data-edit]{background:#456640;color:#f5faef}
html[data-theme="dark"] .card-actions button[data-delete]{background:#344335;color:#d5e6c9}
html[data-theme="dark"] .card-actions button[data-add-to-session]{background:#303c31;color:#d4e2c8}
html[data-theme="dark"] .session-card{color:#e8ece4}
html[data-theme="dark"] .session-title-input{border-color:#465345}
html[data-theme="dark"] .session-details-form>label{color:#b0b9ab}
html[data-theme="dark"] .session-item-actions button,
html[data-theme="dark"] .session-pick-option:disabled{background:#2b362c;color:#c8d5bf;border-color:#3b493c}
html[data-theme="dark"] .session-choice-copy strong,
html[data-theme="dark"] .session-pick-option strong{color:#e2e9de}
html[data-theme="dark"] .session-choice-copy small,
html[data-theme="dark"] .session-pick-option small,
html[data-theme="dark"] .already-added{color:#a4afa0}
html[data-theme="dark"] .sessions-empty{border-color:#3a4939;color:#e8ece4}
html[data-theme="dark"] .player-category-card{background:#202920;border-color:#354235;color:#e8ece4}
html[data-theme="dark"] .player-category-card>small,
html[data-theme="dark"] .player-category-toolbar>span,
html[data-theme="dark"] .player-row-name small{color:#a2ad9f}
html[data-theme="dark"] .player-row{background:#202920;border-color:#354235}
html[data-theme="dark"] .player-avatar{background:#30432e;color:#c6e7a4}
html[data-theme="dark"] .player-row-actions .player-delete-button{color:#ffb6a4}
html[data-theme="dark"] .sessions-empty p{color:#aab4a7}
html[data-theme="dark"] .sessions-empty-icon{color:#a8d47a}
html[data-theme="dark"] .add-button{background:#44653e;color:#f7fbf3}
html[data-theme="dark"] .add-button:hover{background:#527849}
html[data-theme="dark"] .manage-tags-button,
html[data-theme="dark"] .back-button,
html[data-theme="dark"] .player-meta a,
html[data-theme="dark"] .auth-link{color:#b9df91}
html[data-theme="dark"] .manage-tags-button:hover{color:#d1f0b2}
html[data-theme="dark"] .cancel-button,
html[data-theme="dark"] .close-button,
html[data-theme="dark"] .problem-button{background:#2b362c;color:#d8e1d2;border-color:#3c4a3d}
html[data-theme="dark"] .dialog{box-shadow:0 24px 80px #0009}
html[data-theme="dark"] .field-input::placeholder,
html[data-theme="dark"] .search input::placeholder{color:#899587}
html[data-theme="dark"] .tag-choice,
html[data-theme="dark"] .existing-tag,
html[data-theme="dark"] .tag-picker-option,
html[data-theme="dark"] .add-to-session-list .session-pick-option{background:#283329;color:#dce5d6;border-color:#39463a}
html[data-theme="dark"] .tag-choice:has(input:checked),
html[data-theme="dark"] .tag-picker-option[aria-selected="true"]{background:#334531;border-color:#617c4d}
html[data-theme="dark"] .cover-preview,
html[data-theme="dark"] .cover-editor{background:#29352b;color:#aeb9a9;border-color:#3a4939}
html[data-theme="dark"] .auth-description,
html[data-theme="dark"] .tag-manager-copy,
html[data-theme="dark"] .unavailable-message{color:#b0baad}
html[data-theme="dark"] .coach-avatar{background:#3b4a37;color:#e3e9d9}
html[data-theme="dark"] .empty-state{border-color:#3a4939;color:#b4c0ae}
html[data-theme="dark"] .empty-state strong{color:#e4ece0}
html[data-theme="dark"] .footnote{border-color:#303b31}
html[data-theme="dark"] .player-frame{background:#080b08}
html[data-theme="dark"] .video-source{background:#253026;color:#e6ecdf}
html[data-theme="dark"] .saved-indicator{box-shadow:0 0 0 2px #202920}

.theme-toggle{width:29px;height:29px;flex:0 0 29px;display:grid;place-items:center;border:1px solid #e1e5dc;border-radius:50%;background:transparent;color:#61794f;font-size:17px;line-height:1;cursor:pointer}
.theme-toggle:hover{background:#eff3e9}
html[data-theme="dark"] .theme-toggle{border-color:#465345;background:#29352a;color:#f2d57b}
html[data-theme="dark"] .theme-toggle:hover{background:#354335}

@media(prefers-color-scheme:dark){
  :root:not([data-theme]){color-scheme:dark;--ink:#e8ece4;--muted:#a2ad9f;--paper:#151b16;--white:#202920;--green:#b9ed63;--deep:#38583b;--line:#303b31;--orange:#eb865e;background:#151b16}
}
