/* Scenly: dark creative-studio theme. Brand: blue #4361ee and cyan #04d9ff. */
:root {
  --bg: #050506;
  --bg-2: #0b0b0d;
  --panel: #131316;
  --panel-2: #1a1a1e;
  --panel-3: #232328;
  --line: rgb(var(--ink) / .08);
  --line-2: rgb(var(--ink) / .14);
  --text: #f3f3f5;
  --muted: #a0a0aa;
  --faint: #6d6d77;
  --accent: #4361ee;
  --accent-ink: #ffffff;
  --violet: #04d9ff;
  --grad: linear-gradient(100deg, #4361ee 0%, #04d9ff 100%);
  --go: #42c98a;
  --danger: #ff6b6b;
  --warn: #ffb547;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --ink: 255 255 255;
  --bg-rgb: 5 5 6;
  --panel-4: #2b2b31;
  --panel-m: #111114;
  --pop: #1b1b1f;
  --glass: rgba(20, 20, 23, 0.85);
  --text-2: #d4d4da;
  --err-ink: #ff9d9d;
  --ok-ink: #63dba2;
  --code-bg: #0d0d10;
  --side: 224px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
/* Light theme: same tokens, light values. Dark stays the default. */
:root[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-2: #ececf0;
  --panel: #ffffff;
  --panel-2: #f1f1f4;
  --panel-3: #e6e6eb;
  --panel-4: #d9d9e0;
  --panel-m: #ffffff;
  --pop: #ffffff;
  --glass: rgba(255, 255, 255, 0.86);
  --ink: 22 22 34;
  --bg-rgb: 245 245 247;
  --line: rgb(22 22 34 / .1);
  --line-2: rgb(22 22 34 / .18);
  --text: #15151b;
  --text-2: #3b3b45;
  --muted: #5f5f6b;
  --faint: #8a8a95;
  --accent: #4361ee;
  --accent-ink: #ffffff;
  --err-ink: #c0392b;
  --ok-ink: #17824f;
  --code-bg: #f3f3f6;
  --shadow: 0 16px 40px rgba(20, 20, 40, 0.14);
  color-scheme: light;
}
/* Banners and the media viewer keep their dark look in both themes. */
:root[data-theme="light"] :is(.hero, .insp-card, .auth-art, .feature-card, .lightbox, .appc .cover, .app-hero .appc .body) {
  --ink: 255 255 255;
  --line: rgba(255, 255, 255, 0.12);
  --line-2: rgba(255, 255, 255, 0.2);
  --text: #f3f3f5;
  --text-2: #d4d4da;
  --muted: #b4b4be;
  --faint: #8a8a95;
  --panel: #131316;
  --panel-2: #1a1a1e;
  --panel-3: #232328;
  --accent: #4361ee;
  --accent-ink: #ffffff;
  color: var(--text);
}
:root[data-theme="light"] .auth-art { background: #050506; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
a { color: var(--accent); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: rgba(67,97,238, 0.3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgb(var(--ink) / .12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgb(var(--ink) / .2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.grow { flex: 1; }
.hide { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); font-weight: 600; white-space: nowrap; transition: background .15s, transform .1s, opacity .15s; }
.btn:hover { background: #2c2c32; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: #63eef7; }
.btn.grad { background: var(--grad); color: #071016; border: 0; }
.btn.go { background: var(--go); color: #04210f; border: 0; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgb(var(--ink) / .06); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--muted); transition: background .15s, color .15s; flex: none; }
.icon-btn:hover { background: rgb(var(--ink) / .07); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm .i { width: 16px; height: 16px; }

/* ---------- shell ---------- */
#app { height: 100%; }
.shell { display: grid; grid-template-columns: var(--side) 1fr; height: 100%; }
.shell.collapsed { grid-template-columns: 0 1fr; }
.shell.collapsed .sidebar { visibility: hidden; }
.sidebar { background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px 12px; gap: 4px; overflow-y: auto; min-width: 0; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.brand { display: flex; align-items: center; gap: 9px; font: 700 19px/1 var(--display); letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.feature-card { position: relative; border-radius: 14px; padding: 12px 12px 8px; margin: 2px 0 10px; overflow: hidden; background: radial-gradient(120% 140% at 0% 0%, rgba(67,97,238,.35), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(4,217,255,.4), transparent 60%), #0f1418; border: 1px solid rgba(67,97,238,.18); }
.feature-card small { display: block; color: rgba(255,255,255,.55); font-size: 11.5px; margin-bottom: 4px; }
.feature-card a { display: flex; align-items: center; gap: 9px; padding: 6px 2px; color: var(--text); text-decoration: none; font-size: 13.5px; opacity: .92; }
.feature-card a:hover { opacity: 1; }
.feature-card .i { width: 16px; height: 16px; }
.side-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--faint); padding: 12px 10px 4px; }
.nav { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 500; transition: background .15s; }
.nav:hover { background: rgb(var(--ink) / .05); color: var(--text); }
.nav.active { background: var(--panel-2); color: var(--text); }
.nav .i { width: 18px; height: 18px; color: var(--muted); }
.nav.active .i { color: var(--text); }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.tag.hot { background: rgba(255,138,76,.18); color: #ff9f6b; }
.tag.new { background: rgba(67,97,238,.14); color: var(--accent); }
.tag.disc { background: rgba(66,201,138,.16); color: var(--ok-ink); }
.tag.cost-low { background: rgba(66,201,138,.16); color: var(--ok-ink); }
.tag.cost-high { background: rgb(var(--ink) / .07); color: var(--muted); font-weight: 600; }
.gets { border-top: 1px solid var(--line); padding-top: 10px; margin: 2px 0 14px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); text-align: left; }
.gets small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.gets b { color: rgb(var(--ink)); font-weight: 700; }
.tag.dim { background: rgb(var(--ink) / .07); color: var(--muted); font-weight: 600; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.credit-card { display: block; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 10px 12px; color: inherit; text-decoration: none; }
.credit-card:hover { border-color: var(--line-2); }
.credit-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.credit-row b { color: var(--text); font-size: 15px; }
.credit-bar { height: 4px; border-radius: 4px; background: rgb(var(--ink) / .08); margin-top: 8px; overflow: hidden; }
.credit-bar i { display: block; height: 100%; background: var(--grad); border-radius: 4px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; text-align: left; width: 100%; }
.user-chip:hover { background: rgb(var(--ink) / .05); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #071016; display: grid; place-items: center; font-weight: 800; flex: none; }
.user-chip .meta { min-width: 0; }
.user-chip .meta div { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .meta small { color: var(--faint); font-size: 12px; }
.socials { display: flex; gap: 2px; padding: 0 4px; }

.main { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%; background: var(--bg); overflow: hidden; }
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 14px 20px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.topbar .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .menu-btn { display: none; }
.shell.collapsed .topbar .menu-btn { display: inline-grid; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); font-weight: 600; font-size: 13px; color: var(--text); text-decoration: none; }
.pill:hover { border-color: var(--line-2); }
.pill .i { width: 16px; height: 16px; color: var(--accent); }
.pricing-pill { position: relative; }
.pricing-pill .badge { position: absolute; top: -9px; right: -6px; background: var(--go); color: #04210f; font-size: 9.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 13px; }
.seg button.on { background: var(--panel-3); color: var(--text); }
.seg .i { width: 15px; height: 15px; }

.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.page { max-width: 1180px; margin: 0 auto; padding: 72px 28px 60px; }
.page h1 { font: 700 30px/1.15 var(--display); letter-spacing: -.02em; margin: 0 0 6px; }
.page h2 { font: 600 19px/1.3 var(--display); margin: 34px 0 14px; display: flex; align-items: center; gap: 10px; }
.page .sub { color: var(--muted); margin: 0 0 22px; }

/* ---------- studio (image / video) ---------- */
.studio { position: relative; height: 100%; display: flex; flex-direction: column; }
.studio .scroll { padding-bottom: 230px; }
.studio-empty { position: absolute; inset: 0 0 160px; display: grid; place-items: center; pointer-events: none; text-align: center; }
.studio-empty h1 { font: 600 34px/1.2 var(--display); letter-spacing: -.02em; margin: 0; }
.studio-empty p { color: var(--muted); margin: 10px 0 0; }
.studio-empty .glow { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feed { max-width: 1080px; margin: 0 auto; padding: 70px 28px 0; }
.day { color: var(--faint); font-size: 12.5px; font-weight: 600; margin: 26px 0 12px; }
.gen { padding: 4px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.gen-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.gen-prompt { flex: 1; min-width: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.gen-prompt:hover { color: var(--text); }
.gen-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.meta-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 500; }
.meta-chip .i { width: 13px; height: 13px; }
.meta-chip.model { color: var(--text); }
.gen-tools { display: flex; gap: 2px; opacity: .75; }
.gen:hover .gen-tools { opacity: 1; }
.gen-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gen-media.video { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.tile { position: relative; border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid var(--line); aspect-ratio: 1; }
.tile.v { aspect-ratio: 16/9; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.tile video { cursor: default; background: #000; object-fit: contain; }
.tile .over { position: absolute; inset: auto 0 0 0; display: flex; gap: 4px; justify-content: flex-end; padding: 8px; background: linear-gradient(transparent, rgba(0,0,0,.7)); opacity: 0; transition: opacity .15s; }
.tile:hover .over { opacity: 1; }
.tile.v .over { inset: 0 0 auto 0; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.tile .over .icon-btn { background: rgba(0,0,0,.45); color: #fff; backdrop-filter: blur(6px); }
.tile .over .icon-btn:hover { background: rgba(0,0,0,.7); }
.tile.pending { display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13px; }
.tile.pending::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(67,97,238,.08) 45%, rgba(4,217,255,.1) 55%, transparent 70%); background-size: 250% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.tile.pending .in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; }
.gen-err { color: var(--err-ink); background: rgba(255,107,107,.08); border: 1px solid rgba(255,107,107,.2); padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.gen-note { color: var(--warn); font-size: 12.5px; margin-top: 8px; }

/* inspiration */
.insp { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.insp-card { text-align: left; border-radius: 14px; padding: 16px; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); transition: transform .15s, border-color .15s; position: relative; overflow: hidden; }
.insp-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.insp-card b { font: 600 15px/1.3 var(--display); }
.insp-card p { margin: 8px 0 0; color: rgba(255,255,255,.75); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.insp-card .use { margin-top: 12px; font-size: 12px; font-weight: 600; color: #fff; opacity: .8; display: flex; align-items: center; gap: 5px; }

/* ---------- prompt bar ---------- */
.dock { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 15; padding: 0 20px; pointer-events: none; }
.bar { pointer-events: auto; max-width: 940px; margin: 0 auto; background: rgba(24,24,28,.92); backdrop-filter: blur(18px); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow); padding: 12px 12px 10px; transition: border-color .15s; }
.bar:focus-within { border-color: rgba(67,97,238,.35); }
.bar-top { display: flex; gap: 12px; align-items: flex-start; }
.material { display: flex; gap: 8px; flex: none; }
.mat-add { width: 62px; height: 62px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--panel-2); color: var(--muted); display: grid; place-items: center; text-align: center; font-size: 11px; line-height: 1.2; transform: rotate(-4deg); transition: transform .15s, border-color .15s, color .15s; }
.mat-add:hover { transform: rotate(0); border-color: var(--accent); color: var(--text); }
.mat-add .i { width: 18px; height: 18px; margin: 0 auto 2px; }
.mat { position: relative; width: 62px; height: 62px; border-radius: 12px; overflow: hidden; background: var(--panel-3); border: 1px solid var(--line); flex: none; }
.mat img, .mat video { width: 100%; height: 100%; object-fit: cover; }
.mat .x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; }
.mat .x .i { width: 12px; height: 12px; }
.mat .lbl { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; padding: 2px 4px; background: rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat.loading::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.5) url() center/20px no-repeat; }
.mat.doc { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; }
.bar textarea { flex: 1; min-height: 62px; max-height: 240px; resize: none; border: 0; outline: 0; background: transparent; font-size: 15px; line-height: 1.55; padding: 6px 4px; color: var(--text); }
.bar textarea::placeholder { color: var(--faint); }
.bar-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chipbtn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; max-width: 260px; transition: background .15s, border-color .15s; }
.chipbtn:hover { background: var(--panel-3); border-color: var(--line-2); }
.chipbtn .i { width: 15px; height: 15px; color: var(--muted); }
.chipbtn .nm { overflow: hidden; text-overflow: ellipsis; }
.chipbtn.on { border-color: rgba(67,97,238,.45); color: var(--accent); }
.chipbtn.on .i { color: var(--accent); }
.chipbtn .sep { width: 1px; height: 14px; background: var(--line-2); }
.switch { position: relative; width: 32px; height: 18px; border-radius: 10px; background: #3a3a42; transition: background .15s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(14px); }
.gen-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 14px; border-radius: 12px; background: var(--go); color: #04210f; font-weight: 700; font-size: 14px; transition: filter .15s, opacity .15s; }
.gen-btn:hover { filter: brightness(1.08); }
.gen-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.gen-btn .cost { display: inline-flex; align-items: center; gap: 4px; padding-left: 9px; border-left: 1px solid rgba(4,33,15,.25); font-size: 13px; }
.gen-btn .i { width: 15px; height: 15px; }
.gen-btn.stop { background: var(--panel-3); color: var(--text); }
.send { width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.send:disabled { opacity: .35; cursor: not-allowed; }
.send.stop { background: var(--panel-3); color: var(--text); }
.bar-hint { text-align: center; color: var(--faint); font-size: 11.5px; margin-top: 8px; pointer-events: none; }

/* ---------- popovers & menus ---------- */
.popover { position: fixed; z-index: 100; background: var(--pop); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; max-height: min(560px, calc(100vh - 20px)); overflow-y: auto; animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } }
.menu { display: flex; flex-direction: column; min-width: 200px; }
.menu > a, .menu > button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); text-decoration: none; text-align: left; font-size: 13.5px; }
.menu > a:hover, .menu > button:hover { background: rgb(var(--ink) / .06); }
.menu .i { width: 16px; height: 16px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu .chk { margin-left: auto; color: var(--accent); }
.menu-head { padding: 8px 10px 4px; font-size: 11.5px; color: var(--faint); font-weight: 600; letter-spacing: .04em; }
.models { width: 360px; display: flex; flex-direction: column; }
.mopt { display: flex; gap: 11px; align-items: flex-start; padding: 10px; border-radius: 10px; text-align: left; width: 100%; }
.mopt:hover { background: rgb(var(--ink) / .05); }
.mopt.sel { background: rgba(67,97,238,.07); }
.mopt .logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 12px; color: #fff; }
.mopt .txt { flex: 1; min-width: 0; }
.mopt .nm { display: flex; align-items: center; gap: 6px; font-weight: 600; flex-wrap: wrap; }
.mopt .ds { color: var(--muted); font-size: 12px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mopt .pr { color: var(--faint); font-size: 11.5px; margin-top: 3px; }
.mopt .chk { color: var(--accent); margin-top: 8px; }
.settings { width: 330px; padding: 10px 12px 12px; }
.settings h4 { margin: 0; display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.settings h4 button { color: var(--faint); font-size: 12px; font-weight: 500; display: inline-flex; gap: 4px; align-items: center; }
.settings h4 button .i { width: 13px; height: 13px; }
.settings label.lab { display: block; color: var(--muted); font-size: 12.5px; margin: 14px 0 8px; }
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.opts.four { grid-template-columns: repeat(4, 1fr); }
.opt { height: 38px; border-radius: 9px; background: var(--panel-3); border: 1px solid transparent; font-size: 13px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.opt:hover { border-color: var(--line-2); }
.opt.on { border-color: rgb(var(--ink) / .55); background: var(--panel-4); color: var(--text); }
.opt .ratio { border: 1.5px solid currentColor; border-radius: 2px; opacity: .8; }
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--accent); }
.slider-row .val { width: 54px; height: 32px; border-radius: 8px; background: var(--panel-3); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.settings .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }
.settings .row small { display: block; color: var(--faint); font-size: 11.5px; }
.field-input { width: 100%; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-3); padding: 0 11px; outline: 0; }
.field-input:focus { border-color: rgba(67,97,238,.45); }

/* ---------- home ---------- */
.home { padding-top: 64px; }
.hero { position: relative; border-radius: 22px; overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; padding: 36px; border: 1px solid var(--line); }
.hero .bgfx { position: absolute; inset: 0; z-index: 0; }
.hero .bgfx::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,5,6,.92) 0%, rgba(5,5,6,.55) 45%, rgba(5,5,6,0) 75%); }
.hero .copy { position: relative; z-index: 1; max-width: 520px; }
.hero .eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.hero h2 { font: 700 40px/1.08 var(--display); letter-spacing: -.03em; margin: 10px 0 10px; }
.hero p { color: #c9c9d1; margin: 0 0 20px; font-size: 15px; }
.hero .dots { position: absolute; right: 24px; bottom: 22px; display: flex; gap: 6px; z-index: 2; }
.hero .dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.3); }
.hero .dots button.on { background: #fff; width: 22px; border-radius: 6px; }
.orb { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .85; animation: float 12s ease-in-out infinite alternate; }
@keyframes float { to { transform: translate(-40px, 30px) scale(1.12); } }
.quick { margin: 26px auto 0; max-width: 820px; }
.quick .bar { max-width: none; }
.model-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.mcard { text-align: left; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, transform .15s; display: flex; flex-direction: column; gap: 10px; }
.mcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mcard .top { display: flex; align-items: center; gap: 10px; }
.mcard .logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.mcard b { font-weight: 600; font-size: 15px; }
.mcard small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.mcard .kind { margin-left: auto; }
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }

/* ---------- apps ---------- */
.app-hero { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin-bottom: 26px; }
.app-hero .appc { min-height: 220px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); flex: 1; }
.tabs button { padding: 0 0 10px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-color: var(--text); }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); width: 280px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; flex: 1; color: var(--text); min-width: 0; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.appc { position: relative; text-align: left; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.appc:hover { transform: translateY(-3px); border-color: var(--line-2); }
.appc .cover { position: relative; aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden; }
.app-hero .appc .cover { aspect-ratio: auto; flex: 1; }
.appc .cover .i { width: 54px; height: 54px; color: rgba(255,255,255,.95); stroke-width: 1.5; filter: drop-shadow(0 6px 20px rgba(0,0,0,.35)); }
.appc .cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 60% at 30% 20%, rgba(255,255,255,.28), transparent 60%); }
.appc .cover .tag { position: absolute; top: 10px; left: 10px; z-index: 1; background: rgba(0,0,0,.45); color: #fff; backdrop-filter: blur(6px); }
.appc .body { padding: 12px 14px 14px; }
.appc .body b { display: block; font-weight: 600; font-size: 14.5px; }
.appc .body small { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; }
.appc .kindtag { position: absolute; top: 10px; right: 10px; z-index: 1; }
.app-hero .appc .body { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.75)); padding: 30px 18px 16px; }
.app-hero .appc .body b { font-size: 18px; font-family: var(--display); }

/* app modal */
.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.66); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(1080px, 100%); height: min(720px, 100%); background: var(--panel-m); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-head .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.modal-head .ico .i { color: #fff; }
.modal-head b { display: block; font-size: 15px; }
.modal-head small { color: var(--faint); font-size: 12px; }
.modal-body { flex: 1; display: grid; grid-template-columns: 340px 1fr; min-height: 0; }
.app-side { border-right: 1px solid var(--line); padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.app-side .desc { color: var(--muted); font-size: 13px; margin: 0; }
.app-side .lab { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--faint); text-transform: uppercase; margin-bottom: 7px; }
.drop { border: 1.5px dashed var(--line-2); border-radius: 14px; background: var(--panel); min-height: 140px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; position: relative; overflow: hidden; transition: border-color .15s; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--text); }
.drop .i { width: 24px; height: 24px; margin: 0 auto 6px; }
.drop img, .drop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.drop .x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; display: grid; place-items: center; }
.drops { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drops .drop { min-height: 120px; }
.app-side textarea, .app-side input[type=text], .app-side select { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); padding: 10px 12px; outline: 0; resize: vertical; }
.app-side textarea:focus, .app-side input:focus { border-color: rgba(67,97,238,.45); }
.app-side select { height: 40px; padding: 0 10px; }
.app-side .run { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.app-side .run small { color: var(--faint); font-size: 12px; text-align: center; }
.app-main { overflow-y: auto; padding: 18px; }
.app-main .empty { height: 100%; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 11.5px; margin: 8px 0; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-columns: 260px 1fr; grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; }
.chat.nolist { grid-template-columns: 0 1fr; }
.chat.nolist .chat-list { visibility: hidden; }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; background: var(--bg-2); padding: 64px 10px 10px; }
.chat-list .btn { margin-bottom: 10px; }
.chat-list .search { width: 100%; height: 36px; border-radius: 10px; margin-bottom: 8px; }
.conv-list { flex: 1; overflow-y: auto; }
.conv-group { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 12px 8px 4px; }
.conv { display: flex; align-items: center; border-radius: 9px; }
.conv a { flex: 1; min-width: 0; padding: 8px 10px; color: var(--text-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.conv:hover { background: rgb(var(--ink) / .04); }
.conv.active { background: var(--panel-2); }
.conv.active a { color: var(--text); }
.conv .icon-btn { width: 26px; height: 26px; opacity: 0; }
.conv:hover .icon-btn, .conv.active .icon-btn { opacity: 1; }
.chat-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.chat-list { min-height: 0; }
.scroll { min-height: 0; }
.chat-main .scroll { padding-bottom: 200px; }
.thread { max-width: 800px; margin: 0 auto; padding: 72px 24px 0; }
.chat-hero { max-width: 760px; margin: 0 auto; padding: 18vh 24px 0; text-align: center; }
.chat-hero h1 { font: 600 34px/1.2 var(--display); letter-spacing: -.02em; margin: 0 0 8px; }
.chat-hero p { color: var(--muted); margin: 0 0 26px; }
.suggests { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.suggest { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); font-size: 13px; }
.suggest:hover { border-color: var(--line-2); color: var(--text); }
.suggest .i { width: 15px; height: 15px; color: var(--muted); }
.msg { margin: 0 0 26px; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.bubble { background: var(--panel-2); border: 1px solid var(--line); padding: 10px 15px; border-radius: 18px 18px 6px 18px; max-width: 85%; white-space: pre-wrap; word-wrap: break-word; }
.ai-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.ai-mark { width: 24px; height: 24px; }
.who { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.who small { color: var(--faint); font-weight: 500; }
.msg-actions { display: flex; align-items: center; gap: 2px; margin-top: 8px; color: var(--faint); font-size: 12px; }
.msg-actions .spacer { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); max-width: 240px; }
.fchip img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.fchip .ft { width: 36px; height: 36px; border-radius: 6px; background: rgba(67,97,238,.12); color: var(--accent); display: grid; place-items: center; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.fchip .nm { min-width: 0; font-size: 12.5px; }
.fchip .nm div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fchip small { color: var(--faint); }
.thinking { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--bg-2); }
.thinking summary { cursor: pointer; padding: 8px 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; font-size: 13px; list-style: none; }
.thinking .body { padding: 0 12px 10px; color: var(--muted); font-size: 13px; white-space: pre-wrap; max-height: 260px; overflow-y: auto; }
.err { color: var(--err-ink); background: rgba(255,107,107,.08); border: 1px solid rgba(255,107,107,.22); padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.gen-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; }
.gen-card .shimmer { width: 120px; height: 72px; border-radius: 10px; background: linear-gradient(110deg, var(--panel-2) 30%, #2a2a33 50%, var(--panel-2) 70%); background-size: 250% 100%; animation: shimmer 1.4s linear infinite; flex: none; }
.gen-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.cursor > .md > :last-child::after { content: '▍'; color: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* markdown */
.md { line-height: 1.68; font-size: 15px; word-wrap: break-word; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol { margin: 0 0 12px; }
.md h1, .md h2, .md h3 { font-family: var(--display); margin: 20px 0 10px; line-height: 1.3; }
.md h1 { font-size: 22px; } .md h2 { font-size: 19px; } .md h3 { font-size: 16px; }
.md code { font: 13px var(--mono); background: rgb(var(--ink) / .07); padding: 2px 5px; border-radius: 5px; }
.md pre { margin: 0; padding: 12px 14px; overflow-x: auto; background: var(--code-bg) !important; }
.md pre code { background: none; padding: 0; font-size: 13px; }
.md .hljs { background: transparent; }
.md table { border-collapse: collapse; margin: 0 0 12px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line-2); padding: 6px 10px; text-align: left; }
.md blockquote { margin: 0 0 12px; padding-left: 14px; border-left: 3px solid var(--line-2); color: var(--muted); }
.code { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 12px; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 12px; background: var(--panel-2); font: 12px var(--mono); color: var(--muted); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 8px; }
.media { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.media img, .media video { width: 100%; }
.media .dl { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .15s; }
.media:hover .dl { opacity: 1; }

/* ---------- assets ---------- */
.masonry { columns: 4 230px; column-gap: 12px; }
.masonry .tile { aspect-ratio: auto; margin-bottom: 12px; break-inside: avoid; display: block; }
.masonry .tile img { height: auto; }
.masonry .tile video { height: auto; aspect-ratio: 16/9; }
.masonry .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 12px; color: #eee; background: linear-gradient(transparent, rgba(0,0,0,.75)); opacity: 0; transition: opacity .15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.masonry .tile:hover .cap { opacity: 1; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.9); display: grid; grid-template-columns: 1fr 320px; animation: fade .15s; }
.lightbox .stage { display: grid; place-items: center; padding: 30px; min-width: 0; min-height: 0; }
.lightbox .stage img, .lightbox .stage video { max-width: 100%; max-height: calc(100vh - 60px); border-radius: 12px; object-fit: contain; }
.lightbox aside { background: #111114; border-left: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.lightbox aside p { margin: 0; color: #dcdce2; font-size: 13.5px; white-space: pre-wrap; }
.lightbox aside .lab { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--faint); text-transform: uppercase; }
.lightbox .close { position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.08); color: #fff; }
.lightbox .acts { display: flex; flex-direction: column; gap: 8px; }

/* ---------- forms, cards, tables ---------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; height: 100%; overflow: auto; }
.auth-art { position: relative; overflow: hidden; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.auth-art .copy { position: relative; z-index: 1; }
.auth-art h2 { font: 700 42px/1.08 var(--display); letter-spacing: -.03em; margin: 0 0 14px; max-width: 560px; }
.auth-art p { color: #c4c4cc; font-size: 16px; max-width: 520px; margin: 0; }
.auth-feats { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 540px; }
.auth-feats div { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgb(var(--ink) / .05); border: 1px solid var(--line); font-weight: 500; backdrop-filter: blur(8px); }
.auth-feats .i { color: var(--accent); }
.auth-form { display: grid; place-items: center; padding: 30px; }
.auth-form form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { font: 700 28px/1.2 var(--display); margin: 18px 0 0; }
.auth-form p { color: var(--muted); margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field input { height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 14px; outline: 0; color: var(--text); font-size: 15px; }
.field input:focus { border-color: var(--accent); }
.form-err { color: var(--danger); font-size: 13px; min-height: 1px; }
.auth-form .btn { height: 44px; }
.notice { background: rgba(255,181,71,.08); border: 1px solid rgba(255,181,71,.25); color: #ffd28c; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: 13.5px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat small { color: var(--muted); font-size: 12.5px; }
.stat div { font: 700 22px/1.3 var(--display); margin-top: 4px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.card.pop { border-color: rgba(67,97,238,.5); background: linear-gradient(180deg, rgba(67,97,238,.07), transparent 40%), var(--panel); }
.card h3 { margin: 0; font: 600 18px var(--display); }
.card .tl { color: var(--muted); font-size: 13px; }
.card .price { font: 700 30px var(--display); }
.card .price small { font: 500 13px var(--font); color: var(--muted); }
.card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; font-size: 13.5px; }
.card li { display: flex; gap: 8px; align-items: flex-start; }
.card li .i { width: 16px; height: 16px; color: var(--accent); margin-top: 2px; }
.card .badge { position: absolute; top: -10px; right: 16px; background: var(--grad); color: #071016; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; color: var(--faint); font-weight: 600; font-size: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.t td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.t tr:last-child td { border-bottom: 0; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t .pos { color: var(--ok-ink); } .t .neg { color: var(--muted); }
.empty { color: var(--faint); text-align: center; padding: 40px 20px; display: grid; place-items: center; gap: 10px; }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #23232a; border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13.5px; animation: pop .15s; pointer-events: auto; max-width: 90vw; }
.toast.error { border-color: rgba(255,107,107,.4); color: #ffc0c0; }
.dropzone { position: fixed; inset: 10px; z-index: 150; border: 2px dashed var(--accent); border-radius: 20px; background: rgb(var(--bg-rgb) / .8); display: grid; place-items: center; font: 600 20px var(--display); pointer-events: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .chat, .chat.nolist { grid-template-columns: minmax(0, 1fr); }
  .chat .chat-list { visibility: hidden; position: absolute; }
  .chat.show-list { grid-template-columns: 1fr; }
  .chat.show-list .chat-list { visibility: visible; position: static; }
  .chat.show-list .chat-main { display: none; }
  .modal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .app-side { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .app-main { overflow: visible; min-height: 300px; }
  .app-hero { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lightbox aside { max-height: 40vh; }
}
@media (max-width: 860px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; visibility: visible !important; box-shadow: var(--shadow); }
  .shell.mobile-open .sidebar { transform: none; }
  .topbar .menu-btn { display: inline-grid !important; }
  .topbar { padding: 10px 12px; }
  .page { padding: 64px 16px 40px; }
  .feed { padding: 64px 16px 0; }
  .dock { padding: 0 10px; bottom: 10px; }
  .bar { padding: 10px; border-radius: 16px; }
  .mat-add, .mat { width: 50px; height: 50px; }
  .bar textarea { min-height: 50px; font-size: 16px; }
  .chipbtn { height: 32px; padding: 0 10px; }
  .chipbtn .nm { max-width: 110px; }
  .hero { padding: 22px; min-height: 260px; }
  .hero h2 { font-size: 28px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .search { width: 100%; }
  .studio-empty h1 { font-size: 26px; padding: 0 20px; }
  .gen-media.video { grid-template-columns: 1fr; }
  .modal-bg { padding: 0; }
  .modal { height: 100%; border-radius: 0; }
  .thread { padding: 64px 14px 0; }
  .chat-hero { padding: 14vh 16px 0; }
  .chat-hero h1 { font-size: 26px; }
  .models { width: calc(100vw - 30px); }
  .settings { width: calc(100vw - 30px); max-width: 360px; }
}
.logo-sm { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 8.5px; font-weight: 800; flex: none; }
.ai-logo { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; }
a.btn { text-decoration: none; }
@media (max-width: 860px) {
  .pricing-pill { display: none; }
  .seg button { padding: 0 9px; }
  .bar-row .gen-btn { margin-left: auto; }
  .studio .scroll { padding-bottom: 300px; }
}
@media (min-width: 861px) {
  .bar-row { flex-wrap: nowrap; }
  .bar-row .chipbtn { min-width: 0; flex-shrink: 1; }
  .bar-row .gen-btn, .bar-row .send, .bar-row .icon-btn { flex: none; }
}

/* Theme toggle */
.theme-btn { width: 34px; height: 34px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); color: var(--text); display: inline-grid; place-items: center; }
.theme-btn:hover { border-color: var(--line-2); }
.theme-btn .i { width: 16px; height: 16px; }
.jump-btm { position: absolute; left: 50%; transform: translateX(-50%); bottom: 150px; z-index: 6; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--pop); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text); font-size: 12.5px; font-weight: 600; display: none; align-items: center; gap: 6px; }
.jump-btm.show { display: inline-flex; }
.jump-btm .i { width: 14px; height: 14px; }

/* Light theme: surfaces that use fixed dark colours in the dark theme */
:root[data-theme="light"] .bar { background: rgba(255, 255, 255, 0.94); }
:root[data-theme="light"] .bar:focus-within { border-color: rgba(5, 150, 166, 0.45); }
:root[data-theme="light"] .toast { background: #ffffff; color: var(--text); }
:root[data-theme="light"] .toast.error { color: #b42318; }
:root[data-theme="light"] .btn:hover { background: var(--panel-3); }
:root[data-theme="light"] .btn.primary:hover { background: #047b88; }
:root[data-theme="light"] .switch { background: #cfcfd8; }
:root[data-theme="light"] .switch.on { background: var(--accent); }
:root[data-theme="light"] .notice { color: #8a5300; background: rgba(255, 181, 71, 0.14); }
:root[data-theme="light"] .tag.hot { color: #c2500f; }
:root[data-theme="light"] .tag.new { background: rgba(5, 150, 166, 0.12); }
:root[data-theme="light"] .modal-bg { background: rgba(20, 20, 34, 0.4); }
:root[data-theme="light"] ::selection { background: rgba(5, 150, 166, 0.22); }
:root[data-theme="light"] .lightbox aside { color: var(--text); }

/* Chat model picker: search and tabs stay put, only the list scrolls inside the room available */
.popover .models.picker { max-height: calc(var(--pop-max, 560px) - 14px); }
.pick-list { flex: 1; min-height: 0; max-height: 420px; overflow-y: auto; }

/* ---------- downloads and live preview ---------- */
.art-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 12px 0 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); max-width: 560px; }
.art-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(67,97,238,.12); color: var(--accent); flex: none; font: 800 11px var(--font); }
.art-ic.doc { background: #2b579a; color: #fff; font-size: 13px; }
.art-ic .i { width: 20px; height: 20px; }
.art-txt { flex: 1; min-width: 0; }
.art-txt b, .art-txt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-txt small { color: var(--muted); font-size: 12px; }
.pick-note { padding: 4px 10px 8px; color: var(--muted); font-size: 12.5px; }
.chat { position: relative; }
.chat.canvas-open { grid-template-columns: 0 minmax(0, 1fr) minmax(0, 1.2fr); }
.chat.canvas-open .chat-list { visibility: hidden; }
.canvas, .cx-ws { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--line); background: var(--bg-2); }
.canvas.wide { position: absolute; inset: 0; z-index: 40; border-left: 0; }
.canvas-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 55px; border-bottom: 1px solid var(--line); flex: none; }
.canvas-head > b { max-width: 34%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.canvas-head .seg { background: var(--panel); backdrop-filter: none; }
.canvas-head .seg button:disabled { opacity: .4; cursor: not-allowed; }
.canvas-body { flex: 1; min-height: 0; display: flex; background: #fff; }
.pv-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #fff; }
.pv-code { margin: 0; flex: 1; min-width: 0; overflow: auto; padding: 14px 16px; font: 12.5px/1.6 var(--mono); background: var(--code-bg); color: var(--text); tab-size: 2; }
.pv-code code { font: inherit; background: none !important; padding: 0; white-space: pre; display: block; }

/* ---------- Code workspace ---------- */
.codex { position: relative; display: grid; grid-template-columns: 230px minmax(360px, 1fr) minmax(0, 1.25fr); grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; }
.codex.nolist { grid-template-columns: 0 minmax(360px, 1fr) minmax(0, 1.25fr); }
.codex.nolist .chat-list { visibility: hidden; }
.codex.ws-wide { grid-template-columns: 0 0 minmax(0, 1fr); }
.codex.ws-wide .chat-list, .codex.ws-wide .cx-main { visibility: hidden; overflow: hidden; }
.cx-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.cx-main .scroll { padding-bottom: 190px; }
.cx-main .topbar .pricing-pill { display: none; }
.cx-thread { max-width: 780px; margin: 0 auto; padding: 72px 20px 0; font: 13px/1.65 var(--mono); }
.cx-user { display: flex; gap: 10px; padding: 10px 12px; margin: 0 0 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); white-space: pre-wrap; word-break: break-word; }
.cx-caret { color: var(--accent); font: 700 14px/1.5 var(--mono); flex: none; }
.cx-ai { margin: 0 0 24px; }
.cx-ai .md { font: 13px/1.7 var(--mono); margin: 4px 0; }
.cx-ai .md h1, .cx-ai .md h2, .cx-ai .md h3 { font: 700 13.5px/1.5 var(--mono); margin: 12px 0 6px; }
.cx-ai .md.typing > :last-child::after { content: '▍'; color: var(--accent); animation: blink 1s steps(2) infinite; }
.cx-op { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 5px 8px; margin: 2px 0; border-radius: 8px; font: 13px/1.5 var(--mono); color: var(--text-2); }
button.cx-op:hover { background: rgb(var(--ink) / .06); }
.cx-op .dot { color: var(--go); flex: none; }
.cx-op.del .dot { color: var(--danger); }
.cx-op.warn .dot { color: var(--warn); }
.cx-op .verb { font-weight: 700; color: var(--text); flex: none; }
.cx-op .path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-op .dstat { margin-left: auto; display: flex; gap: 8px; flex: none; color: var(--faint); font-size: 12px; }
.cx-op .add { color: var(--ok-ink); font-style: normal; }
.cx-op .rem { color: var(--err-ink); font-style: normal; }
.cx-foot { display: flex; align-items: center; gap: 2px; margin-top: 8px; color: var(--faint); font: 12px var(--font); }
.cx-box { border: 1px solid rgba(67,97,238,.45); border-radius: 10px; padding: 14px 16px; max-width: 560px; }
.cx-box b { font-size: 14px; }
.cx-box p { margin: 8px 0 0; color: var(--text-2); }
.cx-box .dim, .cx-tips .dim { color: var(--faint); }
.cx-star { color: #e08a5b; }
.cx-tips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.cx-tips .suggest { font-family: var(--font); }
.cx-bar .cx-caret { padding: 7px 0 0 4px; }
.cx-bar textarea { font-family: var(--mono); font-size: 14px; min-height: 44px; }
.cx-code { flex: 1; min-height: 0; display: grid; grid-template-columns: 190px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.cx-files { overflow-y: auto; border-right: 1px solid var(--line); padding: 8px 6px; }
.cx-file { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; padding: 6px 8px; border-radius: 8px; font: 12.5px var(--mono); color: var(--text-2); }
.cx-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-file i { color: var(--faint); font-style: normal; }
.cx-file .i { width: 14px; height: 14px; flex: none; color: var(--faint); }
.cx-file:hover { background: rgb(var(--ink) / .05); }
.cx-file.on { background: var(--panel-3); color: var(--text); }
.cx-editor { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cx-editor .code-head { flex: none; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); }
.cx-editor .code-head > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-edit { flex: 1; resize: none; border: 0; outline: 0; padding: 14px 16px; font: 12.5px/1.6 var(--mono); background: var(--code-bg); color: var(--text); tab-size: 2; white-space: pre; overflow: auto; }
.cx-page { height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); padding: 0 8px; font-size: 12.5px; max-width: 180px; }
.cx-empty { flex: 1; align-content: center; }
.cx-empty .i { width: 28px; height: 28px; }
.cx-empty span { max-width: 320px; font-size: 13px; }
.ws-btn, .ws-close { display: none !important; }
:root[data-theme="light"] .cx-box { border-color: rgba(5,150,166,.5); }
:root[data-theme="light"] .art-ic { background: rgba(5,150,166,.12); }
:root[data-theme="light"] .art-ic.doc { background: #2b579a; }

@media (max-width: 1000px) {
  .chat.canvas-open { grid-template-columns: minmax(0, 1fr); }
  .canvas { position: fixed; inset: 0; z-index: 70; border-left: 0; }
  .codex, .codex.nolist, .codex.ws-wide { grid-template-columns: minmax(0, 1fr); }
  .codex.ws-wide .cx-main { visibility: visible; }
  .codex .chat-list { visibility: hidden; position: absolute; }
  .codex.show-list .chat-list { visibility: visible; position: static; }
  .codex.show-list .cx-main { display: none; }
  .cx-ws { display: none; }
  .codex.show-ws .cx-ws { display: flex; position: fixed; inset: 0; z-index: 70; border-left: 0; }
  .ws-btn { display: inline-flex !important; }
  .ws-close { display: inline-grid !important; }
  .cx-code { grid-template-columns: 120px minmax(0, 1fr); }
  .art-card { flex-wrap: wrap; }
}
.chat-main > .topbar, .cx-main > .topbar { background: linear-gradient(var(--bg) 55%, rgb(var(--bg-rgb) / 0)); padding-bottom: 22px; }
.ws-btn { white-space: nowrap; }

/* ---------- dialogs, projects, characters ---------- */
.modal-bg.dlg { z-index: 95; }
.modal.dlg-box { width: min(520px, 100%); height: auto; max-height: min(760px, 100%); }
.modal.dlg-box.wide { width: min(780px, 100%); }
.dlg-body { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.dlg-body .lab { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--faint); text-transform: uppercase; margin-bottom: 7px; }
.dlg-body input[type=text], .dlg-body textarea { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); padding: 10px 12px; outline: 0; resize: vertical; line-height: 1.5; }
.dlg-body input[type=text]:focus, .dlg-body textarea:focus { border-color: rgba(67,97,238,.45); }
.hint { display: block; color: var(--faint); font-size: 12.5px; line-height: 1.45; margin-top: 6px; }
.dlg-body > .hint { margin-top: -6px; }
.clip1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-cap { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.menu .mini, .chipbtn .mini { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex: none; }
.chipbtn .mini { width: 20px; height: 20px; margin-left: -3px; }
.menu > button .tag { margin-left: auto; }
.menu > button .tag + .chk { margin-left: 6px; }
.h2 { font: 600 19px var(--display); margin: 38px 0 14px; }
.empty.big { padding: 70px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty.big b { color: var(--text); font-size: 16px; }
.empty-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--panel-2); }
.empty-ico .i { width: 28px; height: 28px; color: var(--accent); }
.opt-row { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 500; }
.opt:hover { border-color: var(--line-2); }
.opt .i { width: 15px; height: 15px; color: var(--muted); }
.opt.on { border-color: var(--accent); color: var(--text); background: rgba(67,97,238,.1); }
.opt.on .i { color: var(--accent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--text-2); cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.consent input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pj-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--panel); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.pj-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pj-cover { height: 132px; display: grid; gap: 2px; background: linear-gradient(135deg, rgba(67,97,238,.22), rgba(4,217,255,.25)); place-items: center; }
.pj-cover .i { width: 34px; height: 34px; color: var(--accent); }
.pj-cover.n2 { grid-template-columns: 1fr 1fr; } .pj-cover.n3 { grid-template-columns: 1fr 1fr 1fr; }
.pj-cover img { width: 100%; height: 132px; object-fit: cover; }
.pj-card .body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 5px; }
.pj-card b { font-size: 15px; }
.pj-card small { color: var(--muted); font-size: 12.5px; line-height: 1.45; min-height: 36px; }
.pj-counts { display: flex; gap: 14px; margin-top: 6px; color: var(--faint); font-size: 12.5px; }
.pj-counts span { display: inline-flex; align-items: center; gap: 5px; }
.pj-counts .i { width: 14px; height: 14px; }
.pj-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; text-decoration: none; margin-bottom: 14px; }
.pj-back .i { width: 14px; height: 14px; transform: rotate(180deg); }
.pj-back:hover { color: var(--text); }
.pj-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; margin-top: 8px; }
.pj-bar { max-width: none; }
.pj-row { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.pj-row a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 13px 6px; color: var(--text); text-decoration: none; border-radius: 10px; }
.pj-row a:hover { background: rgb(var(--ink) / .04); }
.pj-row a .i { width: 17px; height: 17px; color: var(--muted); flex: none; }
.pj-row small { color: var(--faint); font-size: 12px; flex: none; }
.pj-row .icon-btn { opacity: .5; } .pj-row:hover .icon-btn { opacity: 1; }
.pj-list .tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 12px; color: #eee; background: linear-gradient(transparent, rgba(0,0,0,.75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.pj-list .tile .over { inset: 0 0 auto 0; background: none; }
.pj-pending { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); padding: 12px; text-align: center; }
.pj-side { display: flex; flex-direction: column; gap: 14px; }
.pj-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px 16px; }
.pj-ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pj-ph .btn { margin-right: -8px; color: var(--muted); }
.pj-ph .btn .i { width: 14px; height: 14px; }
.pj-instr { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.pj-none { margin: 0; color: var(--faint); font-size: 13px; line-height: 1.5; }
.pj-files { display: flex; flex-direction: column; gap: 4px; margin: 4px -6px -4px; }
.pj-file { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; font-size: 13px; }
.pj-file:hover { background: rgb(var(--ink) / .04); }
.pj-file img, .pj-file .fi { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; background: var(--panel-3); display: grid; place-items: center; }
.pj-file .fi .i { width: 17px; height: 17px; color: var(--muted); }
.pj-file small { color: var(--faint); font-size: 12px; }
.pj-note { display: flex; gap: 9px; color: var(--faint); font-size: 12.5px; line-height: 1.5; padding: 0 4px; }
.pj-note .i { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent); }
.pick-rows { display: flex; flex-direction: column; gap: 2px; margin: -6px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; text-align: left; font-size: 14px; }
.pick-row:hover { background: rgb(var(--ink) / .05); }
.pick-row > .i { width: 16px; height: 16px; color: var(--muted); flex: none; }
.box { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; }
.box .i { width: 12px; height: 12px; opacity: 0; color: var(--accent-ink); }
.on > .box { background: var(--accent); border-color: var(--accent); } .on > .box .i { opacity: 1; }
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.pick-grid .tile { cursor: pointer; padding: 0; }
.pick-grid .tile img, .pick-grid .tile video { cursor: pointer; object-fit: cover; }
.pick-grid .tile .box { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.45); border-color: rgba(255,255,255,.7); }
.pick-grid .tile.on { outline: 2px solid var(--accent); outline-offset: -2px; }
.pick-grid .tile.on .box { background: var(--accent); border-color: var(--accent); }
.tile .cnt, .ch-card .cnt { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; }

.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ch-card { border-radius: var(--r-lg); overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.ch-card .ph { position: relative; aspect-ratio: 4/5; cursor: pointer; background: var(--panel-3); }
.ch-card .ph img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.ch-card .ph.fit img { object-fit: contain; background: #fff; }
.ch-card .ph .tag { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); color: #fff; }
.ch-card .body { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 9px; }
.ch-card .acts { display: flex; gap: 6px; align-items: center; }
.ch-card .acts .btn { flex: 1; padding: 0 8px; }
.ch-card .acts .btn .i { width: 14px; height: 14px; }
.ch-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ch-photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; }
.ch-photo img { width: 100%; height: 100%; object-fit: cover; }
.ch-photo.loading img { opacity: .4; }
.ch-photo .spin { position: absolute; }
.ch-photo .x { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; display: grid; place-items: center; }
.ch-photo .x .i { width: 12px; height: 12px; }
.ch-photo.add { border: 1.5px dashed var(--line-2); color: var(--muted); gap: 2px; align-content: center; font-size: 12px; }
.ch-photo.add:hover { border-color: var(--accent); color: var(--text); }
.char-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.char-pick { flex: none; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.char-pick img, .char-pick .plus { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; border: 2px solid transparent; background: var(--panel); }
.char-pick .plus { display: grid; place-items: center; border: 1.5px dashed var(--line-2); }
.char-pick span { max-width: 100%; }
.char-pick.on { color: var(--text); } .char-pick.on img { border-color: var(--accent); }
.app-side .consent { font-size: 12.5px; }
.apps-page .tabs, .page .tabs { overflow-x: auto; scrollbar-width: none; }
.apps-page .tabs button, .page .tabs button { white-space: nowrap; }
:root[data-theme="light"] .opt.on { background: rgba(5,150,166,.1); }
:root[data-theme="light"] .ch-card .ph.fit img { background: #fafafa; }
@media (max-width: 1000px) {
  .pj-cols { grid-template-columns: minmax(0, 1fr); }
  .pj-side { order: -1; }
  .pj-instr { -webkit-line-clamp: 4; }
  .ch-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .modal.dlg-box, .modal.dlg-box.wide { height: auto; max-height: 100%; border-radius: 18px 18px 0 0; align-self: end; }
  .bar-row { flex-wrap: wrap; }
}
.studio .bar { max-width: 1100px; }
.studio .bar-row .gen-btn { margin-left: auto; }
.proj-chip .nm, .char-chip .nm { max-width: 110px; }
@media (min-width: 861px) {
  .studio .bar-row { flex-wrap: wrap; }
  .studio .bar-row .chipbtn { flex-shrink: 0; }
  .studio .bar-row .chipbtn .nm { max-width: 150px; }
  .studio .bar-row .proj-chip .nm, .studio .bar-row .char-chip .nm { max-width: 96px; }
}
.masonry > .empty { column-span: all; display: grid; }

/* ---------- one sidebar: navigation plus a shared history ---------- */
:root { --side: 256px; }
.sidebar { overflow: hidden; }
.new-chat { margin: 0 0 8px; height: 38px; flex: none; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.side-scroll > * { flex: none; }
.side-scroll .nav { height: 36px; }
.side-foot { margin-top: 0; }
.recents-head { display: flex; align-items: center; justify-content: space-between; padding-right: 2px; margin-top: 6px; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.recents-head .icon-btn { width: 24px; height: 24px; }
.recents-head .icon-btn .i { width: 14px; height: 14px; }
.side-search { width: 100%; height: 34px; border-radius: 10px; margin-bottom: 4px; font-size: 13px; }
.side-search[hidden] { display: none; }
#recents { flex: none; overflow: visible; padding-bottom: 8px; }
#recents .conv-group { padding: 10px 10px 3px; font-size: 11px; font-weight: 500; }
#recents .conv a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: 13.5px; }
#recents .conv a .i { width: 15px; height: 15px; flex: none; color: var(--faint); }
#recents .conv a span { overflow: hidden; text-overflow: ellipsis; }
#recents .conv.active a .i { color: var(--accent); }
.conv-none { color: var(--faint); font-size: 12.5px; line-height: 1.5; padding: 8px 10px; }
.topbar .title:empty { display: none; }
.studio .topbar .title { max-width: 40vw; }

/* ---------- voice input ---------- */
.icon-btn.mic.rec { background: var(--danger); color: #fff; animation: mic-pulse 1.6s ease-out infinite; }
.icon-btn.mic.rec:hover { background: var(--danger); color: #fff; }
.icon-btn.mic.busy { opacity: .55; cursor: progress; }
@keyframes mic-pulse { 0% { box-shadow: 0 0 0 0 rgb(255 107 107 / .55); } 100% { box-shadow: 0 0 0 10px rgb(255 107 107 / 0); } }
.voice-strip { display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.voice-strip .grow { flex: 1; }
.voice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); flex: none; animation: voice-blink 1.2s ease-in-out infinite; }
.voice-strip.busy .voice-dot { background: var(--accent); }
@keyframes voice-blink { 50% { opacity: .3; } }
.voice-label { color: var(--text); font-weight: 600; }
.voice-clock { font-variant-numeric: tabular-nums; }
.voice-meter { width: 64px; height: 6px; border-radius: 3px; background: rgb(var(--ink) / .12); overflow: hidden; flex: none; }
.voice-meter i { display: block; height: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(.04); transition: transform .2s; }
.voice-strip.sr .voice-meter, .voice-strip.busy .voice-meter { display: none; }
.voice-lang { background: transparent; color: var(--muted); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 12.5px; max-width: 150px; }
.voice-strip.busy .voice-lang { display: none; }
@media (prefers-reduced-motion: reduce) { .icon-btn.mic.rec, .voice-dot { animation: none; } }

/* A chat that is still answering, and one that finished while you were elsewhere */
.conv .conv-spin, .pj-row .conv-spin { flex: none; width: 13px; height: 13px; margin: 0 1.5px; vertical-align: 0; }
.conv.working a span { color: rgb(var(--ink)); }
.conv .conv-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin: 0 2px 0 4px; }

/* ---------- Landing page for visitors ---------- */
.lp { height: 100%; overflow-y: auto; overflow-x: hidden; }
.lp-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 12px 28px; background: rgb(var(--bg-rgb) / .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.lp-nav nav { display: flex; gap: 4px; margin-left: 22px; }
.lp-nav nav a { padding: 7px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 500; }
.lp-nav nav a:hover { color: var(--text); background: rgb(var(--ink) / .06); }
.lp .btn { text-decoration: none; }
.lp-hero { position: relative; overflow: hidden; padding: 84px 24px 70px; border-bottom: 1px solid var(--line); }
.lp-hero .bgfx { position: absolute; inset: 0; z-index: 0; opacity: .55; }
.lp-hero-in { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; text-align: center; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--glass); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.lp-eyebrow .i { width: 14px; height: 14px; color: var(--accent); }
.lp-hero h1 { font: 700 52px/1.06 var(--display); letter-spacing: -.035em; margin: 20px 0 14px; }
.lp-hero p { color: var(--text-2); font-size: 17px; margin: 0 auto 28px; max-width: 600px; }
.lp-bar { max-width: none; text-align: left; }
.lp-bar textarea { min-height: 70px; font-size: 16px; }
.lp-sec { max-width: 1180px; margin: 0 auto; padding: 64px 28px 0; }
.lp-sec h2, .lp-end h2 { font: 700 30px/1.15 var(--display); letter-spacing: -.02em; margin: 0 0 8px; }
.lp-sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.lp-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.lp-feat { padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.lp-feat .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgb(var(--ink) / .06); color: var(--accent); margin-bottom: 6px; }
.lp-feat b { font-size: 15.5px; font-weight: 600; }
.lp-feat small { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.lp-models { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.lp-models > small { color: var(--faint); margin-right: 4px; }
.lp-model { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 500; }
.lp-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.lp-plan { position: relative; padding: 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.lp-plan.pop { border-color: rgba(67,97,238,.5); }
.lp-plan .tag { position: absolute; top: 16px; right: 16px; }
.lp-plan b { font-size: 16px; }
.lp-plan .price { font: 700 32px/1.1 var(--display); letter-spacing: -.02em; }
.lp-plan .price small { font: 500 13px var(--font); color: var(--muted); letter-spacing: 0; }
.lp-plan > small { color: var(--muted); }
.lp-plan ul { list-style: none; padding: 0; margin: 12px 0 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lp-plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.lp-plan li .i { width: 15px; height: 15px; color: var(--go); flex: none; margin-top: 2px; }
.lp-end { text-align: center; padding: 84px 24px 70px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lp-end h2 { margin-bottom: 10px; }
.lp-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
/* Sign up step after the first message */
.gate-box { position: relative; width: min(440px, 100%); max-height: 100%; overflow: auto; background: var(--panel-m); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow); padding: 28px; }
.gate-box .gate-x { position: absolute; top: 14px; right: 14px; }
.gate-box h2 { font: 700 24px/1.2 var(--display); letter-spacing: -.02em; margin: 18px 0 6px; }
.gate-sub { color: var(--muted); margin: 0 0 14px; }
.gate-quote { padding: 10px 14px; border-radius: 12px; background: rgb(var(--ink) / .05); border: 1px solid var(--line); margin-bottom: 16px; }
.gate-quote small { color: var(--faint); font-size: 12px; font-weight: 600; }
.gate-quote div { font-size: 14px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.gate-box form { display: flex; flex-direction: column; gap: 14px; }
.gate-box form .btn { height: 44px; }
.gate-box form p { margin: 0; color: var(--muted); }
form .fine { font-size: 12.5px; text-align: center; color: var(--faint); margin: -4px 0 0; }
@media (max-width: 860px) {
  .lp-nav { padding: 10px 14px; }
  .lp-nav nav, .lp-nav .btn.ghost { display: none; }
  .lp-hero { padding: 48px 16px 44px; }
  .lp-hero h1 { font-size: 34px; }
  .lp-hero p { font-size: 15.5px; }
  .lp-sec { padding: 44px 16px 0; }
  .lp-sec h2, .lp-end h2 { font-size: 24px; }
  .lp-feats { grid-template-columns: 1fr; }
  .lp .app-grid { grid-template-columns: 1fr 1fr; }
  .gate-box { padding: 22px 18px; }
  .lp-bar .seg .i { display: none; }
  .lp-bar .seg button { padding: 0 10px; }
  .lp-bar .bar-row { flex-wrap: nowrap; }
}

/* Model provider icons */
.has-icon { background: #fff !important; padding: 0; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.has-icon img { width: 74%; height: 74%; object-fit: contain; display: block; margin: auto; }
.logo-sm.has-icon img { width: 80%; height: 80%; }
.has-icon { display: grid !important; place-items: center; }

/* Legal pages */
.legal { max-width: 820px; margin: 0 auto; padding: 56px 24px 40px; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.legal-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.legal h1 { font: 700 40px/1.1 var(--display); letter-spacing: -.03em; color: var(--text); margin: 8px 0 10px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }
.legal-toc { padding: 18px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 30px; }
.legal-toc b { display: block; color: var(--text); font-size: 13px; margin-bottom: 8px; }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; font-size: 13.5px; }
.legal-toc li { break-inside: avoid; padding: 2px 0; }
.legal-toc li:first-child { margin-top: 0; }
.legal-toc ol > li { display: list-item; }
.legal-toc a, .legal a { color: var(--accent); text-decoration: none; }
.legal-toc a:hover, .legal a:hover { text-decoration: underline; }
.legal section { scroll-margin-top: 80px; }
.legal h2 { font: 600 20px/1.3 var(--display); color: var(--text); margin: 34px 0 10px; }
.legal h3 { font-size: 15px; color: var(--text); margin: 18px 0 4px; }
.legal p { margin: 0 0 12px; }
.legal p.caps { font-size: 13.5px; letter-spacing: .01em; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal-intro p:nth-child(2) { color: var(--text); font-weight: 600; }
.legal-contact { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.legal-copy { text-align: center; color: var(--faint); font-size: 13px; padding: 0 0 40px; }
.lp-foot-links { display: flex; gap: 16px; }
.lp-foot a { color: var(--muted); text-decoration: none; }
.lp-foot a:hover { color: var(--text); }
.auth-form { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.auth-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 12.5px; color: var(--faint); }
.auth-legal a { color: var(--muted); text-decoration: none; }
form .agree { font-size: 12px; line-height: 1.5; margin-top: -6px !important; }
form .agree a { color: var(--muted); text-decoration: underline; }
/* Model chosen on the landing page */
.lp-model-chip { max-width: 220px; }
.lp-model-chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate-quote.with-model { display: flex; gap: 12px; align-items: center; }
.gate-quote .logo { width: 34px; height: 34px; border-radius: 9px; flex: none; font-weight: 800; font-size: 12px; }
.gate-quote .gq { min-width: 0; }
@media (max-width: 860px) {
  .legal { padding: 34px 16px 30px; font-size: 14.5px; }
  .legal h1 { font-size: 30px; }
  .legal-toc ol { columns: 1; }
  .lp-bar .bar-row { flex-wrap: wrap !important; }
  .lp-model-chip { order: 3; max-width: none; flex: 1; }
  .lp-model-chip .nm { max-width: none; flex: 1; text-align: left; }
}
.logo-xs { width: 15px; height: 15px; border-radius: 4px; display: inline-grid !important; place-items: center; font-size: 7px; font-weight: 800; flex: none; vertical-align: -3px; margin-right: 5px; }
.meta-chip.model { display: inline-flex; align-items: center; }
.mname { display: inline-flex; align-items: center; gap: 8px; }

/* AI Apps: background notice, Assets source filter */
.app-bgnote { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(67,97,238,.09); border-bottom: 1px solid var(--line); }
.app-bgnote b { display: block; font-size: 13.5px; }
.app-bgnote small { color: var(--text-2); font-size: 12.5px; }
.app-bgnote .grow { flex: 1; min-width: 0; }
.app-bgnote .btn { flex: none; white-space: nowrap; }
:root[data-theme="light"] .app-bgnote { background: rgba(5,150,166,.09); }
.asset-from { margin: -4px 0 16px; }
.asset-from .opt .n { color: var(--faint); font-size: 12px; font-weight: 600; }
.masonry .tile .app-tag { position: absolute; top: 8px; left: 8px; z-index: 1; gap: 4px; background: rgba(0,0,0,.55); color: #fff; }
.masonry .tile .app-tag .i { width: 11px; height: 11px; }
@media (max-width: 700px) { .app-bgnote { flex-wrap: wrap; } .app-bgnote .btn { width: 100%; } }

/* AI Apps: saved subjects box and output options */
.saved-box { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.saved-head { display: flex; align-items: center; margin-bottom: 8px; font-size: 12.5px; }
.saved-head b { flex: 1; font-weight: 600; }
.saved-head a { color: var(--accent); font-size: 12px; }
.saved-box .hint { display: block; margin-top: 6px; }
.app-opts { display: flex; flex-direction: column; gap: 14px; }
.app-opts:empty { display: none; }
.app-opts .opt { height: 32px; padding: 0 11px; }

/* ===== Sign in: Google, email confirmation, password reset, account ===== */
.btn.google { background: #fff; color: #1f1f1f; border-color: #dadce0; width: 100%; height: 44px; text-decoration: none; }
.btn.google:hover { background: #f4f6f8; }
.btn.google .g { display: inline-grid; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: -2px 0; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.lab-row { display: flex; justify-content: space-between; align-items: baseline; }
.lab-row .forgot { font-weight: 500; font-size: 12.5px; }
.form-ok { color: var(--ok-ink); font-size: 13px; }
.form-err a { color: inherit; text-decoration: underline; }
.verify-step { display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: stretch; }
.verify-step.left { text-align: left; }
.verify-step h3 { font: 700 22px/1.2 var(--display); margin: 0; color: var(--text); }
.verify-step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.verify-step p b { color: var(--text); overflow-wrap: anywhere; }
.verify-step .btn { height: 44px; }
.vs-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(67,97,238,.12); margin: 6px auto 0; }
.vs-ic .i { width: 26px; height: 26px; color: var(--accent); }
.dev-link { padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line-2); font-size: 13px !important; text-align: left; }
.auth.solo { grid-template-columns: 1fr; }
.acct-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acct-rows > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 13px; font-size: 13.5px; }
.acct-rows > div + div { border-top: 1px solid var(--line); }
.acct-rows span { color: var(--muted); } .acct-rows b { font-weight: 600; text-align: right; word-break: break-all; }
.acct-h { margin: 6px 0 -4px; font-size: 14.5px; }
.acct-p { margin: 0; color: var(--muted); font-size: 13.5px; }
.dlg-body input[type=password] { width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); padding: 0 12px; outline: 0; }
.dlg-body input[type=password]:focus { border-color: rgba(67,97,238,.45); }

/* ===== Grid / list switch, Projects list, Assets list, back to top ===== */
.view-toggle button { padding: 0 9px; }
.view-toggle .i { width: 16px; height: 16px; }
.pj-list, .asset-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.pj-row { display: flex; align-items: center; gap: 14px; padding: 11px 14px; color: inherit; text-decoration: none; transition: background .12s; }
.pj-row + .pj-row, .asset-row + .asset-row { border-top: 1px solid var(--line); }
.pj-row:hover, .asset-row:hover { background: rgb(var(--ink) / .04); }
.pj-thumb { width: 48px; height: 48px; border-radius: 11px; overflow: hidden; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, rgba(67,97,238,.22), rgba(4,217,255,.25)); }
.pj-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pj-thumb .i { width: 22px; height: 22px; color: var(--accent); }
.pj-row .txt, .asset-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pj-row .txt b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-row .txt small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-row .pj-counts { flex: none; }
.pj-row .go { width: 16px; height: 16px; color: var(--faint); flex: none; }
.asset-row { display: flex; align-items: center; gap: 14px; padding: 9px 12px; cursor: pointer; }
.asset-row .thumb { position: relative; width: 60px; height: 60px; border-radius: 10px; overflow: hidden; flex: none; background: var(--panel-3); display: grid; place-items: center; }
.asset-row .thumb.v { width: 92px; }
.asset-row .thumb img, .asset-row .thumb video { width: 100%; height: 100%; object-fit: cover; }
.asset-row .thumb > .i { position: absolute; width: 20px; height: 20px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.7)); }
.asset-row .p { font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asset-row .m { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--faint); font-size: 12px; }
.asset-row .m span { display: inline-flex; align-items: center; gap: 4px; }
.asset-row .m .i { width: 12px; height: 12px; }
.asset-row .acts { display: flex; gap: 2px; flex: none; }
.masonry .tile .over { gap: 4px; }
.to-top { position: absolute; right: 24px; bottom: 24px; z-index: 20; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 11px; border-radius: 999px; background: var(--pop); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 600; font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s, transform .18s; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top .i { width: 15px; height: 15px; }
.to-top:hover { border-color: var(--accent); }

/* ===== Image settings ===== */
.opt .two { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.opt .two small { color: var(--faint); font-size: 10.5px; font-weight: 500; }
.set-note { color: var(--faint); font-size: 12px; line-height: 1.45; margin: 12px 0 0; }
.icon-btn.on { color: var(--accent); background: rgba(67,97,238,.1); }

/* ===== Design Library ===== */
.stylechip .sw { width: 16px; height: 16px; border-radius: 5px; flex: none; }
.stylechip .clr { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: -5px; border-radius: 6px; }
.stylechip .clr:hover { background: rgb(var(--ink) / .12); }
.stylechip .clr .i { width: 12px; height: 12px; }
.popover.wide-pop { padding: 0; }
.stylelib { width: min(660px, calc(100vw - 20px)); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.st-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.st-head b { font: 600 16px var(--display); }
.st-head small { color: var(--muted); font-size: 12.5px; }
.st-cats .opt { height: 30px; padding: 0 11px; font-size: 12.5px; }
.st-cats .opt .i { width: 13px; height: 13px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 9px; }
.st-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 5px 5px 7px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel-2); text-align: left; transition: border-color .12s, transform .12s; }
.st-tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.st-tile.sel, .st-tile.asking { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.st-tile .art { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; }
.st-tile .art .i { width: 30px; height: 30px; color: #fff; filter: drop-shadow(0 1px 4px rgba(0,0,0,.45)); stroke-width: 1.6; }
.st-tile .art img { width: 100%; height: 100%; object-fit: cover; }
.st-tile .nm { font-size: 12.5px; font-weight: 600; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.st-tile .badge { position: absolute; top: 9px; display: inline-grid; place-items: center; height: 22px; min-width: 22px; border-radius: 7px; background: rgba(0,0,0,.5); color: #fff; backdrop-filter: blur(4px); font-size: 10px; font-weight: 700; }
.st-tile .badge .i { width: 13px; height: 13px; }
.st-tile .badge.fav { right: 9px; opacity: 0; transition: opacity .12s; }
.st-tile:hover .badge.fav, .st-tile .badge.fav.on { opacity: 1; }
.st-tile .badge.fav.on { color: #ffd257; } .st-tile .badge.fav.on .i { fill: currentColor; }
.st-tile .badge.lock { right: 9px; }
.st-tile .badge.photo { left: 9px; padding: 0 6px; letter-spacing: .03em; }
.st-tile.locked .art { filter: saturate(.35) brightness(.75); }
.st-tile.locked .nm { color: var(--faint); }
.st-ask { display: flex; flex-direction: column; gap: 9px; padding: 11px 12px; border-radius: 12px; border: 1px solid rgba(67,97,238,.4); background: rgba(67,97,238,.07); }
.st-ask b { font-size: 13.5px; }
.st-ask .opt { height: 30px; font-size: 12.5px; }
.st-ask.lockmsg { flex-direction: row; align-items: center; gap: 12px; border-color: var(--line-2); background: var(--panel-2); }
.st-ask.lockmsg > .i { width: 18px; height: 18px; color: var(--warn); flex: none; }
.st-ask.lockmsg small { display: block; color: var(--muted); font-size: 12.5px; }
.st-ask .grow, .st-foot .grow { flex: 1; min-width: 0; }
.st-foot { display: flex; align-items: center; gap: 9px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.st-foot .i { width: 14px; height: 14px; flex: none; }
.st-foot a { font-weight: 600; white-space: nowrap; }
body:has(.lightbox) .popover { z-index: 130; }

/* ===== Image editor ===== */
.lightbox.editor { grid-template-columns: 1fr 360px; }
.lightbox.editor .stage-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.lightbox.editor .stage { position: relative; flex: 1; padding: 26px 26px 14px; }
.lightbox.editor .stage img { max-height: 100%; max-width: 100%; position: absolute; inset: 26px 26px 14px; margin: auto; }
.lightbox.editor .stage img.checker { background: repeating-conic-gradient(#3a3a40 0% 25%, #26262b 0% 50%) 50% / 22px 22px; }
.ed-busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); color: #fff; text-align: center; padding: 20px; }
.ed-busy small { color: #c9c9d2; font-size: 13px; }
.ver-strip { display: flex; gap: 8px; padding: 0 26px 16px; overflow-x: auto; justify-content: safe center; flex: none; }
.ver { position: relative; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; flex: none; opacity: .65; transition: opacity .12s, border-color .12s; }
.ver:hover, .ver.on { opacity: 1; }
.ver.on { border-color: var(--accent); }
.ver img { width: 100%; height: 100%; object-fit: cover; background: #222; }
.ver span { position: absolute; inset: auto 0 0 0; padding: 7px 2px 2px; font-size: 9.5px; font-weight: 700; color: #fff; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.lightbox.editor aside { gap: 11px; padding: 18px 16px; }
.ed-ta { width: 100%; min-height: 62px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); padding: 10px 12px; outline: 0; resize: vertical; line-height: 1.45; color: var(--text); font-size: 14px; }
.ed-ta:focus { border-color: rgba(67,97,238,.5); }
.ed-row { display: flex; align-items: center; gap: 8px; margin-top: -3px; }
.lightbox.editor .btn .cost { display: inline-flex; align-items: center; gap: 3px; padding-left: 9px; border-left: 1px solid rgba(0,38,42,.25); font-size: 12.5px; }
.lightbox.editor .btn .cost .i { width: 13px; height: 13px; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ed-grid.three { grid-template-columns: repeat(3, 1fr); }
.ed-tool { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); text-align: left; min-width: 0; transition: border-color .12s, background .12s; }
.ed-tool:hover:not(:disabled) { border-color: var(--accent); background: var(--panel-3); }
.ed-tool:disabled { opacity: .5; cursor: not-allowed; }
.ed-tool > .i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.ed-tool span { display: flex; flex-direction: column; min-width: 0; }
.ed-tool b { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-tool small { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-tool.col { flex-direction: column; justify-content: center; gap: 7px; padding: 13px 6px; text-align: center; }
.ed-back { display: flex; align-items: center; gap: 8px; margin: -4px 0 2px -6px; }
.ed-back b { font-size: 14.5px; color: var(--text); }
.lightbox aside p.ed-note, .lightbox aside p.ed-cost { color: var(--faint); font-size: 12px; line-height: 1.45; white-space: normal; }
.lightbox aside p.ed-cost { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ed-cost .i { width: 12px; height: 12px; }
.ed-cost a { font-weight: 600; }
.lightbox aside p.ed-prompt { max-height: 96px; overflow-y: auto; font-size: 13px; color: var(--muted); }
.lightbox .acts.row { flex-direction: row; flex-wrap: wrap; }
.lightbox .acts.row .btn { flex: 1 1 auto; height: 36px; padding: 0 12px; font-size: 13px; text-decoration: none; }
.lightbox.editor .field-input { color: var(--text); }
.lightbox.editor .opt { height: 32px; font-size: 12.5px; padding: 0 10px; justify-content: center; }
.ed-sizes { display: flex; flex-direction: column; gap: 5px; }
.ed-size { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: 13px; }
.ed-size.on { border-color: rgba(67,97,238,.5); }
.ed-size input { accent-color: var(--accent); width: 15px; height: 15px; }
.ed-size .ratio { border: 1.5px solid var(--muted); border-radius: 2px; flex: none; min-width: 5px; min-height: 5px; }
.ed-size b { flex: 1; font-weight: 500; color: var(--text); }
.ed-size small { color: var(--faint); font-size: 11.5px; }
.ed-dim { color: var(--faint); font-size: 11.5px; text-align: center; margin-top: auto; padding-top: 4px; }
@media (max-width: 860px) {
  .lightbox.editor { grid-template-columns: 1fr; grid-template-rows: minmax(0, 44vh) minmax(0, 1fr); }
  .lightbox.editor aside { border-left: 0; border-top: 1px solid var(--line); }
  .lightbox.editor .stage { padding: 50px 12px 8px; }
  .lightbox.editor .stage img { inset: 50px 12px 8px; }
  .ver-strip { padding: 0 12px 10px; justify-content: flex-start; }
  .ver { width: 46px; height: 46px; }
  .pj-row .pj-counts { display: none; }
  .asset-row .thumb.v { width: 60px; }
  .to-top { right: 14px; bottom: 14px; }
  .st-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* ---------- Prompt bar, one row (step 1) ---------- */
.chipbtn { height: 32px; padding: 0 11px; border-radius: 10px; background: rgb(var(--ink) / .045); border: 1px solid var(--line); gap: 6px; }
.chipbtn:hover { background: rgb(var(--ink) / .09); border-color: var(--line-2); }
.chipbtn.on { background: rgba(67,97,238,.12); border-color: transparent; color: var(--accent); }
.chipbtn.on:hover { background: rgba(67,97,238,.18); border-color: transparent; }
.chipbtn.icon-only { width: 32px; padding: 0; justify-content: center; flex: none; }
.chipbtn.icon-only .nm, .chipbtn.icon-only > .i:last-child:not(:first-child) { display: none; }
.chipbtn.folded { display: none !important; }
.chipbtn[hidden] { display: none; }
.chipbtn .task { color: var(--accent); font-weight: 600; }
.bar-row.one, .studio .bar-row.one { flex-wrap: nowrap; overflow: hidden; gap: 6px; }
.bar-row.one > * { flex: none; }
.bar-row.one > .grow { flex: 1 1 0; min-width: 0; }
.bar-row.one .chipbtn .nm { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.bar-row.one #set-chip .nm { max-width: none; }
.bar-row.one.wrap, .studio .bar-row.one.wrap { flex-wrap: wrap; overflow: visible; row-gap: 8px; }
.bar-row.one.wrap .gen-btn { margin-left: auto; }
.bar-row.one .gen-btn, .studio .bar-row.one .gen-btn { margin-left: 0; height: 36px; border-radius: 999px; padding: 0 16px 0 14px; }
.bar-top { position: relative; }
.bar-expand { opacity: .55; margin: 2px 0 0 -4px; }
.bar-expand:hover, .bar.tall .bar-expand { opacity: 1; }
.bar.tall .bar-expand { color: var(--accent); }
.bar.tall textarea { max-height: 50vh; min-height: 180px; }
.split { display: inline-flex; align-items: center; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: rgb(var(--ink) / .045); }
.split .icon-btn { width: 30px; height: 30px; border-radius: 9px; }
.split .icon-btn.caret { width: 20px; margin-left: -4px; }
.split .icon-btn.caret .i { width: 12px; height: 12px; }
.split.on { background: rgba(67,97,238,.12); border-color: transparent; box-shadow: 0 0 14px rgba(67,97,238,.22); }
.split.on #enh-now { color: var(--accent); }
.split .enh-auto { height: 22px; padding: 0 7px; margin-right: 2px; border-radius: 7px; border: 0; font: 600 11.5px/22px inherit; font-family: inherit; letter-spacing: .02em; color: var(--accent); background: rgba(67,97,238,.16); cursor: pointer; }
.split .enh-auto:hover { background: rgba(67,97,238,.26); }
.split .enh-auto[hidden] { display: none; }
:root[data-theme="light"] .split .enh-auto { background: rgba(5,150,166,.14); }
.mat-add.need { border-color: rgba(67,97,238,.55); color: var(--accent); }
.more-val { margin-left: auto; color: var(--accent); font-size: 12px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* info points and their tooltip */
.info { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 5px; border-radius: 50%; color: var(--faint); cursor: help; vertical-align: -4px; flex: none; }
.info .i { width: 14px; height: 14px; color: inherit; }
.info:hover, .info:focus-visible { color: var(--text); background: rgb(var(--ink) / .08); outline: 0; }
.info.cost-info { margin: 0 -2px 0 0; }
.tip { position: fixed; z-index: 400; max-width: min(300px, calc(100vw - 16px)); padding: 9px 11px; border-radius: 10px; background: var(--panel-4); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text); font-size: 12.5px; line-height: 1.45; font-weight: 400; pointer-events: none; }
.settings label.lab { display: flex; align-items: center; }
.settings h4 > span { display: inline-flex; align-items: center; }
.menu-cap, .menu-head { display: flex; align-items: center; }

/* tip banner above the bar */
.tip-banner { pointer-events: auto; max-width: 940px; margin: 0 auto 8px; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 12px; background: rgba(67,97,238,.08); border: 1px solid rgba(67,97,238,.18); font-size: 13px; color: var(--text-2); }
.studio .tip-banner { max-width: 1100px; }
.tip-banner > .i { width: 15px; height: 15px; color: var(--accent); flex: none; }
.tip-banner .grow { flex: 1; min-width: 0; }
.tip-banner .link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; font-size: 13px; white-space: nowrap; }
.tip-banner .link .i { width: 13px; height: 13px; }

/* model menu: task buttons inside a model row */
.mrow { display: flex; flex-direction: column; border-radius: 10px; }
.mrow .mtasks { display: flex; gap: 6px; padding: 0 10px 9px 46px; flex-wrap: wrap; }
.mrow .mtasks button { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--text-2); background: rgb(var(--ink) / .05); border: 1px solid var(--line); }
.mrow .mtasks button:hover { background: rgb(var(--ink) / .1); }
.mrow .mtasks button.on { background: rgba(67,97,238,.12); border-color: transparent; color: var(--accent); }
.mrow .mtasks button .i { width: 13px; height: 13px; color: inherit; }
:root[data-theme="light"] .chipbtn.on, :root[data-theme="light"] .split.on, :root[data-theme="light"] .mrow .mtasks button.on { background: rgba(5,150,166,.12); }
:root[data-theme="light"] .split.on { box-shadow: 0 0 12px rgba(5,150,166,.2); }
:root[data-theme="light"] .tip-banner { background: rgba(5,150,166,.07); border-color: rgba(5,150,166,.2); }
.bar-row.one #model-chip .nm { max-width: 230px; }
.bar-row.one.tight { gap: 5px; }
.bar-row.one.tight #mode-chip .nm, .bar-row.one.tight .gen-btn > .i { display: none; }
.bar-row.one.tight #model-chip { flex: 0 1 auto; min-width: 92px; }
.bar-row.one.tight #model-chip .nm { max-width: none; min-width: 0; flex: 1 1 auto; }
.bar-row.one.tight .gen-btn { padding: 0 14px; }
.settings .opt.on, .opts .opt.on { background: rgba(67,97,238,.13); border-color: transparent; color: var(--accent); }
:root[data-theme="light"] .settings .opt.on, :root[data-theme="light"] .opts .opt.on { background: rgba(5,150,166,.13); }
.mat-add > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mat-add > div .i { margin: 0; }

/* ---------- Downloads tray, selection in Assets (step 2) ---------- */
.row-gap { display: flex; align-items: center; gap: 8px; }
.sub .usage { color: var(--faint); }
.sel-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px 8px 14px; margin: 0 0 14px; border-radius: 12px; background: rgba(67,97,238,.08); border: 1px solid rgba(67,97,238,.18); font-size: 13.5px; position: sticky; top: 8px; z-index: 15; backdrop-filter: blur(12px); }
.sel-bar[hidden] { display: none; }
.sel-bar .grow { flex: 1; }
.btn.ghost.on { background: rgba(67,97,238,.12); color: var(--accent); border-color: transparent; }
.tile.selecting, .asset-row.selecting { cursor: pointer; }
.tile.selecting img, .tile.selecting video { cursor: pointer; }
.tile.selecting .over { display: none; }
.pick { position: absolute; top: 8px; left: 8px; z-index: 3; width: 22px; height: 22px; border-radius: 7px; border: 2px solid rgba(255,255,255,.85); background: rgba(0,0,0,.35); display: grid; place-items: center; color: transparent; }
.pick .i { width: 14px; height: 14px; }
.picked > .pick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile.picked { outline: 2px solid var(--accent); outline-offset: -2px; }
.asset-row.selecting { position: relative; padding-left: 42px; }
.asset-row.selecting .pick { top: 50%; left: 10px; transform: translateY(-50%); border-color: var(--line-2); background: transparent; }
.asset-row.picked { background: rgba(67,97,238,.07); }
.dl-tray { position: fixed; left: calc(var(--side) + 16px); bottom: 16px; z-index: 90; width: 300px; max-width: calc(100vw - 32px); border-radius: 14px; background: var(--pop); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: hidden; font-size: 13px; }
.dl-tray:not(.open) { width: auto; }
.dl-head { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 12px; font-weight: 600; color: var(--text); }
.dl-head .i { width: 15px; height: 15px; color: var(--muted); }
.dl-head .n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(67,97,238,.14); color: var(--accent); font-size: 11.5px; display: grid; place-items: center; }
.dl-tray.open .dl-head > .i:last-child { transform: none; }
.dl-tray:not(.open) .dl-head > .i:last-child { transform: rotate(180deg); }
.dl-list { max-height: 260px; overflow-y: auto; border-top: 1px solid var(--line); padding: 4px; }
.dl-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; }
.dl-row:hover { background: rgb(var(--ink) / .05); }
.dl-row > .i { width: 15px; height: 15px; color: var(--ok-ink); flex: none; }
.dl-row .txt { flex: 1; min-width: 0; }
.dl-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-row small { color: var(--faint); font-size: 11.5px; }
.dl-clear { width: 100%; padding: 7px; color: var(--faint); font-size: 12px; border-radius: 8px; }
.dl-clear:hover { color: var(--text); background: rgb(var(--ink) / .05); }
@media (max-width: 900px) { .dl-tray { left: 12px; bottom: 12px; } }
.mopt .ds.mtag { color: var(--text); font-weight: 600; }

/* ---------- subscriptions (FEATURE_SUBSCRIPTIONS) ---------- */
.plan-panel { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.plan-panel.warn { border-color: rgba(255,107,107,.45); background: linear-gradient(180deg, rgba(255,107,107,.07), transparent 60%), var(--panel); }
.plan-panel small { color: var(--muted); font-size: 12.5px; }
.plan-panel .pp-name { font: 700 22px/1.3 var(--display); display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.plan-panel p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.plan-panel .pp-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-tag { font: 700 11px var(--font); padding: 3px 9px; border-radius: 999px; background: var(--line); color: var(--muted); letter-spacing: .02em; }
.pp-tag.ok { background: rgba(66,201,138,.16); color: var(--ok-ink); }
.pp-tag.warn { background: rgba(255,107,107,.16); color: var(--danger); }
.card.cur { border-color: var(--accent); }
.up-box { width: min(520px, 100%); }
.up-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #071016; }
.up-ico .i { width: 22px; height: 22px; }
.up-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.up-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); color: inherit; font: inherit; cursor: pointer; }
.up-plan:hover, .up-plan:focus-visible { border-color: var(--accent); }
.up-plan.pop { border-color: rgba(67,97,238,.5); background: linear-gradient(180deg, rgba(67,97,238,.08), transparent 60%), var(--panel); }
.up-plan b { font: 700 16px var(--display); }
.up-plan span { font-weight: 600; }
.up-plan small { color: var(--muted); font-size: 12px; }
.up-plan:disabled { opacity: .6; cursor: wait; }
.up-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; }

.plan-panel p.pp-extra { font-size: 12.5px; margin-top: 2px; }
.pay-table td { vertical-align: top; }
.pay-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pay-docs { display: flex; gap: 12px; flex-wrap: wrap; white-space: nowrap; }
.pay-docs a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.pay-docs a .i { width: 14px; height: 14px; }
.pay-foot { color: var(--muted); font-size: 13px; }

.pc-box { width: min(480px, 100%); }
.pc-block { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.pc-block > small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.pc-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pc-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-row.muted { color: var(--muted); }
.pc-row.total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; font-size: 16px; }
.pc-note { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.pc-card { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }

/* Assets: sound files (Video Builder audio exports) */
.masonry .tile .audio-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 140px; padding: 16px; background: var(--bg-2, rgba(127,127,127,.08)); }
.masonry .tile .audio-tile > .i { width: 28px; height: 28px; opacity: .6; }
.masonry .tile .audio-tile audio { width: 100%; }

/* A paid-plan tool opened on the Free plan */
.paid-only { max-width: 560px; margin: 8vh auto 40px; padding: 0 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.paid-only h1 { margin: 6px 0 0; }
.paid-only .sub { margin: 0; }
.paid-only-plans { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 14px 0 8px; }
.paid-only-plans .up-plan { text-decoration: none; }
