/* Chatixia Studio: make each film page's surroundings follow the studio's light/dark theme.
   The film itself (the canvas) keeps its own look; the page, player frame, captions, controls,
   chapter list, transcript and glossary use the studio palette. html[data-st] is set before first paint. */
html[data-st="dark"]{--st-bg:#081a31;--st-panel:#0d2a4d;--st-panel2:#0a2140;--st-hover:#10345e;--st-rule:#1d4575;--st-rule2:#5D86B6;--st-ink:#E8F2FF;--st-dim:#8EB1D8;--st-grid:rgba(93,134,182,.07);--st-accent:#FFB45E;color-scheme:dark}
html[data-st="light"]{--st-bg:#f2f6fb;--st-panel:#ffffff;--st-panel2:#f6f9fc;--st-hover:#edf3fa;--st-rule:#d2deec;--st-rule2:#8ea9c8;--st-ink:#0f2440;--st-dim:#4a6280;--st-grid:rgba(40,100,170,.08);--st-accent:#a65a00;color-scheme:light}
/* the studio palette is mapped onto the film's own variables only for the chrome around the picture;
   .screen (the canvas and its play button) keeps the film's original variables */
html[data-st] :is(main.wrap>header,.player>.caption,.player>.controls,#chapters,main.wrap>details,.foot,.fg-aside,.fg-open){--bg:var(--st-bg);--ink:var(--st-ink);--dim:var(--st-dim);--line:var(--st-rule2);--panel:var(--st-panel);--card:var(--st-panel);--track:var(--st-rule);--thumb:var(--st-panel);--accent:var(--st-accent)}
/* on the light page the films' bright highlight colours (chalk yellow and pink, gold, tomato) are darkened so they stay readable */
html[data-st="light"] :is(main.wrap>header,.player>.caption,.player>.controls,#chapters,main.wrap>details,.foot){--yellow:#8a6a00;--pink:#b23a62;--gold:#a65a00;--blue:#1f6fa8;--teal:#12766f;--tomato:#c2410c;--mustard:#9a6400}
html[data-st],html[data-st] body{background:var(--st-bg)!important;color:var(--st-ink)!important}
html[data-st] body{background-image:linear-gradient(var(--st-grid) 1px,transparent 1px),linear-gradient(90deg,var(--st-grid) 1px,transparent 1px)!important;background-size:24px 24px!important}
html[data-st] h1{color:var(--st-ink)!important}
html[data-st] .lede,html[data-st] .foot,html[data-st] summary{color:var(--st-dim)!important}
html[data-st] .lede b{color:var(--st-ink)!important}
html[data-st] .player{background:var(--st-panel)!important}
html[data-st] .caption{background:var(--st-panel)!important;color:var(--st-ink)!important;border-top-color:var(--st-rule)!important}
html[data-st] .controls{background:var(--st-panel2)!important;border-top-color:var(--st-rule)!important}
html[data-st] .controls .btn{background:transparent!important;color:var(--st-ink)!important;border:1px solid var(--st-rule2)!important;box-shadow:none!important}
html[data-st] .controls .btn:hover{background:var(--st-hover)!important}
html[data-st] .time{color:var(--st-dim)!important}
html[data-st] .ticks i{background:var(--st-rule2)!important}
html[data-st] .chap{background:var(--st-panel)!important;color:var(--st-ink)!important;border:1px solid var(--st-rule)!important;box-shadow:none!important}
html[data-st] .chap:hover{background:var(--st-hover)!important}
html[data-st] .chap[aria-current="true"]{border-color:var(--st-accent)!important;background:color-mix(in srgb,var(--st-accent) 10%,var(--st-panel))!important}
html[data-st] .chap .d{color:var(--st-dim)!important}
html[data-st] details{border-top-color:var(--st-rule)!important}
html[data-st] .transcript p{color:var(--st-ink)!important}
/* narrow phones: the seek bar gets its own full-width row above the buttons, so it stays easy to drag */
@media (max-width:480px){ html[data-st] .player>.controls{flex-wrap:wrap;row-gap:6px} html[data-st] .player>.controls>.track{order:-1;flex:1 0 100%} html[data-st] .player>.controls>.time{margin-right:auto} }
