/* Shared palette for the welcome screen, desktop and phone. Images retain their original colours. */
.theme-toggle{font:500 14px/1.5 "Microsoft YaHei",system-ui,sans-serif;white-space:nowrap;min-height:40px;padding:7px 12px;color:#995d3c;background:transparent;border:1px solid #b687644d;border-radius:6px;cursor:pointer}
.welcome-theme{position:absolute;right:24px;top:max(20px,env(safe-area-inset-top));z-index:2}
header .mode-actions .theme-toggle{padding:7px 10px;border:1px solid #b6876455;border-radius:6px;margin-left:2px}
:root[data-theme=dark]{color-scheme:dark;--bg:#131820;--paper:#1c232d;--text:#e4e8ed;--muted:#a4afbd;--line:#354150;--blue:#9ab7ef;--orange:#dba17c;--tint:#25303e;background:#131820;color:#e4e8ed}
[data-theme=dark] body,[data-theme=dark] .welcome,[data-theme=dark] .viewer-shell,[data-theme=dark] .viewport-area,[data-theme=dark] .viewport-frame,[data-theme=dark] iframe{background:#131820;color:#e4e8ed}
[data-theme=dark] header,[data-theme=dark] footer,[data-theme=dark] .mode-bar,[data-theme=dark] dialog,[data-theme=dark] .art-info{background:#1c232d;color:#e4e8ed;border-color:#354150}
[data-theme=dark] .medium-rail,[data-theme=dark] .medium-strip,[data-theme=dark] .dimension-tools{background:#171e27;border-color:#354150}
[data-theme=dark] #portfolioMain #stage{background-image:radial-gradient(ellipse at center,#29415b38,transparent 68%),linear-gradient(#6179960d 1px,transparent 1px),linear-gradient(90deg,#6179960d 1px,transparent 1px);background-size:auto,44px 44px,44px 44px}
[data-theme=dark] .group-card,[data-theme=dark] .course-cover,[data-theme=dark] .course-image,[data-theme=dark] .feedback-entry,[data-theme=dark] .choice,[data-theme=dark] .gallery-item{background:#202936;color:#e4e8ed;border-color:#3b4859}
[data-theme=dark] button:hover{background:#2a3747;border-color:#9ab7ef}
[data-theme=dark] .folder-name,[data-theme=dark] .surface-title,[data-theme=dark] .header-nav button{color:#e4e8ed}
[data-theme=dark] .folder-subtitle,[data-theme=dark] .folder-count,[data-theme=dark] .view-head p,[data-theme=dark] #dimensionNote,[data-theme=dark] .about-content p,[data-theme=dark] .feedback-entry p,[data-theme=dark] .intro p,[data-theme=dark] .welcome-note,[data-theme=dark] .choice small,[data-theme=dark] #collectionDescription,[data-theme=dark] #mediumDescription,[data-theme=dark] #groupDescription{color:#b2bdcb}
[data-theme=dark] .medium-label,[data-theme=dark] #mediumNav button,[data-theme=dark] #sphereLevel,[data-theme=dark] .mode-actions button,[data-theme=dark] .theme-toggle,[data-theme=dark] .folder-open{color:#e1ad89}
[data-theme=dark] .mode-actions button[aria-pressed=true],[data-theme=dark] .header-nav button[aria-pressed=true]{color:#f0c7a8}
[data-theme=dark] #dimensionNav button{color:var(--dimension-dark,var(--dimension-color))}
[data-theme=dark] #dimensionNav button:hover,[data-theme=dark] #dimensionNav button[aria-pressed=true]{background:#ffffff0d;border-color:currentColor}
[data-theme=dark] #artTags span,[data-theme=dark] #groupTags,[data-theme=dark] input,[data-theme=dark] .feedback-cover{background:#273342;color:#c3d1e4;border-color:#47596c}
[data-theme=dark] .official-logo{mix-blend-mode:normal;background:#fff;border-radius:4px}
[data-theme=dark] .preview-print{border-color:#e0ded7;box-shadow:0 5px 18px #0008}
[data-theme=dark] .course-image img,[data-theme=dark] .course-cover img,[data-theme=dark] .course-placeholder{background:#222b37}
[data-theme=dark] #tooltip{background:#253447;color:#f1f4f8;border-color:#e1ad89}
[data-theme=dark] dialog::backdrop{background:#02060bcc}
[data-theme=dark] .dialog-return-bar>.close,[data-theme=dark] #sphereBack,[data-theme=dark] #courseBack{background:#9d5e36!important;color:#fff9f1!important;border-color:#dba17c!important;box-shadow:0 4px 20px #0006}
[data-theme=dark] #courseViewer .dialog-return-bar,[data-theme=dark] .art-stage,[data-theme=dark] #courseViewer{background:#151b24}
@media(max-width:760px){.theme-toggle{font-size:13px;min-height:40px}.mode-actions{gap:6px}.mode-actions .theme-toggle{padding:6px 9px}.welcome-theme{right:18px}}

[data-theme=dark] .medium-rail>summary{background:#273342;color:#e1ad89;border-color:#566171}
