.copy-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.copy-steps button{display:flex;gap:12px;align-items:center;border-radius:14px;background:#fff;padding:17px;border:0;font-weight:600}.copy-steps button span{color:#92929b;font-weight:400}.copy-steps button.active{background:#e8f2ff;color:#0672ee}.copy-layout{display:grid;grid-template-columns:minmax(260px,.7fr) minmax(0,1.3fr);gap:24px;align-items:start}.copy-field{display:block;margin:20px 0;font-size:14px;font-weight:500}.copy-field textarea,.copy-field input{display:block;width:100%;margin-top:9px;font-weight:400}.copy-script{width:100%;min-height:320px;line-height:1.9;padding:20px}.copy-topic-list{display:grid;gap:8px}.copy-topic{display:flex;align-items:center;gap:16px;text-align:left;border:1px solid transparent;background:#f5f5f7;border-radius:14px;padding:15px;width:100%}.copy-topic:hover,.copy-topic.selected{background:#edf5ff;border-color:#a8cfff}.copy-topic>span:nth-child(2){flex:1}.copy-topic small{display:block;color:#83838a;font-size:12px;margin-top:5px}.copy-topic strong{font-size:14px;font-weight:500}.copy-topic-number{color:#95959f;font-size:13px}.copy-empty{min-height:260px;display:grid;place-items:center;color:#85858e;text-align:center}.copy-context{display:flex;align-items:center;gap:14px;margin:24px 0;flex-wrap:wrap}.copy-context .ghost{margin-left:auto}.copy-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px;flex-wrap:wrap}.copy-duration{display:flex;gap:8px}.copy-shots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.copy-shot{background:#f6f6f8;border-radius:18px;padding:20px}.copy-shot-heading{display:flex;justify-content:space-between;align-items:center}.copy-shot-heading span{font-size:12px;color:#73737d}.copy-inline{display:flex;gap:12px;align-items:center}.copy-inline input{min-width:0;flex:1}.copy-tags{display:grid;gap:12px}.sidebar>.copy-demo-nav{margin-bottom:24px}.copy-topic:focus-visible{outline:2px solid #0672ee;outline-offset:2px}@media(max-width:760px){.copy-layout,.copy-shots{grid-template-columns:1fr}.copy-steps{grid-template-columns:repeat(2,1fr);gap:8px}.copy-steps button{padding:13px;font-size:12px}.copy-context{font-size:13px}.sidebar>.copy-demo-nav{margin:0}.copy-script{min-height:380px}.copy-actions>button{flex:1}}

.copy-shot-time{width:110px;padding:8px;font-size:12px;text-align:right}@media(max-width:767px){.sidebar:has(.copy-demo-nav){flex-direction:row;align-items:center}.sidebar>.copy-demo-nav{flex:1}.sidebar:has(.copy-demo-nav)>.nav:not(.copy-demo-nav){flex:3}.sidebar:has(.copy-demo-nav) .nav button{padding:8px 4px;white-space:nowrap}}
.copy-steps{grid-template-columns:repeat(3,minmax(0,1fr))}.copy-directions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:24px 0}.copy-directions button.selected{background:#e8f2ff;border-color:#0672ee;color:#0672ee}.copy-results{display:grid;gap:24px}.copy-metadata{border-bottom:1px solid #eee;padding-bottom:18px;margin-bottom:20px}.copy-metadata .copy-tags{display:flex;flex-wrap:wrap;gap:8px}.copy-tags input{min-width:0;width:150px;max-width:100%}.copy-shots{margin-top:20px}.copy-results .paneltitle{flex-wrap:wrap;gap:16px}.copy-results h2{font-size:20px}.copy-results .copy-script{min-height:220px}@media(max-width:760px){.copy-steps button{flex-direction:column;gap:4px;padding:12px 4px}.copy-steps{grid-template-columns:repeat(3,minmax(0,1fr))}.copy-tags input{width:calc(50% - 4px)}}
.copy-profile,.copy-saved{margin:24px 0}.copy-profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 20px}.copy-refine{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:20px}.copy-profile .copy-field{margin:12px 0}.copy-profile input{min-width:0}@media(max-width:760px){.copy-profile-grid{grid-template-columns:1fr}.copy-refine .note{width:100%}}
.copy-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.copy-storyboard{margin-top:28px;border-top:1px solid #e8e8ed;padding-top:24px}.copy-table-scroll{overflow-x:auto;margin-top:16px}.copy-shot-table{width:100%;min-width:700px;border-collapse:collapse;table-layout:fixed}.copy-shot-table th,.copy-shot-table td{border:1px solid #e2e2e7;padding:12px;vertical-align:top;text-align:left}.copy-shot-table thead th{background:#f5f5f7;font-weight:600}.copy-shot-table th:nth-child(1){width:12%}.copy-shot-table th:nth-child(2){width:23%}.copy-shot-table th:nth-child(3){width:42%}.copy-shot-table th:nth-child(4){width:23%}.copy-shot-table textarea{width:100%;min-height:100px;resize:vertical;border:0;background:transparent;font:inherit;line-height:1.7;padding:4px}.copy-shot-table input{width:100%;min-width:0;font-size:12px;margin-top:8px;padding:4px;border:0;background:transparent;color:#777}.copy-shot-table textarea:focus,.copy-shot-table input:focus{outline:2px solid #0672ee;background:white;border-radius:4px}@media(max-width:760px){.copy-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.copy-shot-table th,.copy-shot-table td{padding:8px}}
.copy-topic-check{flex:0 0 32px;width:32px;height:32px;padding:0;border:0;background:transparent;color:#85858e}.copy-topic.selected .copy-topic-check{color:#0672ee}.copy-topic-title{flex:1;min-width:0;width:100%;border:1px solid transparent;background:transparent;font:inherit;padding:8px;border-radius:6px}.copy-topic-title:hover{border-color:#d4d4dd}.copy-topic-title:focus{background:#fff;border-color:#0672ee;outline:none}.copy-topic:has(.copy-topic-title){gap:8px;padding:10px}
.copy-topic-select{display:flex;align-items:center;gap:16px;flex:1;min-width:0;text-align:left;border:0;background:transparent;padding:4px;white-space:normal;line-height:1.6}.copy-topic-select>span:last-child{flex:1}.copy-topic-edit{flex:none}.copy-topic.selected .copy-topic-number{color:#0672ee}.copy-profile .paneltitle>div{min-width:0;flex:1}.copy-profile .paneltitle>.button,.copy-profile .paneltitle>button{flex:none}.copy-profile .note{line-height:1.8;overflow-wrap:anywhere}
.copy-three-columns{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1fr) minmax(0,1.5fr);gap:20px;margin-top:24px}.copy-result-column{min-width:0;display:flex;flex-direction:column;gap:16px}.copy-result-column>h3{margin:0}.copy-publish-box{background:#f5f5f7;border:1px solid #e8e8ed;border-radius:14px;padding:16px}.copy-publish-box .copy-field{margin:0 0 16px}.copy-publish-box .copy-field:last-child{margin-bottom:0}.copy-publish-box textarea{width:100%;resize:vertical;border:1px solid #dedee5;border-radius:8px;padding:10px;line-height:1.6;font:inherit}.copy-result-column .copy-script{min-height:380px;border:1px solid #dedee5;border-radius:12px;font:inherit;line-height:1.8;padding:16px}.copy-result-column .copy-storyboard{padding:0;border:0;margin:0}.copy-result-column .copy-shot-table{min-width:520px}.copy-result-column .copy-table-scroll{max-height:560px;overflow:auto}.copy-result-column>button{align-self:flex-start}.copy-result-column .copy-refine{margin:0;gap:6px}.copy-result-column .copy-refine button{padding:8px 10px}.copy-result-column .copy-storyboard h3{margin:0}@media(max-width:1000px){.copy-three-columns{grid-template-columns:1fr}.copy-result-column{padding-bottom:24px;border-bottom:1px solid #eee}.copy-result-column .copy-script{min-height:260px}}
.sidebar>.copy-account-heading{margin-top:24px}@media(max-width:767px){.sidebar:has(.copy-demo-nav)>.nav:not(.copy-demo-nav){flex:2}.sidebar:has(.copy-demo-nav)>.copy-account-nav{flex:1}}
/* Copy workspace polish: reuse the production design tokens. */
.main[data-page="copy"]{--copy-line:#E8E8ED;--copy-field:#FAFAFC}
.main[data-page="copy"] .heading{align-items:center;margin-bottom:24px}
.main[data-page="copy"] .service-notice{background:var(--color-primary-soft);color:var(--color-muted);border-radius:var(--radius-control);padding:14px 18px;line-height:1.7;font-size:13px}
.main[data-page="copy"] .panel{padding:28px;border-radius:var(--radius-card)}
.main[data-page="copy"] h2{font-size:21px;line-height:1.4;margin:0}
.main[data-page="copy"] h3{font-size:15px;line-height:1.5;font-weight:600}
.main[data-page="copy"] .paneltitle{gap:20px;align-items:center}
.main[data-page="copy"] .copy-field{font-size:13px;color:var(--color-muted);font-weight:500;line-height:1.5}
.main[data-page="copy"] input:not([type="checkbox"]),.main[data-page="copy"] textarea{font-family:var(--font-ui);font-size:14px;color:var(--color-text);border:1px solid var(--copy-line);border-radius:var(--radius-control);background:var(--copy-field);padding:12px 14px;line-height:1.65;transition:border-color var(--motion-fast),box-shadow var(--motion-fast)}
.main[data-page="copy"] input:not([type="checkbox"]){min-height:44px}
.main[data-page="copy"] textarea{resize:vertical}
.main[data-page="copy"] input:focus,.main[data-page="copy"] textarea:focus{outline:0;border-color:var(--color-primary);box-shadow:0 0 0 3px var(--color-primary-soft);background:white}
.main[data-page="copy"] button:focus-visible{outline:2px solid var(--color-primary);outline-offset:3px}
.copy-steps{gap:12px;margin:24px 0}.copy-steps button{min-height:56px;border-radius:var(--radius-control);padding:16px 20px;font-size:14px;background:white;color:var(--color-muted)}
.copy-steps button.active{color:var(--color-primary);background:var(--color-primary-soft)}.copy-steps button.active span{color:var(--color-primary)}
.copy-profile-grid{gap:8px 24px;margin-top:20px}.copy-profile .copy-actions{margin-top:20px;padding-top:20px;border-top:1px solid var(--copy-line)}
.copy-profile .note{max-width:900px;margin:8px 0 0;font-size:13px}.copy-profile .paneltitle{margin-bottom:0}
.copy-layout{grid-template-columns:minmax(280px,.72fr) minmax(0,1.28fr);gap:24px}
.copy-layout .muted{font-size:13px;margin:10px 0 0}.copy-directions{gap:10px;margin:20px 0 28px}.copy-directions button{min-height:44px;font-size:14px;padding:10px 12px;border-color:var(--copy-line)}
.copy-directions button.selected{border-color:#A7CCF6;color:var(--color-primary);background:var(--color-primary-soft)}
.copy-layout>section:first-child>button.primary{width:100%;margin-top:4px;min-height:46px}.copy-layout .note{font-size:12px;line-height:1.7;margin-bottom:0}
.copy-topic-list{gap:10px;margin-top:20px}.copy-topic{border:1px solid transparent;border-radius:var(--radius-control);padding:10px 12px;min-height:60px;background:var(--color-surface);gap:10px}.copy-topic:hover{background:#F0F2F5;border-color:var(--copy-line)}.copy-topic.selected{border-color:#B6D7FC;background:var(--color-primary-soft)}
.copy-topic-select{font-size:14px;min-height:38px;line-height:1.6;gap:12px}.copy-topic-number{font-size:12px;min-width:20px;text-align:center}.copy-topic-edit{font-size:12px;color:var(--color-muted);padding:8px 10px}.copy-topic-edit:hover{color:var(--color-primary);background:white}
.copy-empty{min-height:340px;font-size:14px;border:1px dashed var(--copy-line);border-radius:var(--radius-control);margin-top:20px;padding:24px}
.copy-context{margin:24px 0;font-size:14px}.copy-context button{font-size:13px}.copy-results>.panel>.paneltitle{padding-bottom:22px;border-bottom:1px solid var(--copy-line)}
.copy-three-columns{grid-template-columns:minmax(0,.85fr) minmax(0,1.1fr) minmax(0,1.65fr);gap:24px}.copy-result-column h3{min-height:32px;display:flex;align-items:center}.copy-result-column{gap:14px}.copy-publish-box{padding:16px;background:var(--color-surface);border:0;border-radius:16px}
.main[data-page="copy"] .copy-publish-box textarea{background:white}.copy-result-column .copy-script{min-height:400px;margin:0}.copy-result-column .copy-refine button{font-size:12px;border-color:var(--copy-line)}
.copy-result-column .copy-storyboard .paneltitle{gap:8px;margin:0;min-height:32px}.copy-result-column .copy-storyboard .paneltitle button{font-size:12px;padding:6px 12px;min-height:32px}.copy-result-column .copy-table-scroll{margin-top:14px;border:1px solid var(--copy-line);border-radius:12px;max-height:530px}.copy-result-column .copy-shot-table{min-width:0;border-style:hidden;font-size:12px}.copy-shot-table thead{position:sticky;top:0;z-index:1}.copy-shot-table th:nth-child(1){width:14%}.copy-shot-table th:nth-child(2){width:24%}.copy-shot-table th:nth-child(3){width:38%}.copy-shot-table th:nth-child(4){width:24%}.copy-shot-table th,.copy-shot-table td{padding:8px;border-color:var(--copy-line);overflow-wrap:anywhere}
.main[data-page="copy"] .copy-shot-table textarea{border:0;background:transparent;padding:2px;font-size:12px;line-height:1.7;border-radius:4px;min-height:125px}.main[data-page="copy"] .copy-shot-table input{border:0;background:transparent;font-size:10px;padding:0;min-height:26px;margin-top:4px;border-radius:4px}.copy-result-column>button{font-size:13px}.copy-results>.panel>.copy-actions{border-top:1px solid var(--copy-line);padding-top:22px;margin-top:28px}.copy-result-column .copy-storyboard h3{min-height:32px}.copy-profile .paneltitle>div{flex:1}
@media(max-width:1100px){.copy-three-columns{grid-template-columns:1fr}.copy-result-column{border-bottom:1px solid var(--copy-line);padding-bottom:24px}.copy-result-column:last-child{border-bottom:0}.copy-result-column .copy-script{min-height:260px}.copy-result-column .copy-shot-table{min-width:540px}}
@media(max-width:760px){.main[data-page="copy"] .panel{padding:20px}.main[data-page="copy"] .heading{gap:12px}.main[data-page="copy"] h2{font-size:19px}.copy-layout{grid-template-columns:1fr}.copy-profile-grid{grid-template-columns:1fr;gap:4px}.copy-steps button{flex-direction:row;padding:12px;font-size:13px}.copy-empty{min-height:200px}.copy-topic{flex-wrap:wrap}.copy-topic-select{min-width:180px}.copy-three-columns{gap:20px}.copy-context{gap:10px}.main[data-page="copy"] .copy-topic-title{flex-basis:65%}}
.main[data-page="copy"] .copy-shot-table input{display:block}.copy-shot-table tbody th{font-weight:500;line-height:1.7}
.main[data-page="copy"] .copy-profile input::placeholder{color:#92929B;opacity:1;font-weight:400}
.copy-context .copy-back{display:inline-flex;align-items:center;gap:8px;background:transparent;border:0;border-radius:8px;box-shadow:none;color:var(--color-muted);padding:10px 8px}.copy-context .copy-back .ui-icon{transform:rotate(180deg);width:16px;height:16px}.copy-context .copy-back:hover{color:var(--color-primary);background:var(--color-primary-soft)}
/* Soft card elevation, matching the supplied Apple Store reference. */
.main[data-page="copy"]{--copy-card-shadow:0 2px 5px rgba(29,29,31,.025),0 8px 20px rgba(29,29,31,.045)}
.main[data-page="copy"] .panel{box-shadow:var(--copy-card-shadow)}
.copy-three-columns{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}.copy-inline-meta{border-bottom:1px solid var(--copy-line);padding-bottom:16px}.copy-inline-meta .copy-field{margin:0 0 12px}.copy-inline-meta .copy-field:last-child{margin:0}.copy-table-titles{display:grid;grid-template-columns:1fr 1fr;gap:12px}.copy-table-meta label{display:block;font-size:12px;color:var(--color-muted)}.main[data-page="copy"] .copy-table-meta textarea{display:block;min-height:44px;width:100%;margin-top:4px;background:white;font-size:13px}.copy-shot-table thead:has(.copy-table-meta){position:static}.copy-table-meta td{background:var(--color-surface)}@media(max-width:1100px){.copy-three-columns{grid-template-columns:1fr}}
.copy-unified-editor{background:var(--copy-field);border:1px solid var(--copy-line);border-radius:var(--radius-control);padding:18px;overflow:hidden}.copy-unified-editor:focus-within{border-color:var(--color-primary);box-shadow:0 0 0 3px var(--color-primary-soft)}.copy-unified-editor .copy-inline-meta{border:0;padding:0}.main[data-page="copy"] .copy-unified-editor textarea{border:0;border-radius:0;background:transparent;box-shadow:none;padding:4px 0;min-height:0;resize:vertical}.main[data-page="copy"] .copy-unified-editor textarea:focus{background:transparent;box-shadow:none;border:0}.main[data-page="copy"] .copy-unified-editor .copy-script{min-height:300px;width:100%;margin-top:20px;line-height:1.9}.copy-unified-editor .copy-field{margin-bottom:14px}
.copy-history-list{display:grid;gap:20px}.copy-history-item{display:flex;align-items:center;justify-content:space-between;gap:24px;box-shadow:0 8px 20px #1d1d1f0b}.copy-history-item h2{font-size:18px;margin:0}.copy-history-item .note{margin:8px 0 0}.copy-history-actions{display:flex;gap:10px;flex-shrink:0}.copy-history-snapshot{white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.8 var(--font-ui);max-height:55vh;overflow:auto;background:var(--color-surface);padding:16px;border-radius:12px}@media(max-width:767px){.copy-history-item{align-items:flex-start;flex-direction:column}.copy-history-actions{width:100%;flex-wrap:wrap}.sidebar:has(.copy-demo-nav)>.nav:not(.copy-demo-nav){flex:1}.sidebar:has(.copy-demo-nav)>.copy-account-nav{flex:2}}
/* A single, subtle writing gesture on the icon; the label stays still. */
.copy-demo-nav button .ui-icon{transform-origin:50% 75%}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .copy-demo-nav button:hover .ui-icon{animation:copy-icon-write 560ms ease-in-out 1}
}
@media (prefers-reduced-motion:no-preference){
  .copy-demo-nav button:focus-visible .ui-icon{animation:copy-icon-write 560ms ease-in-out 1}
}
@keyframes copy-icon-write{
  0%,100%{transform:translate(0,0) rotate(0)}
  25%{transform:translate(1px,-1px) rotate(-10deg)}
  50%{transform:translate(-1px,0) rotate(7deg)}
  75%{transform:translate(1px,-.5px) rotate(-4deg)}
}
/* Apply the same restrained gesture to the image and account navigation. */
.sidebar:has(.copy-demo-nav) > .nav:not(.copy-demo-nav) button .ui-icon{transform-origin:50% 75%}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .sidebar:has(.copy-demo-nav) > .nav:not(.copy-demo-nav) button:hover .ui-icon{animation:copy-icon-write 560ms ease-in-out 1}
}
@media (prefers-reduced-motion:no-preference){
  .sidebar:has(.copy-demo-nav) > .nav:not(.copy-demo-nav) button:focus-visible .ui-icon{animation:copy-icon-write 560ms ease-in-out 1}
}

/* Semantic SVG motion: animate the working parts, not the entire symbol. */
.demo-motion-icon{width:18px;height:18px;flex-shrink:0;overflow:visible;vertical-align:middle}
@media(prefers-reduced-motion:no-preference){
.sidebar .nav button:is(:hover,:focus-visible) .ink{animation:demo-ink 1s ease both}
.sidebar .nav button:is(:hover,:focus-visible) .pen{animation:demo-pen 1s ease both}
.sidebar .nav button:is(:hover,:focus-visible) .clock-hand{transform-origin:12px 12px;animation:demo-clock 1s cubic-bezier(.3,0,.2,1) both}
.sidebar .nav button:is(:hover,:focus-visible) .gown{transform-origin:12px 11px;animation:demo-gown 1s ease both}
.sidebar .nav button:is(:hover,:focus-visible) .coin{animation:demo-coin 1s ease both}
.sidebar .nav button:is(:hover,:focus-visible) .wallet-flap{transform-origin:19px 14px;animation:demo-flap 1s ease both}
}
@keyframes demo-ink{0%{stroke-dasharray:1;stroke-dashoffset:1}75%,100%{stroke-dasharray:1;stroke-dashoffset:0}}
@keyframes demo-pen{0%{transform:translate(-9px,0)}20%{transform:translate(-7px,-2px)}40%{transform:translate(-5px,1px)}60%{transform:translate(-3px,-2px)}80%{transform:translate(0,0)}100%{transform:translate(0,0)}}
@keyframes demo-clock{from{transform:rotate(0)}to{transform:rotate(360deg)}}
@keyframes demo-gown{0%,100%{transform:scaleX(1)}35%{transform:scaleX(.45) skewY(-5deg)}70%{transform:scaleX(1.05) skewY(2deg)}}
@keyframes demo-coin{0%{opacity:0;transform:translateY(-5px)}20%{opacity:1;transform:translateY(-2px)}65%{opacity:1;transform:translateY(8px)}75%{opacity:0;transform:translateY(9px)}80%{opacity:0;transform:translateY(0)}100%{opacity:1;transform:translateY(0)}}
@keyframes demo-flap{0%,100%{transform:scaleX(1)}45%,70%{transform:scaleX(.65)}}
/* Keep SVG and masked navigation icons on the same text alignment grid. */
.sidebar:has(.copy-demo-nav) > .nav button{display:flex;align-items:center;gap:12px}
.sidebar:has(.copy-demo-nav) > .nav button > :is(.demo-motion-icon,.ui-icon){width:18px;height:18px;flex:0 0 18px;margin:0}
@media(max-width:767px){
  .sidebar:has(.copy-demo-nav) > .nav button{justify-content:center;gap:6px}
  .sidebar:has(.copy-demo-nav) > .nav button > :is(.demo-motion-icon,.ui-icon){width:16px;height:16px;flex-basis:16px}
}
.copy-history-item{padding:24px;gap:24px;position:relative}.copy-history-open{flex:1;min-width:0;display:block;text-align:left;border:0;background:transparent;padding:0;border-radius:8px;box-shadow:none;color:inherit}.copy-history-open:hover{background:transparent;color:var(--color-primary)}.copy-history-excerpt{font-size:14px;line-height:1.7;color:var(--color-muted);margin:10px 0 14px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal}.copy-history-meta{display:flex;flex-wrap:wrap;align-items:center;gap:12px;font-size:12px;color:var(--color-muted)}.copy-history-tag{padding:4px 8px;border-radius:6px;background:var(--color-surface)}.copy-history-actions{align-items:center}.copy-history-more{position:relative}.copy-history-more summary{list-style:none;cursor:pointer;font-size:24px;width:40px;height:40px;display:grid;place-items:center;border-radius:50%}.copy-history-more summary::-webkit-details-marker{display:none}.copy-history-more summary:hover{background:var(--color-surface)}.copy-history-more>div{position:absolute;right:0;top:44px;z-index:5;background:white;border:1px solid #e8e8ed;border-radius:12px;padding:6px;box-shadow:0 8px 24px #00000016;white-space:nowrap}.copy-history-more button{border:0;background:white}.copy-history-open:focus-visible,.copy-history-more summary:focus-visible{outline:2px solid var(--color-primary);outline-offset:5px}
#modal:has(.copy-history-detail){width:min(1100px,calc(100vw - 32px));max-width:1100px}.copy-snapshot-columns{display:grid;grid-template-columns:1fr 1.4fr;gap:24px;max-height:65vh;overflow:auto}.copy-snapshot-columns section{min-width:0}.copy-snapshot-columns h3{font-size:15px}.copy-snapshot-box,.copy-snapshot-meta{background:#f5f5f7;border-radius:12px;padding:16px}.copy-snapshot-box .copy-snapshot-meta{padding:0}.copy-snapshot-meta p{margin:0 0 12px;overflow-wrap:anywhere;font-size:14px}.copy-snapshot-meta small{display:block;color:var(--color-muted);margin-bottom:5px}.copy-snapshot-script{white-space:pre-wrap;line-height:1.9;font-size:14px;overflow-wrap:anywhere}.copy-snapshot-table{overflow:auto;margin-top:12px}.copy-snapshot-table table{width:100%;border-collapse:collapse;font-size:13px;min-width:440px}.copy-snapshot-table td,.copy-snapshot-table th{border:1px solid #e8e8ed;padding:10px;text-align:left;vertical-align:top;white-space:pre-wrap}.copy-snapshot-table th{background:#f5f5f7}
@media(max-width:767px){.copy-history-item{gap:16px;padding:20px}.copy-history-open{width:100%}.copy-history-actions{justify-content:flex-end}.copy-snapshot-columns{grid-template-columns:1fr}.copy-history-meta{gap:8px}}
.copy-topic-duration{margin:12px 0}.copy-topic-duration button{flex:1}
/* Result workspace: generous card spacing, quiet surfaces and readable editors. */
.main[data-page="copy"] .copy-results{display:grid;gap:32px}
.main[data-page="copy"] .copy-results>.panel{padding:36px;border-radius:28px;background:#fff;box-shadow:0 3px 8px #1d1d1f03,0 12px 32px #1d1d1f08;margin:0}
.copy-results>.panel>.paneltitle{padding-bottom:24px;margin-bottom:28px;border-bottom:1px solid #eeeef1;align-items:flex-start}
.main[data-page="copy"] .copy-results>.panel>.paneltitle h2{font-size:25px;letter-spacing:-.5px;line-height:1.4;max-width:85%}
.copy-results>.panel>.paneltitle .tag{padding:7px 12px;border-radius:20px;white-space:nowrap;background:#f5f5f7;color:#6e6e73;font-size:12px}
.copy-results .copy-three-columns{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:28px;align-items:start}
.main[data-page="copy"] .copy-result-column h3{font-size:17px;letter-spacing:-.2px;margin:0 0 18px;min-height:26px}
.copy-results .copy-storyboard{margin:0;padding:0;border:0}
.copy-results .copy-storyboard>.paneltitle{margin:0 0 18px;min-height:26px}
.copy-results .copy-storyboard>.paneltitle h3{margin:0}
.copy-results .copy-unified-editor{padding:24px;background:#fafafc;border-color:#ececf0;border-radius:18px}
.copy-results .copy-unified-editor .copy-field{margin-bottom:20px}
.main[data-page="copy"] .copy-results .copy-unified-editor textarea{font-size:15px;line-height:1.8;resize:vertical}
.main[data-page="copy"] .copy-results .copy-unified-editor .copy-script{min-height:360px;margin-top:8px;padding-top:20px;border-top:1px solid #e8e8ed;line-height:1.95}
.copy-results .copy-refine{gap:8px;flex-wrap:wrap;margin:16px 0}
.copy-results .copy-refine button{background:#f5f5f7;border:0;padding:9px 12px;color:#515154}
.copy-results .copy-table-scroll{max-height:none;overflow-x:auto;overflow-y:visible;border-radius:18px;border:1px solid #ececf0}
.copy-results .copy-shot-table{table-layout:fixed;width:100%;min-width:480px;border:0}
.copy-results .copy-shot-table thead{position:static}
.copy-results .copy-shot-table th,.copy-results .copy-shot-table td{border-color:#eeeef1}
.copy-results .copy-shot-table tbody th{width:14%;background:#fafafc;padding:14px 8px;color:#6e6e73}
.copy-results .copy-shot-table thead th{background:#f5f5f7;font-size:12px;padding:14px 10px;color:#6e6e73}
.main[data-page="copy"] .copy-results .copy-shot-table textarea{font-size:13px;line-height:1.8;padding:12px 10px;min-height:132px;background:#fff;border:0;border-radius:0}
.main[data-page="copy"] .copy-results .copy-table-meta textarea{min-height:54px;border-radius:8px;margin-top:6px;padding:8px 10px;font-size:13px}
.copy-results .copy-table-meta td{padding:14px;background:#fafafc}
.copy-results .copy-result-column>button{margin-top:14px;color:#0066cc;border:0;background:transparent;padding:8px 0;border-radius:6px}
.copy-results>.panel>.copy-actions{margin-top:28px;padding-top:24px;border-top:1px solid #eeeef1;gap:10px;align-items:center}
.copy-results>.panel>.copy-actions button{min-height:44px;padding:11px 20px}
.copy-results>.panel>.copy-actions button:first-child{margin-right:auto}
@media(max-width:1100px){.copy-results .copy-three-columns{grid-template-columns:1fr}.copy-results .copy-result-column{border:0;padding:0}.copy-results .copy-table-scroll{overflow-x:auto}}
@media(max-width:760px){.main[data-page="copy"] .copy-results>.panel{padding:22px 18px;border-radius:22px}.main[data-page="copy"] .copy-results>.panel>.paneltitle h2{font-size:21px}.copy-results .copy-unified-editor{padding:18px}.copy-results>.panel>.copy-actions{justify-content:stretch}.copy-results>.panel>.copy-actions button:first-child{margin-right:0}.copy-results>.panel>.copy-actions button{flex:1;white-space:nowrap}.copy-results .copy-three-columns{gap:28px}}

.copy-results>.panel>.copy-actions{justify-content:flex-end}
.copy-results>.panel>.copy-actions button:first-child{margin-right:0;margin-left:auto;flex:0 0 auto}
/* Clean editing surfaces without manual resize handles. */
.main[data-page="copy"] .copy-results textarea{resize:none}
/* Match the editor selectors' specificity so earlier resize rules cannot win. */
.main[data-page="copy"] .copy-results .copy-unified-editor textarea,
.main[data-page="copy"] .copy-results .copy-shot-table textarea{resize:none}
.main[data-page="copy"] .copy-results .copy-unified-editor{padding:18px 20px}
.main[data-page="copy"] .copy-results .copy-unified-editor .copy-field{margin:0 0 10px}
.main[data-page="copy"] .copy-results .copy-unified-editor .copy-inline-meta textarea{margin-top:4px;padding:2px 0;line-height:1.6;field-sizing:content;min-height:28px}
.main[data-page="copy"] .copy-results .copy-unified-editor .copy-script{margin-top:4px;padding-top:14px;min-height:280px;line-height:1.8}
/* Compact metadata above the storyboard, matching the spoken-copy editor. */
.main[data-page="copy"] .copy-results .copy-shot-table .copy-table-meta td{padding:10px 14px;border:0;background:#fafafc}
.main[data-page="copy"] .copy-results .copy-shot-table .copy-table-meta:first-child td{padding-top:16px;padding-bottom:4px}
.main[data-page="copy"] .copy-results .copy-shot-table .copy-table-meta:nth-child(2) td{padding-top:4px;padding-bottom:14px;border-bottom:1px solid #eeeef1}
.main[data-page="copy"] .copy-results .copy-table-titles{gap:16px}
.main[data-page="copy"] .copy-results .copy-table-meta label{font-size:12px;line-height:1.5;color:var(--color-muted)}
.main[data-page="copy"] .copy-results .copy-shot-table .copy-table-meta textarea{display:block;width:100%;margin-top:4px;padding:2px 0;min-height:26px;field-sizing:content;line-height:1.6;font-size:13px;background:transparent;border:0;border-radius:4px;box-shadow:none;resize:none}
.main[data-page="copy"] .copy-results .copy-shot-table .copy-table-meta textarea:focus{background:#fff;outline:2px solid var(--color-primary);outline-offset:2px}

/* Compact two-step navigation. */
.copy-steps{display:flex;align-items:center;gap:20px;width:100%;margin:24px 0 28px;padding:8px 0}
.copy-steps::before{content:"";order:1;width:64px;height:1px;background:#d7d7dc;flex-shrink:0}
.copy-steps button{flex:0 1 auto;min-width:0;min-height:44px;flex-direction:row;gap:10px;padding:6px 10px;border-radius:12px;background:transparent;color:#6e6e73;font-size:14px;box-shadow:none}
.copy-steps button:nth-child(2){order:2}
.copy-steps button.active{background:transparent;color:#1d1d1f}
.copy-steps button .copy-step-number{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:#e6e6eb;color:#6e6e73;font-size:13px;font-weight:600}
.copy-steps button .copy-step-label{color:inherit;font-weight:500;white-space:nowrap}
.copy-steps button.active .copy-step-number{background:#0071e3;color:#fff;box-shadow:0 2px 6px #0071e326}
.copy-steps button.active .copy-step-label{color:#1d1d1f;font-weight:600}
.copy-steps button:hover:not(:disabled){background:#eaeaef}
.copy-steps button:disabled{opacity:1;cursor:not-allowed;color:#929299}
.copy-steps button:focus-visible{outline:2px solid #0071e3;outline-offset:3px}
@media(max-width:600px){.copy-steps{gap:6px;margin:16px 0 20px}.copy-steps::before{width:auto;flex:1;min-width:12px}.copy-steps button{gap:7px;padding:5px 2px;font-size:12px}.copy-steps button .copy-step-number{width:26px;height:26px;flex-basis:26px;font-size:12px}}

/* Duration is a selection, distinct from the primary generation action. */
.copy-topic-duration button.primary{background:#e8f2ff;color:#0066cc;border:1px solid #b8d7ff;box-shadow:none}
.copy-topic-duration button.primary:hover:not(:disabled){background:#dcecff;border-color:#8ebfff}
.copy-topic-duration button.primary:focus-visible{outline:2px solid #0071e3;outline-offset:2px}

.copy-duration-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}.copy-duration-picker label{position:relative;cursor:pointer}.copy-duration-picker input{position:absolute;opacity:0;width:1px;height:1px}.copy-duration-picker span{display:block;text-align:center;padding:12px;border:1px solid #d9d9de;border-radius:14px}.copy-duration-picker input:checked+span{background:#e8f2ff;color:#0066cc;border-color:#b8d7ff;font-weight:600}.copy-duration-picker input:focus-visible+span{outline:2px solid #0071e3;outline-offset:2px}

.main[data-page="copy"] .copy-results .copy-unified-editor textarea{field-sizing:content;resize:none;overflow:hidden;max-height:none;white-space:pre-wrap;overflow-wrap:anywhere}

.copy-goal-field{margin:20px 0}.copy-goal-field h3{font-size:14px;margin-bottom:12px}

/* Compact storyboard: reserve width for speech and grow rows only with content. */
.copy-results .copy-shot-table thead th:nth-child(1){width:14%}
.copy-results .copy-shot-table thead th:nth-child(2){width:20%}
.copy-results .copy-shot-table thead th:nth-child(3){width:46%}
.copy-results .copy-shot-table thead th:nth-child(4){width:20%}
.copy-results .copy-shot-table tbody th{padding:10px 8px;line-height:1.5}
.copy-results .copy-shot-table tbody td{padding:8px 6px}
.copy-results .copy-shot-table thead th{padding:10px 8px}
.main[data-page="copy"] .copy-results .copy-shot-table tbody textarea{display:block;width:100%;min-height:24px;height:auto;padding:2px 4px;line-height:1.6;overflow:hidden;field-sizing:content;resize:none}
.main[data-page="copy"] .copy-results .copy-shot-table input{margin-top:3px;min-height:20px;line-height:1.4}
.copy-results .copy-storyboard>.paneltitle{margin-bottom:10px}
@media(max-width:760px){.copy-results .copy-shot-table{min-width:480px}.copy-results .copy-shot-table tbody td{padding:7px 5px}}

.copy-topic-count{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 24px}.copy-topic-count .selected{background:#e8f2ff;color:#006be6;border-color:#b6d6ff}

.copy-custom-direction{margin:0 0 20px}.copy-custom-toggle{display:flex;align-items:center;justify-content:flex-start;gap:8px;width:auto;min-height:44px;padding:8px 0;border:0;border-radius:4px;background:transparent;box-shadow:none;color:#6e6e73;font-size:13px;font-weight:400;text-align:left}.copy-custom-toggle:hover{background:transparent;color:#1d1d1f;box-shadow:none}.copy-custom-toggle>span:last-child{color:#86868b}.copy-custom-direction .copy-field{margin:12px 0 0}.copy-custom-direction textarea{width:100%;box-sizing:border-box}

.copy-custom-direction .copy-custom-toggle:disabled,
.copy-custom-direction .copy-custom-toggle:disabled:hover{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  color:#6e6e73;
}

#modal .copy-duration-actions{display:flex;justify-content:center}

.copy-batch-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.copy-batch-controls>span{color:#6e6e73;font-size:13px}.copy-batch-controls>button{flex-shrink:0}@media(max-width:760px){.copy-batch-controls{gap:10px}}

.copy-provider-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:24px}@media(max-width:900px){.copy-provider-grid{grid-template-columns:1fr}}

/* Saved copy cards show only topic, spoken script and saved time. */
.copy-history-list{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:24px}
.copy-history-item{display:block;min-width:0;height:400px;box-sizing:border-box;padding:24px}
.copy-history-open{width:100%;height:100%;min-height:0;display:grid;grid-template-rows:53px minmax(0,1fr) auto;gap:16px;font-weight:400}
.copy-history-open h2{font-size:17px;line-height:1.55;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.copy-history-open:hover{color:inherit}
.copy-history-excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:9;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85;margin:0;min-height:0}
.copy-history-meta{padding-top:16px;border-top:1px solid var(--color-border,#eeeef1);font-size:12px}
@media(max-width:767px){.copy-history-list{grid-template-columns:1fr;gap:16px}.copy-history-item{padding:20px}}

.copy-three-columns:has(>.copy-result-column:only-child){grid-template-columns:minmax(0,1fr)}

.copy-snapshot-columns:has(>section[hidden]){grid-template-columns:minmax(0,1fr)}

.copy-history-time{margin-left:auto}

.copy-snapshot-columns.single-output{grid-template-columns:minmax(0,1fr)}
.copy-snapshot-export{margin-top:16px;color:var(--color-primary);background:transparent;border-color:transparent}

#modal:has(.copy-history-detail){max-height:90dvh;overflow:hidden}
.copy-history-detail{display:flex;flex-direction:column;max-height:calc(90dvh - 64px);min-height:0}
.copy-history-detail>h2,.copy-history-detail>.note{flex-shrink:0}
.copy-history-detail .copy-snapshot-columns{min-height:0;flex:1;overflow:auto}
.copy-snapshot-footer{display:grid;grid-template-columns:1fr 1.4fr;gap:24px;flex-shrink:0;padding-top:16px;background:white}
.copy-snapshot-footer.single-output{grid-template-columns:minmax(0,1fr)}
.copy-snapshot-footer .copy-snapshot-export{margin:0;justify-self:start}
.copy-snapshot-table tr:nth-child(-n+4)>th,.copy-snapshot-table tr:nth-child(-n+4)>td{background:#f5f5f7}
@media(max-width:767px){.copy-snapshot-footer{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.copy-snapshot-footer .copy-snapshot-export{padding-inline:8px}}
