.illustration-controls {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 30;
  width: min(300px, calc(100vw - 32px));
  padding: 16px 18px;
  border: 1px solid #dedee8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 24px #00000012;
  color: #18181b;
  font-family: 'SB Sans Interface', sans-serif;
  font-size: 14px;
  line-height: 20px;
  user-select: none;
}
.illustration-controls__heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-weight: 600;
}
.illustration-controls__summary { display: none; }
.illustration-controls output {
  color: var(--koroche-ink, #0033ff);
  font-variant-numeric: tabular-nums;
}
.illustration-controls__heading--next {
  margin-top: 12px;
}
.illustration-controls input {
  display: block;
  width: 100%;
  height: 36px;
  margin: 2px 0;
  accent-color: var(--koroche-ink, #0033ff);
  cursor: pointer;
  touch-action: none;
}
.illustration-controls input:focus-visible {
  outline: 2px solid var(--koroche-ink, #0033ff);
  outline-offset: 2px;
  border-radius: 4px;
}
.illustration-controls__hint {
  color: #71717a;
  font-size: 12px;
}
.illustration-controls__trial {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
}
.illustration-controls__trial input { width: 16px; height: 16px; margin: 0; }
.objection-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
[data-artboard].has-hero-brush > svg,
[data-artboard].has-hero-brush > .sequence__poster { visibility: hidden; }

@media (max-width: 899px) {
  .illustration-controls {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(calc(100% - 2 * var(--mobile-gutter)), 620px);
    margin: 0 auto max(24px, env(safe-area-inset-bottom));
    padding: 0;
    border-radius: 14px;
    box-shadow: none;
  }
  .illustration-controls__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
  }
  .illustration-controls__summary::-webkit-details-marker { display: none; }
  .illustration-controls__summary:focus-visible { outline: 2px solid var(--koroche-ink); outline-offset: 3px; border-radius: 14px; }
  .illustration-controls__disclosure[open] > summary svg { rotate: 180deg; }
  .illustration-controls__body {
    width: 100%;
    padding: 4px 16px 16px;
    overflow-y: auto;
  }
  .illustration-controls input[type='range'] { height: 44px; }
  .illustration-controls__trial { min-height: 44px; margin-top: 4px; }
  .illustration-controls__trial input { flex: none; width: 20px; height: 20px; }
}

/* Phase-zero captures of the approved 115% / 4.75 px / 0 px preset.
   Keep the original poster URL as the renderer's SVG alignment reference.
   CSS replaces only the visible image while the live frames are prepared. */
.art--objection > .sequence__poster { content: url('../assets/posters/objection-desktop.png'); }
.art--feed > .sequence__poster { content: url('../assets/posters/feed-desktop.png'); }
.wizard-wiggle > .sequence__poster { content: url('../assets/posters/wizard-desktop.png'); }
.art--voices > .sequence__poster { content: url('../assets/posters/voices-desktop.png'); }
@media (max-width: 600px) {
  .art--objection > .sequence__poster { content: url('../assets/posters/objection-mobile.png'); }
  .art--feed > .sequence__poster { content: url('../assets/posters/feed-mobile.png'); }
  .wizard-wiggle > .sequence__poster { content: url('../assets/posters/wizard-mobile.png'); }
  .art--voices > .sequence__poster { content: url('../assets/posters/voices-mobile.png'); }
}

/* Source geometry is independent from the actual poster in the HTML image. */
svg[data-ink-poster]:not([data-motion-frame]) {
  background-image: var(--ink-poster);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
svg[data-ink-poster]:not([data-motion-frame]) > * { visibility: hidden; }
img[data-ink-source] { object-fit: contain; }

/* Responsive captures share the same source identity as the live SVG. */
[data-ink-source="assets/art/hero-doodles/style-arrow-green.svg"] { --ink-poster: url("../assets/posters/arrow-green-desktop.png"); }
[data-ink-source="assets/art/hero-doodles/style-arrow-pink.svg"] { --ink-poster: url("../assets/posters/arrow-pink-desktop.png"); }
[data-ink-source="assets/art/hero-doodles/portrait.svg"] { --ink-poster: url("../assets/posters/portrait-desktop.png"); }
[data-ink-source="assets/art/hero-doodles/rifle.svg"] { --ink-poster: url("../assets/posters/rifle-desktop.png"); }
[data-ink-source="assets/art/hero-doodles/heart.svg"] { --ink-poster: url("../assets/posters/heart-desktop.png"); }
[data-ink-source="assets/icons/globe.svg"] { --ink-poster: url("../assets/posters/globe-desktop.png"); }
[data-ink-source="assets/art/bubble-dot-lg.svg"] { --ink-poster: url("../assets/posters/bubble-lg-desktop.png"); }
[data-ink-source="assets/art/bubble-dot-sm.svg"] { --ink-poster: url("../assets/posters/bubble-sm-desktop.png"); }
[data-ink-source="assets/icons/question-1.svg"] { --ink-poster: url("../assets/posters/question-desktop.png"); }
[data-ink-source="assets/icons/pencil.svg"] { --ink-poster: url("../assets/posters/pencil-desktop.png"); }
[data-ink-source="assets/brand/disrupt-footer.svg"] { --ink-poster: url("../assets/posters/disrupt-desktop.png"); }
img[data-ink-source] { content: var(--ink-poster); }
@media (max-width: 899px) {
  [data-ink-source="assets/art/hero-doodles/style-arrow-green.svg"] { --ink-poster: url("../assets/posters/arrow-green-mobile.png"); }
  [data-ink-source="assets/art/hero-doodles/style-arrow-pink.svg"] { --ink-poster: url("../assets/posters/arrow-pink-mobile.png"); }
  [data-ink-source="assets/art/hero-doodles/portrait.svg"] { --ink-poster: url("../assets/posters/portrait-mobile.png"); }
  [data-ink-source="assets/art/hero-doodles/rifle.svg"] { --ink-poster: url("../assets/posters/rifle-mobile.png"); }
  [data-ink-source="assets/art/hero-doodles/heart.svg"] { --ink-poster: url("../assets/posters/heart-mobile.png"); }
  [data-ink-source="assets/icons/globe.svg"] { --ink-poster: url("../assets/posters/globe-mobile.png"); }
  [data-ink-source="assets/art/bubble-dot-lg.svg"] { --ink-poster: url("../assets/posters/bubble-lg-mobile.png"); }
  [data-ink-source="assets/art/bubble-dot-sm.svg"] { --ink-poster: url("../assets/posters/bubble-sm-mobile.png"); }
  [data-ink-source="assets/icons/question-1.svg"] { --ink-poster: url("../assets/posters/question-mobile.png"); }
  [data-ink-source="assets/icons/pencil.svg"] { --ink-poster: url("../assets/posters/pencil-mobile.png"); }
  [data-ink-source="assets/brand/disrupt-footer.svg"] { --ink-poster: url("../assets/posters/disrupt-mobile.png"); }
}
