/* Gregggo Studio: sits on top of /style.css and reuses its tokens.
   White, near-black, bold grotesk, 8px corners (6px on phones). Solid type only. */
.s { --r: 8px; --hair: #e6e6e6; --dock: 0px; }
@media (max-width: 640px) { .s { --r: 6px; } }
.s [hidden] { display: none !important; }
.s button { font-family: var(--font); }
.s input, .s textarea, .s select { font-family: var(--font); color: inherit; }
.s h1, .s h2, .s h3 { font-weight: 800; letter-spacing: -.022em; line-height: 1; }
.s a.u, .s .hint a, .s p a { text-decoration: underline; text-underline-offset: 3px; }
.studio-main section, .dock section, .page section { padding: 0; }

/* ---------- header for the working pages ---------- */
.s .bar-logo { opacity: 1; }
.s .sbar { position: sticky; top: 0; inset: auto; mix-blend-mode: normal; color: var(--ink); background: #fff; z-index: 40; padding: 14px var(--g); border-bottom: 1px solid var(--hair); }
.snav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.snav a { font: 600 13px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; padding: 8px 0; color: var(--mute); transition: color .2s; }
.snav a:hover, .snav a.on { color: var(--ink); }
@media (max-width: 480px) { .s .sbar .bar-logo > span:last-child { display: none; } .snav a { font-size: 12px; letter-spacing: .04em; } }

/* ---------- basics ---------- */
.lbl { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.hint { color: var(--mute); font-size: 14px; line-height: 1.45; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 18px; }
.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; border: 0; border-radius: var(--r); background: var(--soft); color: var(--ink); font: 700 15px/1 var(--font); letter-spacing: -.004em; padding: 14px 18px; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.s-btn:hover { background: #e4e4e4; }
.s-btn.pri { background: var(--ink); color: #fff; }
.s-btn.pri:hover { background: var(--accent); }
.s-btn.ghost { background: none; color: var(--mute); padding-left: 0; padding-right: 0; }
.s-btn.ghost:hover { color: var(--ink); background: none; }
.s-btn.sm { font-size: 13px; padding: 10px 13px; }
.s-btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.inp, .s textarea.inp, .s select.inp { width: 100%; background: var(--soft); border: 0; border-radius: var(--r); padding: 13px 14px; font: 500 16px/1.35 var(--font); color: var(--ink); outline: 0; resize: none; display: block; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .15s; }
.inp:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
.inp::placeholder, textarea::placeholder { color: #8f8f8f; }
.field { display: block; margin-top: 16px; }
.field .lbl { margin-bottom: 8px; }
.seg, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .chips button { border: 0; background: var(--soft); border-radius: var(--r); padding: 9px 12px; font: 600 14px/1 var(--font); cursor: pointer; display: inline-flex; gap: 7px; align-items: center; color: var(--ink); transition: background .15s, color .15s; }
.seg button:hover, .chips button:hover { background: #e4e4e4; }
.seg button.on, .chips button.on { background: var(--ink); color: #fff; }
.chip .shape { display: inline-block; background: currentColor; opacity: .85; border-radius: 1.5px; }
.toggle-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mute); }
.toggle { width: 42px; height: 24px; border-radius: 12px; border: 0; background: #d5d5d5; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle.on { background: var(--ink); }
.toggle.on::after { transform: translateX(18px); }
.iconbtn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 0; background: var(--soft); border-radius: var(--r); cursor: pointer; color: var(--ink); }
.iconbtn:hover { background: #e4e4e4; }
.iconbtn svg { width: 18px; height: 18px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: hop 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-3px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; } }

/* ---------- gates and panels ---------- */
.gate { min-height: calc(100svh - 200px); display: grid; place-items: center; padding: 40px var(--g); }
.panel { background: #fff; }
.gatebox { width: min(520px, 100%); display: grid; gap: 16px; }
.gatebox h1 { font-size: clamp(44px, 7vw, 76px); }
.gatebox p { font-size: 17px; line-height: 1.45; }
.gatebox .hint { font-size: 14px; }
.gatebox .field { margin: 0; }
.keybox { display: block; background: var(--soft); border-radius: var(--r); padding: 16px; font: 500 15px/1.4 ui-monospace, Menlo, monospace; word-break: break-all; user-select: all; }
.pastekey summary { cursor: pointer; color: var(--mute); font-size: 14px; }
.pastekey .row { margin-top: 10px; flex-wrap: nowrap; }
@media (max-width: 480px) { .pastekey .row { flex-wrap: wrap; } }

/* ---------- notices and toast ---------- */
.notices { position: fixed; top: 70px; right: var(--g); width: min(420px, calc(100vw - 2 * var(--g))); display: grid; gap: 8px; z-index: 130; }
.notice { position: relative; background: var(--ink); color: #fff; border-radius: var(--r); padding: 16px 44px 16px 18px; box-shadow: 0 14px 40px -14px rgba(0,0,0,.45); }
.notice b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.notice p { font-size: 14px; line-height: 1.4; color: #cfcfcf; }
.notice .row:not(:empty) { margin-top: 12px; }
.notice .s-btn { background: #fff; color: var(--ink); }
.notice .x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; background: none; border: 0; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 140; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.s-app .toast { bottom: calc(var(--dockh, 150px) + 14px); }

/* ---------- status + device note ---------- */
.status { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; color: var(--mute); }
.status .pc { color: var(--ink); font-weight: 600; }
.status .used { display: inline-flex; flex-wrap: wrap; gap: 0 10px; }
.status .used .full { color: var(--accent); font-weight: 600; }
.devnote { font-size: 14px; color: var(--mute); max-width: 74ch; }
.devnote b { color: var(--ink); font-weight: 600; }
.devuse { font-size: 13px; color: var(--mute); margin-top: 4px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(11,11,11,.42); display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.sheet { background: #fff; border-radius: var(--r); width: min(820px, 100%); max-height: calc(100svh - 40px); overflow-y: auto; }
.sheet.narrow { width: min(460px, 100%); }
.shead { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; position: sticky; top: 0; background: #fff; z-index: 2; }
.shead h3 { font-size: 22px; letter-spacing: -.016em; }
.shead .x { width: 34px; height: 34px; border: 0; background: var(--soft); border-radius: var(--r); font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.sbody { padding: 10px 20px 20px; }
@media (max-width: 640px) { .modal { padding: 0; place-items: end stretch; } .sheet, .sheet.narrow { width: 100%; max-height: 92svh; border-radius: var(--r) var(--r) 0 0; } }

/* ---------- gallery cards, shared ---------- */
.item { position: relative; overflow: hidden; border-radius: var(--r); background: var(--soft); cursor: pointer; display: block; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; }
.item img, .item video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.item .qdel { position: absolute; top: 7px; right: 7px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r); background: rgba(255,255,255,.92); color: var(--ink); border: 0; cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 3; }
.item:hover .qdel { opacity: 1; }
.item .qdel svg { width: 15px; height: 15px; }
@media (hover: none) { .item .qdel { opacity: 1; } }
.item .tag { position: absolute; left: 7px; top: 7px; background: rgba(255,255,255,.92); color: var(--ink); border-radius: calc(var(--r) - 2px); padding: 4px 7px; font-size: 12px; font-weight: 600; z-index: 2; }
.item.chk { background-image: linear-gradient(45deg,#e7e7e7 25%,transparent 25%,transparent 75%,#e7e7e7 75%),linear-gradient(45deg,#e7e7e7 25%,transparent 25%,transparent 75%,#e7e7e7 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.item.chk img { object-fit: contain; }
.work { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 12px; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--soft); }
.work.onimg { background: linear-gradient(transparent 40%, rgba(255,255,255,.92)); }
.work .wait { color: var(--mute); font-weight: 500; }
.work .bar2, .prog .bar2 { height: 3px; background: #dcdcdc; border-radius: 2px; overflow: hidden; }
.bar2 b { display: block; height: 100%; background: var(--ink); width: 0; transition: width .4s; }
.work .stop { align-self: flex-start; background: none; border: 0; padding: 0; font: 600 13px/1 var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }
.fail { background: #fff; box-shadow: inset 0 0 0 1.5px var(--hair); display: flex; flex-direction: column; gap: 6px; padding: 14px; justify-content: flex-end; font-size: 13px; color: var(--mute); }
.fail b { color: var(--ink); font-size: 15px; font-weight: 700; }
.fail .stop { align-self: flex-start; background: none; border: 0; padding: 0; font: 600 13px/1 var(--font); text-decoration: underline; cursor: pointer; color: var(--ink); }

/* ---------- /studio/app ---------- */
.studio-main { padding: 14px var(--g) calc(var(--dockh, 170px) + 24px); min-height: calc(100svh - 60px); }
.tabs { display: flex; gap: clamp(16px, 3vw, 36px); align-items: baseline; }
.tabs button { background: none; border: 0; cursor: pointer; font: 800 clamp(30px, 4.6vw, 54px)/1 var(--font); letter-spacing: -.024em; color: #c9c9c9; padding: 6px 0; transition: color .2s; display: inline-flex; align-items: baseline; }
.tabs button:hover { color: #8f8f8f; }
.tabs button.on { color: var(--ink); }
.tabs .count { font-size: 13px; font-weight: 600; letter-spacing: 0; margin-left: 5px; }
.studio-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 24px; flex-wrap: wrap; margin-bottom: 12px; }
.gbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 12px; min-height: 36px; }
.gbar .what { font-size: 13px; color: var(--mute); }
.gallery { display: flex; flex-wrap: wrap; gap: 6px; }
.gallery::after { content: ""; flex-grow: 1e6; }
.gallery .item { flex: calc(var(--ar, 1) * 280) 1 calc(var(--ar, 1) * 280px); max-width: min(100%, calc(var(--ar, 1) * 520px)); }
.gallery .item > i { display: block; padding-bottom: calc(100% / var(--ar, 1)); }
.gallery .item.sel { outline: 3px solid var(--ink); outline-offset: -3px; }
.gallery .over { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; opacity: 0; transition: opacity .15s; display: flex; gap: 8px; align-items: flex-end; z-index: 2; }
.gallery .item:hover .over { opacity: 1; }
.gallery .over p { flex: 1; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gallery .vary { flex: none; background: #fff; color: var(--ink); border: 0; border-radius: calc(var(--r) - 2px); padding: 7px 10px; font: 600 12px/1 var(--font); cursor: pointer; }
.gallery .badge { position: absolute; left: 7px; bottom: 7px; background: rgba(255,255,255,.92); color: var(--ink); border-radius: calc(var(--r) - 2px); padding: 4px 7px; font-size: 12px; font-weight: 600; z-index: 1; }
.gallery.list { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.gallery.list::after { display: none; }
.track { display: flex; align-items: center; gap: 14px; padding: 12px 2px; border-bottom: 1px solid var(--hair); position: relative; cursor: pointer; }
.track .play { width: 42px; height: 42px; flex: none; border-radius: var(--r); border: 0; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center; }
.track .play svg { width: 16px; height: 16px; fill: currentColor; }
.track .t { flex: 1; min-width: 0; }
.track .t b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .t span { display: block; color: var(--mute); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .r { color: var(--mute); font-size: 13px; text-align: right; flex: none; }
.track .r b { display: block; color: var(--ink); }
.track .prog { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--ink); }
.track .qdel2 { background: none; border: 0; padding: 8px; cursor: pointer; color: var(--mute); flex: none; }
.track .qdel2 svg { width: 16px; height: 16px; display: block; }
.empty-state { padding: clamp(40px, 9vh, 110px) 0; max-width: 620px; }
.empty-state h2 { font-size: clamp(34px, 5vw, 60px); margin-bottom: 12px; }
.empty-state p { color: var(--mute); font-size: 17px; }
.idle-art { display: block; width: clamp(180px, 22vw, 240px); height: auto; margin: 0 0 22px -10px; }
.idle-art .idle-body { animation: idleBreathe 4.5s ease-in-out infinite; transform-origin: 122px 166px; }
.idle-art .idle-z text { animation: idleZ 3.6s ease-in-out infinite; opacity: 0; }
.idle-art .idle-z text:nth-child(2) { animation-delay: .6s; }
.idle-art .idle-z text:nth-child(3) { animation-delay: 1.2s; }
@keyframes idleBreathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .985); } }
@keyframes idleZ { 0% { opacity: 0; transform: translateY(6px); } 30%, 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .idle-art .idle-body, .idle-art .idle-z text { animation: none; opacity: 1; } }
.tries { display: grid; gap: 6px; margin-top: 20px; }
.tries button { text-align: left; background: var(--soft); border: 0; border-radius: var(--r); padding: 13px 15px; font: 500 15px/1.3 var(--font); cursor: pointer; color: var(--ink); }
.tries button:hover { background: #e4e4e4; }
.foot-mini { display: flex; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; padding: 26px 0 0; font-size: 13px; color: var(--mute); }
.foot-mini a:hover { color: var(--ink); }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--hair); padding: 12px var(--g) calc(12px + env(safe-area-inset-bottom)); }
.composer { max-width: 1120px; margin: 0 auto; display: grid; gap: 10px; }
.promptbox { display: flex; gap: 8px; align-items: flex-end; }
.promptbox textarea { flex: 1; min-width: 0; background: var(--soft); border: 0; border-radius: var(--r); padding: 12px 14px; font: 500 16px/1.35 var(--font); resize: none; outline: 0; min-height: 66px; max-height: 34vh; }
.pbtns { display: flex; gap: 6px; }
.go { background: var(--ink); color: #fff; border: 0; border-radius: var(--r); padding: 0 22px; height: 42px; font: 700 15px/1 var(--font); cursor: pointer; white-space: nowrap; transition: background .2s; }
.go:hover { background: var(--accent); }
.go:disabled { opacity: .55; cursor: default; }
.opts { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; }
.group > label, .group > .lbl { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; margin-bottom: 7px; }
.dims { text-transform: none; letter-spacing: 0; }
.more { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding-top: 4px; }
.more .wide { grid-column: span 2; }
.more .full { grid-column: 1 / -1; }
.more label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; margin-bottom: 6px; }
.seedrow { display: flex; gap: 6px; }
.startimg { display: flex; gap: 10px; align-items: center; }
.thumb { width: 42px; height: 42px; border-radius: var(--r); object-fit: cover; background: var(--soft); flex: none; }
.startimg .info b { display: block; font-size: 14px; }
.startimg .info span { display: block; color: var(--mute); font-size: 12px; }
.row-btns { display: flex; gap: 6px; margin-top: 7px; }
.lyrics { flex-basis: 100%; }
.lyrics textarea { width: 100%; min-height: 96px; }
.composer[data-mode="image"] .video-only, .composer[data-mode="image"] .music-only,
.composer[data-mode="video"] .img-only, .composer[data-mode="video"] .music-only,
.composer[data-mode="music"] .img-only, .composer[data-mode="music"] .video-only,
.composer[data-vsrc="text"] .i2v-only, .composer[data-vsrc="image"] .t2v-only { display: none !important; }
.sumbar { display: none; background: none; border: 0; font: 600 13px/1.2 var(--font); color: var(--mute); text-align: left; cursor: pointer; padding: 0; }
.dock-limit { font-size: 13px; color: var(--accent); font-weight: 600; }

@media (max-width: 760px) {
  .sumbar { display: block; }
  .composer:not(.open) .opts, .composer:not(.open) .more { display: none; }
  .composer.open { max-height: 72svh; overflow-y: auto; }
  .promptbox { flex-wrap: wrap; }
  .promptbox textarea { flex-basis: 100%; min-height: 58px; }
  .pbtns { width: 100%; }
  .pbtns .go { flex: 1; }
  .more { grid-template-columns: 1fr 1fr; }
  .more .wide { grid-column: 1 / -1; }
  .gallery .item { flex-basis: calc(var(--ar, 1) * 150px); flex-grow: calc(var(--ar, 1) * 150); }
}

/* ---------- viewer ---------- */
.lb { position: fixed; inset: 0; z-index: 90; background: #fff; display: grid; grid-template-columns: 1fr 360px; }
.stage { position: relative; display: grid; place-items: center; background: var(--soft); min-height: 0; min-width: 0; padding: 20px; }
.stage img, .stage video { max-width: 100%; max-height: calc(100svh - 40px); border-radius: var(--r); display: block; }
.stage .chkimg { background-image: linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; background-color: #fff; }
.stage .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 58px; border: 0; background: #fff; border-radius: var(--r); font-size: 22px; cursor: pointer; color: var(--ink); }
.stage .prev { left: 12px; } .stage .next { right: 12px; }
.audstage { width: min(560px, 100%); display: grid; gap: 16px; }
.audstage audio { width: 100%; }
.mtile { background: #fff; border-radius: var(--r); padding: 24px; }
.mtile p { font-weight: 700; font-size: 22px; letter-spacing: -.012em; line-height: 1.15; }
.lb aside { overflow-y: auto; padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.lb .close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; background: var(--soft); border-radius: var(--r); font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); z-index: 2; }
.lb .ptext { font-size: 16px; line-height: 1.4; font-weight: 500; white-space: pre-wrap; margin-top: 6px; padding-right: 30px; }
.lb .lyr { white-space: pre-wrap; font: 14px/1.45 var(--font); color: var(--mute); max-height: 240px; overflow: auto; margin-top: 6px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 13px; }
.facts dt { color: var(--mute); } .facts dd { word-break: break-word; }
.moreinfo summary { cursor: pointer; font-size: 13px; color: var(--mute); }
.moreinfo .facts { margin-top: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions .s-btn { flex: 1 1 auto; }
.animate { display: grid; gap: 10px; }
.animate textarea { width: 100%; min-height: 96px; }
@media (max-width: 860px) {
  .lb { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .stage { padding: 12px; padding-top: 54px; }
  .stage img, .stage video { max-height: 56svh; }
  .lb aside { overflow: visible; }
  .lb .close { position: fixed; top: 10px; right: 10px; }
}

/* ---------- /studio/full ---------- */
.shell { display: grid; grid-template-columns: 208px 1fr; min-height: calc(100svh - 60px); }
.rail { position: sticky; top: 61px; height: calc(100svh - 61px); overflow-y: auto; padding: 14px 10px 14px var(--g); border-right: 1px solid var(--hair); display: flex; flex-direction: column; gap: 2px; }
.rail .nav { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; border-radius: var(--r); padding: 10px; font: 700 16px/1 var(--font); letter-spacing: -.008em; cursor: pointer; color: var(--mute); text-align: left; }
.rail .nav svg { width: 17px; height: 17px; flex: none; }
.rail .nav:hover { color: var(--ink); }
.rail .nav.on { background: var(--soft); color: var(--ink); }
.rail > .lbl { margin: 16px 0 6px 10px; }
.recents { display: grid; gap: 2px; }
.recent { display: flex; gap: 8px; align-items: center; background: none; border: 0; border-radius: var(--r); padding: 5px; text-align: left; cursor: pointer; min-width: 0; width: 100%; font: inherit; color: inherit; }
.recent:hover, .recent.on { background: var(--soft); }
.recent img, .recent .ph { width: 32px; height: 32px; object-fit: cover; border-radius: calc(var(--r) - 2px); background: var(--soft); flex: none; }
.recent span span, .recent b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent > span:last-child { min-width: 0; }
.recent b { font-size: 13px; font-weight: 600; }
.recent span span { font-size: 12px; color: var(--mute); }
.page { padding: 18px var(--g) 40px; min-width: 0; }
.page-status { padding-bottom: 12px; }
.ptitle h1 { font-size: clamp(44px, 7.6vw, 104px); letter-spacing: -.03em; line-height: .92; }
.ptitle p { color: var(--mute); margin-top: 10px; font-size: 17px; max-width: 58ch; }
.ptitle { margin: 12px 0 22px; }
.fs-composer { max-width: 1060px; }
.modes { display: flex; gap: 6px; margin-bottom: 8px; }
.mode { display: inline-flex; align-items: center; gap: 7px; border: 0; background: var(--soft); border-radius: var(--r); padding: 10px 14px; font: 700 15px/1 var(--font); cursor: pointer; color: var(--ink); }
.mode svg { width: 16px; height: 16px; }
.mode.on { background: var(--ink); color: #fff; }
.card { background: var(--soft); border-radius: var(--r); padding: 8px; display: grid; gap: 8px; }
.tiles { display: grid; gap: 6px; }
.tile { display: flex; gap: 9px; align-items: center; background: #fff; border: 0; border-radius: var(--r); padding: 7px; cursor: pointer; text-align: left; min-width: 0; font: inherit; color: inherit; }
.tile:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.tile .th { width: 44px; height: 44px; border-radius: calc(var(--r) - 2px); background: var(--soft); flex: none; overflow: hidden; display: grid; place-items: center; font-weight: 700; color: var(--mute); }
.tile .th svg { width: 19px; height: 19px; }
.tile .th img, .tile .th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile small { display: block; font-size: 12px; color: var(--mute); }
.tile b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile > span:last-child { min-width: 0; }
.fs-prompt { background: #fff; border-radius: var(--r); padding: 12px; position: relative; }
.fs-prompt textarea { width: 100%; border: 0; outline: 0; resize: none; font: 500 18px/1.35 var(--font); min-height: 92px; background: none; padding-right: 30px; display: block; }
.picked { display: flex; flex-wrap: wrap; gap: 5px; }
.picked:not(:empty) { margin-bottom: 8px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: calc(var(--r) - 2px); padding: 4px 7px 4px 4px; font-size: 13px; font-weight: 600; }
.pchip img { width: 22px; height: 22px; object-fit: cover; border-radius: 3px; }
.pchip button { background: none; border: 0; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; color: var(--mute); }
.mention { position: absolute; left: 12px; right: 12px; top: 100%; background: #fff; border-radius: var(--r); box-shadow: 0 16px 44px -14px rgba(0,0,0,.4); z-index: 20; padding: 5px; margin-top: 4px; }
.mention button { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; border-radius: calc(var(--r) - 2px); padding: 6px; cursor: pointer; font: 600 14px/1 var(--font); color: var(--ink); }
.mention button.on { background: var(--soft); }
.mention img { width: 26px; height: 26px; object-fit: cover; border-radius: 4px; }
.mention span { margin-left: auto; font-weight: 500; color: var(--mute); font-size: 12px; }
.bottom { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.pill { border: 0; background: #fff; border-radius: var(--r); padding: 0 13px; min-height: 46px; font: 600 14px/1 var(--font); cursor: pointer; color: var(--ink); max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.bottom .go, .wide-go { margin-left: auto; height: auto; min-height: 46px; padding: 8px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.go small { font-size: 11px; font-weight: 500; opacity: .75; letter-spacing: 0; }
.wide-go { width: 100%; margin: 18px 0 0; }
.expbtn { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; color: var(--mute); cursor: pointer; }
.expbtn svg { width: 15px; height: 15px; }
.tawrap { position: relative; }
.editor textarea { width: 100%; min-height: 44svh; background: var(--soft); border: 0; border-radius: var(--r); padding: 14px; font: 500 17px/1.4 var(--font); resize: vertical; outline: 0; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; margin: 34px 0 12px; gap: 12px; }
.sechead h2 { font-size: clamp(24px, 3vw, 36px); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.grid .card-item { display: block; }
.grid .item { aspect-ratio: 3 / 4; }
.grid .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 10px 9px; background: linear-gradient(transparent, rgba(0,0,0,.62)); color: #fff; z-index: 1; }
.grid .meta b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid .meta span { display: block; font-size: 12px; opacity: .8; }
.grid .noart { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); }
.grid .noart svg { width: 34px; height: 34px; }
.grid .aud { display: flex; align-items: center; justify-content: center; gap: 2px; position: absolute; inset: 22% 14%; }
.grid .aud i { width: 3px; background: var(--ink); border-radius: 2px; }
.empty { color: var(--mute); grid-column: 1 / -1; padding: 12px 0; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 10px; }
.app { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; display: block; }
.app .art { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--soft); position: relative; margin-bottom: 8px; }
.app .art img, .app .art video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.app:hover .art img, .app:hover .art video { transform: scale(1.04); }
.app .glyph { position: absolute; left: 7px; top: 7px; width: 30px; height: 30px; background: #fff; border-radius: calc(var(--r) - 2px); display: grid; place-items: center; }
.app .glyph svg { width: 16px; height: 16px; }
.app b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.app > span { display: block; color: var(--mute); font-size: 14px; line-height: 1.3; margin-top: 2px; }
.cats { margin-bottom: 18px; }
.appview { display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: clamp(20px, 3vw, 44px); align-items: start; }
.appview h2 { font-size: 28px; }
.appview .sechead { margin-top: 0; }
.back { background: none; border: 0; padding: 0; font: 600 14px/1 var(--font); color: var(--mute); cursor: pointer; margin-bottom: 14px; }
.back:hover { color: var(--ink); }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
.slot { position: relative; aspect-ratio: 1 / 1; background: var(--soft); border-radius: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 10px; text-align: center; font-size: 14px; font-weight: 600; overflow: hidden; }
.slot.many { aspect-ratio: auto; min-height: 120px; grid-column: 1 / -1; }
.slot.full img, .slot.full video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.slot .acts button { background: #fff; border: 0; border-radius: calc(var(--r) - 2px); padding: 7px 9px; font: 600 12px/1 var(--font); cursor: pointer; color: var(--ink); }
.slot .rm, .ref .rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; background: #fff; border: 0; border-radius: calc(var(--r) - 2px); cursor: pointer; font-size: 16px; line-height: 1; z-index: 2; color: var(--ink); }
.slot .sl { position: absolute; left: 6px; top: 6px; background: #fff; border-radius: calc(var(--r) - 2px); padding: 3px 6px; font-size: 12px; z-index: 2; }
.vlist { display: grid; gap: 4px; }
.vgrid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); max-height: 330px; overflow-y: auto; }
.vrow { display: flex; align-items: center; gap: 9px; background: var(--soft); border: 0; border-radius: var(--r); padding: 9px 11px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.vrow b { font-size: 14px; font-weight: 700; }
.vrow span { font-size: 13px; color: var(--mute); }
.vrow.on { background: var(--ink); color: #fff; }
.vrow.on span { color: #cfcfcf; }
.camtile { display: inline-flex; align-items: center; gap: 10px; background: var(--soft); border: 0; border-radius: var(--r); padding: 7px 14px 7px 7px; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.camtile video { width: 54px; height: 54px; object-fit: cover; border-radius: calc(var(--r) - 2px); display: block; }
.camtile small { display: block; font-size: 12px; color: var(--mute); }
.camtile b { font-size: 15px; font-weight: 700; }
.trimbox video { width: 100%; border-radius: var(--r); display: block; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.opt { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; display: block; }
.opt .pv { aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--soft); display: grid; place-items: center; color: var(--mute); font-size: 13px; padding: 0; position: relative; }
.opt .pv img, .opt .pv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opt b { display: block; font-size: 14px; font-weight: 600; padding-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt.on .pv { outline: 3px solid var(--ink); outline-offset: -3px; }
.refgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ref { position: relative; display: grid; gap: 5px; }
.ref img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); }
.add { aspect-ratio: 1; border: 0; background: var(--soft); border-radius: var(--r); font-size: 30px; cursor: pointer; color: var(--mute); }
.phead { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.phead h2 { font-size: clamp(30px, 4.6vw, 60px); letter-spacing: -.024em; max-width: 22ch; }
.prog { display: grid; gap: 8px; margin: 18px 0; max-width: 620px; font-weight: 600; }
.prog .wait { color: var(--mute); font-weight: 500; font-size: 14px; }
.errbox { margin: 18px 0; max-width: 620px; }
.errbox b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.errbox p { color: var(--mute); margin-top: 4px; }
.final { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 20px; margin-top: 18px; align-items: start; }
.final video { width: 100%; border-radius: var(--r); background: var(--soft); display: block; max-height: 78svh; }
.outs { margin-top: 10px; }
.outs .item { aspect-ratio: 9 / 16; }
.vwrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
.vmedia { display: grid; place-items: center; background: var(--soft); border-radius: var(--r); min-height: 240px; overflow: hidden; }
.vmedia img, .vmedia video { max-width: 100%; max-height: 70svh; display: block; }
.vacts { display: flex; flex-direction: column; gap: 6px; }
.vacts .s-btn { width: 100%; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: sticky; top: 56px; z-index: 20; height: auto; flex-direction: row; overflow-x: auto; background: #fff; border-right: 0; border-bottom: 1px solid var(--hair); padding: 7px var(--g); }
  .rail { scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .slot { aspect-ratio: auto; min-height: 200px; }
  .rail .nav { width: auto; padding: 9px 11px; font-size: 14px; white-space: nowrap; }
  .rail .lbl, .rail .recents { display: none; }
  .tiles { grid-template-columns: 1fr 1fr !important; }
  .appview { grid-template-columns: 1fr; }
  .final, .vwrap { grid-template-columns: 1fr; }
  .bottom .go { flex-basis: 100%; margin: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .apps { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---------- /studio/account ---------- */
.acct { padding: 26px var(--g) 60px; max-width: 1180px; }
.acct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid var(--hair); }
.acct-head h1 { font-size: clamp(56px, 10vw, 128px); letter-spacing: -.03em; line-height: .9; }
.acct-who { display: flex; align-items: center; gap: 16px; }
.acct-who b, .acct-who span { display: block; text-align: right; }
.acct-who b { font-size: 17px; letter-spacing: -.01em; }
.acct-who span { color: var(--mute); font-size: 14px; }
.acct-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; background: var(--ink); color: #fff; border-radius: var(--r); padding: 18px 20px; }
.acct-alert b, .acct-alert span { display: block; }
.acct-alert span { color: #bdbdbd; font-size: 14px; margin-top: 2px; }
.acct-alert .s-btn.pri { background: #fff; color: var(--ink); }
.acct-alert .s-btn.pri:hover { background: var(--accent); color: #fff; }
.acct-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 48px; }
.acct-nav { position: sticky; top: 61px; align-self: start; display: flex; flex-direction: column; gap: 2px; padding: 22px 0; }
.acct-nav a { color: var(--mute); font-weight: 700; font-size: 15px; letter-spacing: -.006em; padding: 9px 10px; border-radius: var(--r); text-decoration: none; }
.acct-nav a:hover { color: var(--ink); }
.acct-nav a.on { background: var(--soft); color: var(--ink); }
.acct-nav a[href="#delete"] { margin-top: 10px; }
.aset { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 14px 48px; padding: 34px 0; border-bottom: 1px solid var(--hair); scroll-margin-top: 70px; }
.aset-h h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.02em; line-height: 1.05; }
.aset-h p { color: var(--mute); font-size: 14px; line-height: 1.5; margin-top: 8px; }
.aset-b { min-width: 0; }
.aset.danger h2 { color: var(--accent); }
.acct .field.first { margin-top: 0; }
.acct .row.nowrap { flex-wrap: nowrap; margin-top: 14px; }
.acct .row.nowrap .inp { flex: 1 1 auto; min-width: 0; }
.aset .field .row.nowrap { margin-top: 0; }
.acct #newKey { margin-top: 18px; }
.setline { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--hair); }
.setline:first-child { padding-top: 0; }
.setline .lbl { margin-bottom: 4px; }
.setline b { display: block; font-weight: 700; overflow-wrap: anywhere; }
.subform { padding: 18px 0 20px; border-bottom: 1px solid var(--hair); max-width: 440px; }
.subform.open { border-bottom: 0; padding-top: 8px; }
.subform .row { margin-top: 16px; }
.hint.small { font-size: 13px; margin-top: 8px; max-width: 60ch; }
.s-btn.warn { background: var(--accent); color: #fff; }
.s-btn.warn:hover { background: var(--ink); }
.docs details summary { cursor: pointer; font-weight: 700; padding: 13px 16px; background: var(--soft); border-radius: var(--r); list-style: none; display: flex; justify-content: space-between; }
.docs details summary::-webkit-details-marker { display: none; }
.docs details summary::after { content: "+"; font-weight: 800; }
.docs details[open] summary::after { content: "\2212"; }
.docs details[open] summary { margin-bottom: 8px; }
.acct .foot-mini { margin-top: 30px; }
@media (max-width: 900px) {
  .acct-grid { grid-template-columns: 1fr; }
  .acct-nav { top: 56px; z-index: 20; flex-direction: row; overflow-x: auto; background: #fff; padding: 8px 0; margin: 0 calc(-1 * var(--g)); padding-left: var(--g); padding-right: var(--g); border-bottom: 1px solid var(--hair); scrollbar-width: none; }
  .acct-nav::-webkit-scrollbar { display: none; }
  .acct-nav a { white-space: nowrap; font-size: 14px; }
  .acct-nav a[href="#delete"] { margin-top: 0; }
  .aset { grid-template-columns: 1fr; padding: 28px 0; scroll-margin-top: 120px; }
}
@media (max-width: 560px) {
  .acct-who { width: 100%; justify-content: space-between; }
  .acct-who b, .acct-who span { text-align: left; }
  .acct .row.nowrap { flex-wrap: wrap; }
  .acct .row.nowrap .s-btn { width: 100%; }
  .setline { flex-wrap: wrap; }
}
.keyrow { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.keyrow .k { flex: 1 1 200px; min-width: 0; }
.keyrow b { display: block; font-weight: 700; }
.keyrow span { display: block; font-size: 13px; color: var(--mute); }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 18px; }
.meter b { display: block; font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.meter span { color: var(--mute); font-size: 14px; }
.meter .bar2 { height: 4px; background: var(--soft); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.docs p { margin: 10px 0; max-width: 70ch; }
.docs pre { background: var(--soft); border-radius: var(--r); padding: 14px 16px; overflow-x: auto; font: 13px/1.5 ui-monospace, Menlo, monospace; margin: 8px 0 18px; }
.docs h3 { font-size: 19px; margin-top: 22px; letter-spacing: -.01em; }
.docs table { border-collapse: collapse; font-size: 14px; width: 100%; margin: 8px 0 18px; }
.docs th { text-align: left; font-weight: 600; color: var(--mute); padding: 5px 12px 5px 0; }
.docs td { padding: 7px 12px 7px 0; border-top: 1px solid var(--hair); vertical-align: top; }
.docs code { font: 13px/1.4 ui-monospace, Menlo, monospace; word-break: break-word; }

/* ---------- /studio/login ---------- */
.login { min-height: calc(100svh - 120px); display: grid; place-items: center; padding: 36px var(--g); }
.login-box { width: min(440px, 100%); }
.login-box h1 { font-size: clamp(50px, 8vw, 84px); letter-spacing: -.03em; line-height: .94; margin-bottom: 8px; }
.login-box > p { color: var(--mute); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; margin-top: 16px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--ink); }
.login-box .s-btn.pri { width: 100%; margin-top: 18px; padding: 17px; }
.switch { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 14px; }
.form-msg { min-height: 1.4em; margin-top: 12px; font-size: 14px; color: var(--accent); font-weight: 600; }
.form-msg.ok { color: var(--ink); }
.mockflag { position: fixed; left: 8px; bottom: 8px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 4px; z-index: 200; pointer-events: none; }

/* ---------- /studio overview + terms ---------- */
.o-hero { padding: 96px var(--g) clamp(30px, 5vw, 60px); }
.o-hero .giant { display: block; }
.o-lead { display: grid; grid-template-columns: 1fr 1fr; gap: var(--g); margin-top: clamp(30px, 4vw, 60px); align-items: end; }
.o-lead p { font-size: clamp(22px, 2.5vw, 38px); font-weight: 700; letter-spacing: -.016em; line-height: 1.08; max-width: 22ch; }
.o-cta { justify-self: end; display: flex; gap: 8px; flex-wrap: wrap; }
.o-cta .s-btn { font-size: 17px; padding: 18px 26px; }
.o-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 8px; padding: 0 var(--g); overflow-x: auto; scrollbar-width: none; }
.o-strip::-webkit-scrollbar { display: none; }
.o-strip figure { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--soft); }
.o-strip img, .o-strip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.o-strip figcaption { position: absolute; left: 7px; bottom: 7px; background: #fff; border-radius: calc(var(--r) - 2px); padding: 4px 7px; font-size: 13px; font-weight: 600; }
.o-sec { padding: clamp(70px, 10vw, 150px) var(--g) 0; }
.o-sec > h2 { font-size: clamp(44px, 8vw, 124px); letter-spacing: -.028em; line-height: .94; max-width: 13ch; margin-bottom: clamp(30px, 5vw, 60px); }
.o-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px) var(--g); }
.o-grid h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.014em; margin-bottom: 8px; }
.o-grid p { color: var(--mute); font-size: 16px; max-width: 38ch; }
.o-limits { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--g); }
.o-limits b { display: block; font-size: clamp(64px, 11vw, 180px); font-weight: 800; letter-spacing: -.03em; line-height: .9; }
.o-limits span { font-size: clamp(16px, 1.5vw, 22px); font-weight: 600; }
.o-after { color: var(--mute); margin-top: 22px; max-width: 60ch; }
.o-end { padding: clamp(70px, 10vw, 150px) var(--g) 0; }
.o-end .giant-2 { margin-bottom: 26px; }
@media (max-width: 900px) { .o-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .o-lead { grid-template-columns: 1fr; } .o-cta { justify-self: start; }
  .o-grid { grid-template-columns: 1fr; }
  .o-limits { grid-template-columns: 1fr 1fr; }
  .o-strip { grid-auto-columns: 46vw; }
}
.t-page { padding: 100px var(--g) 0; max-width: 820px; }
.t-page h1 { font-size: clamp(52px, 9vw, 120px); letter-spacing: -.03em; line-height: .92; margin-bottom: 20px; }
.t-page h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.016em; margin: 40px 0 10px; }
.t-page p, .t-page li { font-size: 17px; line-height: 1.5; color: #333; }
.t-page ul { margin: 8px 0; display: grid; gap: 6px; padding-left: 20px; list-style: disc; }
.t-draft { background: var(--soft); border-radius: var(--r); padding: 14px 16px; font-weight: 600; margin-bottom: 8px; }

/* ---------- /studio home (hero with a live mock of the Studio) ---------- */
.h-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(30px, 5vw, 80px); align-items: center; padding: clamp(110px, 12vw, 150px) var(--g) clamp(50px, 7vw, 100px); min-height: min(92svh, 900px); }
.h-kicker { font-weight: 700; font-size: 15px; color: var(--mute); margin-bottom: 18px; }
.h-copy h1 { font-size: clamp(44px, 6vw, 92px); letter-spacing: -.035em; line-height: .95; font-weight: 800; }
.h-sub { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; color: var(--ink); max-width: 34ch; margin-top: 24px; }
.h-cta { justify-self: start; margin-top: 30px; }
.h-small { color: var(--mute); font-size: 14px; margin-top: 14px; }
.h-visual { position: relative; }
.h-win { background: var(--soft); border-radius: calc(var(--r) + 6px); padding: clamp(12px, 1.4vw, 18px); }
.h-prompt { background: #fff; border-radius: var(--r); padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 6px 16px; align-items: center; }
.h-prompt .h-lbl { grid-column: 1 / -1; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.h-prompt p { font-size: clamp(16px, 1.45vw, 20px); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; min-height: 2.6em; }
.h-caret { display: inline-block; width: 2px; height: 1.05em; background: var(--accent); vertical-align: -.15em; margin-left: 2px; animation: hBlink 1s steps(1) infinite; }
@keyframes hBlink { 50% { opacity: 0; } }
.h-go { background: var(--ink); color: #fff; border-radius: var(--r); padding: 12px 16px; font-weight: 700; font-size: 15px; white-space: nowrap; transition: transform .15s, background .15s; }
.h-go.press { transform: scale(.94); background: var(--accent); }
.h-out { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: clamp(8px, 1vw, 12px); margin-top: clamp(8px, 1vw, 12px); transition: opacity .3s, filter .3s; }
.h-out.busy { opacity: .35; filter: blur(4px); }
.h-out figure { position: relative; border-radius: var(--r); overflow: hidden; background: #e8e8e8; }
.h-pic, .h-vid { aspect-ratio: 3 / 4; }
.h-out img, .h-out video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.h-out figcaption { position: absolute; left: 8px; top: 8px; background: #fff; border-radius: calc(var(--r) - 2px); padding: 4px 8px; font-size: 13px; font-weight: 700; }
.h-song { grid-column: 1 / -1; background: var(--ink) !important; color: #fff; display: flex; align-items: center; gap: 18px; padding: 44px 18px 18px; }
.h-song figcaption { background: #fff; color: var(--ink); }
.h-wave { flex: 1 1 auto; height: 44px; background: repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 7px); -webkit-mask: linear-gradient(#000 0 0) center / 100% 30% no-repeat; mask: linear-gradient(#000 0 0) center / 100% 30% no-repeat; animation: hWave 1.2s ease-in-out infinite alternate; opacity: .9; }
@keyframes hWave { 0% { -webkit-mask-size: 100% 25%; mask-size: 100% 25%; } 50% { -webkit-mask-size: 100% 90%; mask-size: 100% 90%; } 100% { -webkit-mask-size: 100% 55%; mask-size: 100% 55%; } }
.h-songtext b, .h-songtext span { display: block; white-space: nowrap; }
.h-songtext b { font-size: 17px; }
.h-songtext span { color: #bdbdbd; font-size: 13px; }
.h-sec { padding: clamp(70px, 9vw, 130px) var(--g) 0; }
.h-sec > h2, .h-free h2 { font-size: clamp(40px, 6.4vw, 96px); letter-spacing: -.03em; line-height: .95; margin-bottom: clamp(26px, 4vw, 50px); }
.h-lead { color: var(--mute); font-size: clamp(16px, 1.4vw, 19px); max-width: 52ch; margin-top: -16px; margin-bottom: 26px; }
.h-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--g); }
.h-steps > div { background: var(--soft); border-radius: var(--r); padding: clamp(22px, 2.4vw, 34px); min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; }
.h-steps h3, .h-grid h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.014em; margin-bottom: 8px; }
.h-steps p, .h-grid p { color: var(--mute); font-size: 16px; max-width: 38ch; }
.h-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(26px, 3vw, 44px) var(--g); }
.h-grid a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.h-free { display: grid; gap: 10px; }
.h-free .h-lead { margin-top: -10px; }
@media (prefers-reduced-motion: reduce) { .h-caret, .h-wave { animation: none; } }
@media (max-width: 980px) {
  .h-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 100px; }
  .h-steps, .h-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .h-steps, .h-grid { grid-template-columns: 1fr; }
  .h-steps > div { min-height: 0; }
  .h-prompt { grid-template-columns: 1fr; }
  .h-go { justify-self: start; }
  .h-cta .s-btn { flex: 1 1 auto; }
}

/* ---------- Studio: prompt and settings as a panel on the right (wide screens) ---------- */
@media (min-width: 1000px) {
  .s-app { --panel: clamp(340px, 26vw, 420px); }
  .s-app .studio-main { padding-right: calc(var(--panel) + var(--g)); padding-bottom: 40px; }
  .s-app .toast { bottom: 20px; right: calc(var(--panel) + 20px); left: auto; }
  .s-app .dock { top: 61px; left: auto; width: var(--panel); border-top: 0; border-left: 1px solid var(--hair); padding: 18px 20px 20px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
  .s-app .dock[hidden] { display: none; }
  .s-app .composer { max-width: none; margin: 0; width: 100%; gap: 18px; display: flex; flex-direction: column; flex: 1 0 auto; }
  .s-app .promptbox { flex-direction: column; align-items: stretch; gap: 8px; }
  .s-app .promptbox textarea { min-height: 150px; max-height: 42vh; }
  .s-app .pbtns { order: 2; }
  .s-app .pbtns .go { flex: 1; height: 46px; font-size: 16px; }
  .s-app #optsBtn { display: none; }
  .s-app .opts { flex-direction: column; flex-wrap: nowrap; gap: 18px; }
  .s-app .opts .group { width: 100%; }
  .s-app .chips, .s-app .seg { flex-wrap: wrap; }
  .s-app .more { grid-template-columns: 1fr 1fr; }
  .s-app .more .wide { grid-column: 1 / -1; }
}
