/* LND Motion Studio. Light by default, dark on request (data-theme="dark" on <html>). */
:root {
  --bg: #f5f6fb; --panel: #ffffff; --panel2: #eef0f8; --line: rgba(20,26,70,.09); --line2: rgba(20,26,70,.17);
  --ink: #12152e; --soft: #474b70; --mute: #7a7f9e; --accent: #4a63f0; --accent-ink: #ffffff; --ok: #1f9d78;
  --fill: rgba(20,26,70,.045); --fill2: rgba(20,26,70,.09); --glass: rgba(255,255,255,.78); --badge: rgba(255,255,255,.82); --badge-ink: #3a3f66;
  --top: rgba(245,246,251,.82); --shadow: 0 26px 50px -30px rgba(30,40,110,.45); --shadow-hover: 0 34px 60px -28px rgba(40,50,140,.5);
  --grad: linear-gradient(135deg, #5b7dff, #9a6bff 55%, #ff6bc4); --grad-ink: #ffffff;
  --glow1: rgba(110,140,255,.20); --glow2: rgba(255,130,210,.14); --glow3: rgba(90,220,180,.10);
  --code-bg: #f1f3fb; --code-ink: #2b2f55; --tk-c: #8a90b6; --tk-s: #13795b; --tk-k: #7a3fd0; --tk-n: #b25a12;
  --frame: radial-gradient(circle at 50% 40%, #e9ecfa, #d9ddf0 75%); --grid-line: rgba(20,26,70,.05);
  --scrim: rgba(18,21,46,.35); --toast: #12152e; --toast-ink: #ffffff;
  --ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --serif: "Instrument Serif", Georgia, serif; --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1); color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #06070e; --panel: #0d1020; --panel2: #121528; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --ink: #f2f1ff; --soft: #b6b3d4; --mute: #7a779c; --accent: #7aa8ff; --accent-ink: #0a0b18; --ok: #74ecbe;
  --fill: rgba(255,255,255,.05); --fill2: rgba(255,255,255,.1); --glass: rgba(10,12,24,.72); --badge: rgba(5,6,12,.64); --badge-ink: #cfdcff;
  --top: rgba(6,7,14,.78); --shadow: 0 30px 60px -28px rgba(0,0,0,.9); --shadow-hover: 0 30px 60px -28px rgba(0,0,0,.9), 0 0 0 1px rgba(122,168,255,.18);
  --grad: linear-gradient(135deg, #7aa8ff, #b57aff 55%, #ff7ad9); --grad-ink: #0a0b18;
  --glow1: rgba(122,168,255,.14); --glow2: rgba(255,122,217,.10); --glow3: rgba(116,236,190,.05);
  --code-bg: #070913; --code-ink: #cfd3f0; --tk-c: #5f6a99; --tk-s: #9fe2b4; --tk-k: #c9a0ff; --tk-n: #ffb680;
  --frame: radial-gradient(circle at 50% 40%, #151937, #080a14 72%); --grid-line: rgba(255,255,255,.028);
  --scrim: rgba(3,4,10,.6); --toast: #151937; --toast-ink: #f2f1ff; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
body { min-height: 100%; transition: background .3s, color .3s; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--fill2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(1000px 560px at 10% -12%, var(--glow1), transparent 60%), radial-gradient(900px 520px at 100% 0%, var(--glow2), transparent 60%), radial-gradient(800px 500px at 50% 110%, var(--glow3), transparent 60%); }
.grow { flex: 1; }

/* top bar */
.top { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--top); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.brand img { height: 26px; width: auto; }
:root[data-theme="dark"] .brand img { filter: brightness(1.5) saturate(1.2); }
.brand em { font: italic 400 24px var(--serif); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 2px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--fill); color: var(--soft); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: .2s var(--ease); }
a.pill:hover, button.pill:hover { color: var(--ink); border-color: var(--mute); background: var(--fill2); }
button.pill[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); background: var(--fill2); }
.pill svg { width: 16px; height: 16px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 42px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:hover:not(:disabled) { border-color: var(--mute); transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(30,40,110,.4); } .btn:disabled { opacity: .45; cursor: default; }
.btn.primary { border: 0; color: var(--grad-ink); background: var(--grad); box-shadow: 0 14px 34px -14px rgba(110,100,255,.7); } .btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; } .btn.ghost { background: transparent; }
.btn svg { width: 17px; height: 17px; flex: none; }
.ib { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); display: grid; place-items: center; transition: .2s; } .ib:hover { border-color: var(--mute); background: var(--fill); } .ib svg { width: 18px; height: 18px; }
.theme .sun { display: none; } :root[data-theme="dark"] .theme .sun { display: block; } :root[data-theme="dark"] .theme .moon { display: none; }

/* gallery */
#gallery { max-width: 1760px; margin: 0 auto; padding: 0 32px 40px; }
.hero { padding: 52px 0 24px; max-width: 920px; }
.eyebrow { margin: 0 0 12px; font: 800 12px var(--ui); letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0; font: 400 clamp(40px, 5.2vw, 72px)/1.04 var(--serif); letter-spacing: -.015em; } .hero h1 em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .08em; }
.lede { margin: 16px 0 0; color: var(--soft); font-size: 17px; max-width: 62ch; }
.bar { position: sticky; top: 60px; z-index: 20; display: grid; gap: 10px; padding: 14px 0; background: linear-gradient(var(--bg) 80%, transparent); }
.search { position: relative; max-width: 560px; } .search input { width: 100%; height: 46px; padding: 0 16px 0 46px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel); outline: 0; font-size: 15px; box-shadow: 0 8px 22px -18px rgba(30,40,110,.5); } .search input:focus { border-color: var(--accent); } .search svg { position: absolute; left: 15px; top: 13px; width: 20px; height: 20px; color: var(--mute); }
.cats { display: flex; gap: 8px; flex-wrap: wrap; }
.cat { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--soft); font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: .2s; } .cat:hover { color: var(--ink); border-color: var(--mute); } .cat[aria-pressed="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); } .cat small { font-size: 11.5px; opacity: .6; font-weight: 700; }
.cats.sub .cat { height: 30px; font-size: 12.5px; padding: 0 13px; background: transparent; } .cats.sub .cat[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; padding-top: 6px; }
.card { position: relative; display: block; width: 100%; padding: 0; text-align: left; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; box-shadow: 0 12px 30px -24px rgba(30,40,110,.5); transition: transform .35s var(--ease), border-color .25s, box-shadow .35s; contain: layout paint; cursor: pointer; }
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: var(--line2); box-shadow: var(--shadow-hover); }
.card .th { position: relative; aspect-ratio: 16 / 9; background: #0b0d1c; overflow: hidden; }
.card .th img, .card .th canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.card .th canvas { opacity: 0; transition: opacity .5s; } .card .th canvas.on { opacity: 1; }
.card .num { position: absolute; left: 10px; top: 10px; z-index: 2; font: 700 11px var(--mono); padding: 3px 8px; border-radius: 999px; background: var(--badge); border: 1px solid var(--line2); backdrop-filter: blur(8px); color: var(--badge-ink); }
.card .uses { position: absolute; right: 10px; top: 10px; z-index: 2; font: 700 10.5px var(--ui); letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--badge); border: 1px solid var(--line2); backdrop-filter: blur(8px); color: var(--badge-ink); }
.card .go { position: absolute; inset: 0; z-index: 2; opacity: 0; transition: .3s; background: linear-gradient(transparent 45%, rgba(5,6,16,.78)); display: flex; align-items: flex-end; padding: 12px; color: #fff; pointer-events: none; } .card:hover .go, .card:focus-visible .go { opacity: 1; } .card .go span { font-weight: 800; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; } .card .go svg { width: 16px; height: 16px; }
.card .meta { padding: 12px 15px 14px; display: flex; align-items: flex-start; gap: 10px; } .card .meta .tx { flex: 1; min-width: 0; } .card .meta b { display: block; font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .card .meta span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav { width: 32px; height: 32px; margin: -4px -6px 0 0; flex: none; border-radius: 10px; border: 0; background: transparent; color: var(--mute); display: grid; place-items: center; z-index: 3; } .fav:hover { color: var(--ink); background: var(--fill2); } .fav svg { width: 18px; height: 18px; } .fav[aria-pressed="true"] { color: #f0467f; } .fav[aria-pressed="true"] svg path { fill: currentColor; }
.empty { grid-column: 1 / -1; padding: 60px 10px; text-align: center; color: var(--mute); }
.foot { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--mute); font-size: 13px; }

/* editor */
#editor { display: flex; flex-direction: column; height: calc(100vh - 60px); height: calc(100dvh - 60px); }
.ebar { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--line); min-width: 0; }
.etitle { min-width: 0; margin-left: 6px; } .etitle h2 { margin: 0; font: 400 30px/1.05 var(--serif); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .etitle span { font-size: 12px; font-weight: 700; color: var(--mute); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.ework { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 392px; }
.stagecol { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px 24px; }
.frame { flex: 1; min-height: 0; display: grid; place-items: center; border-radius: 24px; border: 1px solid var(--line2); background: var(--frame); position: relative; overflow: hidden; box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.4); }
.frame::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 36px 36px; }
.stage { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 30px 70px -30px rgba(10,14,50,.7); background: #000; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: #cfd3f0; background: rgba(5,6,12,.92); z-index: 3; }
.textbar { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line2); background: var(--panel); box-shadow: 0 14px 30px -24px rgba(30,40,110,.5); }
.textbar label { flex: 1 1 200px; min-width: 0; display: grid; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.textbar input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); padding: 0 12px; font: 600 15px var(--ui); letter-spacing: 0; text-transform: none; color: var(--ink); outline: 0; } .textbar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--fill2); }
.timeline { display: flex; align-items: center; gap: 10px; }
.scrub { flex: 1; min-width: 0; } .scrub input { width: 100%; } .scrub input:disabled { opacity: .45; }
.ctr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ctr .desc { flex: 1 1 280px; margin: 0; color: var(--soft); font-size: 13.5px; line-height: 1.45; min-width: 200px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; border: 1px solid var(--line2); background: var(--fill); gap: 2px; } .seg button { height: 32px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; color: var(--mute); font-size: 12.5px; font-weight: 700; } .seg button:hover { color: var(--ink); } .seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(30,40,110,.35); }
.time { font: 600 12.5px var(--mono); color: var(--mute); min-width: 92px; text-align: right; white-space: nowrap; }
.hint { font-size: 12px; color: var(--mute); }
.tip { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--fill); font-size: 12.5px; color: var(--soft); } .tip kbd { font: 700 11px var(--mono); padding: 1px 6px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line2); } .tip button { margin-left: auto; border: 0; background: transparent; color: var(--mute); font-weight: 800; font-size: 16px; line-height: 1; padding: 2px 6px; }

.ins { min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--panel); }
.tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); }
.tab { flex: 1; white-space: nowrap; height: 42px; border: 0; background: transparent; color: var(--mute); font-weight: 700; font-size: 13px; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 7px; } .tab:hover { color: var(--ink); } .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); } .tab svg { width: 16px; height: 16px; }
.pane { flex: 1; overflow: auto; padding: 16px 18px 28px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.grp { margin: 0 0 22px; } .grp > h3 { margin: 0 0 12px; font: 800 11px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.fld { display: grid; gap: 7px; margin-bottom: 14px; } .fld > label, .fld > .lb { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--soft); font-weight: 600; } .fld output { font: 600 12px var(--mono); color: var(--ink); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; } input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--fill2) var(--p, 50%)); } input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(20,26,70,.45); border: 1px solid var(--line2); } input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--fill2); } input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); } input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 1px solid var(--line2); }
.clr { display: flex; align-items: center; gap: 10px; } .clr input[type=color] { width: 40px; height: 34px; padding: 0; border: 1px solid var(--line2); border-radius: 10px; background: none; cursor: pointer; } .clr input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; } .clr input[type=color]::-webkit-color-swatch { border: 0; border-radius: 7px; } .clr input[type=text] { flex: 1; min-width: 0; height: 34px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); padding: 0 10px; font: 600 12.5px var(--mono); outline: 0; }
.txt, select.sel { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); padding: 0 12px; outline: 0; } .txt:focus, select.sel:focus, .clr input[type=text]:focus { border-color: var(--accent); } select.sel option { background: var(--panel); }
.tg { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--soft); font-weight: 600; } .sw { position: relative; width: 44px; height: 26px; flex: none; } .sw input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; } .sw i { position: absolute; inset: 0; border-radius: 99px; background: var(--fill2); transition: .2s; } .sw i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(20,26,70,.4); transition: .25s var(--ease); } .sw input:checked + i { background: var(--accent); } .sw input:checked + i::after { transform: translateX(18px); } .sw input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.pal { display: flex; gap: 8px; flex-wrap: wrap; } .pal button { height: 34px; padding: 3px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); display: flex; gap: 2px; } .pal button:hover { border-color: var(--ink); } .pal i { width: 14px; height: 100%; border-radius: 5px; display: block; }
.drop { border: 1.5px dashed var(--line2); border-radius: 18px; padding: 24px 16px; text-align: center; background: var(--fill); transition: .2s; cursor: pointer; display: grid; gap: 6px; justify-items: center; } .drop:hover, .drop.on { border-color: var(--accent); background: var(--fill2); } .drop svg { width: 30px; height: 30px; color: var(--accent); } .drop b { font-size: 14.5px; } .drop span { font-size: 12.5px; color: var(--mute); }
.samples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .samples button { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line2); background: #1a1d36 center / 70% no-repeat; position: relative; overflow: hidden; } .samples button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); } .samples button span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; font-weight: 700; text-align: center; padding: 3px; background: rgba(5,6,12,.78); color: #d6dbf5; }
.note { font-size: 12.5px; color: var(--mute); line-height: 1.5; margin: 8px 0 0; } .note b { color: var(--soft); }
.codebar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
pre.code { margin: 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line2); background: var(--code-bg); font: 12px/1.65 var(--mono); max-height: calc(100vh - 360px); min-height: 220px; overflow: auto; white-space: pre; tab-size: 2; color: var(--code-ink); }
.tk-c { color: var(--tk-c); font-style: italic; } .tk-s { color: var(--tk-s); } .tk-k { color: var(--tk-k); } .tk-n { color: var(--tk-n); }
.prog { height: 8px; border-radius: 8px; background: var(--fill2); overflow: hidden; margin: 12px 0 6px; } .prog i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .15s linear; }
video.res { width: 100%; border-radius: 14px; border: 1px solid var(--line2); background: #000; margin-top: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--toast); color: var(--toast-ink); padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: 14px; box-shadow: 0 20px 50px -18px rgba(10,14,50,.7); transition: .3s var(--ease); pointer-events: none; z-index: 60; } .toast.on { opacity: 1; transform: translate(-50%, 0); }
.about { max-width: 560px; width: calc(100% - 32px); border: 1px solid var(--line2); border-radius: 22px; background: var(--panel); color: var(--ink); padding: 28px; font: 15px/1.6 var(--ui); box-shadow: 0 40px 90px -30px rgba(10,14,50,.6); } .about::backdrop { background: var(--scrim); backdrop-filter: blur(3px); } .about h2 { margin: 0 0 6px; font: 400 34px var(--serif); } .about ol { padding-left: 20px; color: var(--soft); } .about ol b { color: var(--ink); } .about p { color: var(--mute); font-size: 13.5px; }

@media (max-width: 1700px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1320px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ework { grid-template-columns: minmax(0, 1fr) 350px; } }
@media (max-width: 980px) {
  #gallery { padding: 0 18px 30px; } .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .hero { padding: 36px 0 18px; } .top { padding: 0 16px; }
  #editor { height: auto; } .ework { display: flex; flex-direction: column; } .stagecol { padding: 14px; } .frame { min-height: 0; padding: 14px 0; } .ins { border: 0; border-top: 1px solid var(--line); } .pane { overflow: visible; } pre.code { max-height: 420px; }
  .ebar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px 8px; padding: 10px 14px; } .ebar .grow { display: none; } .etitle { grid-column: 1 / -1; grid-row: 2; margin: 0; } .etitle h2 { font-size: 26px; } #eBack { grid-column: 1; } #ePrev { grid-column: 3; } #eNext { grid-column: 4; } #eExport { grid-column: 2; justify-self: end; }
}
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } .pill.hide-s { display: none; } .tab span { display: none; } .card .meta { padding: 10px 13px 12px; } .bar .cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; } .bar .cats::-webkit-scrollbar { display: none; } .cat { flex: none; } .time { min-width: 0; font-size: 11.5px; } .tip { display: none; } #eExport span { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

.pal i { box-shadow: inset 0 0 0 1px rgba(20,26,70,.12); }

/* ============ v3: polish and motion ============ */
kbd { font: 700 10.5px var(--mono); padding: 1px 6px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line2); color: var(--soft); margin-left: 4px; }
.btn, .ib, .cat, .pill, .tab { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled), .ib:active, .cat:active, .pill:active { transform: scale(.96); }
.rip { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .22; transform: scale(0); animation: rip .65s var(--ease) forwards; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }

/* hero */
.hero { position: relative; }
.hero::before { content: ""; position: absolute; z-index: -1; right: -8%; top: -30px; width: 520px; height: 520px; border-radius: 50%; background: conic-gradient(from 0deg, #6f8bff, #b57aff, #ff7ad9, #ffd27a, #74ecbe, #6f8bff); filter: blur(90px); opacity: .32; will-change: transform; animation: heroDrift 22s ease-in-out infinite alternate; pointer-events: none; }
:root[data-theme="dark"] .hero::before { opacity: .22; }
@keyframes heroDrift { from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); } to { transform: translate3d(-60px, 40px, 0) rotate(80deg) scale(1.12); } }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; } .chips span { display: inline-flex; gap: 6px; align-items: baseline; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--glass); backdrop-filter: blur(8px); font-size: 13px; color: var(--soft); } .chips b { font: 800 14px var(--ui); color: var(--ink); }
.hero > * { animation: rise .8s var(--ease) both; } .hero > :nth-child(2) { animation-delay: .06s; } .hero > :nth-child(3) { animation-delay: .12s; } .hero > :nth-child(4) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* cards */
.js .card:not(.in) { opacity: 0; transform: translateY(22px) scale(.985); }
.card { transition: transform .3s var(--ease), opacity .6s var(--ease), border-color .25s, box-shadow .35s; transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s; }
.card.in { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.card.in:hover, .card.in:focus-visible { transition-delay: 0s; transform: perspective(900px) translateY(-5px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.card .th img, .card .th canvas { transition: transform .8s var(--ease), opacity .5s; } .card:hover .th img, .card:hover .th canvas { transform: scale(1.05); }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.16), transparent 62%); opacity: 0; transition: opacity .3s; z-index: 4; } .card:hover::after { opacity: 1; }
.card .th.loading::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.12) 50%, transparent 80%) -100% 0 / 60% 100% no-repeat, #0b0d1c; animation: shimmer 1.4s linear infinite; } @keyframes shimmer { to { background-position: 220% 0; } }
.card .go { align-items: flex-end; justify-content: space-between; gap: 8px; } .go .cpp { pointer-events: auto; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.16); backdrop-filter: blur(8px); color: #fff; border-radius: 999px; height: 28px; padding: 0 11px; font: 700 12px var(--ui); display: inline-flex; gap: 6px; align-items: center; transition: .2s; } .go .cpp:hover { background: rgba(255,255,255,.3); } .go .cpp svg { width: 14px; height: 14px; }

/* view transitions between gallery and editor */
::view-transition-old(root) { animation: .24s var(--ease) both vtOut; } ::view-transition-new(root) { animation: .42s var(--ease) both vtIn; }
::view-transition-group(mv) { animation-duration: .55s; animation-timing-function: var(--ease); } ::view-transition-old(mv), ::view-transition-new(mv) { height: 100%; object-fit: cover; }
@keyframes vtOut { to { opacity: 0; transform: scale(.985); filter: blur(5px); } } @keyframes vtIn { from { opacity: 0; transform: scale(1.012); } }

/* tabs */
.tabs { position: relative; }
.tab[aria-selected="true"] { border-bottom-color: transparent; }
.tabs .ind { position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--w, 0); border-radius: 2px; background: var(--grad); transform: translateX(var(--x, 0)); transition: transform .35s var(--ease), width .35s var(--ease); pointer-events: none; }
.pane { animation: paneIn .35s var(--ease) both; } @keyframes paneIn { from { opacity: 0; transform: translateY(8px); } }

/* inspector accordions and scrubbable fields */
.grp > h3.acc { display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; padding: 2px 0; margin-bottom: 8px; } .grp > h3.acc::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--ease); } .grp.collapsed > h3.acc::after { transform: rotate(-45deg); }
.grp .abody { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .35s var(--ease); } .grp.collapsed .abody { grid-template-rows: 0fr; } .grp .abody > div { overflow: hidden; min-height: 0; padding: 2px 3px 0; margin: 0 -3px; }
.scr { cursor: ew-resize; user-select: none; touch-action: none; } .scr:hover { color: var(--ink); }
.val { width: 66px; height: 24px; border: 1px solid transparent; border-radius: 7px; background: transparent; text-align: right; font: 600 12px var(--mono); color: var(--ink); padding: 0 6px; outline: 0; } .val:hover { background: var(--fill); } .val:focus { background: var(--bg); border-color: var(--accent); }
.fld.chg > label .scr::after { content: "•"; color: var(--accent); margin-left: 6px; }

/* timeline */
.scrub { position: relative; padding-top: 30px; }
.scrub input[type=range] { height: 26px; } .scrub input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; } .scrub input[type=range]::-webkit-slider-thumb { width: 14px; height: 26px; margin-top: -10px; border-radius: 5px; background: var(--ink); border: 2px solid var(--panel); } :root[data-theme="dark"] .scrub input[type=range]::-webkit-slider-thumb { background: #fff; }
.ruler { position: absolute; left: 7px; right: 7px; top: 14px; height: 16px; pointer-events: none; } .ruler i { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--line2); } .ruler i.big { height: 11px; background: var(--mute); } .ruler b { position: absolute; top: -9px; transform: translateX(-50%); font: 600 9.5px var(--mono); color: var(--mute); }
.bub { position: absolute; top: 0; left: calc(7px + (100% - 14px) * var(--pc, 0)); transform: translateX(-50%); font: 700 11px var(--mono); padding: 2px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); pointer-events: none; white-space: nowrap; } .bub::after { content: ""; position: absolute; left: 50%; bottom: -4px; margin-left: -4px; border: 4px solid transparent; border-top-color: var(--ink); border-bottom: 0; }

/* prompt */
pre.code.wrap { white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.6; }

/* command palette */
dialog.cmd { padding: 0; border: 1px solid var(--line2); border-radius: 20px; width: min(620px, calc(100% - 28px)); margin-top: 11vh; background: var(--panel); color: var(--ink); box-shadow: 0 50px 100px -30px rgba(10,14,50,.7); overflow: hidden; } dialog.cmd::backdrop { background: var(--scrim); backdrop-filter: blur(4px); } dialog.cmd[open] { animation: cmdIn .28s var(--ease); } @keyframes cmdIn { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
.cmd-in { padding: 14px; } .cmd .search { max-width: none; } .cmd .search input { height: 48px; box-shadow: none; }
#cmdList { list-style: none; margin: 10px 0 0; padding: 0; max-height: 52vh; overflow: auto; } #cmdList li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; } #cmdList li[aria-selected="true"] { background: var(--fill2); } #cmdList img { width: 72px; height: 40px; border-radius: 8px; object-fit: cover; background: #0b0d1c; flex: none; } #cmdList b { display: block; font-size: 14.5px; } #cmdList span { font-size: 12px; color: var(--mute); }
.cmd-foot { margin: 10px 4px 2px; font-size: 12px; color: var(--mute); }

@media (prefers-reduced-motion: reduce) { .hero::before, .hero > *, .rip, .pane, .card .th.loading::before { animation: none !important; } .js .card:not(.in) { opacity: 1; transform: none; } }
@media (hover: none) { .card.in { transform: none; } .card::after { display: none; } }
@media (max-width: 560px) { .chips span:nth-child(n+3) { display: none; } #cmdBtn { display: none; } }
@media (max-width: 980px) {
  .ebar { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "back back prev next" "title title title title" "add save exp exp"; align-items: center; } #eAdd { grid-area: add; justify-self: start; } #eSave { grid-area: save; justify-self: start; }
  #eBack { grid-area: back; justify-self: start; } #ePrev { grid-area: prev; } #eNext { grid-area: next; } .etitle { grid-area: title; grid-column: auto; grid-row: auto; } #eExport { grid-area: exp; justify-self: end; }
}