/* Video Gen — Flow-style canvas + floating composer + side panels, in the Backstage palette. */
:root {
  --bg:#0e1014; --bg2:#151920; --bg3:#1b2029; --bg4:#242b36; --in:#0f131a;
  --line:#262c37; --line2:#333a47;
  --fg:#e6e9ef; --fg2:#9aa3b2; --fg3:#6b7482;
  --brand:#B01A18; --brand2:#d63b39; --navy:#2f6ad1; --ok:#22a06b; --warn:#d99b2b;
  --r:9px;
  --font:'Open Sans',system-ui,sans-serif; --head:'Montserrat',system-ui,sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2b323e; border-radius: 8px; border: 2px solid var(--bg2); }
::-webkit-scrollbar-track { background: transparent; }
.ic { width: 20px; height: 20px; fill: currentColor; display: block; flex: none; }
.grow { flex: 1; }

.shell { position: fixed; inset: 0; display: flex; }

/* ---------- stage ---------- */
.stage { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; }
.bar { flex: none; height: 64px; display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, 430px) auto 1fr; align-items: center; gap: 10px; padding: 0 16px; }
/* Same wordmark as SPACE and BACKSTAGE: white first half, CTI red second half */
.bar-start { justify-self: start; display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; font: 800 19px var(--head); letter-spacing: .02em; }
.logo b { color: #fff; font-weight: 800; }
.logo img { height: 32px; width: auto; display: block; }
.bar-end { justify-self: end; }
.search { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; color: var(--fg2); transition: .14s; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(176,26,24,.18); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); }
.search input::placeholder { color: var(--fg3); }

.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--fg2); transition: .14s; }
.icon-btn:hover { background: var(--bg3); color: var(--fg); }
.icon-btn.solid { background: var(--bg2); border: 1px solid var(--line); color: var(--fg); }
.icon-btn.solid:hover { background: var(--bg3); border-color: var(--line2); }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn.xs { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.xs .ic { width: 17px; height: 17px; }
.icon-btn.round { width: 34px; height: 34px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--line2); color: var(--fg); }
.icon-btn.round:hover { background: var(--bg4); }
.icon-btn.on { background: var(--bg3); color: var(--brand2); }

/* canvas */
.canvas { flex: 1; overflow-y: auto; padding: 8px 24px 210px; }
.empty { position: absolute; inset: 64px 0 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; pointer-events: none; }
.empty p { margin: 0; font-size: 21px; color: var(--fg2); letter-spacing: -.01em; }
.pixel { width: 52px; height: 52px; }
.pixel rect { fill: var(--fg); }
.pixel rect.red { fill: var(--brand2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; max-width: 1400px; margin: 0 auto; }
.tile { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); aspect-ratio: 16/9; cursor: pointer; transition: .18s; }
.tile:hover { border-color: var(--line2); transform: translateY(-2px); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px; background: linear-gradient(transparent, rgba(0,0,0,.85)); font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: .18s; }
.tile:hover .tile-cap { opacity: 1; }
.tile.pending { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; color: var(--fg2); font-size: 12.5px; background: linear-gradient(110deg, var(--bg2) 30%, var(--bg3) 50%, var(--bg2) 70%) 0 0/300% 100%; animation: shimmer 2.2s linear infinite; }
.tile.pending b { color: var(--fg); font-weight: 600; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile.pending.failed { animation: none; color: #ff8f8d; }
@keyframes shimmer { to { background-position: -300% 0; } }

.dock { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; z-index: 5; }
.dock .composer { pointer-events: auto; width: 100%; max-width: 620px; box-shadow: 0 20px 50px -12px rgba(0,0,0,.9); }

.drop { position: absolute; inset: 10px; z-index: 20; border: 2px dashed var(--brand2); border-radius: 18px; background: rgba(176,26,24,.08); display: none; place-items: center; font-size: 18px; font-weight: 600; color: var(--fg); pointer-events: none; }
.drop.on { display: grid; }

/* ---------- composer ---------- */
.composer { background: var(--bg2); border: 1px solid var(--line2); border-radius: 20px; padding: 12px 10px 10px 16px; }
.attach-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.att { position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--in); border: 1px solid var(--line2); flex: none; }
.att img, .att video { width: 100%; height: 100%; object-fit: cover; display: block; }
.att .att-x { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; padding: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 13px; line-height: 18px; display: none; }
.att:hover .att-x { display: block; }
.att.loading::after { content: ''; position: absolute; inset: 0; background: rgba(14,16,20,.6) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><circle cx='9' cy='9' r='7' fill='none' stroke='%23fff' stroke-width='2' stroke-dasharray='30 14'><animateTransform attributeName='transform' type='rotate' from='0 9 9' to='360 9 9' dur='.8s' repeatCount='indefinite'/></circle></svg>") no-repeat center; }
.att .vid-tag { position: absolute; left: 4px; bottom: 3px; font-size: 9.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.prompt-row { display: flex; gap: 6px; align-items: flex-start; }
#prompt { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: none; color: var(--fg); font-size: 15px; line-height: 1.5; padding: 4px 0 10px; max-height: 160px; }
#prompt::placeholder { color: var(--fg3); }
.composer.tall #prompt { min-height: 180px; max-height: 50vh; }
.tool-row { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line2); background: transparent; color: var(--fg2); font: 600 13px var(--head); text-decoration: none; transition: .14s; white-space: nowrap; }
.pill:hover { background: var(--bg3); border-color: #4a5467; color: #fff; }
.pill.on, .pill.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill.on:hover, .pill.primary:hover { background: var(--brand2); border-color: var(--brand2); }
.pill:disabled { opacity: .45; cursor: not-allowed; }
.settings-sum { font-size: 11.5px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.send { width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--bg3); color: var(--fg3); transition: .14s; flex: none; }
.send.ready { background: var(--brand); color: #fff; }
.send.ready:hover { background: var(--brand2); }
.send:disabled { opacity: .5; cursor: not-allowed; }
.send .spinner { width: 16px; height: 16px; }

/* ---------- small popover (sort) ---------- */
.pop-anchor { position: relative; }
.pop { position: absolute; z-index: 50; display: none; background: var(--bg3); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.85); }
.pop.open { display: block; }
.pop.menu { top: calc(100% + 8px); right: 0; min-width: 180px; padding: 5px; }
.pop.menu button { display: block; width: 100%; text-align: left; padding: 8px 11px; border: 0; border-radius: 8px; background: none; color: var(--fg); font-size: 13px; }
.pop.menu button:hover { background: var(--bg4); }
.pop.menu button.on { color: var(--brand2); font-weight: 600; }

/* ---------- side panels (chat + settings) ---------- */
.side { width: 0; flex: none; overflow: hidden; display: flex; flex-direction: column; background: var(--bg2); border-left: 0 solid var(--line); transition: width .25s ease; }
.side.open { width: 420px; border-left-width: 1px; }
.side > * { width: 420px; }
.side-head { flex: none; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); }
.side-head h2 { flex: 1; min-width: 0; margin: 0; font: 700 15px var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side.settings .side-head { padding-left: 8px; }
.side-logo { width: 22px; height: 22px; object-fit: contain; flex: none; }

.agent-body { flex: 1; overflow-y: auto; padding: 16px 16px; display: flex; flex-direction: column; }
.agent-slot { flex: none; padding: 0 12px 12px; }
.agent-slot .composer { background: var(--bg3); }

.welcome { margin: auto 0 0; padding-bottom: 8px; }
.welcome h3, .welcome p { margin: 0; text-align: center; font: 600 22px var(--head); color: var(--fg2); letter-spacing: -.01em; }
.welcome p { margin-bottom: 60px; }
.ideas { display: flex; flex-direction: column; gap: 10px; }
.idea { display: flex; align-items: center; gap: 14px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg3); text-align: left; transition: .14s; }
.idea:hover { background: var(--bg4); border-color: var(--line2); }
.idea-art { width: 60px; height: 60px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 28px; background: var(--in); }
.idea b { display: block; font: 700 13.5px var(--head); color: #fff; }
.idea small { display: block; color: var(--fg2); font-size: 12px; margin-top: 2px; }

.thread { display: flex; flex-direction: column; gap: 14px; }
.thread:empty { display: none; }
.m-user { align-self: flex-end; max-width: 85%; background: var(--brand); color: #fff; padding: 8px 13px; border-radius: 14px 14px 3px 14px; white-space: pre-wrap; word-break: break-word; }
.m-user .m-att { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.m-user .m-att img, .m-user .m-att video { width: 46px; height: 46px; object-fit: cover; border-radius: 7px; display: block; }
.m-ai { align-self: flex-start; max-width: 100%; color: var(--fg); white-space: pre-wrap; }
.m-ai .who { display: flex; align-items: center; gap: 7px; color: var(--fg2); font: 700 11.5px var(--head); letter-spacing: .02em; margin-bottom: 4px; }
.m-ai .who img { width: 15px; height: 15px; object-fit: contain; }
.card { background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; padding: 14px; white-space: normal; margin-top: 4px; }

/* settings panel */
.settings-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.settings-foot { flex: none; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.s-label { font: 700 12px var(--head); color: var(--fg2); margin: 18px 0 8px; }
.radio-card { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 4px; border: 1px solid transparent; }
.radio-card:hover { background: var(--bg3); }
.radio-card input { display: none; }
.radio-card i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fg3); flex: none; margin-top: 2px; position: relative; }
.radio-card input:checked + i { border-color: var(--brand); }
.radio-card input:checked + i::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand); }
.radio-card:has(input:checked) { background: var(--bg3); border-color: var(--line2); }
.radio-card b { display: block; font-weight: 600; font-size: 13.5px; }
.radio-card small { display: block; color: var(--fg2); font-size: 12px; line-height: 1.4; }

.types { display: flex; flex-direction: column; gap: 4px; }
.type { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; transition: .14s; }
.type:hover { background: var(--bg3); }
.type.on { background: rgba(176,26,24,.12); border-color: rgba(176,26,24,.55); }
.type .em { font-size: 17px; width: 24px; text-align: center; flex: none; }
.type b { display: block; font-weight: 600; font-size: 13px; }
.type small { display: block; color: var(--fg3); font-size: 11.5px; line-height: 1.35; }
.type.on b { color: #ff9b99; }

/* Even grids, so wrapped options line up in columns instead of stretching unevenly */
.seg { display: grid; gap: 3px; padding: 3px; background: var(--in); border: 1px solid var(--line2); border-radius: 10px; }
.seg.cols-2 { grid-template-columns: repeat(2, 1fr); }
.seg.cols-3 { grid-template-columns: repeat(3, 1fr); }
.seg.cols-4 { grid-template-columns: repeat(4, 1fr); }
.seg button { min-width: 0; border: 0; background: none; color: var(--fg2); padding: 8px 6px; border-radius: 7px; font: 600 12.5px var(--head); white-space: nowrap; transition: .14s; }
.seg button:hover { color: var(--fg); background: var(--bg3); }
.seg button.on { background: var(--brand); color: #fff; }
.seg.ratios button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 4px 8px; }
.r { display: block; border: 1.6px solid currentColor; border-radius: 2px; }
.r-16-9 { width: 18px; height: 10px; margin: 3px 0; }
.r-1-1 { width: 13px; height: 13px; margin: 1.5px 0; }
.r-4-5 { width: 12px; height: 15px; margin: .5px 0; }
.r-9-16 { width: 10px; height: 16px; }

.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg3); border: 1px solid var(--line); cursor: pointer; }
.switch-row > span:first-child { flex: 1; }
.switch-row b { display: block; font-size: 13px; font-weight: 600; }
.switch-row small { display: block; font-size: 11.5px; color: var(--fg3); }
.sw input { display: none; }
.sw i { width: 36px; height: 20px; border-radius: 99px; background: var(--line2); position: relative; transition: .18s; display: block; }
.sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #8d95a3; transition: .18s; }
.sw input:checked + i { background: var(--brand); }
.sw input:checked + i::after { left: 18px; background: #fff; }

.credits { padding: 10px 12px; border-radius: 10px; background: var(--in); border: 1px solid var(--line); font-size: 12.5px; color: var(--fg2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.credits b { color: var(--fg); }
.credits.warn { color: #e6c88a; background: rgba(217,155,43,.10); border-color: rgba(217,155,43,.32); }
.bar-mini { width: 60px; height: 4px; border-radius: 2px; background: var(--line2); overflow: hidden; }
.bar-mini i { display: block; height: 100%; background: var(--ok); }
.save-btn { width: 100%; height: 42px; border: 1px solid var(--brand); border-radius: var(--r); background: var(--brand); color: #fff; font: 600 14px var(--head); transition: .14s; }
.save-btn:hover { background: var(--brand2); border-color: var(--brand2); }

/* progress inside the card */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font: 700 11px var(--head); letter-spacing: .03em; background: var(--bg4); color: var(--fg3); white-space: nowrap; height: fit-content; text-transform: capitalize; }
.chip.active, .chip.generating { background: rgba(47,106,209,.16); color: #7aa8f0; }
.chip.done { background: rgba(34,160,107,.16); color: #4ad295; }
.chip.failed { background: rgba(176,26,24,.16); color: #ff9b99; }
.line { font-size: 13px; color: var(--fg2); margin-bottom: 10px; }
.line .spinner { margin-right: 7px; }
.err { color: #ff8f8d; font-size: 13px; font-weight: 600; }
.shots { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.shot { display: flex; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font-size: 12.5px; }
.shot-n { font: 800 12.5px var(--head); color: var(--brand2); min-width: 16px; }
.shot-b { flex: 1; min-width: 0; }
.shot-v { color: var(--fg); }
.shot-t { color: var(--fg2); font-style: italic; margin-top: 2px; }
.result video { width: 100%; border-radius: 10px; background: #000; display: block; margin-bottom: 10px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* plan editor */
.plan-h { font-size: 13px; color: var(--fg2); margin-bottom: 10px; }
.plan { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; margin-bottom: 12px; }
.plan-item { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.plan-item.dragging { opacity: .4; }
.plan-item:focus-within { border-color: var(--line2); }
.plan-grip { cursor: grab; color: var(--fg3); padding: 3px 1px; user-select: none; line-height: 1; letter-spacing: -2px; }
.plan-f { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-n { font: 700 11px var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--brand2); }
.plan-f textarea { width: 100%; resize: vertical; border: 1px solid var(--line2); background: var(--in); color: var(--fg); border-radius: 7px; padding: 6px 9px; font-size: 12.5px; line-height: 1.45; outline: 0; transition: .14s; }
.plan-f textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(176,26,24,.18); }
.plan-f textarea.narr { font-style: italic; color: var(--fg2); }
.plan-x { border: 0; background: none; color: var(--fg3); font-size: 18px; line-height: 1; padding: 2px 5px; border-radius: 6px; }
.plan-x:hover { color: #ff8f8d; background: rgba(176,26,24,.16); }

.spinner { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid rgba(255,255,255,.22); border-top-color: currentColor; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- viewer + toast ---------- */
.viewer { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.8); display: grid; place-items: center; padding: 24px; }
.viewer-box { width: min(1100px, 100%); background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; }
.viewer-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line); }
.viewer-head span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 700 14px var(--head); }
.viewer video { width: 100%; max-height: 75vh; background: #000; display: block; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 120; background: var(--bg3); border: 1px solid var(--line2); color: var(--fg); padding: 10px 16px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; box-shadow: 0 18px 40px -16px rgba(0,0,0,.8); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(176,26,24,.6); color: #ffb3b2; }

/* ---------- projects ---------- */
.proj-btn { display: flex; align-items: center; gap: 7px; height: 36px; max-width: 240px; padding: 0 8px 0 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--fg); font: 600 13px var(--head); transition: .14s; }
.proj-btn:hover { background: var(--bg3); border-color: var(--line2); }
.proj-btn .ic { width: 17px; height: 17px; color: var(--fg3); }
.proj-btn .caret { width: 18px; height: 18px; }
.proj-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.proj-pop { top: calc(100% + 8px); left: 0; width: 300px; padding: 6px; }
.proj-h { padding: 6px 10px 6px; font: 700 11.5px var(--head); color: var(--fg3); letter-spacing: .04em; text-transform: uppercase; }
.proj-list { max-height: 50vh; overflow-y: auto; }
.proj-row { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.proj-row:hover { background: var(--bg4); }
.proj-row.on { background: rgba(176,26,24,.14); }
.proj-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0; background: none; color: var(--fg); font-size: 13px; text-align: left; }
.proj-pick b { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-row.on .proj-pick b { color: #ff9b99; }
.proj-pick small { color: var(--fg3); font-size: 11.5px; flex: none; }
.proj-tool { width: 28px; height: 28px; border-radius: 7px; border: 0; background: none; color: var(--fg3); display: none; place-items: center; flex: none; }
.proj-row:hover .proj-tool { display: grid; }
.proj-tool:hover { background: var(--bg3); color: var(--fg); }
.proj-tool.del:hover { color: #ff8f8d; background: rgba(176,26,24,.16); }
.proj-tool .ic { width: 16px; height: 16px; }
.proj-new { border-top: 1px solid var(--line2); margin-top: 6px; padding-top: 6px; }
.proj-add { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--fg2); font: 600 13px var(--head); text-align: left; }
.proj-add:hover { background: var(--bg4); color: #fff; }
.proj-add .ic { width: 17px; height: 17px; }
.proj-edit { display: flex; gap: 6px; padding: 4px; }
.proj-edit input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--in); color: var(--fg); font-size: 13px; outline: 0; }
.proj-edit input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(176,26,24,.18); }
.proj-edit .pill { height: 32px; padding: 0 12px; }
.proj-confirm { padding: 8px 10px; font-size: 12.5px; color: var(--fg2); }
.proj-confirm b { color: var(--fg); }
.proj-confirm .acts { margin-top: 8px; }
.proj-confirm .pill { height: 30px; padding: 0 12px; }
.move { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg2); }
.move select { height: 32px; max-width: 180px; padding: 0 26px 0 10px; border-radius: 8px; border: 1px solid var(--line2); appearance: none; color: var(--fg); font-size: 13px;
  background: var(--in) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='7'><path fill='%239aa3b2' d='M0 0h10L5 7z'/></svg>") no-repeat right 9px center; }

/* ---------- account ---------- */
.bar-end { display: flex; align-items: center; gap: 6px; }
.user-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: linear-gradient(145deg,#c0302d,#7d1311); color: #fff; font: 700 12.5px var(--head); letter-spacing: .02em; }

/* ---------- sign-in (shared CTI design: Athena, CTI Sign, Backstage, SPACE) ---------- */
.lg { position: fixed; inset: 0; z-index: 200; display: flex; overflow: auto; background: var(--bg); font-size: 16px; line-height: normal; }
.lg-wrap { width: 100%; max-width: 448px; padding: 16px; margin: auto; }   /* margin:auto centres without clipping the top on short screens */
.lg-logo { background: var(--bg2); border: 1px solid var(--line); border-bottom: none; border-radius: 16px 16px 0 0; padding: 32px 32px 12px; display: flex; justify-content: center; }
.lg-logo img { width: 144px; height: 144px; object-fit: contain; display: block; }
.lg-form { background: var(--bg2); border: 1px solid var(--line); border-top: none; border-radius: 0 0 16px 16px; padding: 8px 40px 32px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.7); text-align: center; }
.lg-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.lg-sub { font-size: 14px; color: var(--fg2); }
.lg-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px; border: 0; border-radius: 6px; background: #fff; color: #111827; font-size: 14px; font-weight: 700; margin-top: 24px; transition: background .15s; }
.lg-btn:hover { background: #f3f4f6; }
.lg-hint { font-size: 14px; color: var(--fg2); margin-top: 12px; }
.lg-hint b { color: var(--fg); }
.lg-err { display: none; padding: 12px; background: rgba(239,68,68,.10); border: 1px solid rgba(176,26,24,.2); border-radius: 6px; margin-top: 16px; font-size: 13px; color: #fecaca; text-align: left; }
.lg-err.on { display: block; }
.lg-note { text-align: center; margin-top: 32px; font-size: 12px; color: var(--fg3); line-height: 1.45; }

/* ---------- small screens: side panels cover the stage ---------- */
@media (max-width: 900px) {
  .bar { grid-template-columns: auto 1fr auto auto; }
  .logo span { display: none; }
  .proj-btn { max-width: 150px; }
  .side.open { position: fixed; inset: 0; width: 100%; z-index: 60; }
  .side > * { width: 100%; }
  .settings-sum { display: none; }
}

/* ---------- home + social pages (Backstage events-list layout) ---------- */
.home { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); }
.h-top { height: 56px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.h-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font: 800 15px var(--head); letter-spacing: .01em; }
.h-logo img { height: 26px; width: auto; display: block; flex: none; }
.h-logo-t { display: flex; flex-direction: column; line-height: 1.15; }
.h-logo-t small { font: 500 10.5px var(--font); letter-spacing: .02em; color: var(--fg3); }
.h-sep { width: 1px; height: 24px; background: var(--line); margin: 0 2px; }
.h-tabs { display: flex; gap: 2px; }
.h-tabs a { padding: 7px 13px; border-radius: 8px; font: 600 13px var(--head); color: var(--fg2); text-decoration: none; white-space: nowrap; }
.h-tabs a:hover, .h-tabs a.on { background: var(--bg3); color: var(--fg); }
.h-who { font-size: 12px; color: var(--fg2); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-page { flex: 1; overflow: auto; padding: 30px 32px 60px; }
.h-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.h-card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); }
.h-stat { padding: 16px 18px; }
.h-stat b { display: block; font: 700 26px/1.1 var(--head); }
.h-stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg3); font-weight: 700; }
.h-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.h-head h1 { font: 700 26px/1.2 var(--head); margin: 0; }
.h-head h2 { font: 700 18px/1.2 var(--head); margin: 0; }
.h-head p { margin: 4px 0 0; font-size: 12px; color: var(--fg2); }
.h-head-sm { align-items: center; margin: 30px 0 14px; }
.h-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--bg3); color: var(--fg); font: 600 13px var(--head); text-decoration: none; white-space: nowrap; transition: .14s; }
.h-btn .ic { width: 16px; height: 16px; }
.h-btn-p { background: var(--brand); border-color: var(--brand); color: #fff; }
.h-btn-p:hover { background: var(--brand2); border-color: var(--brand2); }
.h-btn-g { background: transparent; color: var(--fg2); }
.h-btn-g:hover { background: var(--bg3); border-color: #4a5467; color: #fff; }
.h-btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 7px; }
.h-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.h-tool { display: flex; align-items: flex-start; gap: 14px; padding: 18px; color: var(--fg); text-decoration: none; transition: .14s; }
.h-tool:hover { border-color: var(--line2); background: var(--bg3); transform: translateY(-2px); }
.h-tool-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: rgba(176,26,24,.14); color: var(--brand2); }
.h-tool-ic .ic { width: 22px; height: 22px; }
.h-tool-b { flex: 1; min-width: 0; }
.h-tool-b h3 { margin: 0 0 4px; font: 700 16px var(--head); }
.h-tool-b p { margin: 0 0 10px; font-size: 13px; color: var(--fg2); }
.h-meta { font-size: 12px; color: var(--fg3); }
.h-chip { flex: none; display: inline-flex; padding: 3px 9px; border-radius: 99px; font: 700 11px var(--head); letter-spacing: .03em; }
.h-chip-ok { background: rgba(34,160,107,.16); color: #4ad295; }
.h-chip-off { background: var(--bg4); color: var(--fg3); }
.h-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.h-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 60px 20px; text-align: center; color: var(--fg3); border: 1px dashed var(--line2); border-radius: var(--r); font-size: 13px; }
.h-empty .ic { width: 34px; height: 34px; color: var(--fg3); }
.h-empty b { color: var(--fg); font: 700 16px var(--head); }
.h-empty .h-btn { margin-top: 8px; }
.bar-end .h-tabs a { padding: 7px 11px; }
@media (max-width: 760px) {
  .h-top { gap: 8px; padding: 0 12px; }
  .h-sep, .h-who, .h-logo-t small { display: none; }
  .h-tabs a { padding: 7px 9px; font-size: 12px; }
  .h-page { padding: 20px 16px 48px; }
  .h-tools { grid-template-columns: 1fr; }
  .bar-end .h-tabs { display: none; }
}

/* ---------- profile menu (eSign's pattern, dark) ---------- */
.prof-slot:empty { display: none; }
.prof { position: relative; }
.prof-btn { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); color: var(--fg); text-align: left; transition: .14s; }
.prof-btn:hover, .prof-btn[aria-expanded="true"] { background: var(--bg3); border-color: var(--line2); }
.prof-av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 13px var(--head); }
.prof-t { display: flex; flex-direction: column; min-width: 0; max-width: 180px; line-height: 1.2; }
.prof-t small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg3); }
.prof-t span { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-caret { width: 18px; height: 18px; color: var(--fg2); }
.prof-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: 256px; padding: 8px; background: var(--bg3); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.85); }
.prof-h { padding: 8px 12px 10px; border-bottom: 1px solid var(--line2); margin-bottom: 6px; }
.prof-h small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg3); }
.prof-h b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; margin-top: 2px; border: 0; border-radius: 8px; background: none; color: var(--fg); font-size: 13px; font-weight: 600; text-align: left; }
.prof-menu button .ic { width: 18px; height: 18px; color: var(--fg2); }
.prof-menu button:hover { background: var(--bg4); }
.prof-menu button.dg, .prof-menu button.dg .ic { color: #ff8f8d; }
.prof-menu button.dg:hover { background: rgba(176,26,24,.16); }
.bar-end { gap: 10px; }
@media (max-width: 760px) { .prof-t, .prof-caret { display: none; } .prof-btn { padding: 4px; border-radius: 50%; } }
.bar-end .prof-t, .bar-end .prof-caret { display: none; }
.bar-end .prof-btn { padding: 4px; border-radius: 50%; }

/* ---------- spacing system (same in Backstage, Studio and Space) ----------
   8-pt grid. One side gutter (--gx) for the header AND the page, so the logo and the content
   line up. Desktop 24px, phones 16px. */
:root{--gx:24px;--gy:24px;--sec:24px;--pb:48px}
@media(max-width:760px){:root{--gx:16px;--gy:16px;--sec:16px;--pb:32px}}
.h-top, .bar { padding-left: var(--gx); padding-right: var(--gx); }
.h-page { padding: var(--gy) var(--gx) var(--pb); }
.canvas { padding-left: var(--gx); padding-right: var(--gx); }
.h-stats, .h-head { margin-bottom: var(--sec); }
.h-head-sm { margin: 32px 0 16px; }
@media (max-width: 760px) {
  .h-top .grow { display: none; }
  .h-tabs { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .h-tabs::-webkit-scrollbar { display: none; }
  .h-top .prof-slot { flex: none; }
}
/* Login card keeps Inter: all six CTI apps share one sign-in design (Athena / eSign). */
.lg { font-family: 'Inter', system-ui, sans-serif; }

/* ---------- VideoGen project list ---------- */
.vg-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.vg-card { position: relative; display: flex; flex-direction: column; overflow: hidden; cursor: pointer; transition: .14s; outline: none; }
.vg-card:hover, .vg-card:focus-visible { border-color: var(--line2); transform: translateY(-2px); }
.vg-thumb { aspect-ratio: 16/9; display: grid; place-items: center; background: var(--bg3); color: var(--fg3); border-bottom: 1px solid var(--line); }
.vg-thumb .ic { width: 34px; height: 34px; }
.vg-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.vg-b { padding: 14px 16px 16px; }
.vg-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vg-name h3 { margin: 0; font: 700 15px var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg-b p { margin: 4px 0 0; font-size: 12.5px; color: var(--fg3); }
.vg-acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: .14s; }
.vg-card:hover .vg-acts, .vg-card:focus-within .vg-acts { opacity: 1; }
.vg-acts .icon-btn { background: rgba(14,16,20,.82); color: var(--fg); backdrop-filter: blur(4px); }
.vg-acts .icon-btn.del:hover { color: #ff8f8d; }
.vg-new { cursor: default; border-style: dashed; justify-content: center; }
.vg-new:hover { transform: none; }
.vg-form { display: flex; flex-direction: column; gap: 10px; cursor: default; }
.vg-form input { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--in); color: var(--fg); outline: none; }
.vg-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(176,26,24,.18); }
.vg-form-a { display: flex; gap: 8px; }
.vg-confirm { font-size: 13px; color: var(--fg2); }
.vg-confirm b { color: var(--fg); }
@media (hover: none) { .vg-acts { opacity: 1; } }
.prof-av { line-height: 1.55; }   /* same as Backstage, so the initial sits centred */

/* ---------- Social Hub: inbox, auto-reply, accounts (2026-10-16) ---------- */
.sx-tabs { display: flex; gap: 2px; margin: 0 0 var(--sec); border-bottom: 1px solid var(--line); }
.sx-tabs a { padding: 9px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; font: 600 13px var(--head); color: var(--fg2); text-decoration: none; }
.sx-tabs a:hover { color: var(--fg); }
.sx-tabs a.on { color: var(--fg); border-bottom-color: var(--brand2); }
.sx-pf { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #fff; }
.sx-pf svg { width: 15px; height: 15px; fill: currentColor; }
.sx-facebook { background: #1877F2; }
.sx-instagram { background: linear-gradient(135deg, #F58529, #DD2A7B 55%, #8134AF); }
.sx-tiktok { background: #000; box-shadow: inset 0 0 0 1px #333; }
.sx-in { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; height: max(520px, calc(100vh - 330px)); }
.sx-list, .sx-conv { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sx-filt { display: grid; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.sx-q, .sx-filt select, .sx-f input, .sx-f select, .sx-cfg textarea, .sx-mbox textarea, .sx-comp textarea { width: 100%; background: var(--in); border: 1px solid var(--line2); border-radius: 8px; color: var(--fg); font: 13px var(--font); padding: 8px 10px; }
.sx-q:focus, .sx-f input:focus, .sx-f select:focus, .sx-comp textarea:focus, .sx-cfg textarea:focus, .sx-mbox textarea:focus { outline: none; border-color: var(--navy); }
.sx-chips { display: flex; gap: 4px; }
.sx-chips button { flex: 1; padding: 6px 0; border-radius: 7px; border: 1px solid var(--line2); background: transparent; color: var(--fg2); font: 600 12px var(--head); }
.sx-chips button.on { background: var(--bg3); color: var(--fg); border-color: #4a5467; }
.sx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sx-items { flex: 1; overflow: auto; }
.sx-it { display: flex; gap: 10px; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--fg); text-align: left; }
.sx-it:hover { background: var(--bg3); }
.sx-it.on { background: var(--bg3); box-shadow: inset 3px 0 0 var(--brand2); }
.sx-it-b { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sx-it-top { display: flex; justify-content: space-between; gap: 8px; }
.sx-it-top b { font: 600 13px var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-it-top small { flex: none; color: var(--fg3); font-size: 11px; }
.sx-it.new .sx-it-top b, .sx-it.new .sx-it-txt { color: #fff; }
.sx-it-txt { font-size: 12.5px; color: var(--fg2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-it-txt em { font-style: normal; color: var(--fg3); }
.sx-it-tags { display: flex; align-items: center; gap: 6px; }
.sx-tag { padding: 1px 7px; border-radius: 99px; background: var(--bg4); color: var(--fg3); font: 700 10px var(--head); letter-spacing: .03em; }
.sx-dot { min-width: 18px; padding: 1px 6px; border-radius: 99px; background: var(--brand); color: #fff; font: 700 10px var(--head); text-align: center; }
.sx-none, .sx-pick { padding: 30px 16px; text-align: center; color: var(--fg3); font-size: 13px; }
.sx-pick { margin: auto; }
.sx-ch { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sx-ch-b { flex: 1; min-width: 0; display: grid; }
.sx-ch-b b { font: 700 14px var(--head); }
.sx-ch-b small { color: var(--fg3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sx-m { max-width: 75%; display: grid; gap: 3px; }
.sx-m.them { align-self: flex-start; }
.sx-m.us { align-self: flex-end; text-align: right; }
.sx-m-a { font-size: 11px; color: var(--fg3); font-weight: 600; }
.sx-m-t { padding: 9px 12px; border-radius: 12px; background: var(--bg3); font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
.sx-m.us .sx-m-t { background: rgba(47,106,209,.22); border: 1px solid rgba(47,106,209,.35); }
.sx-m-i { font-size: 11px; color: var(--fg3); }
.sx-m-i b { color: var(--warn); font-weight: 600; }
.sx-comp { display: grid; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.sx-comp textarea { resize: vertical; min-height: 54px; }
.sx-comp-r { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sx-chk { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--fg2); }
.sx-hint { margin: 0; font-size: 11.5px; color: var(--fg3); }
.sx-ar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.sx-ar .h-head-sm { margin-top: 0; }
.sx-rule { display: flex; gap: 14px; padding: 14px 16px; margin-bottom: 10px; }
.sx-rule-b { flex: 1; min-width: 0; display: grid; gap: 6px; }
.sx-rule-b b { font: 700 14px var(--head); }
.sx-rule-b p { margin: 0; font-size: 13px; color: var(--fg2); white-space: pre-wrap; }
.sx-rule-b small { font-size: 11.5px; color: var(--fg3); }
.sx-kw { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.sx-kw span { padding: 2px 8px; border-radius: 99px; background: rgba(47,106,209,.16); color: #8fb3f2; font-size: 11.5px; font-weight: 600; }
.sx-kw em { font-style: normal; font-size: 11px; color: var(--fg3); }
.sx-rule-a { display: flex; gap: 4px; align-items: flex-start; }
.sx-tog { position: relative; flex: none; width: 36px; height: 20px; margin-top: 1px; }
.sx-tog input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.sx-tog i { position: absolute; inset: 0; border-radius: 99px; background: var(--bg4); transition: .15s; }
.sx-tog i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg3); transition: .15s; }
.sx-tog input:checked + i { background: var(--ok); }
.sx-tog input:checked + i::after { left: 19px; background: #fff; }
.sx-cfg, .sx-mbox { display: grid; gap: 12px; padding: 16px; }
.sx-f { display: grid; gap: 5px; }
.sx-f > span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg3); font-weight: 700; }
.sx-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sx-days { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-days label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--line2); border-radius: 7px; font-size: 12.5px; color: var(--fg2); }
.sx-sw { display: flex; align-items: center; gap: 8px; font: 600 13px var(--head); }
.sx-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.55); }
.sx-mbox { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.sx-mbox h2 { margin: 0; font: 700 18px var(--head); }
.sx-mact { display: flex; justify-content: flex-end; gap: 8px; }
.sx-accs { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.sx-card { display: grid; gap: 12px; padding: 18px; }
.sx-card .h-btn { justify-self: start; }
.sx-card-h { display: flex; gap: 8px; align-items: flex-start; }
.sx-card-h > div { margin-left: 6px; }
.sx-card-h h3 { margin: 0 0 4px; font: 700 16px var(--head); }
.sx-card-h p { margin: 0; font-size: 12.5px; color: var(--fg2); }
.sx-card .sx-none { padding: 8px 0; text-align: left; }
.sx-acc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.sx-acc > div { flex: 1; min-width: 0; display: grid; }
.sx-acc b { font: 600 13px var(--head); }
.sx-acc small { font-size: 11.5px; color: var(--fg3); }
.sx-err { color: #ff8a80; }
.sx-warn { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(217,155,43,.12); color: #f0c46a; font-size: 12.5px; }
.sx-setup summary { cursor: pointer; font-size: 12.5px; color: var(--fg2); }
.sx-setup p { font-size: 12px; color: var(--fg2); }
.sx-copy { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--fg3); }
.sx-copy code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); background: var(--in); padding: 5px 8px; border-radius: 6px; }
@media (max-width: 900px) {
  .sx-in { grid-template-columns: 1fr; height: auto; }
  .sx-list { max-height: 360px; }
  .sx-conv { min-height: 480px; }
  .sx-ar { grid-template-columns: 1fr; }
  .sx-copy { grid-template-columns: 1fr auto; }
  .sx-copy span { grid-column: 1 / -1; }
}
