/* Editor: start from a real story, then edit the shot list below. */
.studio .workbench,.studio .workbench:has(#studio-launch[hidden]){
  grid-template-columns:minmax(0,1.35fr) minmax(240px,.86fr);
  grid-template-areas:"setup setup" "board preview" "stage preview";
}
.studio .workbench .setup{padding:clamp(19px,3.35vw,32px);border-color:#e4eadc}
.story-start-head .front-label,#studio-board .front-label{color:#526436;margin:0 0 6px}
.story-start-head h2{font:800 clamp(1.65rem,4vw,2.7rem)/1.02 Manrope,Inter,sans-serif;letter-spacing:-.055em;margin:0 0 8px}
.story-start-head p:not(.front-label){margin:0;color:#505e49}
.story-ready-title,.studio label.story-own-title{font:760 1rem/1.25 Manrope,Inter,sans-serif;color:#263421;margin:20px 0 8px}
.story-starters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 20px}
.studio .story-starter{display:grid;grid-template-columns:68px minmax(0,1fr);align-items:center;gap:12px;min-height:90px;text-align:left;padding:9px;border:1px solid #dfe7d8;border-radius:14px;background:#f5f8f1;color:#22311f}
.studio .story-starter[hidden]{display:none}
.story-starter img{width:68px;height:68px;object-fit:cover;border-radius:9px;background:#e8ede1}
.story-starter span{display:grid;gap:4px;overflow-wrap:anywhere;min-width:0}
.story-starter strong{font-size:.96rem;line-height:1.23}
.story-starter small{color:#53634b;font-size:.875rem;line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.studio .story-starter:hover,.studio .story-starter[aria-pressed=true]{background:#edf5e1;border-color:#839e58}
.studio #topic{width:100%;min-height:clamp(140px,19vh,190px);max-height:420px;box-sizing:border-box;font-size:1rem;padding:13px 14px}
.studio #story-settings{margin:20px 0 14px}
.studio #build-board{margin-top:4px}
.studio #story-input-hint,.studio #story-board-note{margin:7px 0 10px}
.studio #scenes .shot{position:relative;min-width:0}
.studio #scenes .shot label textarea{width:100%}
.studio #story-add-shot{margin:10px 0 0}
.studio button.shot-remove{padding:4px 7px;min-height:34px;font-size:.76rem;font-weight:650;background:transparent;color:#5d6257;border-color:transparent}
.studio button.shot-remove:hover{border-color:#d3ddd0}
.studio-format-settings{display:grid;gap:16px;padding-top:16px;border-top:1px solid #e4ebdd}
.studio-format-settings h3{font-size:1rem;line-height:1.25;margin:0 0 9px}
.studio-chooser-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:9px}
.studio-chooser-heading h3{margin:0}
.studio-chooser-heading button{font-size:.875rem;color:#425b30}
.studio-style-cards,.studio-caption-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.studio .studio-style-card,.studio .studio-caption-card{min-width:0;display:grid;text-align:left;padding:0;background:#fff;border:1px solid #dfe7d8;border-radius:12px;color:#273823;overflow:hidden}
.studio .studio-style-card[hidden]{display:none}
.studio-style-card img{width:100%;aspect-ratio:2/1;object-fit:cover;object-position:center 42%;background:#e3e8dc}
.studio-style-card strong,.studio-caption-card strong{font-size:.875rem;padding:8px 10px;line-height:1.3}
.studio .studio-style-card[aria-pressed=true],.studio .studio-caption-card[aria-pressed=true],.studio .studio-duration-pill[aria-pressed=true]{border-color:#89a553;background:#edf6dc;box-shadow:inset 0 0 0 1px #89a553}
.studio .studio-format-language{display:grid;gap:8px;margin:0;font-weight:720}
.studio-format-language select{width:100%;min-height:44px}
.studio-duration-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.studio .studio-duration-pill{min-height:44px;padding:7px 12px;background:white;color:#273823;border:1px solid #dfe7d8;border-radius:9px;font-size:.875rem}
.studio-caption-sample{position:relative;display:block;aspect-ratio:2/1;background:#1c2b21 center 45%/cover;overflow:hidden}
.studio-caption-sample .caption-look{top:auto;bottom:10%;left:5%;right:5%;font-size:clamp(.7rem,1.65vw,.9rem)}
.studio-animation-group{display:grid;gap:10px}
.studio .quality-picks-row span{padding:9px 5px;gap:3px;text-align:center}
.quality-picks-row small{font-size:.875rem;font-weight:500;color:#53634b}
.quality-note{margin:8px 0 0}
@media(max-width:720px){
  .studio-style-cards,.studio-caption-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .studio .workbench,.studio .workbench:has(#studio-launch[hidden]){grid-template-columns:minmax(0,1fr);grid-template-areas:"setup" "board" "preview" "stage"}
  .story-starters{grid-template-columns:minmax(0,1fr)}
}

.story-concept {
  display: grid;
  gap: 10px;
  background: #f4f7ef;
  border: 1px solid #dfe7d7;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}
.story-concept h3, .story-concept p { margin: 0; }
.story-concept-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.story-concept label { display: grid; gap: 5px; font-weight: 700; min-width: 0; }
.story-concept textarea { width: 100%; font-weight: 400; }
.story-concept-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.story-concept-actions button { min-height: 44px; }
.shot-location { margin: 8px 0 0; }
.preview-screen.concept-preview { aspect-ratio: 9 / 16; min-height: 0; }
.preview-screen.story-frame { aspect-ratio: 9 / 16; min-height: 0; }

#story-reference-image { display: block; width: 100%; height: auto; border-radius: .55rem; margin: .55rem 0; }
#story-script-choice:not([hidden]) { display: flex; align-items: center; gap: .5rem; }
.preview-screen.concept-preview img {
  width: 300%;
  max-width: none;
  left: calc(var(--concept-frame) * -100%);
  object-fit: fill;
}
.preview-screen.concept-preview .preview-copy strong { display: none; }
@media (max-width: 520px) { .story-concept-fields { grid-template-columns: 1fr; } }

.preview-screen.text-preview {
  min-height: 150px;
  aspect-ratio: auto;
  background: #eff4e8;
  color: #22301d;
}
.preview-screen.text-preview .preview-copy {
  position: static;
  padding: 20px;
  background: none;
  color: inherit;
}
.preview-screen.text-preview #preview-kicker { color: #3e5434; }
.preview-screen.text-preview #caption-look { display: none; }
#preview-screen.story-frame #caption-look,#preview-screen.concept-preview #caption-look{top:auto;bottom:17%;font-size:clamp(.8rem,2vw,1.25rem)}
#preview-screen #caption-look[hidden]{display:none}

.story-feedback {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #edf4e2;
  color: #314823;
}
.story-feedback p{margin:0}
.story-feedback p+p{margin-top:4px}
.story-feedback button{margin-top:8px}
.story-feedback.is-error{background:#f8eedb;color:#524223}
.fruit-cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
  gap: .65rem;
}
.fruit-cast-grid button {
  padding:0;text-align:left;cursor:pointer;border:2px solid transparent;font:inherit;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: .75rem;
  background: #f7eee3;
}
.fruit-cast-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 360 / 342;
  object-fit: contain;
}
.fruit-cast-grid button[aria-pressed="true"] {border-color:#365417;box-shadow:0 0 0 2px #adcf75}
.studio .story-starter.text-only {grid-template-columns:minmax(0,1fr)}
.fruit-cast-grid button span {
  display:block;
  padding: .45rem .65rem;
  color: #282318;
  font-size: .875rem;
}
.stick-look-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5rem, 8rem);
  align-items: start;
  gap: .75rem;
  margin: .8rem 0;
}
.stick-look-choice[hidden] { display: none; }
.stick-look-choice img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .65rem;
}
.story-starter[hidden] { display: none; }
#concept-edit-status {
  padding: .65rem .8rem;
  border-radius: .55rem;
  background: #f8eedb;
  color: #524223;
}

.studio .story-concept-actions :is(#concept-approve,#concept-art,#concept-references):enabled {
  background: #d9fa63;
  border-color: #a6c545;
  color: #1c2810;
}
.studio .story-concept-actions #concept-next:enabled {
  background: #e8f5cb;
  border-color: #9abb68;
  color: #243811;
}
.studio .story-concept-actions button:enabled:hover { filter: brightness(.96) }
.studio .story-concept-actions button:focus-visible { outline: 3px solid #42652c; outline-offset: 3px }

.project-film-grid,.projects .project-drafts {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(200px,100%),1fr));gap:16px;margin:12px 0 28px}
.project-film-grid article {align-self:start;background:white;border:1px solid #dce3d3;border-radius:16px;overflow:hidden;max-width:370px}
.project-film-grid video {display:block;background:#152015;width:100%;aspect-ratio:9/16;object-fit:contain}
.project-film-grid article div {padding:12px;display:grid;gap:8px}.project-film-grid h3{font-size:1rem;margin:0;overflow-wrap:anywhere}
.project-film-grid small{color:#526348}.project-film-grid a{justify-self:start}
.projects .project-drafts button {display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:10px;min-width:0;text-align:left}
.projects .project-drafts img{flex:auto;width:100%;height:100px;object-fit:cover}
@media(max-width:700px){.front-top:has(#go-projects){flex-wrap:wrap}.front-top .studio-nav:has(#go-projects){order:3;flex-basis:100%;justify-content:center;gap:12px}}

.studio #build-board {display:block;margin:12px 0 24px;min-height:48px}
.studio .workbench,.studio .workbench:has(#studio-launch[hidden]){display:flex;flex-direction:column;max-width:900px;margin-inline:auto}
.studio[data-stage="plan"]:not(.edit-idea) #studio-setup,.studio[data-stage="video"]:not(.edit-idea) #studio-setup,
.studio[data-stage="video"]:not(.review-plan) #studio-board,.studio[data-stage="video"]:not(.review-plan) #studio-preview,
.studio[data-stage="plan"] #fruity-export{display:none}
.studio #studio-step-links:not([hidden]) {display:flex;flex-wrap:wrap;gap:16px;margin:10px 0 18px}
.plan-scene-summary{padding-inline-start:1.5em}.plan-scene-summary li{padding:4px 0}
.studio :is(#plan-edits,#scene-edits,#fruity-export-fields details)>summary{cursor:pointer;font-weight:650;padding:10px 0}
.studio #story-feedback:not([hidden]) {margin:12px auto;max-width:900px}
.export-frames{display:flex;gap:10px;margin-block:14px;overflow-x:auto}.export-frames img{width:clamp(64px,18%,128px);aspect-ratio:9/16;object-fit:cover;border-radius:10px}

.export-frames{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr));align-items:start;overflow:visible}
.export-frames figure{margin:0;min-width:0}.export-frames figure img{width:100%;height:auto;display:block}.export-frames figcaption{font-size:.93rem;line-height:1.35;margin:7px 0 14px}
#review-edits,#fruity-export-fields details{margin:12px 0}#review-edits summary{cursor:pointer;font-weight:700;padding:10px 0}#review-edits textarea{display:block;width:100%;margin:8px 0}
#fruity-export.has-ready-movie{display:flex;flex-direction:column}#fruity-export.has-ready-movie #fruity-export-file{order:-1}
#fruity-export-file video{display:block;width:min(100%,440px);max-height:60vh;background:#171b14}
.studio[data-stage="plan"] #story-reference-preview img{display:block;width:min(100%,520px);max-height:45vh;object-fit:contain;margin-inline:auto}
@media(max-width:700px){.studio .quality-picks-row{grid-template-columns:1fr}.export-frames{grid-template-columns:1fr}.export-frames figure{display:grid;grid-template-columns:5.5rem 1fr;gap:12px;align-items:center}.studio[data-stage="plan"] #studio-preview{order:-1}}

#studio > :is(.row,h1,#studio-plan,.workbench,#studio-step-links,#story-feedback){box-sizing:border-box;width:min(100%,52rem);max-width:52rem;margin-inline:auto}
#studio .workbench>.panel{width:100%;max-width:none;box-sizing:border-box;align-self:stretch}
#studio #studio-step-links:not([hidden]){margin:10px auto}
#studio[data-stage=video] #studio-plan{display:none}
#studio #edit-studio-idea{background:transparent;border:0;padding:.4rem 0;color:#435632;text-decoration:underline;text-underline-offset:4px}
#studio .guided-choice{min-inline-size:0;border:0;padding:0;margin:18px 0}
#studio .guided-choice legend{font-weight:740;margin-bottom:8px}
#studio .choice-strip{display:flex;flex-wrap:wrap;gap:7px}
#studio .choice-strip button{background:#fff;color:#263322;border:1px solid #cdd5c7;padding:9px 14px;border-radius:12px;min-height:44px}
#studio .choice-strip button[aria-pressed=true]{background:#203b28;border-color:#203b28;color:#fff}
#studio #pace-estimate{display:block;margin-top:8px}
#studio #story-feedback:not([hidden]){display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.6rem 1rem;padding:16px 20px;border-radius:14px;background:#203b28;color:#fff;scroll-margin:18px}
#studio #story-feedback.is-error{background:#fff0dc;color:#442c13}
#studio #story-progress{font-weight:720}
#studio #story-eta{font-size:clamp(1.05rem,2vw,1.4rem);font-weight:750;font-variant-numeric:tabular-nums}
#studio #story-eta{margin:0;color:#d9fa8c}
#studio #story-feedback.is-running{position:sticky;top:8px;z-index:5}
/* The review uses the same pair of portrait cards as the home slideshow. */
.look-references{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--showcase-gap);width:min(100%,var(--showcase-inner));margin:16px auto}
.look-references figure{min-width:0;margin:0}
.reference-crop{width:100%;aspect-ratio:9/16;border-radius:clamp(12px,1.6vw,22px);display:grid;align-items:center;overflow:hidden;background:#f3f6ef}
.reference-crop canvas{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
.reference-sheet{display:block;grid-column:1/-1;width:100%;height:auto;border-radius:12px}
.look-references figcaption{min-width:0;padding:8px 2px;overflow-wrap:anywhere}.look-references small{display:block;color:#526149}
#scene-outline summary{cursor:pointer;font-weight:700;padding-block:8px}
@media(max-width:580px){.look-references{width:min(calc(100% + 22px),var(--showcase-inner));position:relative;left:50%;transform:translateX(-50%)}}

#studio.preparing-story :is(.workbench,#studio-step-links,#studio-plan){display:none}

#editor > section[aria-labelledby=studio-style-label]{margin-block:20px}
#editor > #build-board{margin-block:8px 0}
#fruity-export :is(#scene-outline,#review-edits,#audio-choice,.review-video-options){margin:20px 0 0}
#fruity-export #scene-outline ol{padding-inline-start:1.5rem}
#fruity-export #scene-outline li+li{margin-top:.5rem}
#fruity-export .review-video-options{display:grid;gap:14px}
#fruity-export #fruity-export-progress{margin-block-start:22px}

#projects-title[tabindex="-1"]:focus{outline:none}
