:root {
  color-scheme: light dark;
  --paper: light-dark(#fff6df, #201a22);
  --ink: light-dark(#382439, #f4e7e4);
  --line: light-dark(#cbb993, #63505f);
  --muted: light-dark(#685443, #cebab7);
  --surface: light-dark(#fffbef, #2b222d);
  --control: light-dark(#fffdf5, #312733);
  --raised: light-dark(#fff3db, #3a2d3c);
  --tint: light-dark(#f2e6ca, #423244);
  --plum: light-dark(#4c284a, #f1bbdf);
  --action: light-dark(#4c284a, #784b72);
  --mint: light-dark(#bce7ce, #2d4f43);
  --mint-text: light-dark(#294537, #c8eddb);
  --peach: light-dark(#f9d7b2, #583b39);
  --peach-text: light-dark(#603a2d, #ffd9be);
  --focus: light-dark(#745028, #ffd293);
  --strong-line: light-dark(#a6886c, #a6869a);
  --shadow-line: light-dark(#dfc3a2, #151117);
  --help-bg: light-dark(#ffedbf, #443549);
  --support-bg: light-dark(#fce1d4, #4b3040);
  --feature-edge: light-dark(#382439, #9b788e);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

.header-controls { display:flex; align-items:center; gap:6px; }
.nav-search-short { display:none; }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 44px;
  flex: none;
  margin-inline-start: 2px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  font: 20px/1 system-ui, sans-serif;
}
.theme-toggle:hover, .theme-toggle:focus-visible { background: var(--raised); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.correction-cue { margin:14px 0; padding:10px 14px; border-inline-start:3px solid var(--strong-line); background:var(--surface); border-radius:8px; }
.correction-cue small { color:var(--muted); }
.correction-cue p { margin:3px 0 0; overflow-wrap:anywhere; }
@media (max-width: 350px) {
  .header-controls { gap:4px; }
  .site-header .theme-toggle { width: 34px; margin-inline-start: 0; }
  .site-header .mast:has(.theme-toggle) { gap: 5px; }
  .site-header .mast .brand { font-size:17px; }
  .site-header .site-nav a { padding-inline:.28em; }
}
@media (max-width: 410px) {
  .nav-search-long { display:none; }
  .nav-search-short { display:inline; }
}

.studio {
  --studio-background: light-dark(#ffbd21, #211b38);
  background: var(--studio-background);
}
.duo-posters { position:relative; }
.duo-posters .studio-night { position:absolute; inset:0; }
.studio-palette { position:absolute; width:0; height:0; pointer-events:none; }
.studio-night { opacity:0; filter:url("#studio-night-palette"); }
.studio .dialogue { position:relative; }
.studio .dialogue::after {
  content:"";
  position:absolute;
  inset:0 0 -22px;
  background: #1a1638;
  mask-image: linear-gradient(#000, #000 calc(100% - 26px), transparent);
  opacity:0;
  pointer-events:none;
}
:root[data-theme="dark"] .studio-night,
:root[data-theme="dark"] .studio .dialogue::after { opacity:1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .studio-night,
  :root:not([data-theme]) .studio .dialogue::after { opacity:1; }
}
@media (prefers-reduced-motion: no-preference) {
  .theme-changing :is(body,.site-header,.site-nav a,.bar,.archive-card,.archive-filters,.card,.landing,
    .reading-panel,.people-grid a,.people-films a,.guide-toggle,.theme-toggle,.studio) {
    transition: background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease;
  }
  .studio-night,.studio .dialogue::after { transition: opacity .42s ease-in-out; }
  .theme-toggle span { transition: transform .22s ease; }
  :root[data-theme="dark"] .theme-toggle span { transform: rotate(22deg); }
}
