/* NeoAI — Neo Studio (14 Nov 2026). Same quiet look as the rest of the app: its colours, its type, its pills. */
.media-acts { display: inline-flex; align-items: center; gap: 2px; }
.sd { overflow-y: auto; padding: 26px clamp(16px, 2.4vw, 32px) 40px; }
.sd-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sd-top h1 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.04em; line-height: 1.1; }
.sd-tabs button { height: 38px; padding: 0 16px; font-size: 14.5px; }
.sd-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr) 200px; gap: 22px; align-items: start; }
.sd-panel { display: grid; gap: 14px; min-width: 0; }
.sd-stage { min-width: 0; min-height: 420px; border-radius: 22px; background: var(--soft); padding: 18px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.sd-hist { min-width: 0; position: sticky; top: 0; }
.sd-grid.sd-wide { grid-template-columns: minmax(0, 1fr) 200px; } .sd-grid.sd-wide .sd-panel { display: none; }
.sd-lead { margin: 0; color: var(--muted); font-size: 15px; }
.sd-busy .sd-stage::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--fg), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: stBar 1.1s linear infinite; }
@keyframes stBar { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* the prompt box */
.sd-box { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 10px 10px 8px; transition: border-color .2s, box-shadow .3s var(--ease); position: relative; }
.sd-box:focus-within { border-color: var(--line-2); box-shadow: 0 6px 26px rgba(0,0,0,.06); }
.sd-prompt { display: block; width: 100%; border: 0; outline: 0; resize: vertical; background: transparent; font-size: 15.5px; line-height: 1.5; padding: 4px 6px; min-height: 64px; max-height: 260px; }
.sd-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 6px; }
.sd-mini { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; font-size: 13.5px; color: var(--fg-2); background: var(--soft); transition: background .2s, color .2s; }
.sd-mini:hover { background: var(--soft-2); color: var(--fg); }
.sd-mini.on { background: var(--dark); color: var(--on-dark); }
.sd-mini svg { width: 15px; height: 15px; }
.sd-thumb { position: relative; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--soft-2); flex: none; display: grid; place-items: center; }
.sd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-thumb i { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: rgba(20,20,18,.7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.sd-thumb i svg { width: 10px; height: 10px; }
.sd-thumb.add { border: 1px dashed var(--line-2); background: none; color: var(--muted); }
.sd-thumb.add svg { width: 16px; height: 16px; }
.sd-thumb.sheet { width: 72px; outline: 1.5px solid var(--line-2); }
.sd-at { position: absolute; left: 8px; top: calc(100% + 6px); min-width: 240px; display: grid; gap: 2px; animation: pop .2s var(--ease); }
.sd-at button, .sd-models button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border-radius: 10px; text-align: left; font-size: 14px; }
.sd-at button.on, .sd-at button:hover, .sd-models button:hover, .sd-models button.on { background: var(--soft); }
.sd-at img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; }
.sd-at small, .sd-models small { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.sd-at b, .sd-models b { font-weight: 500; }

/* elements */
.sd-els { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.sd-els::-webkit-scrollbar { display: none; }
.sd-el { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; transition: border-color .2s, background .2s; }
.sd-el:hover { border-color: var(--line-2); background: var(--soft); }
.sd-el img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.sd-el-new { padding-left: 10px; color: var(--muted); border-style: dashed; }
.sd-el-new svg { width: 14px; height: 14px; }

/* level and model */
.sd-level { display: flex; align-items: center; gap: 8px; position: relative; flex-wrap: wrap; }
.sd-level .seg-mini button { min-width: 58px; }
.sd-level .seg-mini button:disabled { opacity: .4; cursor: default; }
.sd-model { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: 12px; font-size: 13.5px; color: var(--muted); transition: background .2s, color .2s; max-width: 100%; }
.sd-model span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-model:hover, .sd-model.on { background: var(--soft); color: var(--fg); }
.sd-model svg { width: 14px; height: 14px; flex: none; }
.sd-model .sd-logo { width: 20px; height: 20px; background: none; }
.sd-model .sd-logo svg { width: 16px; height: 16px; }
.sd-models { top: calc(100% + 6px); left: 0; right: 0; padding: 6px; display: flex; flex-direction: column; max-height: 380px; animation: pop .2s var(--ease); }
.sd-models.over, .sd-sizes.over { transform-origin: bottom left; }
.sd-mlist { overflow-y: auto; display: grid; gap: 2px; min-height: 0; overscroll-behavior: contain; }
.sd-models button { padding: 6px 10px 6px 7px; min-height: 46px; }
.sd-models button[hidden] { display: none; }
.sd-models button:disabled { opacity: .45; cursor: default; }
.sd-models button > svg { width: 15px; height: 15px; margin-left: auto; flex: none; color: var(--muted); }
.sd-logo { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--soft); display: grid; place-items: center; color: var(--fg); font-style: normal; }
.sd-models button:hover .sd-logo, .sd-models button.on .sd-logo { background: var(--panel); }
.sd-logo svg { width: 17px; height: 17px; margin: 0; color: inherit; }
.sd-logo.neo svg { width: 15px; height: 15px; }
.sd-logo em { font-style: normal; font-weight: 600; font-size: 13px; color: var(--muted); }
.sd-mname { display: grid; min-width: 0; line-height: 1.25; }
.sd-mname b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-models .sd-mname small { margin: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-find { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; margin-bottom: 4px; border-radius: 10px; background: var(--soft); color: var(--muted); flex: none; }
.sd-find svg { width: 15px; height: 15px; flex: none; }
.sd-find input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: var(--fg); }
.sd-none { padding: 14px 10px; font-size: 13.5px; color: var(--muted); text-align: center; }
/* exact sizes */
.sd-anchor { position: relative; }
.sd-size { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 11px; border-radius: 999px; font-size: 13.5px; color: var(--muted); border: 1px solid var(--line); justify-self: start; max-width: 100%; transition: background .15s, color .15s, border-color .15s; }
.sd-size:hover { background: var(--soft); color: var(--fg); }
.sd-size.on { background: var(--dark); color: var(--on-dark); border-color: transparent; }
.sd-size > svg { width: 15px; height: 15px; flex: none; }
.sd-size > svg:last-child { width: 13px; height: 13px; opacity: .7; }
.sd-size em { font-style: normal; font-size: 12.5px; opacity: .7; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sd-sname { display: flex; align-items: baseline; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; }
.sd-sname b { font-weight: 500; flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sd-sname span { font-size: 12.5px; opacity: .72; overflow: hidden; text-overflow: ellipsis; }
.sd-sizes { top: calc(100% + 6px); left: 0; right: 0; padding: 6px; max-height: 400px; overflow-y: auto; overscroll-behavior: contain; animation: pop .2s var(--ease); }
.sd-sizes h6 { margin: 10px 10px 4px; font-size: 11.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.sd-sizes button { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border-radius: 10px; text-align: left; font-size: 14px; color: var(--fg); }
.sd-sizes button:hover, .sd-sizes button.on { background: var(--soft); }
.sd-sizes button > svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.sd-sizes button > svg:last-child:not(.sd-shape) { width: 15px; height: 15px; }
.sd-sizes button em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sd-sizes button em + svg { margin-left: 0; }
.sd-sizes .sd-sname span { color: var(--muted); opacity: 1; }
.sd-sizes .sd-sname { flex: 1; }

/* fields, chips, groups */
.sd-field { display: grid; gap: 7px; min-width: 0; }
.sd-field > label, .sd-sub { font-size: 12.5px; color: var(--muted); letter-spacing: .01em; }
.sd-sub { margin: 12px 0 7px; display: flex; justify-content: space-between; }
.sd-sub b { font-weight: 500; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-chips button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; background: var(--soft); color: var(--fg-2); transition: background .15s, color .15s; white-space: nowrap; }
.sd-chips button:hover { background: var(--soft-2); color: var(--fg); }
.sd-chips button.on { background: var(--dark); color: var(--on-dark); }
.sd-chips button:disabled { opacity: .38; cursor: default; }
.sd-chips button svg { width: 15px; height: 15px; flex: none; }
.sd-chips.moves button { padding: 0 11px 0 9px; }
.sd-sw { display: inline-flex; border-radius: 4px; overflow: hidden; flex: none; }
.sd-sw b { width: 7px; height: 14px; display: block; }
.sd-group { border-top: 1px solid var(--line); }
.sd-dir .sd-group:last-child { border-bottom: 1px solid var(--line); }
.sd-group summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 44px; cursor: pointer; font-size: 14.5px; user-select: none; }
.sd-group summary::-webkit-details-marker { display: none; }
.sd-group summary em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sd-group summary svg { width: 15px; height: 15px; margin-left: auto; color: var(--faint); transition: transform .25s var(--ease); }
.sd-group[open] summary svg { transform: rotate(180deg); }
.sd-group[open] { padding-bottom: 14px; }
.sd-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--faint); line-height: 1.4; }
.sd-range { width: 100%; accent-color: var(--fg); height: 22px; }
.sd-row { display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; height: 36px; }
.sd-ta { height: auto; padding: 10px 14px; resize: vertical; line-height: 1.45; font-size: 14.5px; border-radius: 12px; }
.sd-num { height: 40px; border-radius: 12px; max-width: 140px; }
.sd-check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; color: var(--fg-2); cursor: pointer; padding: 6px 8px; border-radius: 10px; margin: 0 -8px; }
.sd-check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--fg); flex: none; }
.sd-check.need, .sd-el-real.need .sd-check { background: rgba(220,38,38,.08); color: var(--bad); }
.sd-note { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.sd-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.sd-gobar { position: sticky; bottom: 0; z-index: 2; padding: 14px 0 18px; margin-bottom: -18px; background: linear-gradient(to bottom, transparent, var(--panel) 30%); }
.sd-gobar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 48px; background: var(--panel); pointer-events: none; }
.sd-go { width: 100%; height: 48px; gap: 6px; }
.sd-go-p { opacity: .72; font-weight: 400; font-variant-numeric: tabular-nums; }
.sd-go:disabled .sd-go-l::after { content: "…"; }

/* frames and slots */
.sd-frames { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-slot { position: relative; flex: 1 1 120px; min-height: 84px; max-width: 200px; border-radius: 14px; border: 1px dashed var(--line-2); display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); font-size: 12.5px; overflow: hidden; transition: border-color .2s, background .2s; padding: 8px; text-align: center; }
.sd-slot:hover { border-color: var(--fg); background: var(--soft); color: var(--fg); }
.sd-slot > svg { width: 18px; height: 18px; }
.sd-slot.has { border-style: solid; border-color: var(--line); padding: 0; }
.sd-slot.has img, .sd-slot.has video { width: 100%; height: 84px; object-fit: cover; display: block; }
.sd-slot.has > span { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(20,20,18,.68); color: #fff; font-size: 11.5px; }
.sd-slot-a { height: 84px; display: grid; place-items: center; }
.sd-slot-x { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; background: rgba(20,20,18,.7); color: #fff; display: grid; place-items: center; }
.sd-slot-x svg { width: 11px; height: 11px; }
.sd-mode { width: 100%; } .sd-mode button { flex: 1; height: 34px; }

/* multi-shot */
.sd-shots { display: grid; gap: 8px; }
.sd-shot { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 8px; align-items: start; }
.sd-shot > b { width: 22px; height: 22px; margin-top: 8px; border-radius: 50%; background: var(--soft-2); font-size: 12px; font-weight: 500; display: grid; place-items: center; }
.sd-shot textarea { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 8px 10px; font-size: 14px; line-height: 1.4; resize: vertical; outline: none; min-height: 40px; }
.sd-shot textarea:focus { border-color: var(--line-2); }
.sd-shot select { height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 13px; padding: 0 4px; }
.sd-shot i { width: 26px; height: 38px; display: grid; place-items: center; color: var(--faint); cursor: pointer; } .sd-shot i:hover { color: var(--fg); }
.sd-shot i svg { width: 14px; height: 14px; }
.sd-shot-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* video editing: the list of operations */
.sd-oplist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sd-oplist button { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 10px; border-radius: 12px; background: var(--soft); font-size: 13.5px; text-align: left; line-height: 1.25; transition: background .15s, color .15s; }
.sd-oplist button:hover { background: var(--soft-2); }
.sd-oplist button.on { background: var(--dark); color: var(--on-dark); }
.sd-oplist button:disabled { opacity: .45; cursor: default; }
.sd-oplist button > svg { width: 17px; height: 17px; flex: none; }
.sd-oplist button > span { flex: 1; min-width: 0; }
.sd-oplist em, .sd-tag { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: rgba(22,163,74,.14); color: var(--ok); flex: none; }
.sd-oplist button.on em { background: rgba(255,255,255,.18); color: inherit; }
.sd-opbody { display: grid; gap: 12px; }

/* the stage */
.sd-empty { padding: 60px 16px; margin: auto; }
.sd-empty-ic { width: 54px; height: 54px; border-radius: 18px; background: var(--panel); display: grid; place-items: center; color: var(--fg-2); }
.sd-empty-ic svg { width: 26px; height: 26px; }
.sd-empty-p { border: 1px dashed var(--line-2); border-radius: 16px; padding: 18px; color: var(--muted); font-size: 14.5px; }
.sd-empty-p p { margin: 0; }
.sd-wait { margin: auto; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 50px 16px; }
.sd-wait h3 { font-size: 19px; } .sd-wait p { margin: 0; color: var(--muted); max-width: 40ch; font-size: 14.5px; } .sd-wait em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.sd-spin { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--fg); animation: spin .8s linear infinite; display: block; }
.sd-spin.sm { width: 16px; height: 16px; border-width: 2px; }
.sd-msg { margin: auto; display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 46ch; padding: 40px 16px; }
.sd-msg svg { width: 26px; height: 26px; color: var(--bad); } .sd-msg p { margin: 0; font-size: 15px; line-height: 1.5; }
.sd-one { position: relative; display: grid; place-items: center; min-height: 240px; }
.sd-one img, .sd-one video { max-width: 100%; max-height: min(62vh, 640px); border-radius: 14px; display: block; background: repeating-conic-gradient(var(--soft-2) 0 25%, var(--panel) 0 50%) 0 0 / 18px 18px; }
.sd-one.masking img { user-select: none; -webkit-user-drag: none; }
#stMask { position: absolute; border-radius: 14px; cursor: crosshair; touch-action: none; opacity: .55; mix-blend-mode: normal; filter: drop-shadow(0 0 0 #2563eb); background: rgba(37,99,235,.08); }
.sd-outs { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sd-outs.n1 { grid-template-columns: 1fr; } .sd-outs.n3, .sd-outs.n5, .sd-outs.n6, .sd-outs.n7, .sd-outs.n8, .sd-outs.n9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sd-outs button { border-radius: 14px; overflow: hidden; background: var(--soft-2); transition: transform .25s var(--ease), box-shadow .25s; }
.sd-outs button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sd-outs img, .sd-outs video { width: 100%; display: block; border-radius: 14px; }
.sd-strip { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.sd-strip button { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; opacity: .6; outline: 2px solid transparent; outline-offset: 1px; transition: opacity .2s; }
.sd-strip button.on, .sd-strip button:hover { opacity: 1; } .sd-strip button.on { outline-color: var(--fg); }
.sd-strip img { width: 100%; height: 100%; object-fit: cover; }
.sd-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sd-tools button, .sd-tools a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--panel); font-size: 13.5px; color: var(--fg-2); transition: background .15s, color .15s; }
.sd-tools button:hover, .sd-tools a:hover { color: var(--fg); background: var(--soft-2); }
.sd-tools button.on { background: var(--dark); color: var(--on-dark); }
.sd-tools button:disabled { opacity: .4; cursor: default; }
.sd-tools svg { width: 15px; height: 15px; }
.sd-toolbox { background: var(--panel); border-radius: 16px; padding: 14px; display: grid; gap: 12px; max-width: 560px; width: 100%; margin: 0 auto; }
.sd-toolbox .sd-gobar { position: static; padding: 0; margin: 0; background: none; } .sd-toolbox .sd-gobar::after { display: none; }
.sd-toolbox .sd-go { height: 44px; }
.sd-toolrow { display: flex; align-items: center; gap: 12px; }
.sd-brush, .sd-slide { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex: 1; }
.sd-meta { display: flex; justify-content: center; gap: 14px; font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* history */
.sd-hist-h { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.sd-hist-l { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: calc(100vh - 190px); overflow-y: auto; scrollbar-width: thin; padding: 2px; }
.sd-hist-e { font-size: 13px; color: var(--faint); margin: 0; line-height: 1.45; }
.sd-h { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--soft); display: grid; place-items: center; color: var(--faint); outline: 2px solid transparent; outline-offset: 1px; transition: outline-color .2s; }
.sd-h.on { outline-color: var(--fg); }
.sd-h img, .sd-h video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-h > svg { width: 18px; height: 18px; }
.sd-h.failed { color: var(--bad); }
.sd-h i { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: rgba(20,20,18,.7); color: #fff; font-size: 11px; font-style: normal; display: grid; place-items: center; }
.sd-h u { position: absolute; left: 5px; bottom: 5px; width: 20px; height: 20px; border-radius: 50%; background: rgba(20,20,18,.7); color: #fff; display: grid; place-items: center; text-decoration: none; }
.sd-h u svg { width: 10px; height: 10px; }

/* apps */
.sd-cats button { height: 34px; padding: 0 14px; font-size: 13.5px; background: var(--panel); }
.sd-cats button:hover { background: var(--soft-2); }
.sd-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.sd-app { position: relative; display: grid; gap: 4px; align-content: start; text-align: left; padding: 8px 8px 12px; border-radius: 16px; background: var(--panel); transition: transform .25s var(--ease), box-shadow .25s; outline: 2px solid transparent; }
.sd-app:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sd-app.on { outline-color: var(--fg); }
.sd-app-sample { position: relative; aspect-ratio: 4 / 3; border-radius: 11px; background: var(--soft); display: grid; place-items: center; color: var(--faint); margin-bottom: 6px; overflow: hidden; }
.sd-app-sample > svg { width: 30px; height: 30px; }
.sd-app-sample img { width: 100%; height: 100%; object-fit: cover; }
.sd-app-k { position: absolute; right: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--panel); color: var(--fg-2); display: grid; place-items: center; }
.sd-app-k svg { width: 9px; height: 9px; }
.sd-app b { font-weight: 500; font-size: 14px; line-height: 1.25; padding: 0 4px; }
.sd-app small { color: var(--muted); font-size: 12.5px; line-height: 1.35; padding: 0 4px; }
.sd-app .sd-tag { position: absolute; top: 14px; left: 14px; background: var(--panel); }
.sd-app .sd-tag.lock { color: var(--muted); display: grid; place-items: center; padding: 3px; } .sd-tag.lock svg { width: 12px; height: 12px; }
.sd-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); height: 30px; width: max-content; }
.sd-back:hover { color: var(--fg); } .sd-back svg { width: 15px; height: 15px; }
.sd-app-h { display: flex; gap: 12px; align-items: flex-start; }
.sd-app-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--soft); display: grid; place-items: center; flex: none; }
.sd-app-ic svg { width: 21px; height: 21px; }
.sd-app-h h3 { font-size: 17px; } .sd-app-h p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.4; }

/* the element window */
.sd-modal { place-items: center; padding: 16px; }
.sd-card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 24px 20px; display: grid; gap: 14px; }
.sd-card-h { display: flex; align-items: center; justify-content: space-between; }
.sd-card-h h3 { font-size: 20px; }
.sd-el-type { width: 100%; } .sd-el-type button { flex: 1; min-width: 0; }
.sd-el-imgs { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-el-imgs .sd-thumb { width: 56px; height: 56px; border-radius: 12px; }
.sd-el-imgs .sd-thumb.sheet { width: 100px; }
.sd-el-prod { display: grid; gap: 14px; }
.sd-card .modal-foot { margin-top: 2px; }

/* ───────── One quiet system (15 Nov 2026) ─────────
   Every setting is a row: its name on the left, its control on the right. A few short options are a segmented control;
   many are a menu of ours (never the browser's list). The prompt boxes grow by themselves. Nothing is dashed. */
.sd-grid { grid-template-columns: 344px minmax(0, 1fr) 168px; gap: 24px; }
.sd-panel { gap: 12px; }
.sd-stage { position: sticky; top: 0; min-height: min(600px, calc(100vh - 150px)); }
.sd-box { border-radius: 22px; padding: 12px 12px 10px; }
.sd-prompt { resize: none; min-height: 70px; overflow-y: auto; }
.sd-refs { gap: 4px; padding-top: 8px; }
.sd-box .sd-mini { background: none; color: var(--muted); padding: 0 9px; }
.sd-box .sd-mini:hover { background: var(--soft); color: var(--fg); }
.sd-box .sd-mini.on { background: var(--dark); color: var(--on-dark); }
.sd-box .sd-els { display: contents; }
.sd-el { border: 0; background: var(--soft); height: 32px; padding: 0 11px 0 3px; }
.sd-el:hover { background: var(--soft-2); }
.sd-el img { width: 26px; height: 26px; }
.sd-el-new { background: none; color: var(--muted); padding: 0 9px; }
.sd-el-new:hover { background: var(--soft); color: var(--fg); }
/* 17 Nov 2026: the saved elements, behind one button (no longer always in the prompt bar) */
.sd-el-at { font-weight: 600; font-size: 14px; line-height: 1; }
.sd-el-menu { max-height: 320px; overflow-y: auto; }
.sd-el-item { display: flex; align-items: center; gap: 2px; }
.sd-el-item > button[data-el] { flex: 1; min-width: 0; }
.sd-el-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.sd-at .sd-el-edit { flex: none; width: 30px; height: 30px; padding: 0; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.sd-at .sd-el-edit:hover { background: var(--soft); color: var(--fg); }
.sd-el-edit svg { width: 14px; height: 14px; }
.sd-at .sd-el-add { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 2px; padding-top: 9px; }
.sd-at .sd-el-add svg { width: 14px; height: 14px; }
/* rows */
.sd-set { display: grid; gap: 2px; }
.sd-level { display: contents; }
.sd-field { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 42px; position: relative; }
.sd-field > label { font-size: 14.5px; color: var(--fg); letter-spacing: 0; flex: none; }
.sd-field > :not(label):not(.seg):not(.seg-mini):not(.sd-pick):not(.toggle):not(.menu):not(.sd-slot):not(.sd-num) { flex: 1 1 100%; min-width: 0; }
.sd-field > .sd-chips:not(.seg) { padding-bottom: 6px; }
.sd-field > .sd-num { flex: 0 0 96px; height: 36px; text-align: right; border-radius: 12px; }
.sd-chips.seg { flex-wrap: nowrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--soft); max-width: 100%; }
.sd-chips.seg button { height: 30px; min-width: 38px; padding: 0 11px; border-radius: 9px; background: none; color: var(--muted); justify-content: center; }
.sd-chips.seg button:hover { background: none; color: var(--fg); }
.sd-chips.seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.sd-level .seg-mini button { min-width: 54px; }
.sd-pick { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 12px; border-radius: 12px; background: var(--soft); font-size: 14px; color: var(--fg); max-width: 72%; min-width: 0; transition: background .15s; }
.sd-pick:hover { background: var(--soft-2); }
.sd-pick > svg:last-child { width: 14px; height: 14px; flex: none; color: var(--muted); }
.sd-pick-v { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; white-space: nowrap; }
.sd-pick-v svg { width: 17px; height: 17px; flex: none; color: var(--fg-2); }
.sd-pick-l { overflow: hidden; text-overflow: ellipsis; }
.sd-pick-l.none { color: var(--faint); }
.sd-pick.sm { height: 32px; font-size: 13.5px; padding: 0 6px 0 10px; border-radius: 10px; max-width: none; }
.sd-pick .sd-sname { font-size: 14px; }
.sd-model.sd-pick { color: var(--fg); padding-left: 8px; }
.sd-model.sd-pick:hover, .sd-model.sd-pick.on { background: var(--soft-2); }
.sd-model.sd-pick.on { background: var(--soft); }
.sd-models { top: calc(100% + 4px); }
.sd-pop { padding: 6px; min-width: 190px; max-width: 100%; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 2px; animation: pop .18s var(--ease); }
.sd-pop button, .sd-tools .sd-pop button { display: flex; align-items: center; gap: 9px; width: 100%; height: auto; min-height: 36px; padding: 0 10px; border-radius: 10px; background: none; font-size: 14px; text-align: left; color: var(--fg); white-space: nowrap; }
.sd-pop button:hover, .sd-pop button.on, .sd-tools .sd-pop button:hover { background: var(--soft); color: var(--fg); }
.sd-pop button:disabled { opacity: .4; cursor: default; }
.sd-pop button svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.sd-pop .sd-pick-l, .sd-pop button > span { flex: 1; }
.sd-pop button > svg:last-child:not(:first-child) { width: 15px; height: 15px; }
/* the picture's format: proportions as a small grid, exact sizes below */
.sd-ars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding-bottom: 2px; }
.sd-sizes .sd-ars button { flex-direction: column; justify-content: center; gap: 3px; height: 58px; padding: 0; border-radius: 12px; font-size: 12.5px; color: var(--fg-2); }
.sd-sizes .sd-ars button > svg { width: 22px; height: 22px; }
.sd-sizes .sd-ars button.on { color: var(--fg); }
.sd-sizes .sd-ars button.on > svg { color: var(--fg); }
/* direction: the same rows, with what is chosen on the right */
.sd-dir { border-top: 1px solid var(--line); padding-top: 6px; }
.sd-group, .sd-dir .sd-group:last-child { border: 0; }
.sd-group summary { height: 42px; }
.sd-group summary em { margin-left: auto; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.sd-group summary em + svg { margin-left: 0; }
.sd-group[open] { padding-bottom: 12px; }
/* files: a soft tile, not a dashed box */
.sd-slot { border: 0; background: var(--soft); border-radius: 16px; min-height: 76px; max-width: none; }
.sd-slot:hover { background: var(--soft-2); border: 0; }
.sd-slot.has { border: 0; }
.sd-slot.has img, .sd-slot.has video, .sd-slot-a { height: 76px; }
.sd-slot.sm { flex: none; width: 52px; height: 36px; min-height: 36px; padding: 0; border-radius: 11px; overflow: visible; }
.sd-slot.sm > svg { width: 16px; height: 16px; }
.sd-slot.sm.has img { width: 52px; height: 36px; border-radius: 11px; }
.sd-slot.sm .sd-slot-x { top: -6px; right: -6px; width: 18px; height: 18px; }
/* shots: one card, a line per shot */
.sd-shots { gap: 0; border: 1px solid var(--line); border-radius: 20px; padding: 4px 8px 6px 14px; }
.sd-shot { grid-template-columns: 16px minmax(0, 1fr) auto auto; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); position: relative; }
.sd-shot > b { width: 16px; height: 20px; margin-top: 7px; background: none; color: var(--faint); font-size: 13px; }
.sd-shot textarea { border: 0; border-radius: 0; background: none; padding: 6px 0; resize: none; min-height: 34px; font-size: 14.5px; }
.sd-shot i { height: 32px; width: 22px; }
.sd-shot-acts { padding-top: 6px; margin-left: -8px; gap: 2px; }
.sd-shot-acts .sd-mini { background: none; color: var(--muted); padding: 0 9px; }
.sd-shot-acts .sd-mini:hover { background: var(--soft); color: var(--fg); }
.sd-panel textarea, .sd-stage textarea { resize: none; }
/* our own lists inside the flow editor */
.sd-finput, .sd-frow, .sd-node-h, .sd-nin { position: relative; }
.sd-finput .sd-pick, .sd-frow .sd-pick, .sd-node .sd-pick { max-width: none; width: 100%; justify-content: space-between; height: 38px; }
.sd-node .sd-pick { height: 34px; font-size: 13.5px; border-radius: 10px; padding: 0 6px 0 10px; }
.sd-node-h .sd-pick { background: none; font-weight: 500; font-size: 14.5px; padding-left: 4px; }
.sd-node-h .sd-pick:hover { background: var(--soft); }
.sd-frow .sd-pick { flex: 1; min-width: 120px; width: auto; }
.sd-node .sd-pop, .sd-finput .sd-pop { min-width: 100%; }
/* the button stays in sight; what passes under it fades */
.sd-gobar { padding-top: 26px; background: linear-gradient(to bottom, transparent, var(--panel) 48%); }
/* video operations: a plain list */
.sd-oplist button { background: none; min-height: 40px; }
.sd-oplist button:hover { background: var(--soft); }
.sd-oplist button.on { background: var(--soft); color: var(--fg); font-weight: 500; }
.sd-oplist button > svg { color: var(--fg-2); }
.sd-oplist button.on em { background: rgba(22,163,74,.14); color: var(--ok); }
/* the tools under a picture: one strip */
.sd-tools { position: relative; justify-content: flex-start; align-items: center; gap: 2px; padding: 5px; border-radius: 16px; background: var(--panel); max-width: 560px; width: 100%; margin: 0 auto; }
.sd-tools > button, .sd-tools > a { height: 34px; padding: 0 10px; border-radius: 11px; background: none; }
.sd-tools > button:hover, .sd-tools > a:hover { background: var(--soft); }
.sd-tools > button.on { background: var(--dark); color: var(--on-dark); }
.sd-tools-r { margin-left: auto; display: inline-flex; gap: 2px; }
.sd-tools .ic { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 11px; background: none; color: var(--muted); }
.sd-tools .ic:hover { background: var(--soft); color: var(--fg); }
.sd-tools .sd-pop { min-width: 200px; }
.sd-toolbox { gap: 4px; padding: 14px 16px 16px; }
.sd-toolbox h4 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.sd-tools > button[data-more] > svg:last-child { width: 13px; height: 13px; opacity: .6; margin-left: -2px; }
@media (min-width: 481px) { .sd-tools > button[data-tool] > svg, .sd-tools > button[data-animate] > svg, .sd-tools > button[data-more] > svg:first-child, .sd-tools > button[data-vedit] > svg { display: none; } .sd-tools > button, .sd-tools > a { padding: 0 11px; } }
.sd-toolbox .sd-gobar { padding-top: 8px; }

@media (max-width: 1279px) {
  .sd-grid { grid-template-columns: 320px minmax(0, 1fr); }
  .sd-grid.sd-wide { grid-template-columns: minmax(0, 1fr); }
  .sd-hist { grid-column: 1 / -1; position: static; }
  .sd-hist-l { display: flex; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .sd-h { flex: 0 0 72px; }
}
@media (max-width: 899px) {
  .sd { padding: 60px 14px 28px; }
  .sd-top { margin-bottom: 14px; }
  .sd-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sd-stage { position: static; min-height: 260px; padding: 12px; border-radius: 18px; }
  .sd-panel, .sd-stage { scroll-margin-top: 60px; }  /* the menu button stays on top while the page scrolls to them */
  .sd-slot { max-width: none; }
  .sd-apps { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .sd-one img, .sd-one video { max-height: 56vh; }
  .sd-gobar { position: static; padding: 4px 0 0; margin: 0; background: none; } .sd-gobar::after { display: none; }
}
@media (max-width: 480px) {
  .sd-tabs { width: 100%; } .sd-tabs button { flex: 1; padding: 0 8px; justify-content: center; }
  .sd-top h1 { font-size: 24px; }
  .sd-oplist { grid-template-columns: 1fr; }
  .sd-tools > button span, .sd-tools > a span { display: none; }
  .sd-tools > button, .sd-tools > a { width: 38px; padding: 0; justify-content: center; }
  .sd-tools > button.on span { display: inline; } .sd-tools > button.on { width: auto; padding: 0 12px; }
  .sd-card { padding: 18px 16px 16px; }
}

/* ---------------- Ads and Flows (web/studio-more.js, 14 Nov 2026) ---------------- */
.sd-step { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.sd-step b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--dark); color: var(--on-dark); font-size: 12px; font-weight: 600; }
.sd-row > .field { flex: 1; min-width: 0; }
.sd-prod { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; }
.sd-prod img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--soft); }
.sd-prod div { flex: 1; min-width: 0; display: grid; gap: 2px; } .sd-prod b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-prod small { color: var(--muted); font-size: 13px; }
.sd-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sd-wbtn { width: 100%; justify-content: center; gap: 8px; } .sd-wbtn svg { width: 17px; height: 17px; }
.sd-script { display: grid; gap: 12px; width: 100%; max-width: 640px; margin: 0 auto; text-align: left; align-self: start; }
.sd-script h3 { font-size: 19px; font-weight: 600; margin: 0; } .sd-script h4, .sd-adlist h4, .sd-break h4 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 8px 0 0; }
.sd-script .field, .sd-node .field, .sd-finput .field { background: var(--panel); }
.sd-shotcard { display: flex; gap: 10px; align-items: flex-start; } .sd-shotcard > div { flex: 1; display: grid; gap: 6px; min-width: 0; }
.sd-shotcard > b { flex: 0 0 22px; height: 22px; margin-top: 8px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.sd-break { display: grid; gap: 4px; padding-top: 4px; }
.sd-brow { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.sd-brow em { font-style: normal; color: var(--muted); } .sd-brow span:last-child { color: var(--muted); white-space: nowrap; }
.sd-adlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; width: 100%; max-width: 640px; margin: 18px auto 0; align-self: start; text-align: left; }
.sd-adlist h4 { grid-column: 1 / -1; }
.sd-adrow { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--panel); text-align: left; min-width: 0; }
.sd-adrow:hover { box-shadow: 0 0 0 1px var(--line); }
.sd-adrow img, .sd-adrow video, .sd-adph { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: var(--soft); display: grid; place-items: center; }
.sd-adph svg { width: 20px; height: 20px; color: var(--muted); }
.sd-adrow span { display: grid; min-width: 0; } .sd-adrow b { font-weight: 500; font-size: 14px; } .sd-adrow small { color: var(--muted); font-size: 12.5px; }
.sd-under { margin-top: 12px; }
.sd-flist { display: grid; gap: 6px; }
.sd-flist button { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 14px; background: var(--soft); text-align: left; }
.sd-flist button:hover { background: var(--line); } .sd-flist b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sd-flist small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.sd-finput { display: grid; grid-template-columns: minmax(0, 1fr) 108px 32px; gap: 6px; align-items: center; }
.sd-frow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .sd-frow .field { flex: 1; min-width: 96px; }
.sd-board { position: relative; display: flex; flex-wrap: wrap; gap: 30px 40px; align-items: flex-start; width: 100%; padding: 6px 4px 14px; align-self: start; text-align: left; }
.sd-links { position: absolute; left: 0; top: 0; pointer-events: none; } .sd-links path { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .55; }
.sd-col { display: grid; gap: 14px; flex: 0 0 228px; position: relative; z-index: 1; } .sd-col-in { flex-basis: 150px; }
.sd-node { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.sd-node-h { display: grid; grid-template-columns: 22px minmax(0, 1fr) 28px; gap: 6px; align-items: center; }
.sd-node-h b { width: 22px; height: 22px; border-radius: 50%; background: var(--dark); color: var(--on-dark); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.sd-node-h select { font-weight: 500; }
.sd-nin { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 6px; align-items: center; font-size: 13px; color: var(--muted); } .sd-nin.req > span::after { content: " *"; }
.sd-node .field { padding: 6px 8px; font-size: 13.5px; min-height: 0; height: auto; }
.sd-node-in { justify-items: start; color: var(--muted); font-size: 13.5px; } .sd-node-in svg { width: 18px; height: 18px; }
.sd-node-in em { font-style: normal; color: var(--fg); background: var(--soft); border-radius: 999px; padding: 2px 9px; font-size: 13px; }
.sd-node-add { place-items: center; justify-items: center; min-height: 86px; color: var(--muted); background: transparent; box-shadow: none; border: 1.5px dashed var(--line); font-size: 14px; cursor: pointer; }
.sd-node-add:hover { color: var(--fg); border-color: var(--muted); } .sd-node-add svg { width: 18px; height: 18px; }
.share-report { font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 0; background: none; border: 0; }
@media (max-width: 899px) {
  .sd-board { flex-direction: column; flex-wrap: nowrap; gap: 26px; } .sd-col, .sd-col-in { flex: 0 0 auto; width: 100%; }
}
.sd-grid.sd-nohist { grid-template-columns: 340px minmax(0, 1fr); } .sd-grid.sd-nohist .sd-hist { display: none; }
@media (max-width: 1279px) { .sd-grid.sd-nohist { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 899px) { .sd-grid.sd-nohist { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .sd-tabs svg { display: none; } .sd-tabs button { padding: 0 4px; font-size: 14px; min-width: 0; } }
@media (max-width: 480px) { .sd-under button span { display: inline; } .sd-under button { width: auto; padding: 0 12px; } }
