@font-face {
  font-family: Schibsted;
  src: url("fonts/schibsted-grotesk.woff2");
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f4f2ec;
  color: #16161a;
  font-family: Schibsted, system-ui, sans-serif;
}
header {
  padding: 22px 5vw;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ccc;
}
a {
  color: inherit;
}
main {
  max-width: 1120px;
  margin: 50px auto;
  padding: 0 24px;
}
h1 {
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: -0.04em;
  margin: 16px 0;
}
h2 {
  font-size: 26px;
}
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}
p {
  line-height: 1.6;
}
.eyebrow {
  color: #3158bd;
  letter-spacing: 0.15em;
  font-size: 13px;
  font-weight: bold;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}
.card {
  background: white;
  border: 1px solid #ddd9ce;
  border-radius: 18px;
  padding: 26px;
  margin: 20px 0;
}
label {
  display: block;
  margin: 18px 0 6px;
  font-weight: 600;
}
input:not([type="checkbox"]),
textarea,
select {
  width: 100%;
  padding: 13px;
  border: 1px solid #aaa;
  border-radius: 8px;
  font: inherit;
  background: white;
}
textarea {
  min-height: 170px;
}
button,
.button {
  display: inline-block;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: #244bd7;
  color: white;
  padding: 13px 19px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  margin: 8px 8px 8px 0;
}
button.secondary {
  background: #e7e8ed;
  color: #202338;
}
button.danger {
  background: #a32939;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
small {
  display: block;
  color: #50545e;
  margin: 8px 0;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
nav button {
  background: #e3e1d7;
  color: #222;
}
nav button[aria-current="true"] {
  background: #244bd7;
  color: white;
}
.secret {
  font-family: monospace;
  font-size: 26px;
  overflow-wrap: anywhere;
  background: #f0f2fa;
  padding: 20px;
}
.qr {
  background: white;
  padding: 16px;
  display: inline-block;
  margin: 16px 0;
}
.qr img {
  max-width: 100%;
  height: auto;
}
.qr p { color: #172033; }
.qr a { color: #174ea6; }
#notice {
  position: fixed;
  bottom: 16px;
  left: 5%;
  right: 5%;
  padding: 16px;
  border-radius: 10px;
  background: #172039;
  color: white;
  z-index: 10;
}
#notice:empty {
  display: none;
}
.links a {
  overflow-wrap: anywhere;
}
.display {
  background: #081727;
  color: white;
}
.display header {
  display: none;
}
.display main {
  max-width: none;
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5vw;
  background: radial-gradient(ellipse at 20% 20%, #164b5266, transparent 65%);
}
.display .scene {
  max-width: 1000px;
  font-size: clamp(28px, min(4.5vw, 5.5vh), 66px);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.display main {
  padding: 4vh 5vw;
}
.display h1 {
  font-size: clamp(28px, min(5vw, 6vh), 68px);
}
.display.warm main {
  background: radial-gradient(ellipse at 20% 20%, #794023, transparent 65%);
}
.display.night main {
  background: #10142a;
}
.display .by {
  font-size: 22px;
  color: #cfdfeb;
}
.display .card {
  color: #16161a;
}
.display button {
  font-size: 18px;
}
.scene {
  animation: appear 1.5s ease;
}
@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
:focus-visible {
  outline: 3px solid #d87816;
  outline-offset: 4px;
}
.session-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(270px, 1.5fr);
  gap: 24px;
}
.session-layout > * {
  min-width: 0;
}
details {
  margin: 20px 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
}
.trash-time {
  padding: 12px;
  background: #fff2de;
  border-radius: 8px;
}
@media (max-width: 700px) {
  .session-layout {
    grid-template-columns: 1fr;
  }
  .session-card {
    padding: 18px;
  }
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}
pre {
  white-space: pre-wrap;
  font-size: 12px;
}
/* Story Director: a fixed, local, calm palette/effect library. */
.story-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: #081727;
  --light: #1a5a68;
  --base: #071927;
}
.story-light,
.story-dim {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.story-light {
  background:
    radial-gradient(ellipse at 25% 30%, var(--light), transparent 70%),
    var(--base);
  opacity: 0.8;
}
.story-dim {
  z-index: -1;
  background: rgba(2, 8, 18, 0.68);
}
.story-content {
  width: 100%;
  max-width: 1000px;
  overflow-wrap: anywhere;
}
.story-content .by {
  color: #e3edf5;
}
.palette-winter-blue {
  --light: #235783;
  --base: #071d37;
}
.palette-aurora-teal {
  --light: #1d655a;
  --base: #082529;
}
.palette-ember-gold {
  --light: #815522;
  --base: #2b180c;
}
.palette-midnight {
  --light: #3c4274;
  --base: #0b1027;
}
.palette-soft-rose {
  --light: #733d62;
  --base: #29152c;
}
.display .story-stage {
  background: transparent;
}
/* Every live presentation fills the viewport; idle-screen spacing stays separate. */
.display main:has(> .story-stage){position:relative;padding:0;height:100dvh;min-height:0;overflow:hidden}
.display main > .story-stage{width:100%;height:100%;min-height:0;max-width:none;aspect-ratio:auto;flex:1 0 100%}
.display .story-light,
.display .story-dim {
  position: fixed;
}
.effect-slow-glow .story-light {
  animation: storyGlow 18s ease-in-out infinite alternate;
}
.effect-aurora-drift .story-light {
  background:
    linear-gradient(120deg, transparent 10%, var(--light) 45%, transparent 80%),
    var(--base);
  background-size: 160% 160%;
  animation: storyAurora 32s ease-in-out infinite alternate;
}
.effect-warm-embers .story-light {
  background:
    radial-gradient(ellipse at 50% 90%, var(--light), transparent 75%),
    var(--base);
  animation: storyGlow 22s ease-in-out infinite alternate;
}
.effect-starfield .story-light {
  background:
    radial-gradient(circle at 20% 30%, #aec5dd66 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, #aec5dd44 1px, transparent 2px),
    var(--base);
  background-size:
    120px 160px,
    180px 220px,
    auto;
  animation: storyStars 60s linear infinite alternate;
}
.effect-soft-rays .story-light {
  background:
    conic-gradient(
      from 30deg at 50% 100%,
      transparent,
      var(--light),
      transparent,
      var(--light),
      transparent
    ),
    var(--base);
  animation: storyGlow 26s ease-in-out infinite alternate;
}
.transition-none .scene {
  animation: none;
}
@keyframes storyGlow {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 0.72;
  }
}
@keyframes storyAurora {
  from {
    background-position: 15% 20%;
  }
  to {
    background-position: 85% 60%;
  }
}
@keyframes storyStars {
  from {
    background-position:
      0 0,
      0 0,
      0 0;
  }
  to {
    background-position:
      8px 16px,
      -12px 8px,
      0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-light {
    animation: none !important;
    opacity: 0.6 !important;
    background-position: 50% 50% !important;
  }
}
.presentation-summary {
  border-top: 1px solid #ddd;
  margin-top: 20px;
  padding-top: 16px;
}
.presentation-summary p {
  margin: 6px 0;
}
.presentation-status {
  font-weight: 600;
}
.director-dialog {
  max-width: 1160px;
  width: calc(100% - 32px);
  max-height: 94dvh;
  overflow: auto;
  border: 1px solid #bbb;
  border-radius: 18px;
  padding: 24px;
  background: #f4f2ec;
  color: #16161a;
}
.director-dialog::backdrop {
  background: #071021aa;
}
.director-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.director-top h2 {
  margin: 0;
}
.director-error {
  color: #9c1728;
  white-space: pre-wrap;
}
.director-preview {
  background: #071927;
  color: white;
  border-radius: 12px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: stretch;
  margin-top: 20px;
}
.director-preview .story-stage {
  padding: 24px;
  min-height: 320px;
}
.director-preview .scene {
  font-size: clamp(22px, 2.8vw, 36px);
  line-height: 1.5;
}
.director-preview:fullscreen {
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
}
.director-preview:fullscreen .scene {
  font-size: clamp(28px, min(4.5vw, 5.5vh), 66px);
}
.director-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.director-controls select {
  width: auto;
  max-width: 230px;
}
.director-scene {
  border: 1px solid #d5d2c8;
  padding: 16px;
  border-radius: 12px;
  background: white;
  margin-top: 18px;
}
.director-scene textarea {
  min-height: 90px;
}
.director-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
}
.display-accessibility {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  font-size: 18px;
  background: #fff;
  color: #11203b;
  border: 2px solid #11203b;
}
.display-accessibility[hidden] { display: none; }
.display-audio-controls {
  position: fixed; z-index: 20; left: 16px; bottom: 16px; max-width: 420px;
  padding: 12px; background: #10243a; color: #fff; border-radius: 12px;
}
.display-audio-controls p { font-size: 16px; margin: 0 0 8px; }
.display-audio-controls[hidden] { display: none; }
.director-fields label {
  margin-top: 8px;
}
.director-summary {
  padding: 16px;
  background: #e8ecf6;
  border-radius: 10px;
}
.director-publish {
  padding: 18px;
  border: 2px solid #244bd7;
  border-radius: 12px;
  margin-top: 24px;
}
.director-versions {
  margin: 12px 0;
}
.director-dialog button:disabled {
  cursor: not-allowed;
}
@media (max-width: 700px) {
  .director-fields {
    grid-template-columns: 1fr 1fr;
  }
  .director-dialog {
    padding: 16px;
  }
  .director-top {
    align-items: flex-start;
  }
  .director-top h2 {
    font-size: 24px;
  }
  .director-controls button {
    padding: 12px;
  }
  .director-preview .scene {
    font-size: 24px;
  }
}
/* V6-A: opaque readable centre, edge-only calm art, one shared stage. */
.v6-stage { container-type:inline-size; aspect-ratio:16/9; overflow:hidden; background:#081321 !important; min-height:0; }
.v6-stage .story-light,.v6-stage .story-dim { display:none; }
.v6-stage .story-content { position:relative; z-index:3; width:78%; max-width:none; padding:3% 4%; background:transparent; color:#f8fafc; border-radius:0; }
.v6-stage .story-content .scene { animation:none; font-family:'Schibsted Grotesk',Arial,sans-serif; font-size:clamp(18px,calc(3.2cqw * var(--v6-text-scale,1)),66px); line-height:1.45; font-weight:500; min-height:4.35em; }
.v6-stage .story-content .by { color:#f8fafc; font-size:clamp(12px,1.4cqw,24px); margin:0 0 .7em; }
.v6-stage .story-content .by:empty { display:none; }
.v6-edges { position:absolute; inset:0; z-index:1; overflow:hidden; pointer-events:none; opacity:var(--v6-light-cap,.35);isolation:isolate; }
.v6-shape { position:absolute; pointer-events:none; background:radial-gradient(ellipse closest-side at var(--v6-x) var(--v6-y),var(--v6-color) 0%,var(--v6-soft-color) var(--v6-core,10%),var(--v6-faint-color) 55%,transparent 100%); }
.v6-zone-left { left:-8%; top:-15%; width:48%; height:130%; }
.v6-zone-right { right:-8%; top:-15%; width:48%; height:130%; }
.v6-zone-top { left:-5%; top:-12%; width:110%; height:52%; }
.v6-zone-bottom { left:-5%; bottom:-12%; width:110%; height:52%; }
.v6-zone-corners { inset:-10%; background:radial-gradient(ellipse 65% 75% at 0 0,var(--v6-color),var(--v6-faint-color) 55%,transparent 100%),radial-gradient(ellipse 65% 75% at 100% 100%,var(--v6-color),var(--v6-faint-color) 55%,transparent 100%); }
.v6-zone-background { inset:0; }
.v6-shape-snowdrift { background:radial-gradient(ellipse closest-side at 50% 65%,var(--v6-color) 0%,var(--v6-soft-color) 14%,var(--v6-faint-color) 55%,transparent 100%); }
.v6-shape-soft-cloud { border-radius:0; }
.v6-shape-aurora-ribbon { background:radial-gradient(ellipse closest-side at 45% 50%,var(--v6-color) 0%,var(--v6-soft-color) 10%,var(--v6-faint-color) 48%,transparent 100%); }
.v6-shape-window-light { border-radius:0; }
.v6-shape-warm-embers { background:radial-gradient(ellipse closest-side at 45% 75%,var(--v6-color) 0%,var(--v6-faint-color) 58%,transparent 100%); }
.v6-shape-starfield { background:radial-gradient(ellipse closest-side at 35% 30%,var(--v6-soft-color),transparent 100%),radial-gradient(ellipse closest-side at 65% 75%,var(--v6-faint-color),transparent 100%); }
/* Light sculptures: local dark surround, coloured bloom and a defined luminous core.
   Everything follows the shared playback clock; there are no independent CSS loops. */
.v6-shape[data-light-theme]{background:none;border-radius:0;color:var(--v6-color)}
.lux-sculpture{width:100%;height:100%;overflow:visible;opacity:calc(var(--lux-presence,.86) * var(--lux-reveal,1));transform:translate(calc((var(--v6-x,50%) - 50%) * .2),calc((var(--v6-y,50%) - 50%) * .2))}
.lux-sculpture path{stroke-dasharray:var(--lux-reveal,1) 1;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
.lux-sculpture .lux-shadow{stroke:#020914;stroke-width:var(--lux-surround-width,12);opacity:var(--lux-surround,.72);filter:blur(calc(var(--lux-softness,2px) * var(--lux-event-softness,1)))}
.lux-sculpture .lux-halo{stroke-width:7;opacity:.16;filter:blur(calc(var(--lux-softness,2px) * var(--lux-event-softness,1)))}
.lux-sculpture .lux-bloom{stroke-width:2.2;opacity:.45;filter:blur(.6px)}
.lux-sculpture .lux-core{stroke-width:.48;opacity:1}
.lux-sculpture .lux-secondary{opacity:calc(.4 * var(--lux-branch,1))}
.lux-sculpture .lux-secondary.lux-shadow{opacity:.45}
.v6-shape[data-light-theme=light-curtain] .lux-halo{stroke-width:12;opacity:.22}
.v6-shape[data-light-theme=light-curtain] .lux-core{stroke-width:.28;opacity:.85}
.v6-shape[data-light-theme=water-memory] .lux-core{stroke-width:.38}
.v6-shape[data-light-theme=carrying-spark] .lux-core{stroke-width:.8}
.v6-shape[data-light-theme=none]{display:none}
.v6-editor-layout { display:grid; grid-template-columns:minmax(140px,.7fr) minmax(320px,2fr) minmax(220px,1fr); gap:16px; align-items:start; }
.director-dialog:has(.v6-editor-layout) { width:96vw; max-width:1680px; }
.v6-editor-layout #director-preview { aspect-ratio:16/9; min-height:0; padding:0; overflow:hidden; background:#081321; }
.v6-editor-layout #director-preview .story-stage { height:100%; }
.director-preview .story-stage.v6-stage { min-height:0; padding:0; height:100%; }
.v6-controls { margin:0; padding:16px; max-height:75vh; overflow:auto; }
.v6-scene-list { max-height:75vh; overflow:auto; }
.v6-scene-list button { display:block; width:100%; text-align:left; margin:0 0 8px; }
.v6-scene-list button[aria-current=true] { outline:3px solid #0f766e; outline-offset:-3px; }
.v6-scene-list small { display:block; }
.v6-zones { display:grid; grid-template-columns:1fr 1fr; }
.v6-controls fieldset { min-width:0; border:1px solid #b8c8d5; border-radius:12px; margin:12px 0; }
.v6-controls input[type=color] { height:42px; }
@media(max-width:1000px) { .v6-editor-layout { grid-template-columns:1fr 1fr; } .v6-preview-column { grid-column:1/-1; grid-row:1; } .v6-controls,.v6-scene-list { max-height:none; } }
@media(max-width:600px) { .v6-editor-layout { grid-template-columns:1fr; } .v6-stage .story-content .scene { font-size:clamp(16px,3.2cqw,40px); } }
/* The background picture is clearly visible: sharp, only lightly darkened so the text and lights stay readable. */
.v6-story-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.85; filter:brightness(.78) saturate(1.05); transform:scale(1.04); pointer-events:none; z-index:0; }
/* Over a picture the text gets its own translucent backing instead of darkening the whole picture: readable even on a white image. */
/* The backing is a soft, blurred ellipse that melts into the picture (no hard block edge): a layer behind the text,
   reaching a little past the text box and fading out towards every edge, so the text itself stays fully opaque. */
.v6-stage[data-has-image]:not(.story-card):not(.story-ending) .story-content{background:transparent;border-radius:0;isolation:isolate}
.v6-stage[data-has-image]:not(.story-card):not(.story-ending) .story-content::before{content:"";position:absolute;inset:-12% -10%;z-index:-1;pointer-events:none;
 background:rgba(6,14,26,calc(var(--v6-backing,.62)*1.1));
 -webkit-mask-image:radial-gradient(ellipse 50% 50% at 50% 50%,#000 0,#000 58%,rgba(0,0,0,.72) 76%,rgba(0,0,0,.25) 90%,transparent 100%);
 mask-image:radial-gradient(ellipse 50% 50% at 50% 50%,#000 0,#000 58%,rgba(0,0,0,.72) 76%,rgba(0,0,0,.25) 90%,transparent 100%)}
.v6-stage.v6-layout-stage[data-has-image] .story-content::before{inset:0}
.v6-stage[data-has-image] .story-content .scene,.v6-stage[data-has-image] .story-content .by{text-shadow:0 1px 3px rgba(0,0,0,.9),0 2px 18px rgba(0,0,0,.75)}
.display-music-controls{position:fixed;right:1rem;bottom:1rem;z-index:30;max-width:18rem;padding:.65rem;background:#081321e8;color:#f8fafc;border-radius:.6rem;font-size:.8rem}.display-music-controls label{display:block}.display-music-controls input[type=range]{max-width:10rem}.display-music-controls[hidden]{display:none}

.display-sound-controls{position:fixed;right:1rem;bottom:1rem;z-index:30;display:grid;gap:.5rem;max-width:18rem;max-height:70vh;overflow:auto}
.display-sound-controls .display-music-controls{position:static}

/* Free layout: art stays below the protected text, editor handles are separate. */
.v6-layout-art{position:absolute;inset:0;z-index:1;overflow:hidden;pointer-events:none;opacity:var(--v6-light-cap,.35);isolation:isolate}
.v6-free-region{position:absolute;overflow:visible}
.v6-region-shape{inset:0;width:100%;height:100%}
.v6-stage.v6-layout-stage .story-content{position:absolute;box-sizing:border-box;max-width:none;z-index:3;border-radius:0;display:flex;flex-direction:column;justify-content:center;overflow:hidden}
.v6-layout-stage .story-content .scene{font-size:var(--layout-font)!important;line-height:1.45;min-height:0;max-width:none;width:100%;white-space:pre-wrap;overflow-wrap:anywhere;tab-size:1;flex-shrink:0}
.v6-layout-stage .story-content .by{font-size:var(--layout-by-font)!important;line-height:1.5;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0}
.display main:has(.v6-layout-stage){padding:0;background:#081321}
.display .v6-layout-stage{width:100vw;height:100dvh;aspect-ratio:auto;flex-shrink:0}
.region-editor{margin-top:1rem;border-top:1px solid #b8c8d5;padding-top:1rem}
.region-editor fieldset{margin:.7rem 0;min-width:0}
.region-editor .region-grid{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
.region-editor .region-grid input{min-width:0;width:100%}
.region-editor .region-actions{display:flex;flex-wrap:wrap;gap:.4rem}
.region-editor .region-actions button{font-size:.85rem;padding:.6rem}
.region-editor [role=status]{font-size:.9rem;line-height:1.5}
.layout-editor-overlay{position:absolute;inset:0;z-index:10;pointer-events:none}
.layout-box{position:absolute;box-sizing:border-box;border:2px dashed #7dd3fc;pointer-events:auto;touch-action:none;cursor:move;background:transparent;outline-offset:3px}
.layout-box[data-layout-target]:not([data-layout-target=text]){border-color:#fbbf24}
.layout-box[aria-current=true]{border-style:solid;outline:2px solid #fff}
.layout-box[data-locked=true]{cursor:not-allowed}
.layout-box-label{position:absolute;left:0;top:0;background:#081321;color:#fff;font:12px/1.4 Arial,sans-serif;padding:2px 5px;pointer-events:none;white-space:nowrap}
.layout-resize{position:absolute;right:-9px;bottom:-9px;min-width:32px;min-height:32px;width:32px;height:32px;padding:0;border:2px solid white;border-radius:6px;background:#0369a1;cursor:nwse-resize;touch-action:none}
.layout-preview-viewport{overflow:auto;max-width:100%}
@media(pointer:coarse){.layout-resize{width:44px;height:44px;right:-12px;bottom:-12px}}

.show-timeline-scroll{overflow-x:auto;max-width:100%;margin:1rem 0}
.show-timeline-canvas{position:relative;min-width:560px}
.show-timeline-row{display:grid;grid-template-columns:110px minmax(0,1fr);min-height:48px;border-bottom:1px solid #cbd5e1}
.show-timeline-label{padding:.7rem .4rem;font-size:.85rem;background:#edf2f7;z-index:2}
.show-timeline-lane{position:relative;min-width:0;background:repeating-linear-gradient(to right,transparent 0,transparent calc(25% - 1px),#cbd5e1 25%)}
.show-timeline-ruler{min-height:30px}
.show-timeline-ruler .show-timeline-label{padding:.25rem .4rem}
.show-timeline-tick{position:absolute;top:4px;font-size:.75rem;white-space:nowrap}
.show-timeline-block{position:absolute;top:6px;min-height:30px;min-width:4px;padding:4px;box-sizing:border-box;border-radius:5px;background:#dbeafe;color:#0f172a;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:.8rem;line-height:22px}
[data-track=music] .show-timeline-block{background:#dcfce7}
[data-track=visual] .show-timeline-block{background:#fef3c7}
[data-track=image] .show-timeline-block{background:#ede9fe}
.show-timeline-cue{min-width:18px;background:#075985;color:white;cursor:grab;touch-action:none;overflow:visible;z-index:3}
.show-timeline-cue[aria-current=true]{outline:2px solid #e87913;outline-offset:1px}
.show-timeline-cue.is-disabled{opacity:.45}
.show-timeline-block[data-media-kind]{color:#0f172a}
.show-timeline-caption{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-word-scene][aria-current=true]{outline:2px solid #b45309;outline-offset:-2px;background:#fef3c7}
[data-track=visual] .show-timeline-cue{background:#78350f;color:white}
.show-timeline-resize{position:absolute;right:-4px;top:0;width:14px;min-width:14px;height:30px;min-height:30px;margin:0;padding:0;background:#c2410c;border-radius:3px;cursor:ew-resize;touch-action:none}
.show-timeline-playhead{position:absolute;top:0;bottom:0;width:2px;background:#dc2626;z-index:5;pointer-events:none}
.show-timeline-fields{display:flex;flex-wrap:wrap;gap:1rem;align-items:end;margin:.6rem 0}
.show-timeline-fields input{max-width:10rem}
.show-timeline-detail fieldset{margin-top:1rem;border:1px solid #94a3b8;border-radius:8px;padding:.8rem}
.show-timeline-detail fieldset label{display:block;margin:.4rem 0}
.show-timeline-mobile{display:none}
@media(max-width:640px){.show-timeline-scroll{display:none}.show-timeline-mobile{display:block}.show-timeline-mobile p{margin:.35rem 0}.show-timeline-fields{display:block}.show-timeline-fields input{max-width:100%}}

/* V7 optional storyteller colors: native modal owns focus trapping. */
.story-color-slots{display:flex;gap:1rem;margin:1rem 0}.story-color-ball{width:76px;height:76px;min-width:64px;border-radius:50%;border:3px solid #667085;font-size:2rem;padding:0}.story-color-ball[data-selected=true]{border:5px double #111;outline:2px solid #fff}.story-color-dialog{width:min(620px,calc(100vw - 2rem));max-height:calc(100dvh - 2rem);overflow:auto;border:1px solid #667085;border-radius:1rem;padding:1.25rem;background:#fff;color:#111}.story-color-dialog::backdrop{background:#000a}.story-color-nav{display:flex;gap:1rem;margin-bottom:1rem}.story-color-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:.75rem;margin:1rem 0}.story-color-swatch{min-height:76px;border:2px solid #667085;border-radius:1.5rem;white-space:normal;padding:.5rem}.story-color-sample{padding:1.5rem;border:2px solid #667085;border-radius:1rem;margin:1rem 0}.story-original-swatch{display:inline-block;width:28px;height:28px;border:1px solid #667085;border-radius:50%;vertical-align:middle}.story-original-colors{padding:1rem;border:1px solid #667085;border-radius:.75rem} @media(max-width:600px){.story-color-dialog{margin:auto auto 0;width:100%;max-height:92dvh;border-radius:1rem 1rem 0 0}.story-color-grid{grid-template-columns:repeat(3,1fr)}.story-color-slots{justify-content:center}}

.director-dialog .v6-scene-list button small{color:#fff}

.show-timeline-block[data-media-kind=light]{color:#fff}

/* Universal display pairing: independent of organizer navigation. */
.pairing-mode header{display:none}.pairing-mode #app{min-height:90svh;display:grid;place-items:center;padding:1rem}.pairing-card{width:min(100%,32rem);text-align:center}.pairing-card h1{font-size:clamp(2rem,7vw,3.5rem)}.pairing-card form{display:grid;gap:1rem;text-align:left}.pairing-card input{font-size:1.6rem;letter-spacing:.12em;width:100%;box-sizing:border-box;text-transform:uppercase}.pairing-card button{font-size:1.2rem;min-height:3rem}.pairing-card #pair-error{min-height:1.5em}.display-pairing-admin{margin-block:1rem}.display-pairing-admin a{display:inline-block;margin:.5rem}

.display-session-tools{position:fixed;top:.5rem;right:.5rem;z-index:50;display:flex;gap:.5rem;align-items:center;font-size:.8rem}.display-session-tools button{font-size:inherit;padding:.4rem .6rem}.display-session-tools a{color:inherit;text-decoration:underline;background:#151322cc;padding:.5rem;border-radius:.4rem}

/* One audiovisual workspace; the same preview and timeline stay mounted across tabs. */
.director-dialog.av-workspace{width:96vw;max-width:1600px;height:94dvh;max-height:94dvh;padding:12px;overflow:hidden;box-sizing:border-box;display:flex;flex-direction:column;gap:6px}
.av-workspace .director-top{flex:none;gap:8px}.av-workspace .director-top h2{font-size:1.05rem;max-width:30vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.av-workspace .director-top .eyebrow{display:none}
.av-save-bar{display:flex;gap:6px;align-items:center;margin-left:auto;flex-wrap:wrap}.av-save-bar output{font-size:.8rem}.av-workspace button{padding:6px 10px;font-size:.85rem;min-height:32px}.av-workspace #director-error{margin:0;max-height:3rem;overflow:auto;flex:none}.av-workspace #director-error:empty{display:none}
.av-workspace #director-body{display:grid;grid-template-rows:minmax(160px,30vh) 40px minmax(100px,1fr) minmax(160px,25vh);gap:8px;min-height:0;flex:1}
.av-preview{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:12px;min-height:0;position:relative}.av-preview #director-preview{min-height:0;height:100%;width:100%;aspect-ratio:auto;padding:0}.av-preview #director-preview .story-stage{height:100%;width:100%}.av-preview #director-preview .story-stage .scene{font-size:clamp(14px,2vw,28px)}.av-preview .director-controls{margin:0;display:flex;flex-wrap:wrap;align-content:start;gap:6px;overflow:auto}.av-preview label{font-size:.8rem;margin:0}.av-preview select{padding:4px}.av-preview-options{font-size:.8rem}.av-preview-options[open]{position:absolute;right:0;top:0;z-index:30;background:#f4f2ec;border:1px solid #aaa;border-radius:8px;padding:12px;width:min(320px,90%);max-height:55vh;overflow:auto}
.av-tabs{display:flex;gap:4px;overflow:auto;white-space:nowrap;border-bottom:1px solid #aaa}.av-tabs [aria-selected=true]{background:#1d367c;color:white}.av-tools{min-height:0;overflow:auto;padding:4px 8px;border:1px solid #ccc;border-radius:8px}.av-tools [hidden]{display:none!important}.av-tools .card{margin:0 0 8px;padding:12px}.av-tools h3{font-size:1rem;margin:4px 0}.av-tools .director-scene{padding:10px;margin:0 0 8px}.av-tools .av-selected-scene{border-color:#244ec9}.av-tools .v6-controls{max-height:none;overflow:visible}.av-workspace .show-timeline{margin:0;padding:8px;min-height:0;overflow:auto}.av-workspace .show-timeline>h3{font-size:.95rem;margin:0}.av-workspace .show-timeline>p:first-of-type{display:none}.av-workspace .show-timeline label{font-size:.8rem;display:inline-block;margin:3px 8px}.av-track-active{background:#dce6ff}.av-workspace #show-timeline [data-undo],.av-workspace #show-timeline [data-redo],.av-workspace #light-timing [data-undo],.av-workspace #light-timing [data-redo],.av-workspace #media-timing [data-undo],.av-workspace #media-timing [data-redo],.av-workspace #layout-undo,.av-workspace #layout-redo,.av-workspace #light-timing [data-lane]{display:none}.av-workspace #sfx-editor label:has([name=duration_ms]){display:none}.av-workspace .director-publish{margin:0}
@media(max-width:700px){.director-dialog.av-workspace{width:100vw;max-width:100vw;height:98dvh;max-height:98dvh;border-radius:0;padding:8px}.av-workspace .director-top{flex-wrap:wrap;gap:3px}.av-workspace .director-top h2{max-width:55vw;font-size:.95rem}.av-save-bar{order:3;width:100%;justify-content:space-between}.av-save-bar output{font-size:.7rem}.av-workspace #director-body{grid-template-rows:minmax(160px,24vh) 38px minmax(120px,1fr) minmax(155px,23vh)}.av-preview{grid-template-columns:1fr;grid-template-rows:minmax(90px,1fr) auto;gap:4px}.av-preview .director-controls{max-height:62px;overflow:auto}.av-preview .director-controls>label{max-width:120px}.av-preview-options{font-size:.7rem}.av-workspace .show-timeline-mobile{display:none}.av-workspace .show-timeline-scroll{display:block}.av-workspace .show-timeline-canvas{min-width:600px}.av-tabs button{font-size:.8rem}.av-tools{padding:4px}.av-tools input,.av-tools select,.av-tools textarea{max-width:100%;box-sizing:border-box}}

.av-workspace .av-preview #director-preview{width:auto;max-width:100%;height:100%;aspect-ratio:16/9;justify-self:center;box-sizing:border-box}.av-workspace .show-timeline-scroll{margin:3px 0}.av-workspace .show-timeline-row{min-height:25px}.av-workspace .show-timeline-label{padding:2px 4px;font-size:.7rem}.av-workspace .show-timeline-block{top:2px;min-height:20px;padding:1px 3px;line-height:18px;font-size:.7rem}.av-workspace .show-timeline-ruler{min-height:20px}.av-workspace .show-timeline [data-time]{font-size:.75rem}

@media(min-width:701px){.av-workspace #director-body{grid-template-rows:minmax(140px,27vh) 40px minmax(90px,1fr) 250px}.av-workspace #show-timeline>label{display:inline-flex;align-items:center;gap:5px;margin:0 8px 0 0}.av-workspace #show-timeline input[type=range]{height:18px;padding:0;width:180px;margin:0}.av-workspace #show-timeline select{padding:2px;width:70px;min-height:24px}}
@media(min-width:701px) and (max-height:740px){.av-workspace #director-body{grid-template-rows:minmax(110px,22vh) 36px minmax(80px,1fr) 245px}}

@media(max-width:700px){.av-save-bar{display:grid;grid-template-columns:minmax(55px,1fr) auto auto auto;gap:4px;align-items:center}.av-save-bar output{font-size:.62rem;line-height:1.2}.av-save-bar button{font-size:.68rem;min-height:28px;padding:4px 6px}.av-workspace #director-body{grid-template-rows:minmax(150px,23vh) 38px minmax(100px,1fr) 235px}.av-workspace #show-timeline>label{display:inline-flex;align-items:center;gap:3px;margin:0 4px 0 0;font-size:.65rem}.av-workspace #show-timeline input[type=range]{height:18px;padding:0;width:110px;margin:0}.av-workspace #show-timeline select{padding:2px;width:55px;min-height:24px}.av-workspace #show-timeline>h3{font-size:.8rem}}

.av-workspace .av-preview .story-stage:not(.v6-stage){min-height:0;box-sizing:border-box;padding:8px;container-type:inline-size}.av-workspace .av-preview .story-stage:not(.v6-stage) .scene{font-size:clamp(9px,3cqw,24px);line-height:1.35}.av-workspace .av-preview .story-stage:not(.v6-stage) .by{font-size:clamp(9px,2cqw,14px);margin:0 0 6px}.av-workspace .av-preview #director-preview:fullscreen{width:100vw;height:100dvh;max-width:none;aspect-ratio:auto}.av-workspace .av-preview #director-preview:fullscreen .scene{font-size:clamp(28px,4vw,66px)}

.remote-mode>header{display:none}.remote-mode #app{padding:16px;max-width:460px;margin:auto}.remote-pad{display:grid;gap:14px}.remote-pad h1{font-size:1.5rem;margin:8px 0}.remote-pad button{min-height:58px;font-size:1.15rem;width:100%;margin:0}.remote-pad label{display:flex;justify-content:space-between;align-items:center;margin:0}.remote-pad input[type=range]{min-height:44px;width:100%;padding:0;margin:0}.remote-pad #remote-status{min-height:2em;margin:0}

#story-entry-choice{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0;padding:16px;border-radius:12px}#story-entry-choice button{flex:1;min-height:56px;min-width:180px}#story-entry-choice [aria-pressed=true]{outline:3px solid #6984e5;outline-offset:2px}#recording-timer{font-size:1.65rem;font-variant-numeric:tabular-nums;font-weight:700}#spoken-collect [data-rec]{min-height:48px}#spoken-collect[hidden],#story[hidden]{display:none!important}#story [hidden],#story-entry-choice [hidden]{display:none!important}#story-entry-choice.story-entry-compact{align-items:center;justify-content:space-between;padding:10px 16px;margin:12px 0}#story-entry-choice.story-entry-compact legend{float:left;margin:0;font-weight:700}#story-entry-choice.story-entry-compact button{flex:0 1 auto;min-height:44px;min-width:0}#story-finish,#story .story-colors{margin-top:20px}.story-thanks{text-align:center}.story-thanks button{margin-top:16px;min-height:52px}

/* Timeline is a persistent tab panel, leaving more space for preview and tools. */
.av-workspace #director-body{grid-template-rows:minmax(220px,42vh) 40px minmax(140px,1fr)}
.av-workspace #av-panel-timeline{min-height:100%}.av-workspace #av-panel-timeline #show-timeline{overflow:visible;min-height:100%;box-sizing:border-box}
@media(min-width:701px) and (max-height:740px){.av-workspace #director-body{grid-template-rows:minmax(150px,36vh) 36px minmax(110px,1fr)}}
@media(max-width:700px){.av-workspace #director-body{grid-template-rows:minmax(190px,32vh) 38px minmax(140px,1fr)}.av-preview .director-controls{max-height:86px}}
.session-story-list{display:grid;gap:8px;max-height:340px;overflow:auto;margin:12px 0}.session-story-option{display:flex;align-items:start;gap:10px;margin:0;padding:10px;border:1px solid #b5bfc7;border-radius:8px}.session-story-option input{width:22px;height:22px;flex:0 0 22px;margin:0}.session-story-option small{display:block}.session-stories p,.session-stories small{font-size:.9rem}.session-story-list[hidden]{display:none}.remote-pad select{width:100%;min-height:52px;font-size:1rem}.remote-pad #remote-story-help{font-size:.9rem;margin:0}

/* Editor density tokens apply only below the mobile breakpoint. Preview art/text
   keeps its own renderer styles; desktop and public presentation are unchanged. */
.av-compact-scene-picker{display:none}
@media(max-width:767px){
 .director-dialog.av-workspace{
  --av-text:14px;--av-label:13px;--av-input:16px;--av-heading:17px;--av-title:19px;
  --av-leading:1.35;--av-touch:44px;--av-card:12px;--av-gap:8px;--av-section:12px;
  --av-number:112px;--av-multiline:104px;--av-multiline-min:90px;--av-track-step:48px;
  --av-preview-height:320px;--av-preview-min:180px;
  width:100vw;max-width:100vw;height:98dvh;max-height:98dvh;border-radius:0;padding:var(--av-gap);gap:var(--av-gap);overflow-y:auto;overflow-x:hidden;
 }
 .av-workspace :is(.director-top,.director-controls,.av-tabs,.av-tools){font-size:var(--av-text);line-height:var(--av-leading)}
 .av-workspace .director-top{flex-wrap:wrap;gap:var(--av-gap)}
 .av-workspace .director-top h2{font-size:var(--av-title);line-height:var(--av-leading);max-width:calc(100% - var(--av-touch) - var(--av-gap));margin:0}
 .av-workspace .av-save-bar{order:3;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--av-gap);margin:0}
 .av-workspace .av-save-bar output{grid-column:1/-1;font-size:var(--av-label);line-height:var(--av-leading)}
 .av-workspace button,.av-workspace summary{min-width:var(--av-touch);min-height:var(--av-touch);font-size:var(--av-text);line-height:var(--av-leading);padding:var(--av-gap);margin:0;font-weight:500;white-space:normal}
 .av-workspace button:not(#save-draft):not(#publish-presentation):not(#preview-play):not(.danger):not(.show-timeline-resize):not([aria-selected=true]){background:#e7e8ed;color:#202338}
 .av-workspace #director-close{margin-left:auto;flex:none}
 .av-workspace #director-body{display:flex;flex-direction:column;flex:none;gap:var(--av-gap)}
 .av-workspace .av-preview{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(var(--av-preview-min),1fr) auto;gap:var(--av-gap);height:var(--av-preview-height);flex:none}
 .av-workspace .av-preview #director-preview{margin-top:0}
 .av-workspace .av-preview .director-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-height:none;overflow:visible;gap:var(--av-gap);align-items:center}
 .av-workspace .av-preview .director-controls>label:has(#preview-scene){display:none}
 .av-workspace .av-preview .director-controls>.av-preview-options,.av-workspace .av-preview .director-controls>label:has(#av-volume){grid-column:span 2;min-width:0}
 .av-workspace .av-preview .director-controls>output{display:none}
 .av-workspace .av-preview .director-controls>label:has(#av-volume){max-width:none}
 .av-workspace .av-preview-options{font-size:var(--av-label)}
 .av-workspace .av-preview-options[open]{width:min(340px,100%);max-height:70dvh}
 .av-workspace .av-preview-options summary{font-size:var(--av-label)}
 .av-workspace :is(.av-tools,.director-controls) :is(label,legend){font-size:var(--av-label);line-height:var(--av-leading);margin:var(--av-gap) 0}
 .av-workspace :is(.av-tools,.director-controls) :is(input:not([type=checkbox]),select,textarea){font-size:var(--av-input);line-height:var(--av-leading);min-height:var(--av-touch);padding:var(--av-gap);max-width:100%;box-sizing:border-box}
 .av-workspace :is(.av-tools,.director-controls) input[type=range]{padding:0;margin:0;min-width:var(--av-touch)}
 .av-workspace .av-tools textarea{height:var(--av-multiline);min-height:var(--av-multiline-min);resize:vertical;width:100%}
 .av-workspace :is(.av-tools,.director-controls) label:has(input[type=checkbox]){min-height:var(--av-touch);display:flex;align-items:center;gap:var(--av-gap)}
 .av-workspace .av-tools input[type=number]{width:var(--av-number)}
 .av-workspace .av-tools label:has(>input[type=number]){display:flex;align-items:center;justify-content:flex-start;gap:var(--av-gap);flex-wrap:wrap}
 .av-workspace .av-tools{min-width:0;padding:var(--av-gap);overflow:visible;flex:none}
 .av-workspace .av-tools :is(p,details){margin:var(--av-gap) 0;font-size:var(--av-text);line-height:var(--av-leading);overflow-wrap:anywhere}
 .av-workspace .av-tools :is(h3,h4){font-size:var(--av-heading);line-height:var(--av-leading);margin:0 0 var(--av-gap)}
 .av-workspace .av-tools :is(.card,.director-scene,.director-publish){padding:var(--av-card);margin:0 0 var(--av-section)}
 .av-workspace .av-tools .card .card{padding:0;border:0;border-radius:0}
 .av-workspace .av-tools fieldset{min-width:0;margin:var(--av-gap) 0;padding:var(--av-gap)}
 .av-workspace .av-tools .director-fields{grid-template-columns:minmax(0,1fr);gap:var(--av-gap)}
 .av-workspace .av-compact-scene-picker{display:flex;align-items:center;gap:var(--av-gap);margin:0 0 var(--av-gap);font-size:var(--av-label)}
 .av-workspace .av-compact-scene-picker select{width:var(--av-number)}
 .av-workspace .director-scene:not(.av-selected-scene),.av-workspace .director-scene>h3,.av-workspace [data-av-scene]{display:none}
 .av-workspace .director-scene>button{margin:var(--av-gap) var(--av-gap) 0 0}
 .av-workspace .av-tabs{flex:none;min-height:var(--av-touch);overflow-x:auto;overflow-y:hidden;gap:var(--av-gap);scrollbar-width:thin;min-width:0}
 .av-workspace .av-tabs button{flex:none;white-space:nowrap}
 .av-workspace .av-tabs [aria-selected=true]{background:#1d367c;color:#fff;box-shadow:inset 0 -3px #fff}
 .av-workspace #show-timeline{overflow:visible}
 .av-workspace #show-timeline>h3{font-size:var(--av-heading)}
 .av-workspace #show-timeline>label{display:inline-flex;font-size:var(--av-label);margin:0 var(--av-gap) var(--av-gap) 0;gap:var(--av-gap)}
 .av-workspace #show-timeline :is(select,input[type=range]){min-height:var(--av-touch);font-size:var(--av-input)}
 .av-workspace #show-timeline select{width:auto;min-width:var(--av-touch)}
 .av-workspace .show-timeline-scroll{display:block;overflow-x:auto;touch-action:pan-x pan-y}
 .av-workspace .show-timeline-mobile{display:none}
 .av-workspace .show-timeline-canvas{min-width:600px}
 .av-workspace .show-timeline-block{min-height:var(--av-touch);min-width:var(--av-touch);line-height:var(--av-leading);font-size:var(--av-label);padding:var(--av-gap)}
 .av-workspace .show-timeline-block :is([data-resize],[data-media-resize]){width:var(--av-touch);min-width:var(--av-touch);height:var(--av-touch);min-height:var(--av-touch);padding:0}
}

/* Optional local show start: only the idle screen of an opted-in session. */
.display-idle-play{width:min(100%,960px);display:grid;justify-items:center;gap:12px}
.display-idle-play>p,.display-idle-play h1{margin:0}
.display-idle-play h1{font-size:clamp(28px,4vw,52px);line-height:1.2}
.display-idle-play #display-waiting{display:none}
.display-idle-play #display-play-controls{width:100%;display:grid;justify-items:center;gap:12px}
.display-idle-play #display-play{display:flex;align-items:center;justify-content:center;gap:20px;width:min(100%,720px);min-height:clamp(112px,17vh,184px);margin:0;padding:20px 24px;font-size:clamp(26px,3vw,48px);line-height:1.2;border:3px solid #a5c6ff;border-radius:24px;background:#244bd7;color:#fff;cursor:pointer}
.display-idle-play #display-play>span:first-child{font-size:1.3em}
.display-idle-play #display-play:focus{outline:6px solid #ffd666;outline-offset:5px}
.display-idle-play #display-play:disabled{cursor:default;opacity:.6}
.display-idle-play #display-play-status{font-size:18px;margin:0;max-width:60ch}
.display-idle-play #display-play-status:empty{display:none}
.display-idle-play #display-play-controls label{width:min(100%,540px);margin:0;text-align:left;font-size:18px}
.display-idle-play #display-play-story{min-height:52px;font-size:20px}
.display-idle-play #display-qr-fallback{display:grid;justify-items:center;gap:6px;font-size:16px}
.display-idle-play #display-qr-fallback[hidden]{display:none}
.display-idle-play #display-qr-fallback p{margin:0}
.display-idle-play .qr{margin:0;padding:10px}
.display-idle-play .qr img,.display-idle-play .qr canvas{width:clamp(180px,24vh,220px);height:clamp(180px,24vh,220px);max-width:100%}
.display-idle-play #display-audio-policy{max-width:60ch;font-size:16px}
.display-idle-play #fullscreen{min-height:44px;margin:0}

.display-idle-play .eyebrow{color:#abc7ff}

/* Title/attribution cards use the same stage and visual renderer as story scenes. */
.story-stage.story-card{container-type:inline-size}
.story-card:not(.v6-layout-stage) .story-content{position:absolute;inset:10% 11%;width:78%;height:80%;max-width:none;box-sizing:border-box}
.story-card .story-content{display:flex;flex-direction:column;justify-content:center;gap:clamp(6px,2cqw,28px);overflow:hidden}
.story-card .story-card-title{font-size:var(--card-title-size,clamp(16px,6cqw,72px));line-height:1.2;margin:0;letter-spacing:normal;color:inherit;overflow-wrap:anywhere;flex-shrink:0}
.story-card .story-card-by{font-size:var(--card-by-size,clamp(12px,2.5cqw,28px));line-height:1.35;margin:0;color:inherit;overflow-wrap:anywhere;flex-shrink:0}
.av-workspace .director-controls .av-transport-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;flex:0 0 44px;padding:10px}.av-transport-button svg{width:22px;height:22px;fill:currentColor;pointer-events:none}.av-transport-button:focus-visible{outline:3px solid #14b8a6;outline-offset:3px}
.av-transport{display:flex;align-items:center;gap:6px;flex:none}@media(max-width:900px){.av-workspace .director-controls>.av-transport,.av-workspace .director-controls>#preview-fullscreen{grid-column:span 2}}
.show-timeline-scroll .show-timeline-canvas{touch-action:none}.show-timeline-speech{overflow:visible;background:#dbeafe;border:1px solid #2563eb}.show-timeline-speech .show-timeline-resize{touch-action:none;min-width:24px;width:24px;right:-6px}.speech-timing-tools{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin:10px 0}.speech-timing-tools h4,.speech-timing-tools p{flex-basis:100%;margin:0}.speech-timing-tools label{min-width:130px;flex:1}.speech-timing-tools button{min-height:44px}.speech-timing-tools input{max-width:160px}
.text-timing-tools{flex-basis:100%;width:100%}.text-timing-tools[open]{display:flex;flex-wrap:wrap;gap:8px}.text-timing-tools summary,.text-timing-tools p{flex-basis:100%}.text-timing-tools select{max-width:100%}.show-timeline-word{touch-action:none;overflow:visible}.show-timeline-word .show-timeline-resize{width:18px;min-width:18px;opacity:.5}.show-timeline-word:focus-within .show-timeline-resize,.show-timeline-word:hover .show-timeline-resize{opacity:1}
.guided-workspace .av-tabs{display:none!important}.guided-workspace #director-body{display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden;gap:8px}.guided-workspace .av-preview{flex:none;max-height:40vh}.guided-workspace .av-tools{flex:1;min-height:0;overflow:auto}.guided-workspace .av-tools>[data-av-panel]{display:none!important}.guided-workspace .director-scene:not(.av-selected-scene){display:none}.guided-steps{min-width:0}.guided-steps h3{font-size:1.25rem;margin:4px 0 6px}.guided-step-nav{display:flex;gap:4px;margin-bottom:10px;max-width:100%}.guided-step-nav button{flex:1 1 0;min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center;gap:6px;padding:4px 6px;font-size:.85rem;white-space:nowrap;border-radius:8px;background:#e6e9f2!important;color:#172033!important;border:0}.guided-step-nav .guided-step-number{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#fff;font-weight:700;flex:none}.guided-step-nav .guided-step-label{overflow:hidden;text-overflow:ellipsis}.guided-step-nav [data-done=true]{background:#c9d5f7!important}.guided-step-nav [aria-current=step]{background:#1947d8!important;color:#fff!important}.guided-step-nav [aria-current=step] .guided-step-number{color:#1947d8}.guided-intro{margin:0 0 12px;font-size:1rem}.guided-tools{margin:12px 0;border:1px solid #c8ccd6;border-radius:10px;padding:8px 12px}.guided-tools>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600}.guided-step-panel[hidden]{display:none!important}.guided-footer{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;padding:12px 0;background:#f4f2ec;position:sticky;bottom:0;z-index:5}.guided-footer [data-guided-next]{margin-left:auto}.guided-footer [data-guided-next]{background:#1947d8!important;color:#fff!important}.guided-footer p{flex-basis:100%;margin:0}.guided-footer button{min-height:44px}.guided-workspace .guided-step-panel{min-width:0}.guided-workspace .guided-tools>label{display:block;margin:10px 0}.guided-workspace .guided-step-panel select{max-width:100%}@media(max-width:600px){.guided-workspace .av-preview{max-height:none;height:auto!important;grid-template-rows:min(20dvh,160px) auto!important}.guided-workspace #av-undo,.guided-workspace #av-redo,.guided-workspace .av-preview-options,.guided-workspace .av-preview label:has(#av-volume){display:none!important}.guided-workspace .av-preview .director-controls{overflow:visible}.guided-footer button{flex:1 1 30%}.guided-footer [data-guided-next]{margin-left:0}.guided-step-nav .guided-step-label{display:none}.guided-step-nav button[aria-current=step] .guided-step-label{display:inline}.guided-step-nav button[aria-current=step]{flex:2.5 1 0}#guided-mode-toggle{font-size:.85rem;min-height:44px}}
.guided-workspace .guided-step-nav{flex-wrap:nowrap}.guided-workspace .guided-step-panel[hidden]{display:none!important}
/* QR remote V2: all appearance is scoped to remote-mode. */
body.remote-mode{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 0 65%,#123633 0,transparent 65%),radial-gradient(ellipse at 100% 10%,#17223a 0,transparent 65%),#07121e;color:#f3f7ff}body.remote-mode #app{padding:max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));max-width:450px;margin:0 auto;box-sizing:border-box}.remote-mode .remote-pad{display:grid;gap:10px;font-size:14px;line-height:1.35;min-width:0}.remote-mode .remote-pad button,.remote-mode .remote-pad summary{font-size:14px;min-height:44px;box-sizing:border-box;touch-action:manipulation}.remote-mode .remote-pad button{border:1px solid #516572;border-radius:14px;padding:8px 12px;color:#f3f7ff;background:#253848;margin:0;font-weight:600;width:100%}.remote-mode .remote-pad button:disabled{opacity:.45;cursor:not-allowed}.remote-mode .remote-pad :is(button,input,select,summary):focus-visible{outline:3px solid #9cece2;outline-offset:3px}.remote-mode .remote-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.remote-mode .remote-brand{font-weight:700;letter-spacing:.09em;font-size:12px;margin:0 0 6px}.remote-mode #remote-connection{display:flex;align-items:center;gap:7px;margin:0;color:#dbe7ee}.remote-mode .remote-dot{width:9px;height:9px;border-radius:50%;background:#a9b8c7;flex:none}.remote-mode [data-connected=true] .remote-dot{background:#53e493}.remote-mode [data-connected=false] .remote-dot{background:#ffb4ab}.remote-mode .remote-pad .remote-icon-button{width:44px;min-width:44px;background:transparent;border-color:transparent}.remote-mode .remote-pad svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.remote-mode .remote-display-card,.remote-mode .remote-control-card{border:1px solid #48606c;border-radius:18px;background:linear-gradient(120deg,#263e4366,#27384b99);padding:12px 14px;box-shadow:inset 0 1px #ffffff09}.remote-mode .remote-display-card{display:flex;align-items:center;gap:12px}.remote-mode .remote-display-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;background:linear-gradient(145deg,#185a61,#51736a);color:#d5fff6;flex:none}.remote-mode .remote-caption{font-size:12px;color:#c3d2db;margin:0}.remote-mode .remote-pad h1{font-size:20px;line-height:1.2;margin:3px 0;overflow-wrap:anywhere}.remote-mode #remote-playback-state{margin:0;color:#dce7ed}.remote-mode .remote-pad #remote-status{min-height:0;margin:0;color:#ffd4ce;font-size:13px}.remote-mode #remote-status:empty{display:none}.remote-mode .remote-transport{display:flex;justify-content:center;align-items:center;gap:24px;padding:4px 0}.remote-mode .remote-pad .remote-round{width:58px;height:58px;min-width:58px;min-height:58px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:6px 2px;background:linear-gradient(145deg,#304656,#1a2a39);gap:2px;flex:none;font-size:11px;box-shadow:inset 0 1px #ffffff15}.remote-mode .remote-pad .remote-main{width:76px;height:76px;min-width:76px;border:2px solid #a3f3ec;background:linear-gradient(145deg,#31586b,#446b78);font-size:13px}.remote-mode .remote-main svg{width:27px;height:27px;stroke-width:3}.remote-mode .remote-control-title{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px}.remote-mode .remote-control-title label{display:flex;align-items:center;gap:7px;margin:0}.remote-mode .remote-pad output{font-variant-numeric:tabular-nums;color:#fff;white-space:nowrap}.remote-mode .remote-pad .remote-reset{width:auto;min-width:44px;padding:4px;min-height:44px;background:#263d55}.remote-mode .remote-pad input[type=range]{display:block;width:100%;min-height:44px;accent-color:#58bdf5;margin:0;padding:0;cursor:pointer}.remote-mode .remote-range-ends{display:flex;justify-content:space-between;font-size:11px;color:#c3d2db;margin-top:-5px}.remote-mode .remote-pad .remote-danger{background:linear-gradient(#cd3549,#aa2e41);border-color:#f27c86;display:flex;justify-content:center;align-items:center;gap:8px;min-height:48px}.remote-mode .remote-pad .remote-dismiss{background:transparent;border-color:transparent;color:#d0dfe8;font-size:13px}.remote-mode #remote-queue{border:1px solid #48606c;border-radius:14px;background:#20344088;padding:0 12px;min-width:0}.remote-mode #remote-queue summary{display:flex;align-items:center;justify-content:center;cursor:pointer;list-style:none;font-weight:600;gap:8px}.remote-mode #remote-queue summary::after{content:'⌄'}.remote-mode #remote-queue[open]{padding-bottom:12px}.remote-mode #remote-queue label{display:block;margin-top:8px}.remote-mode #remote-story{background:#122334;color:#f3f7ff;border:1px solid #66818f;border-radius:10px;width:100%;min-height:44px;font-size:14px;box-sizing:border-box}.remote-mode #remote-story-help{font-size:12px;color:#cfdee6;margin:8px 0}.remote-mode #remote-next{background:#28587b}.remote-mode #remote-options svg{width:24px;height:24px}@media(max-height:740px){.remote-mode .remote-pad{gap:8px}.remote-mode .remote-display-card,.remote-mode .remote-control-card{padding:10px 12px}.remote-mode .remote-transport{padding:0}}@media(prefers-reduced-motion:reduce){.remote-mode *{scroll-behavior:auto}}

.remote-mode .remote-audio-output{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:4px 12px}.remote-mode #remote-audio-output{min-height:44px;width:100%;font-size:14px;color:#f3f7ff;background:#122334;border:1px solid #66818f;border-radius:10px;padding:4px 8px}.remote-mode #remote-audio-status{grid-column:1/-1;font-size:12px;margin:0;color:#cfdee6}.remote-mode #remote-audio-status:empty{display:none}.remote-mode #remote-audio-unlock{grid-column:1/-1}

.remote-mode .remote-display-card{display:grid;grid-template-columns:38px minmax(0,1fr) 106px;gap:10px}.remote-mode .remote-display-icon{width:38px;height:44px}.remote-mode .remote-display-card h1{font-size:18px}.remote-mode .remote-audio-output{display:block;min-width:0}.remote-mode .remote-audio-output>label{display:block;font-size:12px;margin-bottom:2px}.remote-mode #remote-audio-output{padding:4px;font-size:13px}

@media(max-height:740px){.remote-mode .remote-pad .remote-main{width:68px;height:68px;min-width:68px;min-height:68px}.remote-mode .remote-display-card{padding-block:8px}}

.remote-mode #remote-audio-unlock[hidden]{display:none}

/* The QR landing state exposes one explicit, comfortably sized start action. */
.remote-mode .remote-pad:is([data-playback=idle],[data-playback=starting]) .remote-transport{flex-wrap:wrap;gap:8px}
.remote-mode .remote-pad:is([data-playback=idle],[data-playback=starting]) .remote-main{order:-1;flex-basis:100%;width:100%;height:auto;min-height:64px;border-radius:18px;flex-direction:row;gap:12px;padding:12px 16px;font-size:18px;background:linear-gradient(135deg,#225c64,#315d75);box-shadow:0 5px 20px #0003,inset 0 1px #ffffff15}
.remote-mode .remote-pad:is([data-playback=idle],[data-playback=starting]) #remote-restart{display:none}
.remote-mode .remote-pad:is([data-playback=idle],[data-playback=starting]) #remote-stop{display:none}
.remote-mode .remote-pad:is([data-playback=idle],[data-playback=starting]) #remote-queue-open{width:auto;height:44px;min-height:44px;border-radius:12px;flex-direction:row;gap:8px;padding:8px 16px;font-size:13px}

.remote-mode .remote-brand{display:flex;align-items:center;gap:8px}.remote-mode .digisteri-icon{display:block;flex:none;border-radius:8px}.remote-mode .remote-pad[hidden]{display:none!important}
.remote-mode .remote-thanks{min-height:calc(100dvh - 48px);display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;box-sizing:border-box;padding:32px 20px;gap:20px;max-width:430px;margin:auto}
.remote-mode .remote-thanks>img{width:88px;height:88px;border-radius:22px;box-shadow:0 12px 60px #00d7c326;border:1px solid #76e3d54d}.remote-mode .remote-thanks .remote-brand{font-size:11px;letter-spacing:.1em;color:#bfd4dd;margin:0}.remote-mode .remote-thanks h1{font-size:clamp(28px,7vw,38px);line-height:1.15;color:#f3f7ff;margin:0;outline:none;max-width:340px}.remote-mode .remote-thanks p{font-size:16px;line-height:1.6;color:#ccdde4;margin:0}.remote-mode .remote-thanks strong{font-weight:600;color:#f3f7ff}.remote-mode .remote-thanks a{display:flex;align-items:center;gap:16px;justify-content:center;min-height:48px;min-width:160px;padding:8px 24px;box-sizing:border-box;border:1px solid #78e4db;border-radius:14px;background:#234b56;color:#f3f7ff;font-weight:600;text-decoration:none}.remote-mode .remote-thanks a:focus-visible{outline:3px solid #9cece2;outline-offset:4px}.remote-mode .remote-thanks .remote-thanks-note{font-size:12px;color:#a8c0ce;max-width:280px;margin-top:12px}
.guided-steps [data-guided-hide],.guided-steps #manual-narration-import>h3,.guided-steps #elevenlabs-generation>h3{display:none!important}.guided-status{border-left:4px solid #1947d8;background:#eef2fc;border-radius:8px;padding:8px 12px;margin:0 0 12px}.guided-status p{margin:4px 0}.guided-option{border:1px solid #c8ccd6;border-radius:12px;padding:12px;margin:0 0 12px;min-width:0}.guided-option>.card,.guided-option section.card{margin:0;padding:0;border:0;box-shadow:none;background:none}.guided-option label{display:block;margin:8px 0}.guided-option button{min-height:44px;margin:6px 6px 6px 0}.guided-option details{margin:10px 0}.guided-option details>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600}.guided-consent{display:flex!important;gap:8px;align-items:flex-start}.guided-consent input{min-width:20px;min-height:20px;margin-top:2px}.guided-note{font-size:.92rem;color:#3a4256}
.guided-workspace .av-tools{padding-bottom:0}
#narration-alignment .align-text{line-height:1.9;font-size:1.05rem;padding:10px 12px;border:1px solid #c8ccd6;border-radius:10px;background:#fff;color:#172033;max-height:40vh;overflow:auto;overflow-wrap:anywhere}#narration-alignment .align-text span{cursor:pointer;border-radius:4px;padding:1px 2px}#narration-alignment .align-text .is-uncertain{text-decoration:underline wavy #b4570b;text-underline-offset:4px}#narration-alignment .align-text .is-current{background:#1947d8;color:#fff}#narration-alignment .align-audio{width:100%;margin:8px 0}#narration-alignment .align-phrases{padding-left:1.4em}#narration-alignment .align-phrases li{margin:10px 0}#narration-alignment .align-phrases li.is-uncertain{border-left:3px solid #b4570b;padding-left:8px}#narration-alignment .align-phrases p{margin:2px 0}#narration-alignment .align-reason{font-size:.92rem;color:#7a3c06}#narration-alignment .align-controls{display:flex;flex-wrap:wrap;gap:6px;align-items:center}#narration-alignment .align-controls button{min-height:44px;margin:0}#narration-alignment .align-controls label{display:flex;gap:6px;align-items:center;margin:0}#narration-alignment .align-controls input{width:6.5em;min-height:44px;box-sizing:border-box}#narration-alignment .align-all>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600}#narration-alignment>button{min-height:44px}#narration-alignment .align-problems{color:#7a3c06}
#narration-alignment .align-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}#narration-alignment .align-actions button{min-height:44px;margin:0}#narration-alignment .align-unavailable{flex-basis:100%;margin:0;color:#3a4256}
/* Package D: whole-story palette and light choices */
.story-color-cell{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:76px}.story-color-cell small{font-size:.8rem;color:#475467;text-align:center;max-width:90px}.story-color-lock{min-height:44px;min-width:76px;padding:4px 10px;font-size:.9rem}.story-color-lock[aria-pressed=true]{background:#1d2939;color:#fff;border-color:#1d2939}
.guided-option .story-colors{margin:0;padding:12px;box-shadow:none}.guided-option .story-colors h2{font-size:1.05rem;margin:0 0 4px}.guided-option .story-color-slots{flex-wrap:wrap;gap:12px}
.guided-swatches{display:flex;flex-wrap:wrap;gap:8px 14px;margin:6px 0}.guided-swatch{display:inline-flex;align-items:center;gap:6px;font-size:.92rem}.guided-swatch-dot{width:22px;height:22px;border-radius:50%;border:2px solid #667085;flex:none}.guided-swatch-dot[data-empty=true]{background:repeating-linear-gradient(45deg,#fff 0 4px,#e4e7ec 4px 8px)}
.guided-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.guided-actions button{min-height:44px}
@media (max-width:430px){.story-color-ball{width:64px;height:64px}.story-color-cell{min-width:64px}.story-color-lock{min-width:64px}}

.guided-summary{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}.guided-summary li{display:flex;align-items:center;gap:12px;border:1px solid #c8ccd6;border-radius:12px;padding:10px 12px;background:#fff;min-width:0}.guided-summary-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}.guided-summary-text>span{font-size:.95rem;line-height:1.4}.guided-summary li>button{min-height:44px;flex:none;margin:0}.guided-summary .guided-swatches{margin-top:4px}.guided-costs{border:1px solid #c8ccd6;border-radius:12px;padding:10px 12px;margin:0 0 12px;background:#fff}.guided-costs h4{margin:0 0 6px;font-size:1.05rem}.guided-costs h5{margin:8px 0 2px;font-size:.95rem}.guided-costs ul{margin:2px 0;padding-left:20px}.guided-costs p{margin:2px 0}@media(max-width:600px){.guided-summary li{flex-direction:column;align-items:stretch;gap:8px}.guided-summary li>button{width:100%}}
.guided-steps button,.guided-steps summary{min-height:44px}
.guided-workspace .av-preview #director-preview{margin-top:0}
/* Core flow: priced one-click buttons and the "Tehdään taikoja…" popup. */
.core-flow h4{margin:14px 0 6px;font-size:1.05rem}.core-flow .core-voice{display:block;margin:0 0 8px}.core-speech{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:10px;margin:0 0 8px}
.core-magic{display:flex!important;flex-direction:column;align-items:flex-start;gap:4px;min-height:64px;width:100%;box-sizing:border-box;text-align:left;white-space:normal;padding:12px 14px;border-radius:12px;margin:0!important}
.core-magic strong{font-size:1.05rem}.core-magic .core-price{font-weight:700;font-variant-numeric:tabular-nums}.core-magic small{font-weight:400;font-size:.85rem;opacity:.9;line-height:1.35}
.core-backgrounds textarea{width:100%;box-sizing:border-box;margin-top:4px}.core-published{border-left-color:#1d7a45;background:#e7f5ec}
.magic-overlay{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;box-sizing:border-box;display:grid;padding:16px;overflow:auto;background:radial-gradient(circle at 50% 40%,rgba(48,38,120,.92),rgba(6,10,28,.96));color:#f4f2ff;animation:magic-in .35s ease-out}
/* The overlay scrolls, not the card: a scrolling card would clip the orb's glow into a straight line at its top edge. */
.magic-card{width:min(520px,100%);box-sizing:border-box;margin:auto;padding-top:56px;text-align:center;overflow:visible}
.magic-card h2{font-size:1.6rem;margin:12px 0 10px;outline:none;color:#fff}
.magic-orb{width:84px;height:84px;margin:0 auto;border-radius:50%;background:conic-gradient(from 0deg,#8cb7de,#dfb06b,#e58fb5,#9a8cf0,#8cb7de);filter:blur(1px);box-shadow:0 0 40px 8px rgba(154,140,240,.55);animation:magic-spin 3.2s linear infinite,magic-pulse 2.4s ease-in-out infinite}
.magic-text{min-height:3.2em;margin:0 0 14px;font-family:Georgia,'Times New Roman',serif;font-size:1.1rem;line-height:1.5;letter-spacing:.01em;color:#e9e4ff;overflow-wrap:anywhere}
.magic-steps{list-style:none;padding:0;margin:0 auto 10px;display:inline-flex;flex-direction:column;gap:6px;text-align:left}
.magic-steps li{padding-left:28px;position:relative;opacity:.6}.magic-steps li::before{content:'';position:absolute;left:4px;top:.3em;width:12px;height:12px;border-radius:50%;border:2px solid currentColor;box-sizing:border-box}
.magic-steps li[data-state=run]{opacity:1;font-weight:600}.magic-steps li[data-state=run]::before{border-color:#dfb06b transparent #dfb06b transparent;animation:magic-spin 1s linear infinite}
.magic-steps li[data-state=done]{opacity:1}.magic-steps li[data-state=done]::before{content:'✓';border:0;top:0;left:3px;width:auto;height:auto;color:#8fe0a8;font-weight:700}
.magic-steps li[data-state=fail]{opacity:1;color:#ffb4b4}.magic-steps li[data-state=fail]::before{content:'!';border:0;top:0;left:7px;width:auto;height:auto;font-weight:700}
.magic-status{min-height:1.4em;margin:6px 0 12px;color:#d8d3f5}.magic-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.magic-actions button{min-height:44px;min-width:140px}
.magic-overlay:not([open]){display:none}.magic-overlay::backdrop{background:rgba(6,10,28,.6)}
@keyframes magic-spin{to{transform:rotate(360deg)}}@keyframes magic-pulse{50%{box-shadow:0 0 64px 16px rgba(223,176,107,.5)}}@keyframes magic-in{from{opacity:0}}
@media(prefers-reduced-motion:reduce){.magic-overlay,.magic-orb,.magic-steps li[data-state=run]::before{animation:none}}
/* Core flow: scenes are the system's paging of the text, never shown in the guided view. Review shows only the speech and text lanes. */
.guided-workspace .av-compact-scene-picker,.guided-workspace .av-scene-count,.guided-workspace label:has(#preview-scene){display:none!important}
.core-flow #show-timeline .show-timeline-row[data-track]:not([data-track=voice]):not([data-track=text]){display:none}
/* Core flow: several picked stories — list checkboxes, the shared magic dialog and the "Tarina 1/5" marker. */
.batch-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin:0 0 10px;padding:8px 12px;border:1px solid #c8ccd6;border-radius:12px;background:#fff}
.batch-bar .batch-all{display:flex;align-items:center;gap:8px;min-height:44px;margin:0;font-weight:600}.batch-bar button{min-height:44px;margin:0}
.batch-bar input,.batch-check input{width:22px;height:22px;margin:0;flex:none}
.batch-pick{display:flex;align-items:stretch;gap:4px;min-width:0}.batch-pick>a{flex:1;min-width:0}
.batch-check{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:0;cursor:pointer}
.batch-dialog{width:min(860px,calc(100vw - 32px));box-sizing:border-box;border:0;border-radius:16px;padding:20px;max-height:92dvh;overflow:auto;color:#172033;background:#f6f7fb}
.batch-dialog::backdrop{background:rgba(5,15,30,.6)}
.batch-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.batch-head h2{margin:0;font-size:1.4rem}.batch-head .eyebrow{margin:0 0 2px}
.batch-status:empty{display:none}.batch-status{font-weight:600}
.batch-rows{display:grid;gap:10px;margin:12px 0}
.batch-row{border:1px solid #c8ccd6;border-radius:12px;padding:12px 14px;background:#fff;min-width:0}
.batch-row-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;overflow-wrap:anywhere}.batch-row-head strong{font-size:1.05rem}
.batch-row .core-price{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.batch-fields{display:grid;gap:8px;margin-top:8px}.batch-fields[hidden]{display:none}
.batch-fields textarea{width:100%;box-sizing:border-box}.batch-speech{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0}.batch-speech select{min-height:44px}
.batch-colours{margin:0}.batch-fields>*{margin:0}.batch-colours summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-height:44px;cursor:pointer}.batch-colours .guided-swatches{margin:0}
.batch-foot{display:grid;gap:8px}.batch-foot>.secondary{min-height:44px}
.core-queue{margin:0 0 2px;font-size:.85rem;font-weight:700;letter-spacing:.02em;color:#1947d8}
.magic-counter{margin:0 0 6px;font-size:.9rem;font-weight:700;letter-spacing:.04em;opacity:.85}

.core-flow .guided-note.guided-error{border-left:4px solid #b42318;background:#fef3f2;color:#7a271a;padding:10px 12px;border-radius:6px}
/* Proposal list: trash button next to "Avaa ehdotus" and its confirmation dialog. */
.admin-version-actions{display:flex;align-items:center;gap:6px;flex:none}
button.icon-only{min-width:40px;min-height:40px;padding:8px;display:inline-flex;align-items:center;justify-content:center}
button.danger-icon:hover,button.danger-icon:focus-visible{color:#b42318;background:#fef3f2}
.confirm-dialog{max-width:min(440px,calc(100vw - 32px));border:0;border-radius:12px;padding:22px 22px 18px;box-shadow:0 18px 50px rgba(15,23,42,.3);color:#1d2433;background:#fff}
.confirm-dialog::backdrop{background:rgba(15,23,42,.45)}
.confirm-dialog h2{margin:0 0 10px;font-size:1.15rem}
.confirm-dialog p{margin:0 0 12px;line-height:1.45}
.confirm-dialog .confirm-error{color:#b42318}
.confirm-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:16px}
.ai-locked-note{border-left:4px solid #1947d8;background:#eef3ff;padding:8px 12px;border-radius:6px;color:#1d2433}
.owner-workspace-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.owner-ai-state{font-weight:600;margin:.25rem 0 0}
/* Workspace-password sign-in under the shared Digitili card: same width as the card. */
.account-legacy{max-width:420px;margin:0 auto 24px;box-sizing:border-box}
[data-account-message]:empty{display:none}
/* Owner overview: everything that stops paid AI runs, each with its fix. */
.owner-blockers{border-left:5px solid #b42318}
.owner-blockers.owner-blockers-ok{border-left-color:#067647}
.owner-blockers>h2{margin-top:0}
.owner-blocker{border-top:1px solid #e4e7ec;padding:12px 0 4px}
.owner-blocker h3{margin:0 0 6px;font-size:1.05rem}
.owner-blocker p{margin:0 0 10px;line-height:1.45;max-width:72ch}
.owner-blocker-form{display:grid;gap:8px;max-width:520px}
.owner-blocker-form label{display:grid;gap:4px}
.owner-blocker-form .owner-check{display:flex;gap:8px;align-items:flex-start}
.owner-blocker-form .owner-check input{width:auto;margin-top:3px}
.owner-blocker-form button{justify-self:start}
/* Story ending on the live display: the last background comes forward behind the title and the storyteller,
   with how to continue, a phone-remote QR and a countdown back to the start view. */
.story-stage.story-ending{position:relative;min-height:100vh;min-height:100dvh;overflow:hidden;color:#f8fafc}
.story-ending .v6-story-image{animation:ending-image 12s ease-out forwards}
@keyframes ending-image{0%{opacity:var(--v6-image-opacity,.85);filter:brightness(.78);transform:scale(1.04)}35%{opacity:var(--v6-image-opacity,.85);filter:blur(0) brightness(.9);transform:scale(1.06)}100%{opacity:var(--v6-image-opacity,.85);filter:blur(0) brightness(.9);transform:scale(1.1)}}
.story-ending .story-dim{background:rgba(2,8,18,.25)}
.story-ending::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(to top,rgba(3,8,16,.88) 0%,rgba(3,8,16,.45) 38%,rgba(3,8,16,.12) 62%,rgba(3,8,16,.4) 100%)}
.story-stage.story-ending .story-content{position:absolute;inset:10% 11% 42% 11%;width:auto;height:auto;max-width:none;z-index:2;padding:0;background:transparent;color:#f8fafc;text-shadow:0 2px 24px rgba(0,0,0,.55)}
.story-ending .story-card-by{opacity:.92}
.story-ending-panel{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;justify-content:space-between;align-items:flex-end;gap:clamp(16px,3vw,48px);padding:clamp(16px,4vh,48px) clamp(16px,5vw,72px);box-sizing:border-box;font-family:'Schibsted Grotesk',Arial,sans-serif}
.ending-main{display:grid;gap:clamp(10px,1.6vh,18px);min-width:0}
.ending-hint{margin:0;font-size:clamp(18px,2.3vw,34px);font-weight:600;line-height:1.3;text-shadow:0 2px 16px rgba(0,0,0,.6)}
.ending-hint:empty,.ending-actions:empty,.ending-status:empty{display:none}
.ending-actions{display:flex;flex-wrap:wrap;gap:12px}
.story-ending .ending-button{display:inline-flex;align-items:center;gap:.6em;min-height:56px;padding:.55em 1.3em;border-radius:999px;border:2px solid rgba(255,255,255,.6);background:rgba(255,255,255,.14);color:#fff;font:inherit;font-size:clamp(16px,1.7vw,26px);font-weight:600;cursor:pointer;backdrop-filter:blur(6px)}
.story-ending .ending-button:hover{background:rgba(255,255,255,.26)}
.story-ending .ending-button:focus-visible,.story-ending .ending-button:focus{outline:4px solid #fbbf24;outline-offset:4px;background:#fff;color:#0b1220;border-color:#fff}
.story-ending .ending-button:disabled{opacity:.6;cursor:default}
.ending-status{margin:0;font-size:clamp(14px,1.3vw,20px)}
.ending-countdown{margin:0;display:flex;align-items:center;gap:12px;font-size:clamp(14px,1.3vw,20px);opacity:.9}
.ending-bar{display:block;width:clamp(120px,16vw,240px);height:4px;border-radius:2px;background:rgba(255,255,255,.28);overflow:hidden}
.ending-bar>span{display:block;height:100%;background:#fff;transition:width 1s linear}
.ending-qr-box{margin:0;flex:none;width:clamp(140px,15vw,236px);padding:12px;border-radius:14px;background:#fff;color:#0b1220;text-align:center;box-sizing:border-box}
.ending-qr-box[hidden]{display:none}
.ending-qr-box .qr{display:block}.ending-qr-box img,.ending-qr-box canvas{display:block;width:100%!important;height:auto!important}
.ending-qr-box figcaption{margin-top:8px;font-size:clamp(12px,1vw,16px);font-weight:600;line-height:1.3}
@media (max-width:700px){.story-ending-panel{flex-direction:column;align-items:stretch}.ending-qr-box{align-self:center}.story-stage.story-ending .story-content{inset:8% 6% 55% 6%}}
@media (prefers-reduced-motion:reduce){.story-ending .v6-story-image{animation:none;opacity:var(--v6-image-opacity,.85)!important;filter:none;transform:none}.ending-bar>span{transition:none}}
.display .story-stage.story-ending{position:fixed;inset:0;width:auto;height:auto;aspect-ratio:auto;min-height:0;margin:0;max-width:none;border-radius:0;z-index:10}
/* Narrator voice choice with a sample preview. */
.core-voice-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 10px}
.core-voice-row .core-voice{margin:0}
.voice-preview-wrap{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px}
.voice-preview{min-height:44px}
.voice-preview-status:empty{display:none}
.voice-sample-list{list-style:none;padding:0;margin:8px 0 12px;display:grid;gap:4px}
.voice-sample-list li{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #e4e7ec;padding:4px 0}
/* Local contrast belongs to the light sculpture. Image motion uses the shared playback clock. */
.v6-stage[data-has-image] :is(.v6-edges,.v6-layout-art){mix-blend-mode:normal}
.v6-stage[data-has-image] .v6-story-image{animation:none;transform:none}
.v6-stage[data-has-image][data-motion=static] .v6-story-image{animation:none}
@media (prefers-reduced-motion:reduce){.v6-stage[data-has-image] .v6-story-image{animation:none}}
.story-stage.story-ending[data-has-image] .v6-story-image{animation:ending-image 12s ease-out forwards;animation-delay:0s}
@media (prefers-reduced-motion:reduce){.story-stage.story-ending[data-has-image] .v6-story-image{animation:none}}
/* Presentations: one clear path per story, a green check beside each finished step. */
.presentation-steps{list-style:none;margin:12px 0;padding:0;display:grid;gap:10px}
.presentation-step{display:grid;grid-template-columns:32px 1fr;gap:10px;align-items:start;padding:10px 12px;border:1px solid #d7dbe3;border-radius:10px;background:#fff}
.presentation-step.is-done{border-color:#a6d8bd;background:#f3fbf6}
.step-number{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#e7e8ed;color:#202338;font-weight:700;font-size:14px}
.presentation-step.is-done .step-number{background:#067647;color:#fff}
.step-body{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;min-width:0}
.step-body button{min-height:44px}
.step-done{display:inline-flex;align-items:center;gap:6px;color:#05603a;font-weight:600}
.step-check{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#067647;color:#fff;font-size:13px;line-height:1}
.presentation-tools{display:flex;flex-wrap:wrap;gap:8px}
.core-import{margin:10px 0}
/* Workspace people: invite by e-mail, pending invites and editors. */
.invite-row{display:flex;flex-wrap:wrap;gap:8px}.invite-row input{flex:1 1 240px;min-width:0}
.invite-link{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.invite-link input{flex:1 1 240px;min-width:0;font-size:14px}
.people-list{list-style:none;padding:0;margin:8px 0 16px;display:grid;gap:6px}
.people-list li{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;border-bottom:1px solid #e4e7ec;padding:6px 0}
.people-list small{color:#5b6475}
.account-invites{border-left:5px solid #1947d8}.account-invite{border-top:1px solid #e4e7ec;padding:10px 0 4px}.account-invite p{margin:0 0 8px}
[data-invite-status]:empty{display:none}
/* Workspace roles. */
.member-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.role-select select{min-height:44px}
.role-fixed{font-weight:600;padding:0 8px}
.role-help{margin:0 0 12px}.role-help ul{margin:8px 0;padding-left:20px}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.viewer-banner{margin:0 0 12px;padding:10px 14px;border-left:5px solid #1947d8;background:#eef3ff;color:#1d2433;border-radius:6px}
.voice-import-list{display:grid;gap:6px;margin:8px 0}.voice-import-list label{display:flex;gap:8px;align-items:center}.voice-import-list button{justify-self:start;margin-top:6px}
.core-tone select{min-height:44px}
/* Guided view: drag line between the preview and the settings. Hidden in the full editor, whose grid has fixed rows. */
.av-splitter{display:none}
.guided-workspace .av-splitter{display:flex;flex:none;align-items:center;justify-content:center;height:18px;margin:-4px 0;cursor:row-resize;touch-action:none;user-select:none;border-radius:6px}
.guided-workspace .av-splitter>span{display:block;width:64px;height:6px;border-radius:3px;background:#8a93a8}
.guided-workspace .av-splitter:hover>span,.guided-workspace .av-splitter[data-dragging]>span{background:#1947d8}
.guided-workspace .av-splitter:focus-visible{outline:3px solid #1947d8;outline-offset:1px}
@media(pointer:coarse){.guided-workspace .av-splitter{height:28px}.guided-workspace .av-splitter>span{width:80px}}
.guided-workspace[data-preview-size] .av-preview{height:min(var(--guided-preview),calc(100dvh - 220px))!important;max-height:none!important}
@media(max-width:767px){.guided-workspace[data-preview-size] .av-preview{grid-template-rows:minmax(0,1fr) auto!important}}
/* Full-screen preview transport: back 5 s, play/pause, stop, forward 5 s, exit. Fades after 3 s without movement. */
.preview-fs-controls{position:absolute;left:50%;bottom:max(20px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:60;display:flex;gap:10px;padding:10px 14px;border-radius:999px;background:rgba(6,14,26,.78);box-shadow:0 4px 24px rgba(0,0,0,.45);transition:opacity .4s}
.preview-fs-controls[data-idle=true]:not(:hover):not(:has(:focus-visible)){opacity:0;pointer-events:none}
.preview-fs-controls button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:56px;min-height:56px;margin:0;padding:0 12px;border-radius:999px;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.12)!important;color:#fff!important;font:700 15px/1 system-ui,sans-serif;cursor:pointer}
.preview-fs-controls button:hover{background:rgba(255,255,255,.26)!important}
.preview-fs-controls button:focus-visible{outline:3px solid #fff;outline-offset:2px}
.preview-fs-controls [data-fs=play]{min-width:68px;background:#1947d8!important;border-color:#1947d8}
.preview-fs-controls svg{width:26px;height:26px;fill:currentColor}
#director-preview:not(:fullscreen) .preview-fs-controls{display:none}
@media(max-width:480px){.preview-fs-controls{gap:6px;padding:8px}.preview-fs-controls button{min-width:48px;min-height:48px;padding:0 8px}}
@media (prefers-reduced-motion:reduce){.preview-fs-controls{transition:none}}
/* Guided review: picture look controls. */
.core-look{display:grid;gap:4px}.core-look label{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 10px;margin:6px 0!important}
.core-look input[type=range]{grid-column:1/-1;width:100%;min-height:32px}.core-look output{font-variant-numeric:tabular-nums;font-weight:600}
.core-visibility{padding:14px;border:1px solid #c8ccd6;border-radius:10px;margin:12px 0}.core-visibility h4,.core-visibility p{margin:0 0 8px}.core-visibility input[type=range]{min-height:44px;accent-color:#1947d8}
#director-preview:focus{outline:none}
/* Esitykset: step 1 (story text review) opens inside the story card. */
.story-text-review{border:1px solid #c8ccd6;border-left:5px solid #1947d8;border-radius:12px;padding:12px 16px;margin:12px 0;background:#fff}
.story-text-review>h4{margin:0 0 6px;font-size:1.1rem}.story-text-review[hidden]{display:none}
/* Scene change: soft crossfade with a slight zoom instead of a hard cut between colour worlds (live-stories-presentation.js). */
[data-scene-transition]{overflow:clip}
.story-stage[data-leaving]{position:absolute!important;z-index:4;margin:0!important;pointer-events:none;transform-origin:50% 50%;animation:scene-leave 2.2s cubic-bezier(.4,0,.2,1) forwards}
.story-stage[data-leaving] .story-content{animation:scene-text-leave .7s ease forwards}
.story-stage[data-entering]{transform-origin:50% 50%;animation:scene-enter 2.2s cubic-bezier(.2,0,.2,1)}
@keyframes scene-leave{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.05)}}
@keyframes scene-text-leave{to{opacity:0}}
@keyframes scene-enter{0%{transform:scale(1.05);filter:brightness(.7)}100%{transform:scale(1);filter:brightness(1)}}
@media (prefers-reduced-motion:reduce){.story-stage[data-leaving]{display:none}.story-stage[data-entering]{animation:none}}
.display .story-stage:is([data-leaving],[data-entering]) :is(.story-light,.story-dim){position:absolute;inset:-4vh -5vw}
/* Workspace password = guest: notice after sign-in and the account hint on the sign-in form. */
.guest-notice{max-width:min(560px,calc(100vw - 32px))}.guest-notice h2{margin:0 0 8px}.guest-notice p{margin:0 0 16px;line-height:1.5}.guest-notice .confirm-actions{display:flex;flex-wrap:wrap;gap:8px}.guest-notice button{min-height:44px}
.login-account-hint{margin:12px 0 0;font-size:.95rem}

/* Collection: dictation view (live-stories-spoken-ui.js). One card, a short intro, folded terms, one recorder panel. */
#story #spoken-collect.card{padding:0;margin:12px 0 0;border:0;border-radius:0;box-shadow:none;background:none}
#spoken-collect h2{font-size:1.3rem;line-height:1.25;margin:0 0 6px}
#spoken-collect .spoken-intro{margin:0 0 10px;line-height:1.45}
#spoken-collect .spoken-terms,#spoken-collect .spoken-extra{margin:8px 0;padding:0 12px;border:1px solid #d7dbe3;border-radius:10px;background:#fff}
#spoken-collect .spoken-terms summary,#spoken-collect .spoken-extra summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600;font-size:.95rem}
#spoken-collect .spoken-terms p{margin:0 0 10px;font-size:.9rem;line-height:1.45}
#spoken-collect .spoken-extra label{display:flex;gap:8px;align-items:flex-start;margin:0 0 10px;font-size:.9rem;font-weight:400;line-height:1.4}
#spoken-collect .spoken-consent{display:flex;gap:10px;align-items:flex-start;margin:10px 0;font-size:.95rem;font-weight:600;line-height:1.4}
#spoken-collect .spoken-consent input,#spoken-collect .spoken-extra input{flex:none;width:22px;height:22px;margin:1px 0 0}
#spoken-collect .rec-panel{display:grid;gap:10px;margin:12px 0;padding:14px;border-radius:14px;background:#eef2fc;text-align:center}
#spoken-collect .rec-timer{display:block;font-size:1.5rem;font-weight:700;font-variant-numeric:tabular-nums}
#spoken-collect .rec-controls{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
#spoken-collect .rec-controls button{flex:1 1 0;min-width:0;min-height:48px;margin:0;padding:8px 10px;font-size:1rem}
#spoken-collect #recording-status{margin:0;font-size:.9rem;line-height:1.4}
#spoken-collect .rec-panel audio{display:none}
#spoken-collect .rec-review{display:grid;gap:8px;padding:14px 12px 10px;border:2px solid #244bd7;border-radius:12px;background:#fff}
#spoken-collect .rec-review-title{margin:0;font-weight:700;font-size:1rem}
#spoken-collect .rec-review-controls{display:flex;align-items:center;justify-content:center;gap:14px}
#spoken-collect .rec-review-controls button{margin:0}
#spoken-collect .rec-play{display:grid;place-items:center;width:68px;height:68px;padding:0;border-radius:50%;background:#244bd7;color:#fff;box-shadow:0 2px 8px #244bd755}
#spoken-collect .rec-play:hover{background:#1c3cb0}
#spoken-collect .rec-play svg{width:34px;height:34px;fill:currentColor}
#spoken-collect .rec-play .rec-icon-play{margin-left:4px}
#spoken-collect .rec-play .rec-icon-pause,#spoken-collect .rec-review.is-playing .rec-icon-play{display:none}
#spoken-collect .rec-review.is-playing .rec-icon-pause{display:block}
#spoken-collect .rec-skip{min-width:76px;min-height:48px;padding:8px 12px;font-size:1rem;font-variant-numeric:tabular-nums}
#spoken-collect .rec-seek{width:100%;height:28px;margin:4px 0 0;accent-color:#244bd7;cursor:pointer}
#spoken-collect .rec-review-time{display:flex;justify-content:space-between;font-size:.85rem;font-variant-numeric:tabular-nums;color:#50545e}
#spoken-collect .rec-panel audio:not([src]),#spoken-collect .rec-panel audio:not([src]) ~ .rec-clear{display:none}
#spoken-collect .rec-clear{justify-self:center;min-height:40px;margin:0;font-size:.9rem}
#spoken-collect .rec-file{display:grid;gap:6px;margin:8px 0;font-size:.9rem;font-weight:600}
#spoken-collect .rec-file input{max-width:100%;font-size:.9rem;font-weight:400}
@media (max-width:600px){
 #story.card{padding:14px}
 #spoken-collect .rec-controls [data-rec]:disabled{display:none}
 #story-entry-choice{margin:12px 0;padding:12px;gap:8px}
 #story-entry-choice button{min-width:0;min-height:48px;font-size:1rem}
 #story-entry-choice.story-entry-compact{padding:8px 12px}
 #story-entry-choice.story-entry-compact legend{font-size:.95rem}
 #story-entry-choice.story-entry-compact button{min-height:40px;padding:6px 12px;font-size:.9rem}
 #story-finish label{font-size:.95rem}
 #recording-send{width:100%;min-height:48px}
}

/* Account workspace home and workspace-bound support. */
.account-workspaces-card{max-width:960px;margin:24px auto}.account-workspaces-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.account-workspaces-heading h1,.account-workspaces-heading h2{margin:0;min-width:0;overflow-wrap:anywhere}.account-workspaces-heading button{flex:none;min-height:44px}#account-add-workspace{font-size:28px;line-height:1;width:46px;height:46px}.account-workspace{border-top:1px solid #c8ccd6;padding-top:18px;margin-top:18px}.ls-free-notice{padding:16px;border:1px solid #bdcedd;border-radius:10px;background:#eef5fa;color:#172b42;margin:14px 0}.ls-free-notice p{margin:6px 0 12px;line-height:1.6}.ls-contact-dialog{width:min(620px,calc(100vw - 24px));max-height:90dvh;overflow:auto;border:1px solid #bdcedd;border-radius:14px;padding:24px;background:#fff;color:#172033}.ls-contact-dialog::backdrop{background:#07152888}.ls-contact-dialog label{display:grid;gap:6px;margin:14px 0}.ls-contact-dialog input,.ls-contact-dialog select,.ls-contact-dialog textarea{box-sizing:border-box;width:100%;min-width:0;font:inherit;padding:10px;border:1px solid #8a99ac;border-radius:7px}.ls-contact-dialog textarea{resize:vertical}.ls-contact-dialog output{display:block;text-align:right;font-size:13px}.ls-contact-body{white-space:pre-wrap;overflow-wrap:anywhere}.owner-navigation{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}.ls-contact-card .admin-actions{margin-top:16px}.ls-contact-card.is-selected,[data-owner-workspace].is-selected{outline:3px solid #1b54c6;outline-offset:3px}.ls-contact-list{display:grid;gap:12px;margin-top:16px}@media(max-width:500px){.account-workspaces-heading{gap:10px}.account-workspaces-heading h2{font-size:1.1rem}.ls-contact-dialog{padding:16px}.ls-contact-card .admin-actions{flex-wrap:wrap}}

/* ===== Public display idle view (live-stories.js idle()): backgrounds, QR ring, hierarchy, settings panel ===== */
#display-idle{position:relative;width:100%;display:grid;justify-items:center}
#display-idle .idle-content{position:relative;z-index:1;display:grid;justify-items:center;gap:clamp(6px,1.2vh,16px);width:min(100%,1100px);text-align:center}
#display-idle .idle-content>*{margin:0}
#display-idle .idle-brand{font-size:clamp(12px,1vw,18px);letter-spacing:.26em;color:#7fe3ff;opacity:.9}
#display-idle #event-name{font-size:clamp(34px,5.4vw,104px);line-height:1.04;letter-spacing:-.02em;text-wrap:balance}
#display-idle #workspace-name{font-size:clamp(16px,1.5vw,30px);color:#cfe3f1}
#display-idle #workspace-name:empty{display:none}
#display-idle #display-qr-fallback{display:grid;justify-items:center;gap:clamp(10px,1.6vh,20px);margin-top:clamp(12px,3vh,40px)}
#display-idle #display-qr-fallback[hidden]{display:none}
#display-idle #display-qr-fallback>p{margin:0}
#display-idle #display-qr-help{font-size:clamp(18px,1.7vw,34px);font-weight:600;color:#f4fbff}
#display-idle .idle-qr-note{font-size:clamp(13px,.95vw,18px);color:#a9c3d6}
#display-idle #display-waiting{display:flex;align-items:center;gap:10px;margin-top:clamp(8px,2vh,28px);font-size:clamp(14px,1.15vw,22px);color:#cfe3f1}
#display-idle .idle-waiting-dot{width:.55em;height:.55em;border-radius:50%;background:#00f2bd;box-shadow:0 0 12px #00f2bd99;animation:idle-wait 3.2s ease-in-out infinite}
#display-idle #display-audio-policy{font-size:clamp(12px,.85vw,16px);color:#8aa4b8}
#display-idle #display-audio-policy:empty{display:none}
#display-idle #fullscreen{min-height:40px;padding:6px 16px;font-size:15px;background:transparent;color:#cfe3f1;border:1px solid #cfe3f155}
#display-idle #fullscreen:hover,#display-idle #fullscreen:focus-visible{background:#ffffff14;color:#fff}
@keyframes idle-wait{0%,100%{opacity:.35}50%{opacity:1}}

/* QR ring: fixed geometry; a soft turquoise highlight travels clockwise inside it (10-16 s per lap). */
#display-idle .qr-frame{position:relative;display:inline-grid;place-items:center;padding:clamp(14px,1.6vw,26px);border-radius:var(--ring-radius-px,24px);background:#08132199;box-shadow:0 0 60px #00b6ed1f}
#display-idle .qr-frame .qr{position:relative;z-index:1;margin:0;padding:clamp(10px,.9vw,16px);border-radius:12px;background:#fff;display:block}
#display-idle .qr-frame .qr img,#display-idle .qr-frame .qr canvas{display:block;width:clamp(240px,30vh,340px);height:auto;max-width:100%}
#display-idle .qr-ring{--ring-width:6;--ring-radius:24;position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
#display-idle .qr-ring rect{fill:none;stroke-width:6px;stroke-linecap:round}
#display-idle .qr-ring-base{stroke:url(#qr-ring-base);opacity:.38}
#display-idle .qr-ring-glow{stroke:#00b6ed;opacity:.55;stroke-dasharray:30 70;animation:qr-ring-glow 13s linear infinite;filter:drop-shadow(0 0 6px #00b6ed88)}
#display-idle .qr-ring-light{stroke:#00f2bd;stroke-dasharray:14 86;animation:qr-ring-light 13s linear infinite;filter:drop-shadow(0 0 5px #00f2bdaa)}
@keyframes qr-ring-light{from{stroke-dashoffset:0}to{stroke-dashoffset:-100}}
@keyframes qr-ring-glow{from{stroke-dashoffset:8}to{stroke-dashoffset:-92}}

/* Backgrounds behind the idle content. Small elements scaled up keep GPU memory low on 4K screens. */
#display-idle .idle-bg{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
#display-idle .idle-glow,#display-idle .idle-dots{position:absolute;inset:0;opacity:0;transition:opacity 1.6s ease}
#display-idle .idle-bg[data-theme=glow] .idle-glow,#display-idle .idle-bg[data-theme=dots] .idle-dots{opacity:1}
#display-idle .idle-bg i{position:absolute;display:block;border-radius:50%;will-change:transform}
#display-idle .idle-glow i{left:var(--x);top:var(--y);width:36vmax;height:36vmax;margin:-18vmax;opacity:var(--o);background:radial-gradient(circle,var(--c) 0,transparent 66%);transform:scale(2.4);animation:idle-glow var(--d) ease-in-out var(--delay) infinite alternate}
@keyframes idle-glow{0%{transform:translate(0,0) scale(2.4)}50%{transform:translate(var(--dx),var(--dy)) scale(2.6)}100%{transform:translate(calc(var(--dx)*-.6),calc(var(--dy)*.5)) scale(2.3)}}
#display-idle .idle-dots i{left:var(--x);top:var(--y);width:var(--s);height:var(--s);margin:calc(var(--s)/-2);opacity:var(--o);background:radial-gradient(circle,var(--c) 0,transparent 68%);animation:idle-drift var(--d) ease-in-out var(--delay) infinite alternate}
#display-idle .idle-dots i::after{content:"";position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle,var(--c2) 0,transparent 68%);opacity:0;animation:idle-hue calc(var(--d)*1.4) ease-in-out var(--delay) infinite alternate}
@keyframes idle-drift{from{transform:translate(0,0)}to{transform:translate(var(--dx),var(--dy))}}
@keyframes idle-hue{to{opacity:1}}
#display-idle .idle-bg:not([data-theme=glow]) .idle-glow i,#display-idle .idle-bg:not([data-theme=dots]) .idle-dots i,#display-idle .idle-bg:not([data-theme=dots]) .idle-dots i::after,
body.idle-paused #display-idle *,body.idle-paused #display-idle *::after{animation-play-state:paused!important}
@media (max-width:700px){#display-idle .idle-dots i:nth-child(n+9){display:none}}

/* Display settings (bottom left): collapsed control or the full panel; always fully on screen. */
.display-settings{position:fixed;z-index:25;left:max(16px,env(safe-area-inset-left));bottom:max(16px,env(safe-area-inset-bottom));max-width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;color:#f4fbff}
.display-settings [hidden]{display:none!important}
.display-settings-toggle{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin:0;padding:8px 16px;border-radius:999px;border:1px solid #7fe3ff55;background:#081321d9;color:#e8f4fb;font-size:15px;font-weight:600;cursor:pointer;box-shadow:0 4px 18px #0006}
.display-settings-toggle:hover{background:#10243a}
.display-settings-gear{font-size:1.15em;line-height:1}
.display-settings-chevron{font-size:1.2em;line-height:1;opacity:.8}
.display-settings[data-attention=true] .display-settings-toggle::after{content:"";width:9px;height:9px;border-radius:50%;background:#00f2bd;box-shadow:0 0 8px #00f2bd}
.display-settings-body{padding:12px 14px 14px;border-radius:14px;border:1px solid #7fe3ff33;background:#10243af2;box-shadow:0 8px 30px #0007;animation:display-settings-in .22s ease-out}
.display-settings-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;font-size:16px}
.display-settings-collapse{display:inline-grid;place-items:center;min-width:40px;min-height:40px;margin:0;padding:0;border-radius:10px;border:1px solid #7fe3ff44;background:transparent;color:#e8f4fb;font-size:22px;line-height:1;cursor:pointer}
.display-settings-collapse:hover{background:#ffffff14}
.display-settings :focus-visible{outline:3px solid #ffd666;outline-offset:2px}
.display-idle-theme{display:grid;gap:6px;margin:0 0 10px;padding:0;border:0}
.display-idle-theme legend{margin:0 0 6px;padding:0;font-size:14px;font-weight:600;color:#cfe3f1}
.display-idle-theme label{display:flex;align-items:flex-start;gap:10px;margin:0;padding:8px 10px;border-radius:10px;border:1px solid #ffffff1f;cursor:pointer;font-size:15px}
.display-idle-theme label:has(input:checked){border-color:#00f2bd;background:#00f2bd14}
.display-idle-theme input{width:18px;height:18px;margin:2px 0 0;flex:none;accent-color:#00f2bd}
.display-idle-theme span{display:grid;gap:2px}.display-idle-theme small{font-size:13px;color:#a9c3d6}
.display-settings .display-audio-controls{position:static;max-width:none;margin:0;padding:10px 0 0;border-top:1px solid #ffffff1f;border-radius:0;background:none}
.display-settings .display-audio-controls button{margin:4px 6px 0 0}
.display-settings .display-sound-controls{position:static;max-width:none;max-height:none;overflow:visible;margin-top:10px}
.display-settings .display-music-controls{position:static;max-width:none;margin:0;padding:10px 0;border-top:1px solid #ffffff1f;border-radius:0;background:none;font-size:14px}
.display-settings .display-accessibility{position:static;margin:10px 0 0;font-size:15px;min-height:44px}
@keyframes display-settings-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:700px){.display-settings-toggle .display-settings-label{display:none}.display-settings-toggle{padding:8px 12px}}

@media (prefers-reduced-motion:reduce){
 #display-idle .idle-bg i,#display-idle .idle-bg i::after,#display-idle .qr-ring rect,#display-idle .idle-waiting-dot{animation:none!important}
 #display-idle .idle-glow,#display-idle .idle-dots{transition:none}
 #display-idle .qr-ring-light{stroke-dashoffset:0}
 .display-settings-body{animation:none}
}
#display-idle.display-idle-play .qr-frame .qr img,#display-idle.display-idle-play .qr-frame .qr canvas{width:clamp(180px,22vh,220px)}
/* Core flow, one question at a time: the preview belongs to the review step only. */
.guided-workspace[data-guided-step]:not([data-guided-step="1"]) :is(.av-preview,.av-splitter){display:none!important}
.core-flow .core-question-count{margin:0;color:#3a4256;font-size:.9rem}
.core-flow h4.core-question{margin:2px 0 12px;font-size:1.35rem;line-height:1.3}
.core-choices{display:grid;gap:10px;margin:0 0 12px}
.core-choice{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;min-height:64px;padding:12px 16px;border-radius:12px;border:2px solid #c8ccd6!important;background:#fff!important;color:#172033!important}
.core-choice strong{font-size:1.05rem}
.core-choice small{color:#3a4256;font-size:.9rem;line-height:1.35}
.core-choice:hover{border-color:#1947d8!important}
.core-choice[aria-checked=true]{border-color:#1947d8!important;background:#eef2fc!important;box-shadow:inset 0 0 0 1px #1947d8}
.core-choice[aria-checked=true] strong::before{content:"✓ ";color:#1947d8}
.core-choice-extra:not(:empty){border-left:3px solid #c9d5f7;padding:4px 0 4px 12px;margin:0 0 12px}
.core-choice-extra textarea{width:100%;box-sizing:border-box}
.core-next{margin:12px 0}
.core-next button{min-height:52px;min-width:min(100%,220px);font-size:1.05rem}
.core-next .core-magic{align-items:center;justify-content:center;gap:2px;width:auto;min-width:min(100%,260px);padding:10px 28px;text-align:center;background:#1947d8!important;color:#fff!important}
.core-next .core-magic .core-price{font-size:.9rem;opacity:.9}
.core-answers{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:6px}
.core-answers li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border-radius:8px;background:#eef1f6;min-width:0}
.core-answers li>span{min-width:0;overflow-wrap:anywhere}
.core-answers button{min-height:44px;flex:none}
.core-align .core-realign{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:52px}
@media(max-width:600px){.core-flow h4.core-question{font-size:1.2rem}.core-next button{width:100%}}
.core-flow .guided-footer{position:static;margin-top:8px}
.core-flow .core-next>button{background:#1947d8!important;color:#fff!important;border:0}

/* Separate fades leave the completed scene readable before revealing the ending. */
.display .story-stage.ending-fade-out { animation: story-ending-out 2s linear forwards; }
.display .story-stage.ending-fade-in { animation: story-ending-in 2s linear both; }
@keyframes story-ending-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes story-ending-in { from { opacity: 0; } to { opacity: 1; } }
.remote-mode .remote-scan-new { min-height:52px;width:100%;max-width:340px;padding:12px 20px;border:1px solid #78e4db;border-radius:14px;background:#234b56;color:#f3f7ff;font-size:17px;font-weight:600; }
.remote-qr-dialog { box-sizing:border-box;width:min(94vw,460px);max-height:92dvh;overflow:auto;padding:24px;border:1px solid #78e4db;border-radius:20px;background:#10232f;color:#f3f7ff; }
.remote-qr-dialog::backdrop { background:#000b; }
.remote-qr-dialog h2 { font-size:24px;margin:0 0 16px; }
.remote-qr-dialog video { display:block;width:100%;aspect-ratio:3/4;max-height:50dvh;object-fit:cover;border-radius:12px;background:#050c12; }
.remote-mode .remote-qr-dialog p { margin:16px 0;font-size:15px; }
.remote-qr-dialog button { min-height:48px;width:100%; }
.remote-scan-new:focus-visible,.remote-qr-dialog button:focus-visible { outline:3px solid #9cece2;outline-offset:4px; }
.admin-mode #app .session-action-disclosure { margin: 16px 0; }
.admin-mode #app .session-action-disclosure > summary { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; box-sizing: border-box; min-height: 48px; padding: 12px 18px; border: 1px solid #1947d8; border-radius: 10px; background: #1947d8; color: #fff; font-weight: 700; line-height: 1.4; cursor: pointer; list-style: none; }
.admin-mode #app .session-action-disclosure > summary::-webkit-details-marker { display: none; }
.admin-mode #app .session-action-disclosure > summary::before { content: '+'; font-size: 23px; line-height: 1; }
.admin-mode #app .session-settings > summary { background: #eef2ff; color: #163caf; border-color: #8da5ec; }
.admin-mode #app .session-settings > summary::before { content: '⚙'; font-size: 20px; }
.admin-mode #app .session-action-disclosure > summary::after { content: '⌄'; margin-left: 12px; }
.admin-mode #app .session-action-disclosure[open] > summary::after { content: '⌃'; }
.admin-mode #app .session-action-disclosure > summary:hover { background: #1236aa; color: #fff; }
.admin-mode #app .session-action-disclosure > summary:focus-visible { outline: 3px solid #00866d; outline-offset: 4px; }
.admin-mode #app .session-settings[open] > form { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) {
  .display .story-stage.ending-fade-out, .display .story-stage.ending-fade-in { animation: none; }
}
