/* ============================================================
   VA Studio - the Open-Higgsfield look the boss picked (2026-10-27):
   near-black ground, #111 glass panels, white/5 hairlines, one neon
   lime (#d9ff00) for the primary action, huge uppercase model title,
   a floating prompt bar with pill controls that open upward, and the
   history strip on the right.
   ============================================================ */
@font-face { font-family: "Geist"; src: url(fonts/geist-latin-wght-normal.woff2) format("woff2-variations");
  font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url(fonts/geist-latin-ext-wght-normal.woff2) format("woff2-variations");
  font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url(fonts/geist-mono-latin-wght-normal.woff2) format("woff2-variations");
  font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2212; }

:root {
  color-scheme: dark;
  --app: #050505; --panel: #0a0a0a; --card: #111111; --card-2: #161616; --input: #0c0c0c;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.12); --hover: rgba(255,255,255,.06);
  --text: #ffffff; --text-2: #a1a1aa; --text-3: #52525b;
  --lime: #d9ff00; --lime-ink: #000; --lime-soft: rgba(217,255,0,.10); --lime-line: rgba(217,255,0,.45);
  --glow: 0 0 22px rgba(217,255,0,.35);
  --ok: #4ade80; --bad: #f87171; --bad-soft: rgba(248,113,113,.12); --warn: #fb923c;
  --shadow: 0 35px 60px -15px rgba(0,0,0,.8);
  --sans: "Geist", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--app); color: var(--text); font: 14px/1.5 var(--sans); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--lime); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 18px; } h3 { font-size: 14px; }
.muted, small { color: var(--text-2); }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: var(--lime); color: #000; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 26px; height: 64px; padding: 0 22px;
  background: rgba(5,5,5,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.logo { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; }
.logo svg { width: 20px; height: 20px; color: #000; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding-bottom: 2px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; color: rgba(255,255,255,.62); padding: 8px 12px; font-weight: 650; font-size: 14px; white-space: nowrap; border-radius: 10px; }
.nav a:hover { color: #fff; }
.nav a.on { color: #fff; }
.nav a.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--lime); }
.who { display: flex; align-items: center; gap: 10px; color: var(--text-2); white-space: nowrap; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.05);
  border: 1px solid var(--line); font-size: 12px; font-weight: 650; color: var(--text-2); }
.pill.hot { border-color: var(--lime-line); color: var(--lime); background: var(--lime-soft); }

/* ---- buttons & inputs ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #fff; font: 700 13px var(--sans); cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .2s; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); font-weight: 800; }
.btn.primary:hover:not(:disabled) { box-shadow: var(--glow); background: var(--lime); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 11px; }
.btn.big { padding: 13px 20px; font-size: 15px; width: 100%; border-radius: 18px; }
.btn.danger { color: var(--bad); border-color: rgba(248,113,113,.3); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ok { color: var(--ok); border-color: rgba(74,222,128,.3); }
.btn.outline-lime { color: var(--lime); border-color: var(--lime-line); }
label.f { display: block; }
label.f > span, .lbl { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--text-2); margin-bottom: 7px; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; background: var(--input); color: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; font: inherit; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--lime-line); outline: none; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); font-weight: 600; }
.check input { accent-color: var(--lime); width: 16px; height: 16px; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.err { color: var(--bad); font-size: 13px; }
.seg { display: inline-flex; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 3px; flex-wrap: wrap; }
.seg button { background: none; border: 0; color: var(--text-2); padding: 7px 13px; border-radius: 10px; font: 700 12.5px var(--sans); cursor: pointer; }
.seg button.on { background: var(--lime); color: #000; }
.seg button:hover:not(.on) { color: #fff; }

/* ---- generic layout (boss pages, products, history) ---- */
.page { max-width: 1440px; margin: 0 auto; padding: 30px 26px 70px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.page-head p { margin: 6px 0 0; color: var(--text-2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; }
.card.pad { padding: 22px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.split .plist { position: sticky; top: 84px; }
.split .plist a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 14px; color: #fff; font-weight: 650; }
.split .plist a:hover, .split .plist a.on { background: rgba(255,255,255,.06); }
@media (max-width: 960px) { .split, .grid2 { grid-template-columns: 1fr; } .split .plist { position: static; } }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 700;
  background: rgba(255,255,255,.06); color: var(--text-2); border: 1px solid var(--line); }
.tag.lime { color: var(--lime); border-color: var(--lime-line); background: var(--lime-soft); font-family: var(--mono); }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.done { color: var(--ok); } .st.failed { color: var(--bad); } .st.run { color: var(--lime); }
.st.run::before { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--text-3); }
.dot.on { background: var(--ok); } .dot.off { background: var(--bad); }
.empty { text-align: center; color: var(--text-2); padding: 46px 20px; border: 1px dashed var(--line-2); border-radius: 24px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters select { width: auto; min-width: 160px; border-radius: 14px; }

/* ---- result cards (history, boss feed) ---- */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gen { background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.gen:hover { border-color: var(--line-2); }
.gen .media { position: relative; background: #000; aspect-ratio: 9/16; display: grid; place-items: center; overflow: hidden; }
.gen .media.wide { aspect-ratio: 16/9; } .gen .media.square { aspect-ratio: 1/1; }
.gen .media video, .gen .media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gen .wait { text-align: center; color: var(--text-2); padding: 16px; font-weight: 700; }
.spin { width: 30px; height: 30px; border: 3px solid rgba(217,255,0,.15); border-top-color: var(--lime); border-radius: 50%; margin: 0 auto 10px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gen .fail { color: var(--bad); padding: 16px; font-size: 13px; text-align: center; font-weight: 600; }
.gen .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gen .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); }
.gen .prompt { font: 11.5px/1.45 var(--mono); color: var(--text-2); background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 9px; max-height: 66px; overflow: hidden; cursor: pointer; white-space: pre-wrap; word-break: break-word; }
.gen .prompt.open { max-height: 320px; overflow: auto; }
.gen .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.gen .who-line { font-size: 13px; font-weight: 800; }
.badge-up { position: absolute; top: 10px; left: 10px; }

/* ---- STUDIO (Create) ---- */
.studio { display: grid; grid-template-columns: 1fr 104px; min-height: calc(100vh - 64px); }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 34px 24px 28px; min-width: 0; }
.stage::before { content: ""; position: absolute; left: 50%; top: 40px; width: 520px; height: 320px; margin-left: -260px;
  background: radial-gradient(closest-side, rgba(217,255,0,.08), transparent); pointer-events: none; }
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 100%; max-width: 980px;
  padding: 10px 0 26px; animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero-icon { width: 120px; height: 120px; border-radius: 30px; background: rgba(19,78,74,.35); border: 1px solid var(--line); display: grid; place-items: center;
  position: relative; overflow: hidden; margin-bottom: 34px; }
.hero-icon::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 49%, rgba(217,255,0,.18) 50%, transparent 51%),
  linear-gradient(0deg, transparent 49%, rgba(217,255,0,.18) 50%, transparent 51%); }
.hero-icon .in { width: 64px; height: 64px; border-radius: 18px; background: var(--lime-soft); border: 1px solid rgba(217,255,0,.25); box-shadow: var(--glow);
  display: grid; place-items: center; color: var(--lime); position: relative; z-index: 1; }
.hero-icon .in svg { width: 30px; height: 30px; }
.hero-icon .spark { position: absolute; top: 12px; right: 14px; color: var(--lime); z-index: 1; font-size: 14px; animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(34px, 6.5vw, 76px); font-weight: 900; text-transform: uppercase; letter-spacing: .1em; line-height: 1.02; }
.hero .sub { color: var(--text-2); opacity: .75; margin-top: 12px; font-size: 14px; font-weight: 500; letter-spacing: .02em; }
.tilewrap { position: relative; }
.tilewrap .tile { width: 100%; }
.tdel { position: absolute; right: 7px; bottom: 34px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(248,113,113,.45);
  background: rgba(0,0,0,.78); color: var(--bad); font: 800 15px/1 var(--sans); cursor: pointer; z-index: 2; }
.tdel:hover { background: var(--bad); color: #000; }
.btn.picked.ok { background: rgba(74,222,128,.16); border-color: var(--ok); }
.btn.picked.danger { background: var(--bad-soft); border-color: var(--bad); }
.up-prog { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.up-prog b { color: var(--lime); font-weight: 900; }
.up-prog .bar-track { height: 10px; }
.up-prog .bar-track i { transition: width .2s ease; background: linear-gradient(90deg, var(--lime), #b6e600); }
.bar-wrap { width: 100%; max-width: 980px; position: relative; z-index: 20; animation: rise .5s .1s ease both; }
.bar { background: rgba(17,17,17,.92); backdrop-filter: blur(20px); border: 1px solid var(--line-2); border-radius: 36px; padding: 16px 18px 14px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.bar-top { display: flex; gap: 14px; align-items: flex-start; padding: 2px 6px 0; }
.refs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; max-width: 46%; padding-top: 4px; }
.ref { position: relative; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; border: 1px solid var(--lime-line); background: #000; flex: none; }
.ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref .t { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.72); color: var(--lime); font: 700 8.5px/1.5 var(--mono); text-align: center; }
.ref .x { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; border: 0; background: rgba(0,0,0,.75); color: #fff; cursor: pointer;
  font-size: 11px; line-height: 16px; padding: 0; opacity: 0; transition: opacity .15s; }
.ref:hover .x, .ref.no .x { opacity: 1; }
.ref.no { border-color: var(--bad); }
.ref.no img { opacity: .35; }
.ref.no .t { color: var(--bad); }
.add-ref { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.05); color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; flex: none; transition: all .15s; }
.add-ref:hover { color: var(--lime); border-color: var(--lime-line); background: var(--lime-soft); }
.add-ref svg { width: 20px; height: 20px; }
.bar textarea { flex: 1; background: transparent; border: 0; color: #fff; font: 500 18px/1.55 var(--sans); padding: 8px 4px; min-height: 52px; max-height: 240px;
  resize: none; box-shadow: none; }
.bar textarea::placeholder { color: var(--text-3); }
.bar textarea:focus { box-shadow: none; }
.bar-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pbtn { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 16px; background: rgba(255,255,255,.05);
  border: 1px solid var(--line); color: #fff; font: 700 12.5px var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s; }
.pbtn:hover { background: rgba(255,255,255,.1); }
.pbtn .chev { opacity: .35; width: 12px; height: 12px; }
.pbtn .ic { width: 16px; height: 16px; opacity: .6; }
.pbtn.off { color: var(--text-2); }
.av { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; font: 900 11px var(--sans); color: #000; background: var(--lime); flex: none; }
.av.b { background: #1e3a8a; color: #93c5fd; } .av.p { background: #3b0764; color: #d8b4fe; } .av.g { background: #052e16; color: #86efac; }
.count { font: 600 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.count.over { color: var(--bad); }
.go { background: var(--lime); color: #000; border: 0; border-radius: 22px; padding: 14px 30px; font: 900 15px var(--sans); cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; transition: transform .15s, box-shadow .2s; }
.go:hover:not(:disabled) { box-shadow: var(--glow); transform: scale(1.03); }
.go:active:not(:disabled) { transform: scale(.97); }
.go:disabled { opacity: .35; cursor: not-allowed; }
.go small { color: rgba(0,0,0,.55); font-weight: 700; font-size: 12px; }
.bar-note { text-align: center; color: var(--text-3); font-size: 11.5px; margin-top: 10px; }
.bar-note.err { color: var(--bad); }
.pop { position: absolute; bottom: calc(100% + 10px); left: 0; z-index: 60; background: #111; border: 1px solid var(--line-2); border-radius: 26px; padding: 10px;
  min-width: 230px; max-width: min(380px, 90vw); max-height: 60vh; overflow: auto; box-shadow: var(--shadow); animation: rise .18s ease both; }
.pop .ph { font-size: 10px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .16em; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pop .it { display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 12px; border-radius: 18px; border: 1px solid transparent; background: none; color: #fff;
  font: 700 12.5px var(--sans); cursor: pointer; text-align: left; }
.pop .it:hover { background: rgba(255,255,255,.05); }
.pop .it.on { background: rgba(255,255,255,.05); border-color: var(--line); }
.pop .it .d { display: block; font-size: 10.5px; color: var(--text-2); font-weight: 500; margin-top: 2px; }
.pop .it .ck { margin-left: auto; color: var(--lime); }
.ratio { width: 20px; height: 20px; display: inline-grid; place-items: center; flex: none; }
.ratio i { display: block; border: 2px solid rgba(255,255,255,.35); border-radius: 4px; }
.pop .txt { padding: 6px 12px 10px; color: var(--text-2); font-size: 13px; white-space: pre-wrap; }
.pop .it svg, .pop .it .ic { width: 18px; height: 18px; flex: none; opacity: .6; }
.pop .it .av { width: 26px; height: 26px; border-radius: 8px; }
.slider { padding: 10px 14px 12px; min-width: 260px; }
.slider .sv { color: var(--text-2); font-weight: 700; margin-bottom: 12px; }
.slider .sv b { color: #fff; font-size: 34px; font-weight: 900; margin-right: 4px; }
.slider input[type=range] { width: 100%; accent-color: var(--lime); height: 6px; cursor: pointer; }
.slider .sl { display: flex; justify-content: space-between; color: var(--text-3); font: 700 11px var(--mono); margin-top: 8px; }
img.broken { visibility: hidden; }
.nb:not(:empty) { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--lime); color: #000;
  font: 800 10.5px/18px var(--sans); text-align: center; }
.who .me { color: #fff; font-weight: 700; }
.used-refs { display: flex; gap: 6px; flex-wrap: wrap; }
.used-refs.big { justify-content: center; margin-top: 10px; gap: 10px; }
.uref { position: relative; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-2); background: #000; flex: none; }
.used-refs.big .uref { width: 64px; height: 64px; border-radius: 14px; border-color: var(--lime-line); }
.uref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uref i { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.72); color: var(--lime); font: 700 7.5px/1.5 var(--mono); text-align: center; font-style: normal; }
.used-refs.big .uref i { font-size: 9.5px; }
.wlink { display: block; color: inherit; transition: border-color .2s, transform .15s; }
.wlink:hover { border-color: var(--lime-line); text-decoration: none; }
.today-bar { margin-top: 14px; font-size: 13px; color: var(--text-2); font-weight: 700; }
.today-bar b { color: #fff; font-size: 18px; font-weight: 900; }
.bar-track { height: 8px; border-radius: 4px; background: rgba(255,255,255,.07); margin-top: 7px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--lime); border-radius: 4px; }
b.w { color: #fff; }
.day + .day { margin-top: 34px; }
.day-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; font-size: 18px; font-weight: 900; text-transform: capitalize; }
.day-h .muted { font: 600 12px var(--mono); text-transform: none; }
.dcard .media { aspect-ratio: 9/16; }
.comment { font-size: 12.5px; border-radius: 12px; padding: 9px 11px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text-2); white-space: pre-wrap; }
.comment b { color: #fff; }
.comment.rejected { border-color: rgba(248,113,113,.35); background: var(--bad-soft); }
.comment.approved { border-color: rgba(74,222,128,.3); }
textarea.cmt { min-height: 58px; font: 12.5px/1.45 var(--sans); border-radius: 12px; padding: 8px 10px; }

/* ---- picker, assets, modals ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.tile { position: relative; border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; background: #0c0c0c; cursor: pointer; display: flex; flex-direction: column;
  text-align: left; padding: 0; color: inherit; font: inherit; transition: border-color .15s; }
.tile:hover { border-color: var(--line-2); }
.tile .im { aspect-ratio: 1/1; display: grid; place-items: center; overflow: hidden; color: var(--text-3); font-size: 12px; background: #000; }
.tile .im img { width: 100%; height: 100%; object-fit: cover; }
.tile .nm { font-size: 11.5px; padding: 7px 9px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tile.sel { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.tile.sel::after { content: attr(data-n); position: absolute; top: 7px; right: 7px; padding: 0 7px; height: 22px; border-radius: 11px; background: var(--lime);
  color: #000; font: 800 11px/22px var(--mono); }
.tile.no { opacity: .35; cursor: not-allowed; }
.tile .kind { position: absolute; top: 7px; left: 7px; }
.cat { margin-top: 22px; }
.cat h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--text-2); }
.drop { border: 1.5px dashed var(--line-2); border-radius: 22px; padding: 20px; text-align: center; color: var(--text-2); }
.drop.on { border-color: var(--lime); background: var(--lime-soft); color: #fff; }
.brief { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 80; display: grid; place-items: center; padding: 20px; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(1000px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: #0d0d0d; border-radius: 30px; box-shadow: var(--shadow); }
.modal .mh { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.modal .mh h2 { text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.modal .mb { padding: 18px 22px; overflow: auto; }
.modal .mf { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; align-items: center; }

/* ---- tables & stats ---- */
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--text-2); font-weight: 800; padding: 14px; border-bottom: 1px solid var(--line); }
table.t td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: rgba(255,255,255,.02); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.stat-card { padding: 20px; min-width: 0; }
.stat-card h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.stat-card .nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 8px; }
.stat-card .n { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 14px; padding: 9px 10px; min-width: 0; }
.stat-card .n b { display: block; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-card .n span { display: block; font-size: 9px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.totals { display: flex; gap: 26px; flex-wrap: wrap; color: var(--text-2); align-items: baseline; }
.totals b { color: #fff; font-size: 26px; font-weight: 900; margin-right: 4px; }
.totals .lime b { color: var(--lime); }

/* ---- login ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(700px 420px at 50% 20%, rgba(217,255,0,.07), transparent 65%), var(--app); }
.login .card { width: min(420px, 100%); padding: 32px; border-radius: 32px; background: rgba(17,17,17,.9); box-shadow: var(--shadow); }
.login h1 { margin: 22px 0 6px; font-size: 30px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.login .brandline { display: flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }

/* ---- toasts ---- */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #111; border: 1px solid var(--line-2); border-radius: 16px; padding: 11px 18px; max-width: 460px; box-shadow: var(--shadow);
  font-size: 13.5px; font-weight: 650; animation: rise .25s ease both; display: flex; align-items: center; gap: 10px; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; }
.toast.bad::before { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- upscale running: lime scan over the video + moving pill (2026-10-27) ---- */
.upscan { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 0 2px var(--lime-line), inset 0 0 40px rgba(217,255,0,.18); animation: upglow 2.4s ease-in-out infinite; }
.gd-frame .upscan { border-radius: 18px; }
.upscan .beam { position: absolute; left: 0; right: 0; height: 34%; top: -34%;
  background: linear-gradient(180deg, transparent, rgba(217,255,0,.05) 40%, rgba(217,255,0,.28) 92%, rgba(217,255,0,.9) 99%, transparent);
  animation: upbeam 2.2s cubic-bezier(.45,.05,.55,.95) infinite; }
.upscan::after { content: ""; position: absolute; inset: 0; opacity: .35; animation: upgrid 2.2s steps(6) infinite;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 14px 14px; }
.upscan .lbl { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; white-space: nowrap;
  background: rgba(0,0,0,.78); border: 1px solid var(--lime-line); color: var(--lime); font: 800 11.5px var(--sans); letter-spacing: .04em;
  padding: 7px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.upscan .pd { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: var(--glow); animation: pulse 1s ease-in-out infinite; }
@keyframes upbeam { to { top: 100%; } }
@keyframes upglow { 50% { box-shadow: inset 0 0 0 2px var(--lime), inset 0 0 70px rgba(217,255,0,.28); } }
@keyframes upgrid { 50% { opacity: .12; } }
.up-run { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--lime-line); border-radius: 999px;
  color: var(--lime); font: 800 12px var(--sans); padding: 6px 12px; background: var(--lime-soft); }
.up-run.big { padding: 10px 18px; font-size: 13.5px; }
.up-run i { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(217,255,0,.32) 50%, transparent 80%);
  background-size: 220% 100%; animation: upsheen 1.3s linear infinite; }
.up-run small { font: 700 11px var(--mono); color: var(--text-2); position: relative; }
.up-run::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(217,255,0,.25); border-top-color: var(--lime);
  animation: spin .8s linear infinite; position: relative; }
@keyframes upsheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.up-tag { display: inline-flex; align-items: center; gap: 6px; font: 800 11px var(--mono); color: var(--lime); border: 1px solid var(--lime-line);
  background: var(--lime-soft); padding: 5px 10px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.up-tag.big { padding: 9px 14px; font-size: 12px; }
.gd-title .up-tag { font-size: 10px; padding: 3px 8px; margin-left: 6px; }
.sc.hd { border-color: var(--lime-line); }
.th.upping { border-color: var(--lime-line); animation: upglow2 1.6s ease-in-out infinite; }
@keyframes upglow2 { 50% { box-shadow: var(--glow); border-color: var(--lime); } }

/* ---- fired editors, yes/no window, API keys ---- */
.tag.fired { color: var(--bad); border-color: rgba(248,113,113,.35); font-size: 10.5px; vertical-align: middle; }
.wlink.is-fired { opacity: .62; }
.fired-row td { color: var(--text-2); }
.fired-row td b { color: var(--text-2); }
.btn.danger-fill { background: var(--bad); color: #000; border-color: var(--bad); font-weight: 800; }
.btn.danger-fill:hover { filter: brightness(1.08); }
.ask-body { font-size: 14px; }
.ticks { margin: 0; padding-left: 18px; display: grid; gap: 7px; color: var(--text-2); }
.ticks b { color: #fff; }
.fire-zone { border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; }
.keybox { border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: rgba(255,255,255,.02); }
.keybox .kh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.keybox .kh b { font-size: 15px; }
.kst { margin-left: auto; font-size: 12px; font-weight: 800; }
.kst.on { color: var(--ok); } .kst.off { color: var(--bad); }
.btn .ic { width: 15px; height: 15px; }

/* ---- prompt bar v2 (2026-10-27): references row, calm scrolling prompt box, preview window ---- */
.bar { gap: 10px; padding: 14px 16px 14px; border-radius: 30px; }
.bar-refs { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 2px; }
.bar-refs .refs { display: flex; flex-wrap: nowrap; gap: 8px; max-width: none; flex: 0 1 auto; min-width: 0; overflow-x: auto; padding: 3px 2px 5px;
  scrollbar-width: thin; scrollbar-color: rgba(217,255,0,.35) transparent; }
.add-ref { width: auto; height: 52px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border-radius: 14px; font: 800 12px var(--sans); }
.add-ref svg { width: 17px; height: 17px; }
.ref { width: 52px; height: 52px; cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.ref:hover, .ref:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--lime-line); outline: none; }
.ref .ph { display: grid; place-items: center; height: 100%; color: var(--text-3); font: 700 9px var(--mono); text-transform: uppercase; }
.ref .play { position: absolute; top: 3px; left: 4px; color: #fff; font-size: 9px; text-shadow: 0 1px 3px #000; }
.refs-info { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0; }
.bar-wrap { flex: none; }
.bar textarea.prompt-in { flex: none; display: block; width: 100%; height: 148px; min-height: 92px; max-height: 55vh; resize: vertical; overflow-y: auto;
  background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px;
  color: #e9e9ea; font: 400 13.5px/1.6 var(--sans); white-space: pre-wrap; word-break: break-word;
  scrollbar-width: thin; scrollbar-color: rgba(217,255,0,.4) transparent; transition: border-color .15s; }
.bar textarea.prompt-in:focus { border-color: var(--lime-line); background: rgba(255,255,255,.035); }
.bar textarea.prompt-in::-webkit-scrollbar, .bar-refs .refs::-webkit-scrollbar { width: 8px; height: 6px; }
.bar textarea.prompt-in::-webkit-scrollbar-thumb, .bar-refs .refs::-webkit-scrollbar-thumb { background: rgba(217,255,0,.35); border-radius: 8px; }
.bar textarea.prompt-in::-webkit-scrollbar-track, .bar-refs .refs::-webkit-scrollbar-track { background: transparent; }
.bar .bar-bottom { padding-top: 10px; }
.uref { padding: 0; cursor: zoom-in; }
.uref:hover { border-color: var(--lime); }
.tview { position: absolute; left: 7px; bottom: 34px; width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(0,0,0,.72);
  color: #fff; font: 800 14px/1 var(--sans); cursor: zoom-in; z-index: 2; opacity: 0; transition: opacity .15s; }
.tilewrap:hover .tview, .tview:focus-visible { opacity: 1; }
.tview:hover { color: var(--lime); border-color: var(--lime-line); }
@media (hover: none) { .tview { opacity: 1; } }
.pv-back { z-index: 95; background: rgba(0,0,0,.88); }
.pv { width: min(1100px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; gap: 12px; animation: rise .25s ease both; }
.pv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-head b { font-size: 14px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-head .sp { flex: 1; }
.pv-tag { font: 800 11px var(--mono); color: var(--lime); border: 1px solid var(--lime-line); background: var(--lime-soft); padding: 3px 8px; border-radius: 8px; }
.pv-n { font: 700 12px var(--mono); color: var(--text-2); }
.pv-stage { position: relative; display: grid; place-items: center; min-height: 0; }
.pv-stage img, .pv-stage video { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 22px; border: 1px solid var(--line-2); background: #000;
  box-shadow: var(--shadow); display: block; object-fit: contain; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2);
  background: rgba(17,17,17,.85); color: #fff; font: 400 28px/1 var(--sans); cursor: pointer; z-index: 2; }
.pv-nav:hover { color: var(--lime); border-color: var(--lime-line); }
.pv-nav.prev { left: 8px; } .pv-nav.next { right: 8px; }
@media (max-width: 760px) { .refs-info { display: none; } .bar textarea.prompt-in { height: 120px; } .add-ref span { display: none; } }

/* ---- studio v3 (2026-10-27): history grid + prompt bar pinned to the bottom + one generation in a window ---- */
.studio2 { min-height: calc(100vh - 64px); }
.stage2 { position: relative; padding: 22px 22px calc(var(--dock-h, 280px) + 28px); min-width: 0; }
.stage2 .hero { min-height: calc(100vh - 64px - var(--dock-h, 280px) - 60px); margin: 0 auto; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; max-width: 1500px; margin: 0 auto; }
.sc { position: relative; aspect-ratio: 9/16; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #0c0c0c; padding: 0;
  cursor: pointer; color: inherit; font: inherit; text-align: left; transition: border-color .15s, transform .15s; }
.sc.fresh { animation: rise .35s ease both; }
.sc:hover { border-color: var(--line-2); transform: translateY(-2px); }
.sc:focus-visible { outline: none; border-color: var(--lime); box-shadow: var(--glow); }
.sc-media { position: absolute; inset: 0; display: grid; place-items: center; }
.sc-media img, .sc-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-media video.hv { position: absolute; inset: 0; }
.sc-ph { color: var(--text-3); font-size: 12px; font-weight: 700; padding: 10px; text-align: center; }
.sc.run { border-color: var(--lime-line); }
.sc.run .sc-media { background: linear-gradient(110deg, #0c0c0c 30%, rgba(217,255,0,.07) 50%, #0c0c0c 70%); background-size: 240% 100%; animation: upsheen 1.8s linear infinite; }
.sc-run { display: grid; justify-items: center; gap: 4px; color: var(--text-2); font-size: 12.5px; }
.sc-run .spin { margin: 0 0 6px; }
.sc-run small { font: 700 11px var(--mono); color: var(--lime); }
.sc-fail { display: grid; justify-items: center; gap: 6px; padding: 14px; text-align: center; color: var(--bad); font-size: 11.5px; font-weight: 600; }
.sc-fail b { font-size: 22px; }
.sc-fail span { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.sc-b { position: absolute; top: 8px; left: 8px; z-index: 2; font: 800 9.5px var(--mono); color: var(--lime); background: rgba(0,0,0,.72);
  border: 1px solid var(--lime-line); padding: 2px 7px; border-radius: 7px; }
.sc-d { position: absolute; top: 8px; right: 8px; z-index: 2; font: 800 10px var(--mono); color: #fff; background: rgba(0,0,0,.65); padding: 2px 7px; border-radius: 7px; }
.sc-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; justify-content: space-between; gap: 6px; padding: 26px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); font-size: 10.5px; font-weight: 700; color: #fff; opacity: 0; transition: opacity .15s; }
.sc-cap span:last-child { color: var(--text-2); }
.sc:hover .sc-cap, .sc:focus-visible .sc-cap, .sc.run .sc-cap, .sc.failed .sc-cap { opacity: 1; }
.sc .upscan .lbl { font-size: 9px; padding: 4px 8px; top: 8px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 26px 16px 10px; pointer-events: none;
  background: linear-gradient(to top, rgba(5,5,5,.97) 55%, rgba(5,5,5,.75) 80%, transparent); }
.dock .bar-wrap { pointer-events: auto; margin: 0 auto; max-width: 980px; }
.dock .bar-note { pointer-events: auto; margin-top: 7px; }
.dock .bar textarea.prompt-in { height: 96px; min-height: 72px; }
.dock .bar { padding: 12px 14px; gap: 9px; border-radius: 26px; }
.dock .bar .ref, .dock .bar .add-ref { height: 44px; } .dock .bar .ref { width: 44px; }
.dock .bar .bar-bottom { padding-top: 9px; }
.dock .go { padding: 11px 26px; }
.gd-back { z-index: 85; }
.gd { width: min(1240px, 100%); height: min(880px, calc(100vh - 40px)); display: grid; grid-template-columns: minmax(0, 1fr) 380px; background: #0b0b0b;
  border: 1px solid var(--line-2); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); animation: rise .25s ease both; }
.gd-media { position: relative; background: #000; display: grid; place-items: center; min-height: 0; padding: 18px 64px; }
.gd-frame { position: relative; max-height: 100%; display: grid; place-items: center; }
.gd-frame video, .gd-frame img { max-width: 100%; max-height: calc(min(880px, 100vh - 40px) - 36px); border-radius: 18px; display: block; background: #000; }
.gd-busy { width: min(320px, 60vw); aspect-ratio: 9/16; border-radius: 18px; border: 1px solid var(--line-2); display: grid; place-content: center; justify-items: center;
  gap: 6px; text-align: center; color: var(--text-2); font-weight: 700; padding: 20px; }
.gd-busy small { font: 700 11px var(--mono); color: var(--lime); }
.gd-busy.failed { color: var(--bad); font-weight: 600; font-size: 13px; }
.gd-side { border-left: 1px solid var(--line); padding: 18px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.gd-head { display: flex; align-items: center; justify-content: space-between; }
.gd-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: #fff; font-size: 17px; cursor: pointer; }
.gd-x:hover { border-color: var(--lime-line); color: var(--lime); }
.gd-title { font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.gd-meta { color: var(--text-2); font-size: 12.5px; line-height: 1.6; }
.gd-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.gd-acts .btn { padding: 9px 14px; }
.gd-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 10px; font-weight: 800; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .16em; }
.gd-side .used-refs.big { justify-content: flex-start; margin-top: 0; }
.gd-prompt { flex: 1 0 auto; min-height: 120px; max-height: 46vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 12px/1.6 var(--mono);
  color: #d4d4d8; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 14px; padding: 12px; scrollbar-width: thin;
  scrollbar-color: rgba(217,255,0,.4) transparent; }
@media (max-width: 900px) { .gd { grid-template-columns: 1fr; grid-template-rows: minmax(0, 55%) auto; height: calc(100vh - 40px); }
  .gd-media { padding: 12px 52px; } .gd-side { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 760px) { .sgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } .stage2 { padding: 14px 10px calc(var(--dock-h, 260px) + 20px); }
  .dock { padding: 18px 8px 8px; } }

/* ---- every screen: tablets and phones (2026-10-27) ---- */
@media (max-width: 900px) {
  .top { flex-wrap: wrap; height: auto; padding: 10px 14px 0; gap: 6px 12px; }
  .who { margin-left: auto; }
  .nav { order: 3; flex: 1 1 100%; margin: 0 -14px; padding: 0 10px 6px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .nav a { padding: 7px 11px; font-size: 13.5px; }
  .gd { grid-template-columns: 1fr; grid-template-rows: minmax(0, 55%) minmax(0, 1fr); height: calc(100vh - 24px); height: calc(100dvh - 24px); border-radius: 22px; }
  .gd-media { padding: 10px 50px; }
  .gd-frame video, .gd-frame img { max-height: calc((100vh - 24px) * .55 - 22px); max-height: calc((100dvh - 24px) * .55 - 22px); }
  .gd-side { border-left: 0; border-top: 1px solid var(--line); padding: 14px 16px 16px; }
  .gd-prompt { max-height: none; flex: 1 0 auto; }
  .modal-back { padding: 12px; }
  .pv-stage img, .pv-stage video { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
}
@media (max-width: 700px) {
  table.t thead { display: none; }
  table.t, table.t tbody, table.t tr, table.t td { display: block; width: 100%; }
  table.t tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.t tr:last-child { border-bottom: 0; }
  table.t td { border: 0; padding: 3px 0; text-align: left !important; white-space: normal !important; }
  table.t td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 96px; color: var(--text-3); font-size: 10.5px;
    text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
  table.t td.t-acts { padding-top: 10px; }
}
@media (max-width: 600px) {
  .page { padding: 18px 12px 60px; }
  .page-head h1 { font-size: 26px; }
  .modal-back { padding: 6px; }
  .modal { border-radius: 22px; max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); }
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gen { border-radius: 16px; }
  .gen .body { padding: 9px 10px 11px; gap: 6px; }
  .gen .acts .btn { padding: 7px 10px; font-size: 12px; }
  .filters select { min-width: 0; flex: 1 1 140px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stage2 { padding: 10px 8px calc(var(--dock-h, 220px) + 14px); }
  .dock { padding: 14px 6px 6px; }
  .dock .bar { padding: 10px; gap: 8px; border-radius: 22px; }
  .dock .bar textarea.prompt-in { height: 64px; min-height: 52px; font-size: 13px; padding: 9px 11px; border-radius: 14px; }
  .dock .bar .ref, .dock .bar .add-ref { height: 40px; } .dock .bar .ref { width: 40px; }
  .dock .bar .bar-bottom { flex-wrap: nowrap; gap: 8px; padding-top: 8px; }
  .dock .pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1 1 auto; }
  .dock .pills::-webkit-scrollbar { display: none; }
  .dock .pbtn { padding: 8px 10px; font-size: 12px; }
  .dock .count:not(.over) { display: none; }
  .dock .go { padding: 10px 16px; font-size: 14px; border-radius: 18px; flex: none; }
  .dock .go small { display: none; }
  .dock .bar-note:not(.err) { display: none; }
  .pop { position: fixed; left: 8px; right: 8px; bottom: calc(var(--dock-h, 220px) - 4px); max-width: none; max-height: 55vh; }
  .gd-media { padding: 8px 44px; }
  .pv-nav { width: 38px; height: 38px; font-size: 24px; }
  .pv-head b { max-width: 40vw; }
  .toasts { left: 8px; right: 8px; transform: none; bottom: calc(var(--dock-h, 0px) + 10px); }
  .toast { max-width: none; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
}

/* ---- a new version is out ---- */
.newver { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 14px;
  background: #111; border: 1px solid var(--lime-line); box-shadow: var(--shadow), var(--glow); border-radius: 16px; padding: 10px 12px 10px 18px;
  font-size: 13.5px; font-weight: 700; animation: rise .3s ease both; max-width: calc(100vw - 24px); }
@media (max-width: 600px) { .newver { top: auto; bottom: calc(var(--dock-h, 0px) + 10px); left: 8px; right: 8px; transform: none; justify-content: space-between; } }

.sc-media img.fit { object-fit: contain; background: #000; }

/* ---- editors' faces (boss pages only) ---- */
.face { position: relative; width: 52px; height: 52px; border-radius: 16px; background: #1a1a1a; border: 1px solid var(--line-2); flex: none;
  display: grid; place-items: center; }
.face img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.face b { font: 900 17px var(--sans); color: var(--text-2); letter-spacing: .02em; }
.face .fd { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--card); background: #52525b; }
.face .fd.on { background: var(--ok); box-shadow: 0 0 10px rgba(74,222,128,.7); }
.face .fd.fired { background: var(--bad); }
.face.sm { width: 34px; height: 34px; border-radius: 11px; } .face.sm b { font-size: 12px; } .face.sm .fd { width: 11px; height: 11px; border-width: 2px; }
.face.lg { width: 88px; height: 88px; border-radius: 22px; } .face.lg b { font-size: 26px; } .face.lg .fd { display: none; }
.wc-head { display: flex; align-items: center; gap: 14px; }
.wc-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wc-name h3 { display: flex; align-items: center; gap: 8px; }
.stat-card .nums .n span { font-size: 11px; letter-spacing: .06em; }
.who-cell { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.photo-zone { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
