/* babyslut — black / white / brackets */
:root {
  --bg: #000;
  --fg: #fff;
  --dim: rgba(255, 255, 255, .55);
  --faint: rgba(255, 255, 255, .32);
  --line: rgba(255, 255, 255, .14);
  --line-2: rgba(255, 255, 255, .28);
  --danger: #ff5a6e;
  --font: 'Helvetica Neue', Helvetica, 'Inter Tight', Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --out: cubic-bezier(.2, .8, .2, 1);
  --gut: 24px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg); font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: #fff; color: #000; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); }
.muted { color: var(--dim); }
.small { font-size: 13px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* bracket frame: [  ] corners */
.brk, .brk-sm, .strip-wrap, .intro-frame {
  --bc: #fff; --bl: 12px; --bw: 1.5px;
  background:
    linear-gradient(var(--bc), var(--bc)) left top / var(--bw) 100% no-repeat,
    linear-gradient(var(--bc), var(--bc)) left top / var(--bl) var(--bw) no-repeat,
    linear-gradient(var(--bc), var(--bc)) left bottom / var(--bl) var(--bw) no-repeat,
    linear-gradient(var(--bc), var(--bc)) right top / var(--bw) 100% no-repeat,
    linear-gradient(var(--bc), var(--bc)) right top / var(--bl) var(--bw) no-repeat,
    linear-gradient(var(--bc), var(--bc)) right bottom / var(--bl) var(--bw) no-repeat;
}
.brk-sm { display: block; width: 72px; height: 48px; --bl: 9px; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- header ---------- */
.hd { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: flex-start; gap: 22px; padding: 20px var(--gut); pointer-events: none; }
.hd > * { pointer-events: auto; }
.hd-logo { width: 52px; height: 52px; flex: none; display: block; margin: -6px 0 0 -8px; transition: transform .5s var(--out); }
.hd-logo img { width: 100%; height: 100%; display: block; }
.hd-logo:hover { transform: scale(1.06); }
.gothic { font-family: 'UnifrakturCook', serif; font-weight: 700; letter-spacing: 0; }
.hd-blurb { margin: 3px 0 0; max-width: 300px; font-size: 12.5px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.hd-nav { margin-left: auto; display: flex; gap: 18px; align-items: center; font-size: 13.5px; text-transform: uppercase; letter-spacing: .01em; padding-top: 3px; }
.hd-nav a { position: relative; padding: 2px 0; }
.hd-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--out); }
.hd-nav a:hover::after, .hd-nav a.on::after { transform: scaleX(1); transform-origin: left; }
.snd { background: none; border: 0; cursor: pointer; text-transform: uppercase; font-size: 13.5px; padding: 2px 0; color: var(--dim); }
.snd:hover { color: #fff; }
.snd span { font-family: var(--mono); font-size: 12px; }
.hd-menu { display: none; margin-left: auto; background: none; border: 0; text-transform: uppercase; font-size: 13.5px; cursor: pointer; padding: 4px 0; }
.menu { position: fixed; inset: 0; z-index: 55; background: #000; display: flex; flex-direction: column; justify-content: center; padding: 100px var(--gut) 40px; opacity: 0; pointer-events: none; transition: opacity .35s; }
.menu nav { display: flex; flex-direction: column; gap: 6px; }
.menu a { font-size: clamp(40px, 12vw, 72px); font-weight: 700; letter-spacing: -.045em; line-height: 1; transform: translateY(20px); opacity: 0; transition: transform .5s var(--out), opacity .5s; transition-delay: calc(var(--i) * 45ms); }
.menu a.on { color: var(--faint); }
.menu .snd { margin-top: 30px; align-self: flex-start; font-size: 15px; }
body.menu-open .menu { opacity: 1; pointer-events: auto; }
body.menu-open .menu a { transform: none; opacity: 1; }
body[data-page="home"] .hd { opacity: 0; transform: translateY(-8px); transition: opacity .8s var(--out), transform .8s var(--out); }
body.ready[data-page="home"] .hd { opacity: 1; transform: none; }
body:not([data-page="home"]) .hd { background: linear-gradient(#000 60%, rgba(0, 0, 0, 0)); }

/* ---------- curtain (page transitions) ---------- */
.curtain { position: fixed; inset: 0; z-index: 90; background: #000; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .45s var(--ease); }
.curtain .brk { width: 108px; height: 72px; transform: scale(.6); opacity: 0; transition: transform .45s var(--out), opacity .3s; }
.curtain.shut { opacity: 1; pointer-events: auto; transition-duration: .5s; }
.curtain.shut .brk { transform: none; opacity: 1; }

/* ---------- home / reel ---------- */
body[data-page="home"] { height: 100vh; height: 100dvh; overflow: hidden; }
.home { position: fixed; inset: 0; }
.reel { position: absolute; inset: 0; background: #0c0c0e; transition: clip-path 1.05s var(--ease); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--out); overflow: hidden; }
.slide.on { opacity: 1; z-index: 1; }
.slide > video, .slide > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.on > video { animation: slowzoom 14s linear both; }
@keyframes slowzoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.reel-shade { position: absolute; inset: 0; pointer-events: none; z-index: 2; background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, .7)); }
.reel-ui { position: absolute; left: var(--gut); right: var(--gut); bottom: var(--gut); z-index: 3; opacity: 0; transform: translateY(14px); transition: opacity .9s var(--out) .15s, transform .9s var(--out) .15s; }
body.ready .reel-ui { opacity: 1; transform: none; }
.rl-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.rl-title { display: block; overflow: hidden; line-height: 1; min-width: 0; padding-bottom: 2px; }
.rl-title .swap-in { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; animation: rise .7s var(--out) both; }
.rl-title b { font-size: clamp(22px, 2.1vw, 30px); font-weight: 700; letter-spacing: -.03em; }
.rl-title .tag, .pg-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }
.rl-title:hover b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
@keyframes rise { from { transform: translateY(105%); opacity: 0; } }
.rl-count { font-size: 11px; color: var(--dim); white-space: nowrap; }
.strip-wrap { padding: 0 12px; --bl: 6px; --bw: 2px; }
.strip { display: flex; height: 36px; overflow: hidden; }
.thumb { flex: 1 1 0; min-width: 60px; height: 100%; padding: 0; border: 0; background: #111; cursor: pointer; position: relative; overflow: hidden; opacity: .5; transition: opacity .3s, flex-grow .6s var(--ease); }
.thumb:hover { opacity: .85; }
.thumb.on { opacity: 1; flex-grow: 1.6; }
.thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.th { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; background: #17171a; }
.th svg { flex: none; }
.th-bonk { position: relative; align-items: flex-end; padding-bottom: 6px; gap: 10px; }
.th-bonk i { position: absolute; left: 20%; right: 20%; bottom: 4px; height: 2px; background: #ddd; }
.th-ai b { font-size: 13px; letter-spacing: -.02em; margin-right: 4px; }
.th-shapes { color: #fff; gap: 8px; }
.thumb .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.thumb.on .bar { animation: prog var(--dur, 8s) linear both; }
@keyframes prog { to { transform: scaleX(1); } }

/* intro */
.intro { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; }
.intro::before { content: ''; position: absolute; inset: 0; background: #000; transition: opacity .3s .05s; }
.intro.expand::before { opacity: 0; }
.intro-frame { position: relative; width: 108px; height: 72px; animation: frameIn .55s var(--out) both; transition: width 1.05s var(--ease), height 1.05s var(--ease), opacity .6s .5s; display: grid; place-items: center; overflow: hidden; }
@keyframes frameIn { from { width: 0; opacity: 0; } }
.intro.expand .intro-frame { width: 100vw; height: 100vh; opacity: 0; }
.intro-flash { width: 84px; height: 56px; display: grid; place-items: center; overflow: hidden; background: #111; }
.intro-flash:empty { background: transparent; }
.intro-flash svg { width: 50px; height: 50px; }
.intro.expand .intro-flash { opacity: 0; transition: opacity .2s; }

/* scenes */
.sc-build { position: absolute; inset: 0; display: grid; place-items: center; background: #0c0c0e; }
.sc-art { width: min(52vh, 70vw); aspect-ratio: 1; transition: transform .6s var(--ease), opacity .5s; }
.sc-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.sc-art.out { transform: scale(.9); opacity: 0; }
.bl-base { animation: pop .6s var(--out) both; transform-origin: 15px 15px; }
.bl { animation: drop .55s var(--out) both; transform-origin: 15px 15px; }
@keyframes pop { from { transform: scale(0); } }
@keyframes drop { from { opacity: 0; transform: translateY(-3px) scale(1.25); } }
.sc-read { position: absolute; left: 50%; top: calc(50% + min(26vh, 35vw) + 22px); transform: translateX(-50%); display: flex; gap: 18px; font-size: 11px; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.sc-read span { display: inline-flex; align-items: center; gap: 6px; }
.sc-read span:nth-child(2) { color: #fff; }
.sc-read i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sc-ai { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6vh; background: #0c0c0e; padding: 0 var(--gut); }
.sc-prompt { font-size: clamp(28px, 5vw, 76px); font-weight: 700; letter-spacing: -.045em; line-height: 1; text-align: center; min-height: 1em; }
.caret { display: inline-block; width: .08em; height: .9em; background: #fff; margin-left: .06em; vertical-align: -.08em; animation: blink 1s steps(2) infinite; }
.sc-row { display: flex; gap: clamp(8px, 2vw, 26px); min-height: 140px; flex-wrap: wrap; justify-content: center; transition: opacity .4s, transform .4s var(--ease); }
.sc-row.out { opacity: 0; transform: translateY(-12px); }
.sc-skin { width: clamp(64px, 11vw, 140px); aspect-ratio: 1; animation: up .6s var(--out) both; }
.sc-skin svg { width: 100%; height: 100%; }
@keyframes up { from { opacity: 0; transform: translateY(30px) scale(.8); } }

/* ---------- inner pages ---------- */
.pg { width: 100%; max-width: 1480px; margin: 0 auto; padding: 108px var(--gut) 40px; flex: 1; opacity: 0; transform: translateY(16px); transition: opacity .7s var(--out) .1s, transform .7s var(--out) .1s; }
body.ready .pg { opacity: 1; transform: none; }
.pg-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.pg-head h1 { margin: 0; font-size: clamp(44px, 7.4vw, 112px); font-weight: 700; letter-spacing: -.055em; line-height: .9; }
.pg-tag { color: var(--dim); }
.ft { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; padding: 20px var(--gut) 24px; font-size: 12px; text-transform: uppercase; color: var(--dim); border-top: 1px solid var(--line); }
.ft a:hover { color: #fff; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid var(--line-2); background: transparent; color: #fff; border-radius: 0; cursor: pointer; font-size: 12.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: #fff; color: #000; border-color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .shape:focus-visible, .swatch:focus-visible, .chip:focus-visible, .thumb:focus-visible, a:focus-visible, .seg button:focus-visible, .ideas button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn.primary { background: #fff; color: #000; border-color: #fff; }
.btn.primary:hover { background: transparent; color: #fff; }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: transparent; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 11.5px; }
.btn.icon.sm { width: 32px; padding: 0; }
.btn.icon.xs { width: 26px; height: 26px; padding: 0; }
.btn.icon.xs .ic { width: 14px; height: 14px; }
.btn.lg { height: 48px; padding: 0 22px; }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #000; }
.link { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 11.5px; text-transform: uppercase; }
.link:hover { color: #fff; }
.link .ic { width: 13px; height: 13px; }
.txt-ic { font-weight: 700; font-size: 13px; }
.input { width: 100%; border: 1px solid var(--line-2); background: #000; padding: 12px; outline: none; resize: vertical; border-radius: 0; }
.input:focus { border-color: #fff; }

/* ---------- editor ---------- */
.ed { display: grid; grid-template-columns: 264px minmax(0, 1fr) 304px; grid-template-rows: auto minmax(0, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); height: calc(100vh - 230px); min-height: 640px; }
.ed > * { background: #000; min-width: 0; }
.ed-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; }
.ed-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.name-input { font-weight: 700; font-size: 17px; letter-spacing: -.02em; border: 0; border-bottom: 1px solid transparent; background: none; outline: none; min-width: 0; width: 100%; max-width: 340px; padding: 4px 0; border-radius: 0; }
.name-input:hover { border-bottom-color: var(--line-2); }
.name-input:focus { border-bottom-color: #fff; }
.saved-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; flex: none; }
.saved-dot.dirty { background: transparent; border: 1px solid #fff; }
.ed-actions { display: flex; align-items: center; gap: 4px; }
.sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 6px; }
.ed-lib, .ed-side { padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: hidden; }
.ed-side { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.panel-head { display: flex; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); }
.panel-head b { font-weight: 500; }
.panel-head b::before { content: '['; } .panel-head b::after { content: ']'; }
.panel-head .ic { display: none; }
.panel-head .count { margin-left: auto; font-family: var(--mono); }
.search { display: flex; align-items: center; gap: 8px; height: 38px; border-bottom: 1px solid var(--line-2); transition: border-color .2s; }
.search:focus-within { border-color: #fff; }
.search .ic { color: var(--dim); }
.search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; }
.search input::placeholder { color: var(--faint); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: none; padding: 4px 9px; font-size: 11px; text-transform: uppercase; cursor: pointer; color: var(--dim); transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: #fff; border-color: var(--line-2); }
.chip.on { background: #fff; color: #000; border-color: #fff; }
.shape-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; align-content: start; }
.shape { aspect-ratio: 1; border: 0; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: #fff; padding: 8px 4px 6px; transition: background .15s, color .15s; }
.shape svg { flex: 1; width: 64%; height: auto; max-height: 40px; }
.shape span { font-size: 9.5px; text-transform: uppercase; color: var(--faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shape:hover { background: #fff; color: #000; }
.shape:hover span { color: #000; }
.ed > .ed-stage { display: flex; flex-direction: column; align-items: center; padding: 14px; min-height: 0; position: relative; overflow: hidden; background-color: #0c0c0e; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 40px 40px; }
.stage-wrap { flex: 1; width: 100%; min-height: 0; display: grid; place-items: center; container-type: size; }
#ed-stage { width: min(100%, 100cqh, 640px); height: auto; aspect-ratio: 1; touch-action: none; user-select: none; -webkit-user-select: none; overflow: visible; }
#ed-stage .guide { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: .06; stroke-dasharray: .3 .5; }
#ed-stage .ghost { opacity: .18; }
#ed-stage .rim { stroke: rgba(0, 0, 0, .35); stroke-width: .1; pointer-events: none; }
#ed-stage use { cursor: grab; }
#ed-stage.dragging, #ed-stage.dragging use { cursor: grabbing; }
.sel { pointer-events: none; }
.sel-box { fill: none; stroke: #fff; stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; animation: march 1s linear infinite; }
@keyframes march { to { stroke-dashoffset: -7; } }
.sel.locked .sel-box { stroke: var(--faint); }
.sel-line { stroke: #fff; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.handle { fill: #000; stroke: #fff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; pointer-events: all; cursor: nwse-resize; }
.handle.rot { fill: #fff; stroke: #000; cursor: grab; }
.stage-bar { display: flex; border: 1px solid var(--line-2); background: #000; flex-wrap: wrap; justify-content: center; }
.stage-bar .btn { height: 38px; width: 40px; border: 0; border-right: 1px solid var(--line); }
.stage-bar .btn:last-child { border-right: 0; }
.stage-foot { display: flex; gap: 18px; align-items: center; margin-top: 10px; font-size: 11px; text-transform: uppercase; color: var(--dim); font-family: var(--mono); flex-wrap: wrap; justify-content: center; }
.stage-foot .link { font-family: var(--font); }
.color-row { display: flex; gap: 10px; align-items: flex-start; }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; flex: 1; }
.swatch { --c: #fff; aspect-ratio: 1; width: 100%; border-radius: 50%; border: 0; background: var(--c); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset; cursor: pointer; padding: 0; position: relative; transition: transform .15s; }
.swatch:hover { transform: scale(1.15); }
.swatch.on { box-shadow: 0 0 0 2px #000, 0 0 0 3px #fff; }
.swatch.big { width: 50px; height: 50px; flex: none; border-radius: 0; display: block; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); }
.swatch.big:hover { transform: none; }
.swatch.big::after { content: '+'; position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; background: #000; color: #fff; font-size: 12px; line-height: 15px; text-align: center; }
.swatch.big input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.prop-head { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.prop-head b { flex: 1; font-size: 13px; text-transform: uppercase; font-weight: 500; }
.pthumb { width: 34px; height: 34px; display: grid; place-items: center; background: #1a1a1d; flex: none; }
.prop { display: grid; grid-template-columns: 42px 1fr 60px; align-items: center; gap: 10px; margin-top: 8px; position: relative; }
.prop label { font-size: 11px; text-transform: uppercase; color: var(--dim); }
.prop i { position: absolute; right: 8px; font-style: normal; font-size: 11px; color: var(--faint); pointer-events: none; }
.num { width: 100%; height: 30px; border: 1px solid var(--line); background: #000; padding: 0 8px; font-size: 12px; font-family: var(--mono); outline: none; -moz-appearance: textfield; border-radius: 0; }
.num::-webkit-inner-spin-button { -webkit-appearance: none; }
.num:focus { border-color: #fff; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--line-2); }
input[type=range]::-moz-range-track { height: 1px; background: var(--line-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; border: 0; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.layer-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.layer { display: flex; align-items: center; gap: 8px; padding: 5px 4px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; transition: background .15s; }
.layer:hover { background: #111; }
.layer.on { background: #fff; color: #000; }
.layer.on .btn.ghost { color: #000; }
.layer.on .btn.ghost:hover { background: rgba(0, 0, 0, .08); color: #000; }
.layer.off .lname, .layer.off .lthumb { opacity: .4; }
.layer.over { box-shadow: 0 -2px 0 #fff inset; }
.layer.dragging { opacity: .4; }
.grip { color: var(--faint); font-size: 10px; letter-spacing: -2px; cursor: grab; }
.layer.on .grip { color: rgba(0, 0, 0, .4); }
.lthumb { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.lname { flex: 1; }
.lock-ic .ic { width: 13px; height: 13px; opacity: .6; }
.empty { text-align: center; color: var(--dim); padding: 30px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.empty b { color: #fff; font-size: 15px; font-weight: 500; }
.empty.sm { padding: 12px 6px; font-size: 12px; }

/* ---------- AI page ---------- */
.ai-form { display: flex; align-items: flex-end; gap: 16px; border-bottom: 1.5px solid #fff; padding-bottom: 12px; }
.ai-form input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: clamp(26px, 4.2vw, 60px); font-weight: 700; letter-spacing: -.045em; line-height: 1.05; padding: 0; }
.ai-form input::placeholder { color: rgba(255, 255, 255, .22); }
.ai-form-actions { display: flex; gap: 6px; flex: none; }
.ai-opts { display: flex; gap: 14px; align-items: baseline; margin-top: 14px; }
.lbl { font-size: 11px; text-transform: uppercase; color: var(--dim); flex: none; width: 52px; }
.seg, .ideas { display: flex; gap: 4px 14px; flex-wrap: wrap; }
.seg button, .ideas button { background: none; border: 0; padding: 2px 0; cursor: pointer; font-size: 13px; text-transform: uppercase; color: var(--dim); }
.seg button:hover, .ideas button:hover { color: #fff; }
.seg button.on { color: #fff; }
.seg button.on::before { content: '['; } .seg button.on::after { content: ']'; }
.ideas button { text-transform: none; font-size: 13.5px; }
.ideas button:not(:last-child)::after { content: ','; color: var(--faint); }
#ai-out { margin-top: 36px; }
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ai-card { position: relative; background: #000; padding: 18px; display: flex; flex-direction: column; gap: 14px; animation: up .6s var(--out) both; animation-delay: var(--d, 0ms); }
.ai-card.loading { min-height: 340px; display: grid; place-items: center; }
.ai-n { position: absolute; top: 14px; left: 16px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.ai-art { display: grid; place-items: center; padding: 22px 0 6px; }
.ai-art svg { width: min(200px, 70%); height: auto; transition: transform .6s var(--out); }
.ai-card:hover .ai-art svg { transform: rotate(-8deg) scale(1.04); }
.ai-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ai-meta b { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.ai-meta span { font-size: 10.5px; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.ai-actions { display: flex; gap: 4px; }
.ai-actions .btn.primary { flex: 1; }
.more-row { display: flex; justify-content: center; margin-top: 24px; }
.ai-empty, .lib-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 60px 0; color: var(--dim); text-align: center; }
.ai-empty p, .lib-empty p { margin: 0; max-width: 420px; font-size: 14px; }

/* ---------- my skins ---------- */
.lib-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.lib-card { background: #000; padding: 16px; display: flex; flex-direction: column; gap: 12px; animation: up .6s var(--out) both; animation-delay: var(--d, 0ms); }
.lib-art { border: 0; background: none; padding: 14px 0 4px; cursor: pointer; display: grid; place-items: center; }
.lib-art svg { width: min(170px, 80%); height: auto; transition: transform .6s var(--out); }
.lib-art:hover svg { transform: rotate(-8deg) scale(1.04); }
.lib-meta { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.lib-meta b { font-size: 15px; letter-spacing: -.02em; }
.lib-meta span { font-size: 11px; text-transform: uppercase; color: var(--dim); }
.lib-actions { display: flex; gap: 4px; }
.lib-actions .btn.primary { flex: 1; }

/* ---------- about ---------- */
.statement { font-size: clamp(24px, 3.4vw, 48px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; max-width: 1100px; margin: 10px 0 56px; }
.about-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.about-grid section { background: #000; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.about-grid h2, .keys-block h2 { margin: 0; font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--dim); }
.about-grid p { margin: 0; font-size: 14.5px; color: rgba(255, 255, 255, .85); flex: 1; }
.arrow-link { font-size: 12.5px; text-transform: uppercase; }
.arrow-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.keys-block { margin-top: 48px; max-width: 760px; }
.keys-block .keys { grid-template-columns: 1fr 1fr; column-gap: 40px; margin-top: 14px; }

/* ---------- modal / export / keys ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .72); opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal-root.open { opacity: 1; pointer-events: auto; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #000; border: 1px solid var(--line-2); padding: 20px; transform: translateY(10px); transition: transform .35s var(--out); }
.modal.wide { width: min(760px, 100%); }
.modal-root.open .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.modal p { margin: 0 0 10px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.lib-item { position: relative; background: #000; }
.lib-open { width: 100%; border: 0; background: none; padding: 16px 10px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: background .2s; }
.lib-open:hover { background: #111; }
.lib-open b { font-size: 13px; max-width: 100%; margin-top: 6px; }
.lib-open small { color: var(--dim); font-size: 11px; }
.lib-item [data-del] { position: absolute; top: 4px; right: 4px; opacity: 0; transition: opacity .2s; }
.lib-item:hover [data-del], .lib-item:focus-within [data-del] { opacity: 1; }
.export-prev { display: grid; place-items: center; padding: 6px 0 18px; }
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile { border: 0; background: #000; padding: 16px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; transition: background .2s, color .2s; }
.tile:hover { background: #fff; color: #000; }
.tile:hover small { color: rgba(0, 0, 0, .6); }
.tile .ic { margin-bottom: 8px; width: 20px; height: 20px; }
.tile b { text-transform: uppercase; font-size: 13px; font-weight: 500; }
.tile small { color: var(--dim); font-size: 12px; }
.drop { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px dashed var(--line-2); padding: 20px; cursor: pointer; text-transform: uppercase; font-size: 12px; color: var(--dim); margin-bottom: 10px; transition: border-color .2s, color .2s; }
.drop:hover { border-color: #fff; color: #fff; }
.keys { display: grid; gap: 8px; }
.keys div { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.keys span { color: var(--dim); text-align: right; }
kbd { font: 500 11px var(--mono); padding: 3px 7px; border: 1px solid var(--line-2); white-space: nowrap; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; max-width: calc(100vw - 40px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; color: #000; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .4s var(--out); }
.toast.in { opacity: 1; transform: none; }
.toast .ic { width: 14px; height: 14px; }
.toast.err { background: var(--danger); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .ed { grid-template-columns: 230px minmax(0, 1fr) 280px; }
  .ed-actions .btn:not(.icon):not(.primary) span { display: none; }
  .ed-actions .btn:not(.icon):not(.primary) { width: 38px; padding: 0; }
  .about-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .hd-blurb { display: none; }
  .ai-grid { grid-template-columns: repeat(2, 1fr); }
  .ed { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; height: auto; min-height: 0; }
  .ed > .ed-stage { order: 1; }
  .ed-side { order: 2; overflow: visible; }
  .ed-lib { order: 3; max-height: 480px; }
  #ed-stage { width: min(100%, 520px); }
  .stage-wrap { container-type: normal; }
  .shape-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}
@media (max-width: 760px) {
  :root { --gut: 16px; }
  .hd { padding: 16px var(--gut); align-items: center; }
  .hd-nav { display: none; }
  .hd-menu { display: block; }
  .hd-logo { width: 44px; height: 44px; }
  .pg { padding-top: 92px; }
  .ai-form { flex-direction: column; align-items: stretch; }
  .ai-form-actions .btn { flex: 1; }
  .ai-opts { flex-direction: column; gap: 6px; }
  .about-grid, .keys-block .keys { grid-template-columns: 1fr; }
  .ed-top { flex-wrap: wrap; }
  .ed-title { flex-basis: 100%; }
  .ed-actions { width: 100%; justify-content: space-between; }
  .sep { display: none; }
  .stage-bar .btn { width: 36px; height: 36px; }
  .thumb { min-width: 44px; }
  .sc-read { gap: 10px; font-size: 10px; }
}
@media (max-width: 520px) {
  .ai-grid { grid-template-columns: 1fr 1fr; }
  .ai-card { padding: 12px; gap: 10px; }
  .ai-meta { flex-direction: column; gap: 2px; }
  .ai-actions { flex-wrap: wrap; }
  .ai-actions .btn.primary { flex-basis: 100%; }
  .ai-actions .btn:not(.primary) { flex: 1; padding: 0 4px; }
  .export-grid { grid-template-columns: 1fr; }
  .ed-actions .btn.icon, .ed-actions .btn:not(.primary) { width: 34px; }
  .ed-actions .btn.primary { padding: 0 12px; }
  .stage-bar .btn { width: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- credits ---------- */
.credits { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; margin-top: 56px; border-top: 1px solid var(--line); padding-top: 28px; }
.pfp { position: relative; aspect-ratio: 1; background: #0c0c0e; border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; }
.pfp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pfp .fallback { width: 60%; height: auto; }
.credits-name { font-size: clamp(44px, 6vw, 84px); line-height: .9; margin: 0 0 18px; }
.roles { border-top: 1px solid var(--line); }
.roles div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.roles span { color: var(--dim); text-transform: uppercase; font-size: 12px; letter-spacing: .02em; }

/* ---------- client page ---------- */
.client-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 48px; }
.client-hero p { font-size: clamp(20px, 2.2vw, 30px); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; margin: 0; }
.dl { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.dl a { background: #000; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; transition: background .2s, color .2s; }
.dl a:hover { background: #fff; color: #000; }
.dl a:hover small { color: rgba(0, 0, 0, .6); }
.dl b { font-size: 18px; letter-spacing: -.02em; }
.dl small { display: block; color: var(--dim); font-size: 12px; text-transform: uppercase; margin-top: 2px; }
.dl i { font-style: normal; font-size: 22px; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 48px; }
.shots figure { margin: 0; background: #000; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.shots img { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
.shots figcaption { font-size: 11px; text-transform: uppercase; color: var(--dim); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.steps li::before { content: '0' counter(s); font-family: var(--mono); font-size: 11px; color: var(--dim); padding-top: 3px; }
.steps code, .about-grid code { font-family: var(--mono); font-size: 12.5px; background: #151517; padding: 1px 5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; }
.two h2 { margin: 0; font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--dim); }
@media (max-width: 900px) {
  .client-hero, .two { grid-template-columns: 1fr; gap: 28px; }
  .shots { grid-template-columns: 1fr; }
  .credits { grid-template-columns: 1fr; }
  .pfp { width: 160px; }
}
