/* SOLANGELES Studio · shared "workbench" for Create image and Create video.
   The result owns the screen; every input lives in one compact dock anchored at the bottom,
   with settings as pills beside the Generate button (the Grok Imagine / Higgsfield / Krea pattern).
   Loaded after studio.css and studio-video.css; it only restyles, all behaviour stays id-driven. */

.bench{max-width:none}
.bench-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:0 0 14px}
.bench-head .eyebrow{display:block;margin:0 0 4px;font-size:12px}
.bench-head h1,.bench.video-workspace h1{margin:0;font-size:clamp(20px,2vw,26px);line-height:1.15;letter-spacing:-.04em}
.bench-head .text-button{min-height:40px;font-size:13px;white-space:nowrap}

/* Result + history */
.bench-main,.bench .video-studio-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:stretch}
.bench .video-studio-layout{grid-template-areas:"preview history" "composer composer"}
.bench-stage,.bench-rail{box-sizing:border-box;min-width:0;border:1px solid var(--border);border-radius:20px;background:var(--panel);padding:14px}
.bench-stage.image-preview-workspace{max-width:none;margin:0}
.bench .video-preview-panel{padding:14px}
.bench-rail{display:flex;flex-direction:column}
.bench-rail-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.bench-rail-head h2{margin:0;font-size:15px;letter-spacing:-.01em}
.bench-icon-button{display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--border);border-radius:8px;background:#15171a;color:var(--text);font-size:18px;line-height:1;cursor:pointer}
.bench-icon-button:hover{border-color:#676d73;background:#21242a}
.bench-rail-grid.image-history-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-content:start;overflow-x:hidden;overflow-y:auto;padding:6px;margin:-6px;scrollbar-width:thin}
.bench-rail-grid .image-history-item{flex:none;width:auto;height:auto;aspect-ratio:1}
.bench-rail .image-preview-private{margin:auto 0 0;padding-top:12px}
.bench .video-history-panel{padding:14px}
.bench .video-history{display:flex;flex-direction:column;grid-template-columns:none;max-height:none;margin:-6px -6px 0;padding:6px 6px 14px;overflow-x:hidden;overflow-y:auto}
.bench .video-history-more{width:100%}
.bench .video-history-private{margin:auto 0 0}

/* The dock */
.bench-dock,.bench .video-composer-panel.bench-dock{box-sizing:border-box;flex:none;width:min(100%,1040px);margin:12px auto 0;padding:12px 14px 8px;border:1px solid #3d423b;border-radius:20px;background:#15171aee;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 18px 60px #000a}
.bench .video-composer-panel.bench-dock{grid-area:composer;margin-top:0}
.bench-dock:focus-within{border-color:#71875c}
.bench-dock-row{display:flex;flex-direction:column;gap:8px}
.bench-dock .reference-shortcuts{flex:0 0 auto;flex-wrap:wrap;gap:8px}
.bench-dock .character-choices{flex:0 1 auto;padding:0}
.bench-dock .location-choice{flex:0 1 auto;max-width:190px}
.bench-dock .reference-chip{max-width:none;padding:4px 10px 4px 4px;border-radius:999px;gap:8px}
.bench-dock .reference-thumb{width:34px;height:34px;border-radius:50%;font-size:18px}
.bench-dock .reference-thumb img{object-fit:cover}
.bench-dock .reference-chip-copy{gap:0}
.bench-dock .reference-chip-copy>span{font-size:10px}
.bench-dock .reference-chip-copy strong{font-size:12px;max-width:110px}
.bench-dock #scene-prompt,.bench-dock #video-motion{box-sizing:border-box;flex:1;width:100%;min-height:96px;max-height:260px;margin:0;padding:8px 6px;border:0;border-radius:10px;background:transparent;font-size:17px;line-height:1.55;resize:none;field-sizing:content}
.bench-dock #scene-prompt:focus-visible,.bench-dock #video-motion:focus-visible{outline:1px solid #71875c;outline-offset:0}
.bench-dock .prompt-ideas{justify-content:flex-start;gap:6px;margin:0 0 8px}
.bench-dock .prompt-ideas>span{font-size:11px}
.bench-dock .prompt-ideas button{min-height:32px;padding:5px 11px;font-size:12px}
.bench-dock-footer,.video-dock-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:8px}
.bench-pills{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.bench-pill{display:inline-flex;align-items:center;margin:0}
.bench-pill select{box-sizing:border-box;width:auto;max-width:100%;min-height:36px;padding:6px 30px 6px 13px;border:1px solid #313637;border-radius:999px;background-color:#202324;color:var(--text);font-size:13px;font-weight:500}
.bench-pill select:hover{border-color:#728067}
.bench-pill-button{gap:6px;min-height:36px;padding:0 13px;border:1px solid #313637;border-radius:999px;background:#202324;color:var(--text);font-size:15px;cursor:pointer}
.bench-pill-button:hover{border-color:#728067;background:#262d23}
.bench-style{display:inline-flex;gap:2px;min-width:0;margin:0;padding:2px;border:1px solid #313637;border-radius:999px;background:#202324}
.bench-style button{display:inline-flex;align-items:center;min-height:30px;padding:4px 12px;border:0;border-radius:999px;background:transparent;color:#b3b5bc;font-size:13px;text-align:left;cursor:pointer}
.bench-style button strong{font-weight:500}
.bench-style button .style-icon,.bench-style button small{display:none}
.bench-style button[aria-pressed="true"]{background:#2b3a22;color:var(--green)}
.bench-go{display:flex;align-items:center;gap:12px;margin-left:auto}
.bench-go .button{flex:none;min-height:44px;margin:0;padding:10px 18px;border-radius:12px}
.bench-go .media-credit-estimate{margin:0;font-size:12px;white-space:nowrap}
.bench-dock-status,.bench .video-actions.bench-dock-status{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:12px;margin:6px 0 0;padding:0;border:0}
.bench-dock-status>.field-note{flex:1;min-width:0;margin:0;padding-top:8px;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.bench-more{flex:0 1 auto;font-size:11px;color:var(--muted)}
.bench-more summary{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-height:32px;cursor:pointer;color:#b3b5bc;list-style:none}
.bench-more summary::-webkit-details-marker{display:none}
.bench-more summary::after{content:'▾';font-size:10px;color:var(--green)}
.bench-more[open] summary::after{content:'▴'}
.bench-more .workspace-utilities{justify-content:flex-end;gap:16px;margin:0}
.bench-more .workspace-utilities .text-button{min-height:36px;font-size:12px}
.bench-more .generation-note,.bench-more .local-note{margin:2px 0 0;font-size:11px;text-align:right}
.bench-more p{max-width:420px;margin:4px 0 6px;line-height:1.6}

/* Video dock */
.video-dock-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.bench .video-mode-switch{display:inline-flex;grid-template-columns:none;gap:2px;margin:0;padding:3px;border:1px solid var(--border);border-radius:999px;background:#0f1113}
.bench .video-mode-switch button{min-height:34px;padding:6px 14px;border:0;border-radius:999px;background:transparent;font-size:13px;font-weight:500}
.bench .video-mode-switch button[aria-pressed="true"]{background:#20271c;color:var(--green)}
.bench .video-mode-note{margin:8px 4px 0;font-size:12px}
.video-dock-media{margin:10px 0 2px}
.bench #video-start-block{flex-direction:row;align-items:center;gap:12px}
.bench .video-source-row{flex:0 0 auto;margin:0;gap:10px}
.bench .video-source-preview{flex-basis:56px;width:56px;height:56px;font-size:22px}
.bench .video-source-copy{flex-direction:row;align-items:center;gap:12px}
.bench .video-source-copy .button{min-height:40px;padding:8px 14px;font-size:13px}
.bench .video-source-copy .text-button{font-size:12px;white-space:nowrap}
.bench .video-source-images{flex:1;min-width:0;margin:0;padding:6px}
.bench .video-source-card{flex-basis:56px;width:56px;height:56px}
.bench #video-references-block{flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px 20px}
.video-dock-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.bench .video-field-heading{font-size:11px;font-weight:700}
.video-add-chip{min-height:36px;padding:6px 13px;border:1px dashed #3b4536;border-radius:999px;background:transparent;color:var(--green);font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}
.video-add-chip:hover{border-color:var(--green);background:#182014}
.video-add-chip:disabled{opacity:.5;cursor:not-allowed}
.bench .video-audio-list{flex-direction:row;flex-wrap:wrap}
.bench .video-audio-item{min-height:36px;max-width:220px;padding:0 4px 0 12px;border-radius:999px}
.bench .video-prompt-field{gap:0}
.bench .bench-negative{margin:0;font-size:13px;color:var(--text)}
.bench .bench-negative summary{display:inline-flex;align-items:center;gap:6px;box-sizing:border-box;min-height:36px;padding:0 13px;border:1px solid #313637;border-radius:999px;background:#202324;color:var(--text);font-size:13px;cursor:pointer;list-style:none}
.bench .bench-negative summary::-webkit-details-marker{display:none}
.bench .bench-negative summary::before{content:'−';color:var(--green);font-size:14px}
.bench .bench-negative[open]{flex-basis:100%;order:9}
.bench .bench-negative[open] summary{border-color:#3b4b2e;background:#20271c;color:var(--green)}
.bench .bench-negative textarea{box-sizing:border-box;width:100%;min-height:52px;margin:8px 0 0;padding:9px 12px;border-radius:12px;background:#0b0c0e;font-size:14px;line-height:1.5;color:var(--text)}
.bench .video-audio-option.bench-pill{gap:8px;min-height:36px;margin:0;padding:0 13px;border:1px solid #313637;border-radius:999px;background:#202324;font-size:13px}
.bench .video-dock-footer .bench-go .button{min-width:190px}


/* Tablet and phone: one column, result first, history strip, then the dock in the page flow. */
@media(max-width:1190px){
  .bench-main,.bench .video-studio-layout{grid-template-columns:minmax(0,1fr) 250px}
}
@media(max-width:820px){
  .bench-main{grid-template-columns:minmax(0,1fr)}
  .bench .video-studio-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:"preview" "history" "composer";gap:12px}
  .bench .image-stage{height:300px}
  .bench .video-screen{min-height:240px}
  .bench-rail{padding:12px}
  .bench-rail-grid.image-history-strip{display:flex;grid-template-columns:none;max-height:none;overflow-x:auto;overflow-y:visible}
  .bench-rail-grid .image-history-item{flex:0 0 64px;width:64px;height:64px;aspect-ratio:auto}
  .bench-rail .image-preview-private{margin-top:8px;padding-top:0}
  .bench .video-history{flex-direction:row;max-height:none;overflow-x:auto;overflow-y:visible;padding:6px 6px 10px}
  .bench .video-history-more{width:auto}
  .bench-dock,.bench .video-composer-panel.bench-dock{position:static;margin-top:12px;border-radius:16px;box-shadow:none}
  .bench-dock-row{flex-direction:column;gap:6px}
  .bench-dock .reference-shortcuts{max-width:100%;flex-wrap:wrap}
  .bench #video-start-block{flex-wrap:wrap}
  .bench .video-mode-switch{display:flex;width:100%;overflow-x:auto;scrollbar-width:none}
  .bench .video-mode-switch button{flex:1 0 auto;white-space:nowrap}
  .bench-go{width:100%;flex-wrap:wrap}
  .bench-go .media-credit-estimate{flex-basis:100%;white-space:normal;text-align:left}
  .bench-frame{display:block}
  .bench-go .button,.bench .video-dock-footer .bench-go .button{flex:1;min-width:0}
}
@media(max-width:680px){
  .bench-pill select,.bench-dock #scene-prompt,.bench-dock #video-motion{font-size:16px}
  .bench-dock-status,.bench .video-actions.bench-dock-status{flex-direction:column;gap:0}
  .bench-more summary{justify-content:flex-start}
  .bench-more .workspace-utilities{justify-content:flex-start}
  .bench-more .generation-note,.bench-more .local-note{text-align:left}
}

/* Reference chips in the image dock: characters, location and the owner's images read the same way. */
.bench-dock .character-choice-row{gap:6px}
.bench-dock .character-bubble{flex-basis:36px;width:36px;height:36px}
.bench-dock .image-reference-bubble{border-radius:10px}
.bench-dock .image-reference-bubble>img{border-radius:9px;object-position:center}
.image-reference-option img{aspect-ratio:1;object-fit:cover}
#image-reference-dialog .cast-picker-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}
#image-reference-dialog .cast-picker-actions .field-note{margin:0;flex:1}

/* Cut-out logo and theme switch */
.studio-logo-frame{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
.studio-brand>.studio-logo-frame,.studio-mobile-brand>.studio-logo-frame{overflow:visible;border-radius:0}
.studio-brand .studio-logo-frame img,.studio-mobile-brand .studio-logo-frame img{position:static;left:auto;top:auto;width:100%;height:100%;max-width:100%;object-fit:contain;transform:none}
.studio-logo-frame .studio-logo-light{display:none}
.studio-theme-toggle{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:7px 11px;border:1px solid var(--border);border-radius:7px;background:#131519;color:var(--text);font-size:12px;cursor:pointer}
.studio-theme-toggle:hover{border-color:#676d73}
.studio-theme-toggle span:first-child{font-size:14px;line-height:1}
@media(max-width:680px){#studio-theme-label{display:none}}
/* Gallery page */
.gallery-page{max-width:1240px;margin:0 auto 24px;padding-top:0;border-top:0}
.gallery-page h1{margin:0;font-size:clamp(24px,2.6vw,34px);letter-spacing:-.05em}
.gallery-switches{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.gallery-card-preview video{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.image-preview-actions [aria-pressed="true"],#video-current-share[aria-pressed="true"]{color:var(--green)}

.bench-dock .image-reference-choice .character-bubbles{flex-wrap:wrap;max-width:420px}
#image-reference-dialog .cast-picker-actions .button{flex:none;margin:0}

/* ---- Aligned, contained layout (supersedes the earlier frame rules) ----
   One centred grid: the result and the dock share a column and its edges; the history rail runs
   beside both for their full height. The media always fits whole inside a 16:9 stage. */
.bench-frame{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-areas:"head head" "stage rail" "dock rail";gap:16px;width:min(100%,1240px);margin:0 auto;align-items:stretch}
.bench-frame>.bench-head{grid-area:head;margin:0}
.bench-frame>.bench-main{display:contents}
.bench-frame .bench-stage{grid-area:stage}
.bench-frame .bench-rail{grid-area:rail}
.bench-frame>.bench-dock{grid-area:dock}
.bench-frame>.video-studio-layout{display:contents}
.bench-frame .video-preview-panel{grid-area:stage}
.bench-frame .video-history-panel{grid-area:rail}
.bench-frame .video-composer-panel.bench-dock{grid-area:dock}
.bench-dock,.bench .video-composer-panel.bench-dock{width:100%;max-width:none;margin:0}
/* the rail never stretches the rows: it takes the height of the left column and scrolls inside */
.bench-frame .bench-rail,.bench-frame .video-history-panel{display:flex;flex-direction:column;height:0;min-height:100%;overflow:hidden}
.bench-rail-grid.image-history-strip,.bench .video-history{flex:1 1 0;min-height:0;max-height:none;overflow-y:auto}
/* contained stage: a 16:9 box, capped in height, with the whole media inside */
.bench .image-stage,.bench .video-screen{position:relative;width:100%;height:auto;min-height:0;aspect-ratio:16/9;max-height:min(34vh,400px);flex:none}
.bench .image-stage-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.bench #video-results,.bench .video-result{position:absolute;inset:0;width:100%;height:100%}
.bench .video-result video{width:100%;height:100%;max-height:none;object-fit:contain}
.bench .video-current-placeholder,.bench .video-empty-state,.bench .image-stage-placeholder{position:relative}
@media(max-width:1190px){.bench-frame{grid-template-columns:minmax(0,1fr) 250px}}
@media(max-width:820px){
  .bench-frame{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "stage" "rail" "dock";gap:12px}
  .bench-frame .bench-rail,.bench-frame .video-history-panel{height:auto;min-height:0;overflow:visible}
  .bench-rail-grid.image-history-strip,.bench .video-history{flex:none;overflow-y:visible}
  .bench .image-stage,.bench .video-screen{max-height:none;aspect-ratio:4/3}
}

@media(min-width:821px){
  .bench .image-stage-caption{max-height:calc(1.6em * 2)}
  .bench .video-preview-detail{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:2px 16px;margin-top:10px}
  .bench .video-preview-detail-top{display:contents}
  .bench #video-current-prompt{order:-1;flex:1 1 100%;max-height:1.6em;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .bench #video-current-meta{flex:1 1 auto}
  .bench #video-reuse-prompt,.bench #video-current-share{flex:none;align-self:center;white-space:nowrap}
  .bench #video-current-download{flex:none;order:9}
  .bench-dock #video-motion{min-height:72px}
}

/* My creations: a day-grouped wall of everything the member made */
.creations-page{max-width:1240px;margin:0 auto 24px}
.creations-page h1{margin:0;font-size:clamp(24px,2.6vw,34px);letter-spacing:-.05em}
.creations-count{margin:8px 0 0;font-size:13px;color:var(--muted)}
.creations-groups{display:flex;flex-direction:column;gap:26px;margin-top:22px}
.creations-day-title{margin:0 0 10px;font-size:14px;font-weight:700;letter-spacing:-.01em;color:var(--muted)}
.creations-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:8px}
.creation-tile{position:relative;display:block;aspect-ratio:1;padding:0;overflow:hidden;border:1px solid var(--border);border-radius:14px;background:#0f1113;cursor:pointer}
.creation-tile img,.creation-tile video{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;transition:transform .25s}
.creation-tile:hover img,.creation-tile:hover video{transform:scale(1.04)}
.creation-badge,.creation-shared{position:absolute;left:8px;bottom:8px;padding:3px 8px;border-radius:999px;background:#000a;color:#fff;font-size:11px;line-height:1.4}
.creation-shared{left:auto;right:8px}
.creation-prompt{max-height:180px;overflow:auto;font-size:14px;line-height:1.6;overflow-wrap:anywhere;white-space:pre-wrap}
#creation-dialog .gallery-detail-copy .button{width:100%;margin:6px 0 0}
#creation-dialog .gallery-detail-copy .text-button{align-self:center}
.gallery-sort select{min-width:150px}
@media(max-width:680px){.creations-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.creation-tile{border-radius:8px}}

/* Video player: shown at its own proportions, never upscaled to fill the stage */
.bench .video-screen{max-height:min(32vh,360px)}
.bench #video-results{display:block}
.bench .video-result{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:10px}
.bench .video-result video{position:static;flex:0 1 auto;min-width:0;min-height:0;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;border-radius:10px}
.bench .image-stage-art{box-sizing:border-box;padding:10px}
.bench #video-current-fullscreen{flex:none;white-space:nowrap}
.video-source-slot{position:relative;flex:none}
.video-source-slot .video-start-clear{position:absolute;right:-6px;top:-6px;width:20px;height:20px;font-size:13px;z-index:2}
.bench .video-source-row{flex-wrap:wrap;min-width:0}
.bench .video-source-copy{flex-wrap:wrap;min-width:0;gap:8px 12px}
@media(max-width:820px){.bench .video-source-row{flex:1 1 100%}}

/* Single Images area in the video dock */
.video-dock-top .video-field-heading{font-size:13px}
.video-images-row{gap:8px}
.bench .video-mode-note{margin:8px 2px 0;font-size:12px;color:var(--muted)}
.bench #video-audio-block{margin-top:8px}
.bench .video-source-images:empty{display:none}
.bench .video-source-images{margin-top:8px}
.bench .video-dock-media{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.bench .video-dock-media .video-images-row{flex:0 1 auto}
.bench .video-dock-media .video-source-images{flex:1 1 180px;min-width:0;margin:0;padding:4px}
.bench .video-dock-media .video-source-card{flex-basis:44px;width:44px;height:44px;border-radius:10px}
.bench .video-dock-media .video-mode-note,.bench .video-dock-media #video-audio-block{flex:1 1 100%;margin:0}

/* Walletless coin launch: payment address, amount and progress inside the coin dialog. */
.coin-deposit-steps{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(84px,1fr));gap:8px;padding:0;margin:0 0 18px;counter-reset:deposit}
#coin-dialog a.text-button{display:inline-block;margin:8px 14px 0 0}
.coin-deposit-steps li{counter-increment:deposit;font-size:11px;line-height:1.35;color:var(--muted);border-top:2px solid var(--border);padding-top:8px}
.coin-deposit-steps li::before{content:counter(deposit) ". "}
.coin-deposit-steps li[data-state="done"]{border-color:var(--green);color:var(--text)}
.coin-deposit-steps li[data-state="current"]{border-color:var(--green);color:var(--text);font-weight:700}
.coin-deposit-amount{font-size:30px;font-weight:700;letter-spacing:-.01em;margin:10px 0 8px;color:var(--text)}
.coin-deposit-address{display:block;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--raised);font-size:13px;line-height:1.5;overflow-wrap:anywhere;user-select:all}
.coin-deposit-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 4px}
.coin-deposit-warning{font-size:13px;line-height:1.6;padding:12px 14px;border:1px solid var(--amber);border-radius:10px;color:var(--text)}
input.coin-deposit-wallet{width:100%;min-height:44px;margin:6px 0 16px;font-size:13px}
input.coin-deposit-devbuy{width:100%;min-height:44px;font-size:13px}
.coin-upload-preview{display:flex;gap:12px;align-items:center;margin:8px 0 12px;padding:10px;border:1px solid var(--line,rgba(255,255,255,.12));border-radius:14px}
.coin-upload-preview img{width:72px;height:72px;border-radius:12px;object-fit:cover;flex:none;background:#000}
.coin-upload-preview strong{display:block;font-size:13px;margin-bottom:2px}.coin-upload-preview .field-note{margin:0}
#coin-upload-note[data-state="error"]{color:var(--danger,#ff7b7b)}
@media (max-width:520px){.coin-deposit-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.coin-deposit-amount{font-size:24px}}

/* Deleting own images: a small corner control on each rail thumbnail. */
.image-history-cell{position:relative;min-width:0;aspect-ratio:1}
.bench-rail-grid .image-history-cell .image-history-item{width:100%;height:100%;flex:none;aspect-ratio:auto}
@media (max-width:1190px){.bench-rail-grid .image-history-cell{flex:0 0 64px;width:64px;height:64px;aspect-ratio:auto}}
.image-history-delete{position:absolute;top:-4px;right:-4px;width:22px;height:22px;padding:0;border:1px solid var(--border);border-radius:50%;background:var(--panel);color:var(--text);font-size:14px;line-height:1;cursor:pointer;opacity:0;transition:opacity .15s}
.image-history-cell:hover .image-history-delete,.image-history-cell:focus-within .image-history-delete,.image-history-delete:focus-visible{opacity:1}
@media (hover:none){.image-history-delete{opacity:1}}
.creation-delete{color:var(--amber)}
/* Reference picker: uploading from the computer is the first thing you see. */
.image-reference-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 0 12px}
.image-reference-toolbar .button{margin:0}
.image-reference-upload-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:2px dashed var(--border);background:transparent;text-align:center;padding:12px}
.image-reference-upload-tile .image-reference-upload-icon{font-size:28px;line-height:1;color:var(--green)}
.image-reference-upload-tile small{color:var(--muted);font-size:11px}

/* Text pages: How it works and Updates. */
.doc-page{max-width:760px;margin:0 auto;padding:8px 0 48px}
.doc-page h1{font-size:clamp(26px,3vw,34px);letter-spacing:-.04em;margin:6px 0 10px}
.doc-page .intro{font-size:15px;line-height:1.6;color:var(--muted);margin:0 0 26px}
.doc-section{padding:18px 0;border-top:1px solid var(--border)}
.doc-section h2{font-size:17px;margin:0 0 8px}
.doc-section p{margin:0;font-size:14px;line-height:1.7;color:var(--text)}
.updates-list{display:flex;flex-direction:column;gap:22px}
.updates-entry{padding:20px 22px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}
.updates-head{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted);margin-bottom:6px}
.updates-tag{padding:2px 9px;border-radius:999px;border:1px solid var(--border);font-size:11px;letter-spacing:.04em;text-transform:uppercase}
.updates-entry h2{font-size:18px;margin:0 0 10px}
.updates-entry ul{margin:0;padding-left:18px;display:grid;gap:6px;font-size:14px;line-height:1.6}

/* Video model picker: expands in place instead of the browser's native dropdown. */
.model-menu{position:relative;display:inline-flex}
.model-menu-toggle{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:6px 14px;border:1px solid var(--border);border-radius:999px;background:var(--raised);color:var(--text);font-size:13px;font-weight:500;cursor:pointer}
.model-menu-toggle[aria-expanded="true"],.model-menu-toggle:hover{border-color:var(--green)}
.model-menu-toggle:disabled{opacity:.5;cursor:default}
.model-menu-caret{font-size:11px;color:var(--muted)}
.model-menu-list{position:absolute;top:calc(100% + 6px);right:0;z-index:30;min-width:200px;margin:0;padding:6px;list-style:none;border:1px solid var(--border);border-radius:12px;background:var(--panel);box-shadow:0 18px 50px #0006}
.model-menu-option{display:block;width:100%;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:var(--text);font:inherit;font-size:13px;text-align:left;cursor:pointer}
.model-menu-option:hover,.model-menu-option:focus-visible{background:var(--raised);outline:none}
.model-menu-list [aria-selected="true"] .model-menu-option{color:var(--green);font-weight:700}
.model-menu-list [aria-selected="true"] .model-menu-option::after{content:" ✓"}

/* Motion transfer (Genjutsu): the source video block in the video dock. */
.video-source-block{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.video-source-block .field-note{flex-basis:100%;margin:0}
.video-source-current{display:inline-flex;align-items:center;gap:10px;padding:6px 8px 6px 6px;border:1px solid var(--border);border-radius:12px;background:var(--raised)}
.video-source-current video{width:96px;height:54px;border-radius:8px;object-fit:cover;background:#000}
.video-source-name{font-size:13px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Studio home: greeting and feature panels. */
.home-page{max-width:1040px;margin:0 auto;padding:8px 0 48px}
.home-page h1{font-size:clamp(28px,3.4vw,40px);letter-spacing:-.04em;margin:6px 0 8px}
.home-page .intro{font-size:15px;color:var(--muted);margin:0 0 24px}
.home-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.home-card{display:flex;flex-direction:column;gap:8px;padding:20px;border:1px solid var(--border);border-radius:16px;background:var(--panel);color:var(--text);text-decoration:none;min-height:150px;transition:border-color .15s,transform .15s}
.home-card:hover{border-color:var(--green);transform:translateY(-2px)}
.home-card-icon{font-size:22px;color:var(--green)}
.home-card strong{font-size:17px}.home-card span:last-child{font-size:13px;line-height:1.55;color:var(--muted)}
.home-side{margin-top:22px}
.home-latest-card{display:flex;flex-direction:column;gap:6px;padding:16px 18px;border:1px solid var(--border);border-radius:14px;background:var(--raised);color:var(--text);text-decoration:none}
.home-latest-card strong{font-size:15px}.home-latest-card p{margin:0;font-size:13px;color:var(--muted);line-height:1.5}
@media (max-width:900px){.home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.home-grid{grid-template-columns:1fr}}
/* Video swap (Higgsfield Genjutsu): mode toggle, rail tabs and motion library. */
.swap-by{color:var(--amber)}
#video-swap-heading .intro{font-size:14px;color:var(--muted);margin:8px 0 0;max-width:640px}
.video-swap-modes{display:inline-flex;padding:3px;border:1px solid var(--border);border-radius:999px;background:var(--raised)}
.video-swap-modes button{padding:7px 14px;border:0;border-radius:999px;background:transparent;color:var(--muted);font:inherit;font-size:13px;cursor:pointer}
.video-swap-modes button[aria-pressed="true"]{background:var(--panel);color:var(--text);box-shadow:0 0 0 1px var(--border)}
.video-rail-tabs{display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.video-rail-tabs button{padding:6px 12px;border:1px solid var(--border);border-radius:999px;background:transparent;color:var(--muted);font:inherit;font-size:12px;cursor:pointer}
.video-rail-tabs button[aria-selected="true"]{color:var(--green);border-color:var(--green)}
.video-library-grid{display:grid;gap:12px}
.video-library-card{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--raised)}
.video-library-media{position:relative;aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:#000}
.video-library-media img{width:100%;height:100%;object-fit:cover;display:block}
.video-library-card strong{font-size:13px}.video-library-card p{margin:2px 0 0;font-size:12px;color:var(--muted);line-height:1.5}
.video-howto ol{margin:0;padding-left:18px;display:grid;gap:10px;font-size:13px;line-height:1.55;color:var(--text)}

/* Drag & drop target and the video trim dialog. */
.bench-dock.is-dragover{outline:2px dashed var(--green);outline-offset:-6px;background:color-mix(in srgb,var(--green) 6%,var(--panel))}
.video-trim-player{width:100%;max-height:min(46vh,420px);border-radius:12px;background:#000;display:block}
.video-trim-readout{margin:10px 0 4px;font-size:13px;font-variant-numeric:tabular-nums;color:var(--text)}
.video-trim-range{display:grid;grid-template-columns:auto 1fr;gap:8px 12px;align-items:center;margin:6px 0 14px;font-size:12px;color:var(--muted)}
.video-trim-range input[type=range]{width:100%;accent-color:var(--green)}

.home-latest-card .updates-tag{align-self:flex-start}

/* Estimated progress while a video generates (providers give no real progress). */
.video-progress{width:min(100%,320px);height:6px;border-radius:999px;background:var(--raised);overflow:hidden}
.video-progress span{display:block;height:100%;width:0;border-radius:999px;background:var(--green);transition:width .9s linear}
.video-progress-eta{margin:0;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.video-library-sources{margin-bottom:10px}
.video-library-result{width:100%;text-align:left;cursor:pointer;color:inherit;font:inherit}
.video-library-result:hover{border-color:var(--green)}
.video-library-media video{width:100%;height:100%;object-fit:cover;display:block}
.video-library-details{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px 12px;margin:12px 0 16px;font-size:13px}
.video-library-details dt{color:var(--muted)}.video-library-details dd{margin:0;overflow-wrap:anywhere}
.video-library-assets{display:flex;flex-wrap:wrap;gap:6px}
.video-library-assets img{width:44px;height:44px;border-radius:8px;object-fit:cover;border:1px solid var(--border)}
.coin-deposit-qr{display:flex;flex-direction:column;align-items:center;gap:10px;margin:4px 0}
.coin-deposit-qr img{width:180px;height:180px;padding:8px;border-radius:12px;background:#fff}
.coin-deposit-open-wallet{display:none;text-decoration:none}
@media (hover:none) and (pointer:coarse){.coin-deposit-open-wallet{display:inline-flex}}
.coin-deposit-details{margin:4px 0 12px;font-size:13px}.coin-deposit-details summary{cursor:pointer;color:var(--muted)}
.coin-deposit-amount{text-align:center}
#coin-dialog .coin-deposit-amount{font-size:30px;font-weight:700;margin:6px 0 10px}

/* Account page and the home Buybacks strip. */
.account-tabs{margin-bottom:16px}
.account-table{width:100%;border-collapse:collapse;font-size:13px}
.account-table th{text-align:left;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:8px 10px;border-bottom:1px solid var(--border)}
.account-table td{padding:10px;border-bottom:1px solid var(--border);vertical-align:top;overflow-wrap:anywhere}
.account-panel .button{margin-top:16px}
.home-buybacks{margin-top:18px;padding:18px 20px;border:1px solid var(--border);border-radius:16px;background:var(--panel)}
.home-buybacks-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.home-buybacks-head h2{margin:2px 0 0;font-size:18px}
.home-buybacks-copy{font-size:13px;line-height:1.6;color:var(--muted);margin:10px 0 12px}
.home-buybacks-list{display:grid;gap:6px}
.home-buyback-row{display:grid;grid-template-columns:64px 80px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 10px;border-radius:10px;background:var(--raised);color:var(--text);text-decoration:none;font-size:13px}
.home-buyback-row:hover{outline:1px solid var(--green)}
@media (max-width:560px){.home-buyback-row{grid-template-columns:56px 70px minmax(0,1fr)}.home-buyback-row .updates-tag{display:none}}
.coin-deposit-progress{display:flex;align-items:center;gap:10px;margin:4px 0 14px;font-size:13px;color:var(--text)}
.coin-deposit-spinner{width:18px;height:18px;flex:none;border-radius:50%;border:2px solid var(--border);border-top-color:var(--green);animation:coin-deposit-spin .9s linear infinite}
@keyframes coin-deposit-spin{to{transform:rotate(360deg)}}
.coin-deposit-fee-label{display:flex;flex-direction:column;gap:6px;margin:10px 0 6px;font-size:13px;color:var(--muted)}
.coin-deposit-fee{min-height:40px;font-size:14px}
.coin-fees{margin:12px 0}
/* In-Studio coin leaderboard (same renderer as the public page) */
.studio-board .tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.studio-board .tabs button{padding:8px 14px;border:1px solid var(--border);border-radius:999px;background:var(--panel);color:var(--text);font:inherit;font-size:13px;cursor:pointer}
.studio-board .tabs button[aria-pressed="true"]{border-color:var(--green);color:var(--green)}
.studio-board .meta{font-size:12px;color:var(--muted);margin:0 0 12px}
.studio-board .wrap{overflow-x:auto}
.studio-board table{width:100%;border-collapse:collapse;background:var(--panel);border:1px solid var(--border);border-radius:14px;overflow:hidden}
.studio-board th,.studio-board td{padding:12px 14px;text-align:right;border-bottom:1px solid var(--border);font-variant-numeric:tabular-nums;white-space:nowrap}
.studio-board th{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.studio-board th:first-child,.studio-board td:first-child,.studio-board th:nth-child(2),.studio-board td:nth-child(2){text-align:left}
.studio-board tr:last-child td{border-bottom:0}
.studio-board .coin{display:flex;align-items:center;gap:12px;min-width:0}
.studio-board .coin img,.studio-board .coin .placeholder{width:40px;height:40px;border-radius:10px;object-fit:cover;background:var(--raised);flex:none}
.studio-board .coin .placeholder{display:grid;place-items:center;font-size:11px;font-weight:700;color:var(--muted)}
.studio-board .coin strong{display:block;font-size:14px}.studio-board .coin small{display:block;color:var(--muted);font-size:12px}
.studio-board .badge{display:inline-block;margin-left:8px;padding:2px 8px;border-radius:999px;background:#b4ff6a22;color:var(--green);font-size:10px;letter-spacing:.06em;vertical-align:middle}
.studio-board .bar{position:relative;height:6px;width:90px;border-radius:999px;background:var(--raised);display:inline-block;vertical-align:middle;margin-right:8px}
.studio-board .bar i{position:absolute;inset:0;width:var(--w);border-radius:999px;background:var(--green)}
.studio-board .sub{display:block;color:var(--muted);font-size:11px}
.studio-board .empty{padding:48px 20px;text-align:center;color:var(--muted);border:1px dashed var(--border);border-radius:14px}.studio-board .empty a{color:var(--green)}
.studio-board .foot{margin-top:18px;font-size:12px;color:var(--muted)}
@media (max-width:720px){.studio-board th:nth-child(5),.studio-board td:nth-child(5),.studio-board th:nth-child(7),.studio-board td:nth-child(7){display:none}.studio-board table{min-width:560px}.studio-board th,.studio-board td{padding:10px 8px;font-size:13px}}

/* Coin live dialog */
.coin-live-lead{margin:4px 0 12px;font-size:15px}
.coin-live-actions{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 14px}
.coin-live-cta{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 20px;border-radius:12px;font-weight:600}
.coin-live-cta.primary{font-size:15px}
.coin-live-mint{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px}
.coin-live-mint code{flex:1 1 260px;min-width:0;overflow-wrap:anywhere}
.coin-fees-card{border:1px solid var(--border);border-radius:14px;padding:14px 16px;margin:0 0 12px;background:var(--panel)}
.coin-fees-card h3{margin:0 0 8px;font-size:14px;letter-spacing:.02em}
.coin-fees-card .coin-fees{margin:0}
