/* Site chrome only. Canvas artwork, colour swatches and exports retain their colours. */
:root[data-theme=light]{
    color-scheme:light;
    --bg:#f7f6f1;
    --surface:#fffefb;
    --surface-raised:#efeee7;
    --line:#d5d5c9;
    --muted:#616356;
    --text:#25271f;
    --gold:#805d0b;
}
.header-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}
.site-header .brand{flex-shrink:0;white-space:nowrap}
.site-header .theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 56px;width:56px;height:44px;padding:0;border:0;border-radius:22px;background:transparent;color:#a3a69a;cursor:pointer;-webkit-tap-highlight-color:transparent}
.theme-toggle-track{position:relative;display:flex;align-items:center;justify-content:space-between;width:56px;height:30px;padding:6px;border:1px solid #777962;border-radius:20px;background:#2c3025;transition:background .25s,border-color .25s}
.theme-toggle-track::before{content:"";position:absolute;left:3px;top:3px;width:22px;height:22px;border-radius:50%;background:#f3f3e7;box-shadow:0 1px 4px #0003;transform:translateX(26px);transition:transform .3s cubic-bezier(.2,.8,.2,1),background .25s}
.theme-toggle-track svg{position:relative;flex-shrink:0;transition:transform .3s,color .25s}
.theme-toggle-moon{color:#313725}
.theme-toggle:hover .theme-toggle-track{border-color:var(--gold)}
:root[data-theme=light] .theme-toggle-track{background:#e8e2cc;border-color:#a99c74}
:root[data-theme=light] .theme-toggle-track::before{transform:translateX(0);background:#fffefb}
:root[data-theme=light] .theme-toggle-sun{color:#805d0b;transform:rotate(90deg)}
:root[data-theme=light] .theme-toggle-moon{color:#6c694f;transform:rotate(-20deg)}
@media(min-width:801px) and (max-width:1100px){.site-header-inner{gap:16px;padding-inline:24px}.site-header .main-nav{gap:16px;font-size:11px}.header-actions{gap:10px}}
@media(min-width:801px) and (max-width:950px){.site-header .main-nav{gap:12px}.site-header .header-cta-label{display:none}.site-header .header-cta{padding:10px}.site-header .header-cta .icon{display:block}}
@media(max-width:560px){
    .site-header-inner{gap:12px;padding-inline:16px}
    .header-actions{gap:8px}
    .site-header .header-cta{width:40px;height:44px;padding:0}
    .site-header .header-cta-label{display:none}
    .site-header .header-cta .icon{display:block;width:19px;height:19px}
    .site-header .mobile-menu{height:44px}
}
@media(prefers-reduced-motion:reduce){.theme-toggle-track,.theme-toggle-track::before,.theme-toggle-track svg{transition:none}}

/* Shared pages, navigation and feedback. */
:root[data-theme=light] .button-gold{background:#e8c047;color:var(--ink)}
:root[data-theme=light] .button-gold:hover{background:#f2cb59}
:root[data-theme=light] .button-secondary:hover{background:#e7e5da}
:root[data-theme=light] .skip-link{background:#e8c047}
:root[data-theme=light] .artwork:not(.artwork-dark):not(.artwork-banner){background:#e8c047}
:root[data-theme=light] .format-card{box-shadow:inset 0 1px 0 #ffffffc0,0 8px 26px #25271f08}
:root[data-theme=light] .format-card:hover{--format-tint:#f0eddf;border-color:#a68b40}
:root[data-theme=light] .format-icon{border-color:#d2cbb5}
:root[data-theme=light] :is(.format-size,.tag){color:var(--muted)}
:root[data-theme=light] :is(.template-preview,.featured-template,.download-preview,.admin-template-thumbnail,.admin-template>img){background:#e9e8df}
:root[data-theme=light] .blank-template-art{border-color:#aaa484;background-image:radial-gradient(#79734a55 1px,transparent 1px)}
:root[data-theme=light] .download-links a:is(:hover,:focus-visible){background:#f2e6ba}
:root[data-theme=light] .promo-bar{background:linear-gradient(100deg,#f0df9f,#ede9d1);color:#5f4915;border-color:#d6c384}
:root[data-theme=light] .promo-bar-links a:hover{color:#30280f}
:root[data-theme=light] .promo-preview-panel .promo-bar{border-color:#d6c384}
:root[data-theme=light] .site-scroll-header .site-header{box-shadow:0 5px 18px #30280b14}
:root[data-theme=light] dialog{background:var(--surface);border-color:#b2b19f;box-shadow:0 20px 80px #26271840}
:root[data-theme=light] .toast{background:#303327;color:#fffefb;box-shadow:0 10px 40px #26271833}
:root[data-theme=light] .cookie-banner{background:var(--surface);border-color:#b2b19f;box-shadow:0 10px 50px #26271830}
:root[data-theme=light] .cookie-actions .button{background:#efecdf;border-color:#b6ac87}
:root[data-theme=light] .cookie-actions .button:hover{background:#e7e0c8}
:root[data-theme=light] .error-message{background:#fff0e8;color:#8d351d;border-color:#d8a48b}

/* Editor controls and dialogs. Preview pixels and editing overlays are separate. */
:root[data-theme=light] :is(.editor-controls,.mobile-editor-tabs){background:var(--surface)}
:root[data-theme=light] :is(.field,.control-label,.section-border-row,.theme-choice){color:#4e5143}
:root[data-theme=light] :is(.control-number,.workspace-bottom){color:var(--muted)}
:root[data-theme=light] :is(.field select,.field input:not([type=range]),.field textarea,.section-border-width,.admin-form input,.admin-setup input,.promo-link-fields input,.promo-link-fields select){background:var(--surface);border-color:#bebfb0;color:var(--text)}
:root[data-theme=light] :is(.field input,.field textarea)::placeholder{color:#727565}
:root[data-theme=light] :is(.color-field input,.section-border-row input[type=color]){border-color:#a3a590}
:root[data-theme=light] .upload-zone{border-color:#a6a88f}
:root[data-theme=light] .logo-choice{background:var(--surface-raised);color:var(--muted)}
:root[data-theme=light] .logo-choice[aria-pressed=true]{background:#f6edce;color:var(--gold)}
:root[data-theme=light] .theme-choice span{border-color:#25271f30}
:root[data-theme=light] .canvas-stage{background-color:#e9e9e1;background-image:radial-gradient(#c2c4b6 1px,transparent 1px);border-color:#d2d3c7}
:root[data-theme=light] .canvas-stage canvas{box-shadow:0 12px 30px #26271826}
:root[data-theme=light] :is(.movement-options select,.movement-options .canvas-mode-actions button){border-color:#bebfb0}
:root[data-theme=light] .inline-text-toolbar{background:#fffefbf2}
:root[data-theme=light] .inline-text-toolbar button{background:#e7e5da}
:root[data-theme=light] .inline-text-toolbar [data-inline-done]{background:#e8c047}
:root[data-theme=light] .canvas-context-menu{background:var(--surface);border-color:#b2b19f;box-shadow:0 12px 40px #26271830}
:root[data-theme=light] .canvas-context-menu [role=menuitem].is-danger{color:#a13d29}
:root[data-theme=light] .design-save-status{background:#efeee5}
:root[data-theme=light] .design-save-status:is([data-recovery=unavailable],[data-recovery=restore-failed]){background:#fff0e8}
:root[data-theme=light] .design-save-status:is([data-recovery=unavailable],[data-recovery=restore-failed]) span{color:#8d351d}
:root[data-theme=light] .tour-launcher:hover{color:#574007}
:root[data-theme=light] .tour-card{background:var(--surface);border-color:#b2a46f;box-shadow:0 16px 60px #26271850}
:root[data-theme=light] .tour-copy{color:#4e5143}
:root[data-theme=light] #tour-tried{color:#2f693a}
:root[data-theme=light] .tour-jump select{background:var(--surface-raised);border-color:#bebfb0}
:root[data-theme=light] .tour-card progress,:root[data-theme=light] .tour-card progress::-webkit-progress-bar{background:#dedfcf}
@media(max-width:760px){:root[data-theme=light] .editor-actions{background:var(--surface);box-shadow:0 -4px 18px #26271812}}

/* Support and admin use the same light surfaces. */
:root[data-theme=light] :is(.donation-currency-buttons button,.donation-preset){background:var(--surface-raised)}
:root[data-theme=light] :is(.donation-currency-buttons button,.donation-preset)[aria-pressed=true]{background:#f6edce}
:root[data-theme=light] .donation-input{background:var(--surface)}
:root[data-theme=light] .donation-panel #donation-error{color:#9b3c24}
:root[data-theme=light] .admin-bar{background:#ebe9df;border-color:#cbc8b5;box-shadow:0 2px 8px #26271815}
:root[data-theme=light] .admin-bar-brand span{border-color:#b6a776}
:root[data-theme=light] :is(.admin-bar-links>a,.admin-bar-account>a,.admin-bar button){color:#4e5143}
:root[data-theme=light] .admin-bar-links{border-color:var(--line)}
:root[data-theme=light] .admin-template-table th{background:var(--surface-raised)}
:root[data-theme=light] .admin-message{background:#eaf4e5;border-color:#a5bd93;color:#2f5728!important}
:root[data-theme=light] .admin-message.is-error{background:#fff0e8;border-color:#d8a48b;color:#8d351d!important}
:root[data-theme=light] .template-visibility-public{background:#eaf4e5;border-color:#a5bd93;color:#2f5728}
:root[data-theme=light] .template-visibility-private{background:#f7edcf;border-color:#c9b97c;color:#655016}
:root[data-theme=light] .button-danger{background:#fff0e8;border-color:#d8a48b;color:#8d351d}
:root[data-theme=light] .button-danger:hover{background:#f8ded1}
:root[data-theme=light] .promo-row-actions .promo-remove{color:#8d351d}
:root[data-theme=light] :is(.template-review,.review-diff){background:var(--surface)}
:root[data-theme=light] :is(.review-file-heading,.review-diff th,.review-actions){background:var(--surface-raised);color:var(--muted)}
:root[data-theme=light] .review-diff .diff-line-number{color:var(--muted);border-color:var(--line)}
:root[data-theme=light] .diff-added-count{color:#28603b}
:root[data-theme=light] .diff-removed-count{color:#96392f}
:root[data-theme=light] .diff-added{background:#e2f3e4;color:#285738}
:root[data-theme=light] .diff-removed{background:#fde7e2;color:#893b32}
:root[data-theme=light] .review-diff .diff-gap td{color:#456176;background:#e8eef2}
:root[data-theme=light] .review-image-frame{background-color:#e6e8df;background-image:conic-gradient(#f9faf6 25%,transparent 0 50%,#f9faf6 0 75%,transparent 0)}
:root[data-theme=light] .template-review #review-error{background:#fff0e8;border-color:#d8a48b;color:#8d351d}
