/* R95 · inline template creation. Load after studio-landing/mode-pill/flow-surfaces.
   All rules are presentation-only and scoped to the studio landing. */
.studio-landing .studio-template-inline-host {display:contents;}
.studio-landing .studio-template-composer {
 --st-gold:#f3cf85;--st-ink:#f0f2f5;--st-muted:#a0aab5;--st-line:#ffffff12;
 container:studio-template / inline-size;
 display:flex;flex-direction:column;gap:16px;min-height:0;padding:18px;border-radius:22px;
 color:var(--st-ink);text-align:left;
}
.studio-landing :is(.studio-template-composer,.studio-latest-task,.studio-template-section,.studio-template-showcase),
.studio-landing :is(.studio-template-composer,.studio-latest-task) * {box-sizing:border-box;min-width:0;}
.studio-landing :is(.studio-template-composer,.studio-latest-task) :is(h2,h3,p,strong,small,span,legend) {overflow-wrap:anywhere;}
.studio-landing :is(.studio-template-composer,.studio-latest-task) :is(button,a,label) {-webkit-tap-highlight-color:transparent;}
.studio-landing :is(.studio-template-composer,.studio-latest-task) :is(button,a) {touch-action:manipulation;}
.studio-landing :is(.studio-template-composer,.studio-latest-task) :is(button,a,input):focus-visible {outline:2px solid #f4d698;outline-offset:4px;}
.studio-landing :is(.studio-template-composer,.studio-latest-task) :is(button,a) {min-width:44px;min-height:44px;}
.studio-landing :is(.studio-template-composer,.studio-latest-task) button:disabled {cursor:not-allowed;}

/* Template identity remains a separate row; its change action never contains another button. */
.studio-landing .studio-selected-template {display:flex;align-items:center;gap:12px;padding:0 0 14px;border-bottom:1px solid var(--st-line);}
.studio-landing .studio-template-cover {display:block;flex:0 0 44px;width:44px;height:54px;border:1px solid #ffffff12;border-radius:10px;background:#293038;object-fit:cover;}
.studio-landing .studio-template-copy {flex:1 1 0;min-width:0;}
.studio-landing .studio-template-copy>small {display:block;margin:0 0 3px;color:#a0aab5;font-size:10px;font-weight:400;line-height:1.5;}
.studio-landing .studio-template-name {display:block;margin:0;color:#eff2f4;font-size:14px;font-weight:600;line-height:1.6;}
.studio-landing .studio-template-change {display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:5px;max-width:34%;padding:8px 11px;border:1px solid #e6d3af29;border-radius:999px;background:#f8e4bd09;color:#ead4a6;font-size:11px;font-weight:500;line-height:1.5;white-space:normal;overflow-wrap:anywhere;}
.studio-landing .studio-template-change>svg {flex:0 0 15px;width:15px;height:15px;}
.studio-landing .studio-template-empty {display:flex;flex:1 1 0;align-items:center;gap:11px;width:100%;margin:0;padding:4px 0;border:0;background:transparent;color:#dce2e8;font-size:13px;font-weight:500;line-height:1.6;text-align:left;}
.studio-landing .studio-template-empty>span:not(.studio-template-picker-icon) {flex:1 1 0;}
.studio-landing .studio-template-picker-icon {display:grid;flex:0 0 44px;place-items:center;width:44px;height:48px;border:1px dashed #b8c5ce40;border-radius:10px;background:#ffffff04;color:#b4c7d3;font-size:23px;font-weight:300;line-height:1;}
.studio-landing .studio-template-empty>span[aria-hidden=true]:not(.studio-template-picker-icon) {flex:0 0 auto;color:#aeb9c2;}
.studio-landing .studio-template-empty>svg {flex:0 0 18px;width:18px;height:18px;color:#aeb9c2;}

/* A small tilted photo sits beside the supported specs. The original uploaded media is unchanged. */
.studio-landing .studio-template-body {display:grid;grid-template-columns:76px minmax(0,1fr);align-items:start;gap:20px;min-width:0;}
.studio-landing .studio-photo-field {position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;padding:4px 3px 0;isolation:isolate;}
.studio-landing .studio-photo-card {position:relative;isolation:isolate;display:grid;place-items:center;flex:0 0 auto;box-sizing:border-box;width:60px;height:80px;min-height:44px;margin:2px 0 0;padding:8px;border:1px solid #ffffff08;border-radius:8px;background:#ffffff09;color:#a6aeb7;box-shadow:none;transform:rotate(-8deg);cursor:pointer;overflow:hidden;}
.studio-landing .studio-photo-plus {display:block;color:inherit;font-size:24px;font-weight:300;line-height:1;text-align:center;}
.studio-landing .studio-photo-caption {position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.studio-landing .studio-photo-preview {position:absolute;inset:0;display:block;width:100%;height:100%;border-radius:7px;object-fit:cover;background:#20242a;}
.studio-landing .studio-photo-card[data-state=uploading] {cursor:progress;border-color:#b4a4cf70;}
.studio-landing .studio-photo-card[data-state=error] {border-color:#e4a0b170;}
.studio-landing .studio-photo-card:disabled {opacity:1;background:#ffffff06;color:#9aa4af;}
.studio-landing .studio-photo-card:focus-within {outline:2px solid #f4d698;outline-offset:4px;}
.studio-landing .studio-photo-input[type=file] {position:absolute;width:1px;height:1px;min-height:0;max-height:1px;min-width:0;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.studio-landing .studio-photo-actions {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 3px;width:100%;margin:0;}
.studio-landing .studio-photo-actions :is(button,a) {display:inline-flex;align-items:center;justify-content:center;flex:1 1 44px;min-height:44px;margin:0;padding:5px 3px;border:0;border-radius:8px;background:transparent;color:#b0bac5;font-size:10px;line-height:1.5;text-align:center;text-decoration:none;white-space:normal;overflow-wrap:anywhere;}
.studio-landing .studio-photo-hint {display:block;width:100%;margin:0;color:#95a3ae;font-size:10px;line-height:1.6;text-align:center;}
.studio-landing .studio-photo-hint[data-state=error] {color:#f2a8b9;}

.studio-landing .studio-template-input-hint {display:block;flex:0 0 auto;width:100%;max-width:none;margin:0;padding:0;color:#aeb9c5;font-size:11px;line-height:1.7;text-align:left;overflow-wrap:anywhere;}

.studio-landing .studio-template-options {display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:12px;padding:0;}
.studio-landing .studio-template-option {display:block;min-width:0;margin:0;padding:0;border:0;}
.studio-landing .studio-template-option>legend {float:none;width:100%;margin:0 0 7px;padding:0;color:#a8b4be;font-size:11px;font-weight:400;line-height:1.5;}
.studio-landing .studio-template-segments {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;min-width:0;}
.studio-landing .studio-template-segments>button,
.studio-landing .studio-template-segments>label {position:relative;display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:44px;margin:0;padding:7px 8px;border:1px solid #b5c5d61a;border-radius:10px;background:#0d131c38;color:#d6dde5;font-size:12px;font-weight:450;line-height:1.5;text-align:center;white-space:normal;overflow-wrap:anywhere;cursor:pointer;}
.studio-landing .studio-template-segments>button[aria-pressed=true],
.studio-landing .studio-template-segments>label:has(input:checked) {border-color:#ebcf8c85;background:linear-gradient(130deg,#f0cf8e1f,#dfb3690e);color:#ffffff;box-shadow:0 0 0 1px #f0cf8e0a inset;font-weight:600;}
.studio-landing .studio-template-segments :is(button:disabled,label:has(input:disabled)) {opacity:1;border-color:#ffffff17;background:#181e24;color:#aeb9c5;cursor:not-allowed;box-shadow:none;}
.studio-landing .studio-template-segments>button:disabled[aria-pressed=true],
.studio-landing .studio-template-segments>label:has(input:disabled:checked) {border-color:#e0cb9a55;color:#e6e9ed;}
.studio-landing .studio-template-segments>label>input[type=radio] {position:absolute;width:1px;height:1px;min-height:0;margin:0;padding:0;opacity:0;clip-path:inset(50%);}
.studio-landing .studio-template-segments>label:focus-within {outline:2px solid #f4d698;outline-offset:3px;}
.studio-landing .studio-template-segments :is(svg,.icon) {flex:0 0 14px;width:14px;height:14px;}
.studio-landing .studio-template-cost {display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:3px 8px;margin:0;padding-top:1px;}
.studio-landing .studio-template-cost>span {color:#a8b4be;font-size:11px;line-height:1.5;}
.studio-landing .studio-template-cost>strong {color:#f4d798;font-size:22px;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.025em;}
.studio-landing .studio-template-cost>strong small {margin-left:3px;color:#d1bc95;font-size:10px;font-weight:400;letter-spacing:0;}
.studio-landing .studio-template-cost>small {flex:1 1 100%;margin:0;color:#94a2ae;font-size:10px;line-height:1.6;}
.studio-landing .studio-template-notice {margin:0;padding:9px 11px;border:1px solid #93b9d11a;border-radius:10px;background:#8faed309;color:#b7c5d1;font-size:11px;line-height:1.7;}
.studio-landing .studio-template-notice:empty {display:none;}
.studio-landing .studio-template-notice[data-state=error] {border-color:#ef9bb030;background:#e77a970a;color:#f1b3c3;}
.studio-landing .studio-template-notice[data-state=success] {border-color:#8ed5ba30;color:#b0dfcd;}

/* Submit stays in normal flow, after its complete input and quote. */
.studio-landing .studio-template-composer .studio-template-start {position:relative;display:flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;width:100%;min-height:50px;margin:0;padding:12px 18px;border:1px solid #f3d9a2;border-radius:14px;background:linear-gradient(110deg,#ffedb8 0%,#f4cf81 48%,#e9b861 100%);box-shadow:inset 0 1px #fff6,0 5px 17px #b3813820;color:#392b17;font-size:15px;font-weight:650;line-height:1.5;text-align:center;overflow-wrap:anywhere;}
.studio-landing .studio-template-start :is(svg,.icon) {flex:0 0 18px;width:18px;height:18px;}
.studio-landing .studio-template-composer .studio-template-start:disabled {border-color:#ffffff0d;background:#d2bc8b19;box-shadow:none;color:#b0a38c;opacity:.6;}
.studio-landing .studio-template-composer .studio-template-start[aria-busy=true] {cursor:progress;}

/* One latest server task, with real state and a bounded video. No decorative progress percentage. */
.studio-landing :is(.studio-template-section,.studio-latest-task,.studio-template-showcase) {width:100%;max-width:980px;min-width:0;margin-inline:auto;}
.studio-landing .studio-latest-task {margin-top:16px;padding:16px;border:1px solid #ffffff0c;border-radius:18px;background:#171c218c;color:#e4eaf0;}
.studio-landing .studio-latest-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;}
.studio-landing .studio-latest-heading :is(h2,h3) {margin:0;color:#b5c0ca;font-size:12px;font-weight:500;line-height:1.6;}
.studio-landing .studio-template-history {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;margin:0;padding:7px 9px;border:0;border-radius:9px;background:transparent;color:#b7a6d3;font-size:11px;font-weight:450;line-height:1.5;text-align:center;text-decoration:none;white-space:normal;overflow-wrap:anywhere;}
.studio-landing .studio-template-history :is(svg,.icon) {flex:0 0 16px;width:16px;height:16px;}
.studio-landing .studio-latest-body {display:flex;align-items:center;gap:12px;min-width:0;}
.studio-landing .studio-latest-art {display:grid;flex:0 0 48px;place-items:center;width:48px;min-height:60px;border:1px solid #ffffff0a;border-radius:10px;background:#ffffff04;color:#bcafd3;overflow:hidden;}
.studio-landing .studio-latest-art>img {display:block;width:100%;height:60px;object-fit:cover;}
.studio-landing .studio-latest-copy {flex:1 1 0;min-width:0;}
.studio-landing .studio-latest-copy>strong {display:block;margin:3px 0 0;color:#e3e9ee;font-size:13px;font-weight:500;line-height:1.6;}
.studio-landing .studio-latest-copy>p {margin:4px 0 0;color:#98a5b1;font-size:11px;line-height:1.7;}
.studio-landing .studio-latest-status {display:inline-flex;align-items:center;gap:6px;color:#b6add0;font-size:11px;font-weight:500;line-height:1.6;}
.studio-landing .studio-latest-status::before {content:"";flex:0 0 5px;width:5px;height:5px;border-radius:50%;background:currentColor;}
.studio-landing .studio-latest-task:is([data-state=success],[data-state=succeeded]) .studio-latest-status {color:#9ad4bc;}
.studio-landing .studio-latest-task[data-state=failed] .studio-latest-status {color:#efacbd;}
.studio-landing .studio-latest-task[data-state=unknown] .studio-latest-status {color:#dfc48d;}
.studio-landing .studio-latest-task[data-state=empty] .studio-latest-status {color:#99a5b0;}
.studio-landing .studio-latest-video {display:block;width:100%;height:auto;max-height:360px;margin:14px auto 0;border:1px solid #ffffff0c;border-radius:12px;object-fit:contain;background:#090d12;}
.studio-landing .studio-latest-actions {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:12px;}
.studio-landing .studio-latest-actions :is(button,a) {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;max-width:100%;padding:8px 13px;border:1px solid #c2b2df2b;border-radius:10px;background:#b5a0d10a;color:#d0c1e5;font-size:11px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;}
.studio-landing .studio-template-spinner {display:block;flex:0 0 auto;width:18px;height:18px;border:1.5px solid #b9acc82b;border-top-color:#d4c8e7;border-radius:50%;}

/* One local decorative image: natural proportions on mobile, compact cropped banner on desktop. */
.studio-landing .studio-template-showcase {display:grid;margin-top:22px;margin-bottom:0;padding:0;border:1px solid #ffffff0b;border-radius:18px;background:#151a1f;overflow:hidden;}
.studio-landing .studio-template-showcase>picture {grid-area:1/1;align-self:start;display:block;width:100%;}
.studio-landing .studio-template-showcase img {display:block;width:100%;height:auto;max-width:100%;margin:0;object-fit:contain;}
.studio-landing .studio-template-showcase>img {grid-area:1/1;align-self:start;}
.studio-landing .studio-template-showcase>figcaption.studio-feature-copy {grid-area:1/1;position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;gap:5px;min-width:0;padding:clamp(14px,2.6vw,28px);background:linear-gradient(90deg,#080c167d,#080c1633 45%,transparent 75%);pointer-events:none;}
.studio-landing .studio-template-showcase>.studio-feature-copy>strong {display:block;max-width:60%;margin:0;color:#f6f1e8;font-size:clamp(16px,1.7vw,24px);font-weight:600;line-height:1.5;text-shadow:0 1px 9px #080c1680;overflow-wrap:anywhere;}
.studio-landing .studio-template-showcase>.studio-feature-copy>small {display:block;max-width:60%;margin:0;color:#dddce4;font-size:clamp(11px,1.1vw,13px);font-weight:400;line-height:1.7;text-shadow:0 1px 6px #080c1699;overflow-wrap:anywhere;}

@media(min-width:1024px) {
 .studio-landing .studio-template-showcase {grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:180px;max-height:180px;}
 .studio-landing .studio-template-showcase>picture {height:100%;min-height:0;}
 .studio-landing .studio-template-showcase img {width:100%;height:100%;min-height:0;object-fit:cover;object-position:center 35%;}
 .studio-landing .studio-template-showcase>figcaption.studio-feature-copy {align-self:stretch;box-sizing:border-box;height:100%;min-height:0;}
 .studio-landing .studio-template-showcase>.studio-feature-copy>strong {font-size:20px;}
 .studio-landing .studio-template-showcase>.studio-feature-copy>small {font-size:12px;}
}


@container studio-template (min-width:560px) {
 .studio-landing .studio-template-body {grid-template-columns:78px minmax(0,1fr);gap:24px;align-items:center;}
 .studio-landing .studio-template-options {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;}
 .studio-landing .studio-template-cost {grid-column:1/-1;justify-content:flex-start;gap:5px 16px;padding-top:4px;}
 .studio-landing .studio-template-cost>small {flex-basis:auto;margin-left:auto;}
 .studio-landing .studio-photo-card {width:64px;height:80px;}
 .studio-landing .studio-template-cover {flex-basis:48px;width:48px;height:60px;}
 .studio-landing .studio-template-name {font-size:16px;}
 .studio-landing .studio-template-change {padding-inline:16px;font-size:12px;}
}
@media(max-width:379px) {
 .studio-landing .studio-template-composer {gap:14px;padding:14px;border-radius:18px;}
 .studio-landing .studio-selected-template {gap:9px;padding-bottom:12px;}
 .studio-landing .studio-template-cover {flex-basis:38px;width:38px;height:48px;border-radius:8px;}
 .studio-landing .studio-template-name {font-size:12px;}
 .studio-landing .studio-template-change {padding-inline:8px;font-size:10px;}
 .studio-landing .studio-template-body {grid-template-columns:66px minmax(0,1fr);gap:15px;}
 .studio-landing .studio-template-options {gap:10px;}
 .studio-landing .studio-template-segments {gap:5px;}
 .studio-landing .studio-template-segments>:is(button,label) {padding-inline:4px;font-size:11px;}
 .studio-landing .studio-template-cost>strong {font-size:20px;}
 .studio-landing .studio-photo-actions :is(button,a) {flex-basis:100%;padding-block:5px;}
 .studio-landing .studio-latest-task {padding:14px;border-radius:16px;}
 .studio-landing .studio-template-showcase>figcaption.studio-feature-copy {gap:3px;padding:12px;}
 .studio-landing .studio-template-showcase>.studio-feature-copy>strong {max-width:62%;font-size:15px;}
 .studio-landing .studio-template-showcase>.studio-feature-copy>small {max-width:62%;font-size:11px;}
}
@media(max-width:350px) {
 .studio-landing .studio-photo-card {width:52px;height:72px;}
}
@media(hover:hover) {
 .studio-landing .studio-photo-card:hover {transform:translateY(-2px) rotate(-4deg);background:#ffffff10;}
 .studio-landing .studio-template-change:hover {border-color:#ead4a65c;background:#ead4a612;color:#ffedcb;}
 .studio-landing .studio-template-segments>button:not(:disabled):hover {border-color:#ead4a64d;}
 .studio-landing .studio-template-composer .studio-template-start:not(:disabled):hover {filter:brightness(1.05);box-shadow:inset 0 1px #fff8,0 7px 22px #b3813836;}
 .studio-landing .studio-template-history:hover {background:#b5a0d110;color:#dacbee;}
}
@media(prefers-reduced-motion:no-preference) {
 .studio-landing .studio-photo-card {transition:transform 240ms cubic-bezier(.22,1,.36,1),box-shadow 240ms ease;}
 .studio-landing :is(.studio-template-change,.studio-template-segments>button,.studio-template-start,.studio-template-history) {transition:border-color 180ms ease,color 180ms ease,background-color 180ms ease,box-shadow 180ms ease;}
 .studio-landing .studio-template-spinner {animation:studio-template-spin 1.1s linear infinite;}
}
@keyframes studio-template-spin {to{transform:rotate(1turn);}}
@media(prefers-reduced-motion:reduce) {
 .studio-landing :is(.studio-template-composer,.studio-latest-task) * {animation:none!important;transition:none!important;scroll-behavior:auto!important;}
 .studio-landing .studio-photo-card:hover {transform:rotate(-8deg);}
}
@media(forced-colors:active) {
 .studio-landing :is(.studio-template-composer,.studio-selected-template,.studio-photo-card,.studio-template-segments>button,.studio-template-segments>label,.studio-template-start,.studio-latest-task) {forced-color-adjust:auto;border-color:ButtonText;background:Canvas;color:CanvasText;box-shadow:none;}
 .studio-landing .studio-template-segments>button[aria-pressed=true],.studio-landing .studio-template-segments>label:has(input:checked) {outline:2px solid Highlight;outline-offset:-3px;}
}

/* R100 · exact template slots, same indexed photo-deck presentation as free creation. */
.studio-landing .studio-template-composer:focus-within {outline:none!important;border-color:#ffffff12!important;box-shadow:inset 0 1px #ffffff02;}
.studio-landing .studio-template-body:has(.studio-photo-deck) {grid-template-columns:104px minmax(0,1fr);gap:20px;transition:grid-template-columns 320ms cubic-bezier(.22,.72,.24,1);}
.studio-landing .studio-template-body:has(.studio-photo-deck[data-count="2"][data-fanned=true]) {grid-template-columns:176px minmax(0,1fr);}
.studio-landing .studio-photo-field.studio-photo-deck {--photo-width:60px;--photo-height:80px;position:relative;display:block;width:100%;height:112px;min-height:112px;margin:0;padding:0;isolation:isolate;}
.studio-landing .studio-photo-deck>.studio-photo-slot {position:absolute;top:12px;left:12px;width:var(--photo-width);height:var(--photo-height);margin:0;padding:0;z-index:calc(10 + var(--photo-order));transform:translate(calc(var(--photo-depth) * -3px),calc(var(--photo-depth) * 2px)) rotate(calc(-6deg + var(--photo-depth) * 5deg));transform-origin:center bottom;transition:transform 320ms cubic-bezier(.22,.72,.24,1);}
.studio-landing .studio-photo-deck[data-fanned=true]>.studio-photo-slot {transform:translate(calc(var(--photo-index) * 80px),0) rotate(calc((var(--photo-index) - 1) * 6deg));}
.studio-landing .studio-photo-deck .studio-photo-card {display:block;width:var(--photo-width);height:var(--photo-height);min-height:44px;margin:0;padding:0;border:1px dashed #ffffff23;border-radius:4px;background:#37393b;color:#b0b0b0;transform:none;animation:none;box-shadow:0 6px 16px #0002;}
.studio-landing .studio-photo-deck .has-reference .studio-photo-card {border:2px solid #e8e6e3c7;}
.studio-landing .studio-photo-deck .studio-photo-card:hover {transform:none;background:#37393b;}
.studio-landing .studio-photo-deck .studio-photo-preview {position:absolute;inset:0;display:block;width:100%;height:100%;border-radius:2px;background:#22272b;object-fit:contain;object-position:center;}
.studio-landing .studio-photo-deck .studio-photo-card>.studio-photo-plus {position:absolute;inset:0;display:grid;place-items:center;font-size:27px;font-weight:300;line-height:1;}
.studio-landing .studio-photo-deck>.studio-photo-add-dot {position:absolute;left:58px;top:68px;z-index:40;display:grid;place-items:center;min-width:44px;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:1px solid #ffffff1a;border-radius:50%;background:#3b3d40;color:#ececec;font-size:27px;font-weight:300;line-height:1;}
.studio-landing .studio-photo-deck[data-fanned=true]>.studio-photo-add-dot {left:138px;top:68px;transition:left 320ms cubic-bezier(.22,.72,.24,1);}
.studio-landing .studio-template-submit-row {display:flex;align-items:center;gap:12px;min-width:0;width:100%;}
.studio-landing .studio-template-submit-row>.studio-photo-progress {flex:0 1 auto;min-width:0;max-width:34%;margin:0;padding:0;color:#aeb9c5;font-size:12px;line-height:1.6;font-variant-numeric:tabular-nums;}
.studio-landing .studio-template-submit-row>.studio-template-start {flex:1 1 0;min-width:0;}
.studio-landing .studio-template-composer .studio-template-start:disabled {opacity:1;border-color:#ffffff12;background:#303136;color:#93989f;box-shadow:none;}
@media(min-width:1024px) {.studio-landing .studio-photo-field.studio-photo-deck {--photo-width:64px;--photo-height:80px;}}
@media(max-width:600px) {
 .studio-landing .studio-template-body:has(.studio-photo-deck) {grid-template-columns:88px minmax(0,1fr);gap:14px;}
 .studio-landing .studio-template-body:has(.studio-photo-deck[data-count="2"][data-fanned=true]) {grid-template-columns:minmax(0,1fr);}
 .studio-landing .studio-photo-deck[data-fanned=true] {width:min(176px,100%);}
 .studio-landing .studio-template-submit-row {gap:8px;}
 .studio-landing .studio-template-submit-row>.studio-photo-progress {font-size:11px;}
}
@media(max-width:350px) {.studio-landing .studio-photo-field.studio-photo-deck {--photo-width:52px;--photo-height:72px;}}

/* R101 · the small × opens the same indexed photo actions, never clears a photo. */
.studio-landing .studio-photo-deck .studio-photo-operation {position:absolute;right:-12px;bottom:-12px;z-index:3;display:grid;place-items:center;box-sizing:border-box;min-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:#f1f1f1;box-shadow:none;cursor:pointer;touch-action:manipulation;}
.studio-landing .studio-photo-operation>span {display:grid;place-items:center;box-sizing:border-box;width:24px;height:24px;margin:0;padding:0;border:1px solid #ffffff38;border-radius:50%;background:#33363a;color:inherit;font-size:18px;font-weight:300;line-height:1;pointer-events:none;}
.studio-landing .studio-photo-operation:disabled {opacity:1;cursor:not-allowed;}
.studio-landing .studio-photo-operation:disabled>span {opacity:.55;}
/* Keep the next-photo add target separate from the selected card's action target. */
.studio-landing .studio-photo-deck[data-count="2"][data-ready="1"] {height:160px;min-height:160px;}
.studio-landing .studio-photo-deck[data-count="2"][data-ready="1"]>.studio-photo-add-dot {left:12px;top:112px;transition:none;}

/* R101 follow-up: reveal photo slots only after choosing a template. */
.studio-landing .studio-template-body.is-empty {grid-template-columns:minmax(0,1fr);gap:0;}
.studio-landing .studio-template-steps {margin:0;padding:0;text-align:center;white-space:pre-line;color:#b7c0c9;font-size:13px;line-height:1.9;}

/* R105 · shared VIP mark for inline creation and the standalone template form.
   The host control owns interaction; its decorative badge never intercepts a tap. */
:is(.studio-landing,.picfans-form) .creation-vip-option {position:relative;min-width:0;overflow:visible;}
:is(.studio-landing,.picfans-form) .creation-vip-option>.creation-vip-badge {
 position:absolute;inset-block-start:-10px;inset-inline-end:4px;z-index:2;
 display:grid;place-items:center;box-sizing:border-box;flex:0 0 24px;
 width:24px;min-width:24px;max-width:24px;height:24px;min-height:24px;
 margin:0;padding:0;border:1px solid #ffd667;border-radius:50%;
 background:linear-gradient(145deg,#ffe68c,#f5c343);color:#3b290a;
 box-shadow:0 2px 6px #0003,inset 0 1px #fff7;
 font-family:Arial,sans-serif;font-size:9px;font-weight:750;font-style:normal;
 line-height:1;letter-spacing:-.25px;text-align:center;text-transform:none;
 white-space:nowrap;overflow-wrap:normal;pointer-events:none;user-select:none;
}
/* Reserve the badge's column even for wrapped labels on narrow mobile buttons. */
.studio-landing :is(button,a).creation-vip-option,
.studio-landing :is(.studio-template-segments,.studio-free-segments)>label.creation-vip-option {padding-inline-end:32px;}

/* R112 · compact recent-four layout; server rows/actions remain controller-owned. */
.studio-landing .studio-recent-creations {padding:12px;}
.studio-landing .studio-recent-list {--recent-preview-height:112px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;align-items:start;}
.studio-landing .studio-recent-feedback {margin:4px 0 12px;color:#aeb9c5;font-size:12px;line-height:1.7;}
.studio-landing .studio-recent-card {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;align-self:start;gap:6px;min-width:0;max-width:100%;margin:0;padding:8px;border:1px solid #ffffff10;border-radius:10px;background:#10141940;}
.studio-landing .studio-recent-card>.studio-latest-body {grid-column:1/-1;gap:6px;}
.studio-landing .studio-recent-card .studio-latest-copy {width:100%;min-width:0;}
.studio-landing .studio-recent-card .studio-latest-copy>strong {display:block;width:100%;max-width:100%;margin:2px 0 0;font-size:11px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.studio-landing .studio-recent-card .studio-latest-copy>p {margin:3px 0 0;font-size:10px;line-height:1.5;}
.studio-landing .studio-recent-card:has(>.studio-latest-video,>.studio-recent-image) .studio-latest-copy>p {display:none;}
.studio-landing .studio-recent-card .studio-latest-status {color:#b6add0;font-size:10px;line-height:1.5;}
.studio-landing .studio-recent-card[data-state=succeeded] .studio-latest-status {color:#9ad4bc;}
.studio-landing .studio-recent-card[data-state=failed] .studio-latest-status {color:#efacbd;}
.studio-landing .studio-recent-card[data-state=unknown] .studio-latest-status {color:#dfc48d;}
.studio-landing .studio-recent-card :is(.studio-latest-video,.studio-recent-image) {display:block;grid-column:1/-1;width:100%;min-width:0;height:var(--recent-preview-height);max-height:var(--recent-preview-height);margin:2px 0 0;border-radius:8px;object-fit:contain;object-position:center;background:#090d12;}
/* Flatten action wrappers into the card grid: sharing and download sit beside
   one another. Publication/reward facts keep their own full-width row. */
.studio-landing .studio-recent-card :is(.creation-history-sharing,.studio-recent-downloads) {display:contents;margin:0;padding:0;border:0;}
.studio-landing .studio-recent-card .creation-history-sharing>p {grid-column:1/-1;min-width:0;margin:0;font-size:10px;line-height:1.5;overflow-wrap:anywhere;}
.studio-landing .studio-recent-card .creation-history-sharing>p strong {font-size:10px;line-height:1.5;}
.studio-landing .studio-recent-card .creation-history-sharing>.creation-history-withdrawal {grid-column:1/-1;min-width:0;margin:0;font-size:10px;line-height:1.5;overflow-wrap:anywhere;}
.studio-landing .studio-recent-card .creation-history-sharing>button {grid-column:1;}
.studio-landing .studio-recent-card .studio-recent-downloads>a {grid-column:2;}
.studio-landing .studio-recent-card :is(.creation-history-sharing,.studio-recent-downloads) :is(button,a) {display:flex;align-items:center;justify-content:center;align-self:end;box-sizing:border-box;min-width:44px;min-height:44px;width:100%;max-width:100%;margin:0;padding:5px 0;border:1px solid #c2b2df25;border-radius:8px;background:#b5a0d108;color:#c8bcdb;font-size:10px;line-height:1.35;text-align:center;white-space:normal;overflow-wrap:anywhere;}
@media(max-width:350px) {.studio-landing .studio-recent-list {--recent-preview-height:96px;}.studio-landing .studio-recent-card {padding:6px;gap:5px;}}
@media(min-width:1024px) {.studio-landing .studio-recent-list {--recent-preview-height:128px;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}.studio-landing .studio-recent-card {padding:10px;}.studio-landing .studio-recent-card .studio-latest-copy>strong {font-size:12px;}.studio-landing .studio-recent-card :is(.creation-history-sharing,.studio-recent-downloads) :is(button,a) {font-size:11px;}}

/* Center only this confirmation within the existing modal host; its body scrolls. */
#sheetHost .bottom-sheet:has(.picfans-generation-confirm) {top:50%;bottom:auto;left:50%;right:auto;translate:-50% -50%;width:min(460px,calc(100% - 32px));max-height:calc(100% - 40px);border:1px solid #e0c38b38;border-radius:20px;padding:18px;}
#sheetHost .bottom-sheet:has(.picfans-generation-confirm)>.sheet-body {min-height:0;overflow-y:auto;overscroll-behavior:contain;}
.picfans-generation-confirm-dialog {box-sizing:border-box;width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 40px);margin:auto;padding:20px;border:1px solid #e0c38b38;border-radius:20px;background:#1b1b20;color:#edf1f5;overflow-y:auto;overscroll-behavior:contain;}
.picfans-generation-confirm-dialog::backdrop {background:#0009;}
.picfans-generation-confirm {min-width:0;color:#e5e9ed;}
.picfans-generation-confirm dl {display:grid;gap:14px;margin:0 0 20px;}
.picfans-generation-confirm dl>div {display:grid;grid-template-columns:minmax(62px,auto) minmax(0,1fr);align-items:baseline;gap:12px;}
.picfans-generation-confirm dt {color:#aeb9c5;font-size:12px;line-height:1.7;}
.picfans-generation-confirm dd {min-width:0;margin:0;text-align:right;font-size:14px;line-height:1.7;overflow-wrap:anywhere;}
.picfans-generation-confirm dd strong {color:#f4d798;font-size:20px;font-weight:650;}
.picfans-generation-confirm>p {color:#e8cf9e;font-size:12px;line-height:1.7;overflow-wrap:anywhere;}
.picfans-generation-confirm-actions {display:flex;flex-wrap:wrap;gap:10px;}
.picfans-generation-confirm-actions>button {flex:1 1 140px;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #ffffff24;border-radius:10px;color:#dce2e8;background:#ffffff06;font-size:13px;line-height:1.6;white-space:normal;overflow-wrap:anywhere;}
.picfans-generation-confirm-actions>.primary-button {border-color:#f1d39a;background:linear-gradient(110deg,#ffe9ac,#edc16d);color:#392b17;font-weight:600;}

/* R116: one centered action, scoped to creation confirmations. */
:is(.picfans-generation-confirm,.picfans-confirm,.generation-confirm) .creation-confirm-actions {display:flex;justify-content:center;align-items:center;}
:is(.picfans-generation-confirm,.picfans-confirm,.generation-confirm) .creation-confirm-actions>button {flex:0 1 200px;width:200px;max-width:100%;min-height:44px;text-align:center;}
.picfans-generation-confirm-dialog>.picfans-generation-confirm-close {position:absolute;top:8px;right:8px;display:grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;font:inherit;font-size:24px;cursor:pointer;}
.picfans-generation-confirm-dialog>h2 {padding-inline-end:36px;}
/* Compact recent-card actions shared by template and free creation. */
.studio-landing .studio-recent-card :is(.creation-history-sharing,.studio-recent-downloads) :is(button,a) {min-height:32px;padding:5px 6px;}
.studio-landing .studio-recent-card .creation-history-sharing>button.creation-share-earn {border-color:#ffe6a4;background:linear-gradient(110deg,#ffedb5,#f4c65b 60%,#ffe49a);color:#392508;font-weight:650;}
@media(max-width:350px) {
 .studio-landing .studio-recent-card .creation-history-sharing>button.creation-share-earn {padding-inline:0;letter-spacing:-.4px;white-space:nowrap;}
}
