:root{color-scheme:light;--theme-bg:#fff;--theme-soft:#f6f6f3;--theme-ink:#171918;--theme-muted:#686d68;--theme-line:#dfe2dc;--theme-accent:#58751a;--theme-menu:#fff}
body,body.section-page,body.detail-page{--bg:var(--theme-bg);--paper:var(--theme-ink);--muted:var(--theme-muted);--line:var(--theme-line);--accent:var(--theme-accent);--ink:var(--theme-ink);--base:var(--theme-bg);--soft:var(--theme-soft);background:var(--theme-bg);color:var(--theme-ink)}
.hero,.section-hero,.preview-hero{background:var(--theme-bg)!important;color:var(--theme-ink)}.hero-bg,.hero:after,.section-hero:before{display:none}.hero h1 span,.hero .eyebrow,.section-index,.section-hero .section-index,.section-page .section-index,.preview-hero small{color:var(--theme-accent)}.eyebrow:before{background:var(--theme-accent)}.hero-copy,.hero .scroll,.section-hero p,.about-copy>p,.tool-box p,.section-content p,.stat small,.section-content .contact-meta,.preview-hero p{color:var(--theme-muted)}
.nav,.section-nav{color:var(--theme-ink);border-color:var(--theme-line)}.nav .lang,.section-nav .lang,.admin-link{color:var(--theme-muted)}.nav .brand i,.section-nav .brand i{color:var(--theme-accent)}.nav .menu-toggle,.section-nav .section-menu{color:var(--theme-ink);background:transparent}.section-links a.current{color:var(--theme-accent)}.cta,.section-cta{border-color:var(--theme-line);color:var(--theme-ink)}.cta:hover,.section-cta:hover{background:#d2ff46;color:#171918;border-color:#d2ff46}.scroll:before{background:linear-gradient(var(--theme-accent),transparent)}
.works,.contact,.preview-works,.preview-contact,.preview-story.light{background:var(--theme-soft);color:var(--theme-ink)}.contact .section-index,.works .section-index,.contact a,.contact-note{color:var(--theme-muted)}.stat strong{color:var(--theme-accent)}.tool-box{background:var(--theme-soft);border-color:var(--theme-line)}.tool-form input,.thumb-form input{color:var(--theme-ink)}.tool-result,.thumb-result,.contact-meta a{color:var(--theme-accent)}.contact-form input,.contact-form textarea,.contact-page-form input,.contact-page-form textarea{background:var(--theme-bg);border-color:var(--theme-line);color:var(--theme-ink)}.contact-page-form label{color:var(--theme-muted)}.work-filter button,.filter{color:var(--theme-muted);border-color:var(--theme-line)}.work-filter button.active,.work-filter button:hover,.filter.active,.filter:hover{background:var(--theme-ink);color:var(--theme-bg);border-color:var(--theme-ink)}.thumb-quality a{color:var(--theme-muted);border-color:var(--theme-line)}
.cover{background:var(--theme-soft);color:var(--theme-ink)}.cover-shade,.eye-page .cover-shade{background:linear-gradient(90deg,rgba(255,255,255,.93),rgba(255,255,255,.38)),linear-gradient(0deg,rgba(255,255,255,.88),transparent 75%)}.project-sub,.cover-count{color:var(--theme-muted)}.play-link span{border-color:var(--theme-ink)}.footer,.section-footer,.detail-footer,.eye-page .detail-footer{background:var(--theme-bg);color:var(--theme-muted);border-color:var(--theme-line)}.footer strong,.section-footer strong{color:var(--theme-ink)}
.preview-nav,.preview-about,.preview-tool,.preview-footer,.preview-story,.preview-next{background:var(--theme-bg);color:var(--theme-ink)}.preview-film{background:var(--theme-soft);color:var(--theme-ink)}.preview-story p,.preview-about p,.preview-tool p{color:var(--theme-muted)}
body:has(.studio){--studio-paper:var(--theme-bg);--studio-ink:var(--theme-ink);--studio-line:var(--theme-line)}.studio .topbar{background:var(--theme-bg);color:var(--theme-ink);border-bottom:1px solid var(--theme-line)}.studio .btn.ghost{color:var(--theme-ink);border-color:var(--theme-line)}
@media(max-width:1000px){.nav .navlinks,.section-nav .section-links{background:var(--theme-menu);color:var(--theme-ink)}.nav .navlinks a,.section-nav .section-links a{color:var(--theme-muted)}.nav .navlinks a:hover,.section-nav .section-links a:hover,.section-nav .section-links a.current,.nav-close{color:var(--theme-ink)}}
@media(prefers-color-scheme:dark){
:root{color-scheme:dark;--theme-bg:#10120f;--theme-soft:#191c17;--theme-ink:#f3f4ee;--theme-muted:#a8aea3;--theme-line:#373d33;--theme-accent:#d2ff46;--theme-menu:#191c17}
.cover-shade,.eye-page .cover-shade{background:linear-gradient(90deg,rgba(7,8,7,.76),rgba(7,8,7,.14)),linear-gradient(0deg,rgba(7,8,7,.85),transparent 75%)}
.studio .card-panel,.studio .field input,.studio .field textarea,.studio select,.studio .inline-toolbar,.studio .block-card,.studio .btn{background:var(--theme-soft);color:var(--theme-ink);border-color:var(--theme-line)}.studio .side-btn,.studio .section-help,.studio .intro p,.studio .field label{color:var(--theme-muted)}.studio .side-btn.active,.studio .btn.dark{background:var(--theme-ink);color:var(--theme-bg)}.studio .btn.lime{background:#d2ff46;color:#171918}.studio .warning{background:var(--theme-soft);color:var(--theme-ink);border-color:var(--theme-line)}
}

/* Administrator controls use the same light/dark palette as the editor. */
.studio .cloud-bar{background:var(--theme-soft);color:var(--theme-ink);border-color:var(--theme-line)}
.studio .cloud-bar strong{color:var(--theme-ink)}
.studio .cloud-bar span,.studio .cloud-bar small{color:var(--theme-muted)}
.studio .device-btn,.studio .scope-chip{background:var(--theme-soft);color:var(--theme-ink);border-color:var(--theme-line)}
.studio .device-btn.active,.studio .scope-chip.active{background:var(--theme-ink);color:var(--theme-bg);border-color:var(--theme-ink)}
.studio .preview-stage{background:var(--theme-soft);border-color:var(--theme-line)}
/* Comfortable inspector controls, independent of the preview scale. */
.studio .inline-grid,.studio .block-style-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 14px}
.studio .inline-grid>label,.studio .block-style-grid>label{font-size:12px;line-height:1.5}
.studio .inline-grid select,.studio .inline-grid input:not([type=range]):not([type=color]){font-size:13px;min-height:40px;padding:8px;width:100%}
.studio .inline-grid output{font-size:11px}
.studio .inline-grid .size-control{display:flex;gap:8px;align-items:center}
.studio .inline-grid .size-control input[type=range]{flex:1;min-width:0}
.studio .inline-grid .size-number{width:70px!important;min-width:70px;font-size:13px!important;padding:8px!important}
.studio .inline-grid input[type=color]{height:40px}
.studio .inline-grid input[type=range]{height:22px}
.studio .inline-grid small{font-size:11px}
.studio .inline-toolbar{padding:16px}
.studio .center-panel .editor-section{padding:22px}
@media(min-width:1200px){.studio .layout{grid-template-columns:170px minmax(0,1fr) 440px}.studio .layout.focus-preview{grid-template-columns:minmax(0,1fr) 440px}.studio .layout.inspector-hidden{grid-template-columns:170px minmax(0,1fr)}.studio .layout.focus-preview.inspector-hidden{grid-template-columns:minmax(0,1fr)}}
@media(min-width:761px) and (max-width:1199px){.studio .layout{grid-template-columns:minmax(0,1fr) 380px;grid-template-areas:"pages pages" "preview editor"}.studio .layout.focus-preview{grid-template-columns:minmax(0,1fr) 380px}.studio .layout.inspector-hidden{grid-template-columns:minmax(0,1fr);grid-template-areas:"pages" "preview"}}
.studio .center-panel.detailed-inspector{position:fixed!important;z-index:90;top:84px!important;right:16px;bottom:16px;width:min(680px,calc(100vw - 32px));max-height:none!important;overflow:auto!important;box-shadow:0 14px 70px #0004;border:1px solid var(--theme-line,#deded8)}
.studio .detailed-inspector .toolbar{position:sticky;top:0;z-index:3;background:var(--studio-paper,#fff);gap:10px;flex-wrap:wrap}
.studio .detailed-inspector .inline-grid{gap:22px}
.studio .detailed-inspector .inline-grid select,.studio .detailed-inspector .inline-grid input:not([type=range]):not([type=color]){font-size:15px;min-height:46px}
