@font-face { font-family: 'IS'; src: url(fonts/instrument-sans-latin-400-normal.woff2) format('woff2'); font-weight: 400; }
@font-face { font-family: 'IS'; src: url(fonts/instrument-sans-latin-500-normal.woff2) format('woff2'); font-weight: 500; }
@font-face { font-family: 'IS'; src: url(fonts/instrument-sans-latin-600-normal.woff2) format('woff2'); font-weight: 600; }
@font-face { font-family: 'IS'; src: url(fonts/instrument-sans-latin-700-normal.woff2) format('woff2'); font-weight: 700; }
@font-face { font-family: 'JBM'; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); font-weight: 500; }

:root {
  --bg: #0F0F0E; --panel: #151513; --raise: #1C1B19; --hover: #23221F; --line: #292824; --line2: #36342F;
  --text: #ECE7DD; --dim: #A39D91; --faint: #6E695F; --accent: #F2C230; --accent-ink: #15130B; --red: #E5533D; --ok: #7FB069;
  --r: 6px; color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F0E8; --panel: #FAF8F3; --raise: #FFFFFF; --hover: #EDE9DF; --line: #DDD7CA; --line2: #CFC8B9;
  --text: #191814; --dim: #5D5850; --faint: #8E887C; --accent: #E2AE14; --accent-ink: #15130B; --red: #C9412D; --ok: #4D7E3A;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 'IS', 'Segoe UI', system-ui, sans-serif; overflow: hidden; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: var(--text); background: var(--raise); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--line2); background: var(--hover); }
input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--accent); height: 22px; }
input[type=color] { padding: 2px; width: 34px; height: 30px; }
.mono, .num { font-family: 'JBM', ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.ic { flex: none; display: block; }

/* top bar */
.top { height: 52px; flex: none; display: flex; align-items: center; gap: 28px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--bg); -webkit-app-region: drag; }
.top button, .top .brand { -webkit-app-region: no-drag; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; cursor: pointer; }
.logo { width: 24px; height: 24px; fill: none; stroke-linecap: round; }
.logo .b1 { stroke: var(--text); stroke-width: 3; }
.logo .b2 { stroke: var(--accent); stroke-width: 3; }
.logo .pv { fill: var(--bg); stroke: var(--text); stroke-width: 1.5; }
.nav { display: flex; gap: 4px; }
.nav button { padding: 6px 12px; border-radius: var(--r); color: var(--dim); font-weight: 500; }
.nav button:hover { color: var(--text); }
.nav button.on { color: var(--text); background: var(--raise); }
.topr { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.theme-t { color: var(--faint); font-size: 12.5px; padding: 6px 8px; }
.theme-t:hover { color: var(--text); }
.plan { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line2); color: var(--dim); }
.plan.pro { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

main { flex: 1; min-height: 0; overflow: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 34px 32px 60px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r); font-weight: 600; border: 1px solid var(--line2); background: var(--raise); white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { height: 46px; padding: 0 22px; font-size: 15px; }
.btn.ghost { border-color: transparent; background: none; color: var(--dim); }
.btn.ghost:hover { color: var(--text); background: var(--raise); }
.btn.danger { color: var(--red); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.iconbtn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r); color: var(--dim); }
.iconbtn:hover { color: var(--text); background: var(--raise); }

/* home */
.drop { border: 1.5px dashed var(--line2); border-radius: 10px; padding: 46px 40px 40px; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; background: var(--panel); }
.drop.over { border-color: var(--accent); background: var(--raise); }
.drop h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -0.025em; line-height: 1.1; font-weight: 700; }
.drop p { margin: 0; color: var(--dim); }
.linkrow { display: flex; gap: 8px; margin-top: 22px; max-width: 640px; }
.linkrow input { height: 42px; }
.capsw { display: flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--dim); font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); padding: 2px; background: var(--raise); }
.seg button { padding: 5px 12px; border-radius: 4px; color: var(--dim); font-weight: 500; font-size: 13px; }
.seg button.on { background: var(--text); color: var(--bg); }
.hint { color: var(--faint); font-size: 12.5px; }

h2.sec { font-size: 13px; font-weight: 600; color: var(--dim); letter-spacing: .02em; margin: 40px 0 10px; display: flex; align-items: center; gap: 10px; }
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 64px 1fr 110px 90px 130px 120px; align-items: center; gap: 16px; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:hover { background: var(--panel); }
.row img, .row .noimg { width: 64px; height: 40px; object-fit: cover; border-radius: 4px; background: var(--raise); }
.row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { color: var(--faint); font-size: 12.5px; }
.row .act { display: flex; justify-content: flex-end; gap: 4px; }
.empty { color: var(--faint); padding: 18px 6px; }

.hero { display: grid; grid-template-columns: 210px 1fr; gap: 26px; margin-top: 34px; align-items: center; }
.hero .poster { aspect-ratio: 9/16; border-radius: 8px; overflow: hidden; background: #000; position: relative; cursor: pointer; }
.hero .poster img { width: 100%; height: 100%; object-fit: cover; }
.hero .label { font-size: 12px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.hero h3 { font-size: 26px; margin: 6px 0 8px; letter-spacing: -0.02em; line-height: 1.15; max-width: 640px; }

/* create */
.create { display: grid; grid-template-columns: minmax(420px, 520px) 1fr; height: 100%; }
.side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.side-h { padding: 18px 22px 0; }
.side-h .t { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.side-h .s { color: var(--faint); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 2px; padding: 14px 18px 0; border-bottom: 1px solid var(--line); }
.tabs button { padding: 8px 10px 10px; color: var(--dim); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--text); border-color: var(--accent); }
.side-b { flex: 1; overflow: auto; padding: 6px 22px 30px; }
.side-f { padding: 12px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.side-f .grow { flex: 1; }
.f { padding: 16px 0; border-bottom: 1px solid var(--line); }
.f:last-child { border-bottom: 0; }
.lab { font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .09em; text-transform: uppercase; margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.lab .r { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; font-family: 'JBM', monospace; color: var(--dim); }
.pro-tag { font-size: 10px; letter-spacing: .08em; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--accent); color: var(--accent); font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line2); color: var(--dim); font-size: 13px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.locked { opacity: .55; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode { border: 1px solid var(--line2); border-radius: var(--r); padding: 12px; display: flex; gap: 11px; align-items: flex-start; text-align: left; }
.mode b { display: block; font-weight: 600; }
.mode span { color: var(--faint); font-size: 12.5px; }
.mode.on { border-color: var(--accent); background: var(--raise); }
.mode.on .ic { color: var(--accent); }
.tog { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
.tog .tl b { font-weight: 600; display: block; }
.tog .tl span { color: var(--faint); font-size: 12.5px; }
.sw { width: 36px; height: 20px; border-radius: 99px; background: var(--line2); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); transition: left .15s; }
.sw.on { background: var(--accent); }
.sw.on::after { left: 19px; background: var(--accent-ink); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: var(--r); }
.stepper button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--dim); }
.stepper span { min-width: 34px; text-align: center; font-family: 'JBM', monospace; }
.ranges .rg { display: grid; grid-template-columns: 1fr 88px 88px 30px; gap: 6px; align-items: center; margin-bottom: 6px; }
.ranges .rg input { padding: 6px 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(128,128,128,.4); position: relative; }
.swatch.on { outline: 2px solid var(--text); outline-offset: 2px; }
.swatch.auto { font-size: 9px; font-weight: 700; color: var(--dim); display: grid; place-items: center; background: var(--raise); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme { height: 74px; border-radius: var(--r); border: 1px solid var(--line); background: #1A1D1F center/cover; position: relative; overflow: hidden; display: grid; place-items: center; padding: 6px; }
.theme::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.38); }
.theme .smp { position: relative; text-align: center; line-height: 1.05; }
.theme .nm { position: absolute; left: 6px; bottom: 4px; font-size: 11px; color: #EDE8DE; font-weight: 600; text-shadow: 0 1px 2px #000; }
.theme.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme .pro-tag { position: absolute; right: 5px; top: 5px; background: rgba(0,0,0,.6); }
.looks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.look { text-align: left; }
.look .im { position: relative; aspect-ratio: 9/16; border-radius: 5px; background: var(--raise) center/cover; border: 1px solid var(--line); max-height: 120px; width: 100%; }
.look span { font-size: 12px; color: var(--dim); display: block; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look.on .im { outline: 2px solid var(--accent); outline-offset: 1px; }
.look.on span { color: var(--text); }
.grid9 { display: grid; grid-template-columns: repeat(3, 26px); gap: 4px; }
.grid9 button { width: 26px; height: 26px; border-radius: 4px; border: 1px solid var(--line2); }
.grid9 button.on { background: var(--accent); border-color: var(--accent); }

/* preview */
.stage { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.stage-b { flex: 1; min-height: 0; display: grid; place-items: center; padding: 22px; position: relative; }
.stage-f { padding: 10px 20px; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; color: var(--faint); font-size: 12.5px; }
.phone { position: relative; background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line2), 0 22px 60px rgba(0,0,0,.45); }
.phone video, .phone .pv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone .bgblur { filter: blur(18px) brightness(.75); transform: scale(1.15); }
.phone .fit { object-fit: contain; }
.phone .half { position: absolute; left: 0; right: 0; overflow: hidden; }
.phone .half video { object-fit: cover; }
.phone .game-b { position: absolute; inset: 0; animation: gamebg 6s linear infinite; background-size: 300% 300%; }
@keyframes gamebg { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
.ov { position: absolute; inset: 0; pointer-events: none; }
.ov .cap { position: absolute; left: 6%; right: 6%; text-align: center; transform: translateY(-50%); line-height: 1.12; }
.ov .cap .w { display: inline-block; margin: 0 .12em; }
.ov .ttl { position: absolute; top: 11%; left: 8%; right: 8%; text-align: center; }
.ov .ttl span { display: inline; padding: .12em .35em; line-height: 1.5; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ov .sig { position: absolute; font-weight: 800; }
.ov .bar { position: absolute; left: 0; height: 1%; min-height: 3px; animation: grow 8s linear infinite; }
@keyframes grow { from { width: 0; } to { width: 100%; } }
.exact { position: absolute; right: 18px; top: 16px; display: flex; gap: 8px; }

/* run */
.run { max-width: 1060px; margin: 0 auto; padding: 44px 32px; }
.run .lab2 { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; }
.run .big { font-size: 46px; line-height: 1.08; letter-spacing: -0.035em; font-weight: 700; margin: 12px 0 0; min-height: 2.2em; }
.run .big .lw { color: var(--accent); }
.run .big .fw { color: var(--faint); }
.pct { display: flex; align-items: flex-end; gap: 14px; margin-top: 34px; }
.pct .n { font-family: 'JBM', monospace; font-size: 64px; line-height: 1; letter-spacing: -0.04em; }
.pct .n small { font-size: 24px; color: var(--accent); }
.pct .d { margin-left: auto; color: var(--dim); font-size: 13px; padding-bottom: 8px; }
.track { height: 3px; background: var(--line); margin-top: 12px; position: relative; overflow: hidden; }
.track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); transition: width .4s; }
.track.busy i { width: 30% !important; animation: busy 1.3s ease-in-out infinite; }
@keyframes busy { from { left: -30%; } to { left: 100%; } }
.steps { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12.5px; color: var(--faint); font-weight: 600; }
.steps .now { color: var(--accent); }
.steps .done { color: var(--text); }

/* results */
.res-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.res-h h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.res-h .s { color: var(--faint); }
.res-h .grow { flex: 1; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 18px; }
.card { cursor: pointer; }
.card .pv { aspect-ratio: 9/16; border-radius: 8px; overflow: hidden; position: relative; background: #000; }
.card .pv img, .card .pv video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .sc { position: absolute; left: 8px; top: 8px; font-family: 'JBM', monospace; font-size: 12px; font-weight: 500; padding: 2px 7px; border-radius: 4px; background: rgba(0,0,0,.66); color: #fff; }
.card .sc.hi { background: var(--accent); color: var(--accent-ink); }
.card .ln { position: absolute; right: 8px; bottom: 8px; font-family: 'JBM', monospace; font-size: 11.5px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.66); color: #fff; }
.card .tt { font-weight: 600; margin-top: 9px; line-height: 1.3; }
.card .why { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.card .acts { display: flex; gap: 2px; margin-top: 6px; margin-left: -8px; }

/* clip editor */
.ed { display: grid; grid-template-columns: 1fr 460px; height: 100%; min-height: 0; }
.ed .side { min-height: 0; }
.ed .vid { display: grid; place-items: center; padding: 22px; min-height: 0; background: var(--bg); position: relative; }
.ed video { height: calc(100vh - 110px); max-width: 100%; aspect-ratio: auto; border-radius: 10px; background: #000; }
.lines { display: flex; flex-direction: column; }
.line { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); align-items: start; }
.line .tm { font-family: 'JBM', monospace; font-size: 12px; color: var(--accent); padding-top: 3px; cursor: pointer; }
.line input { background: transparent; border-color: transparent; padding: 2px 6px; }
.line input:hover { border-color: var(--line); }
.line.cur { background: var(--raise); }

/* settings */
.set { max-width: 760px; }
.set .blk { padding: 22px 0; border-bottom: 1px solid var(--line); }
.set .blk h3 { margin: 0 0 4px; font-size: 16px; }
.set .blk p { margin: 0 0 12px; color: var(--dim); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; color: var(--dim); }
.kv b { color: var(--text); font-weight: 500; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mrow .grow { flex: 1; }
.dev { font-family: 'JBM', monospace; font-size: 18px; letter-spacing: .08em; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--r); font-weight: 500; opacity: 0; pointer-events: none; transition: all .2s; max-width: 640px; z-index: 50; }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--red); color: #fff; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 40; }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 24px; width: 460px; }
.modal h3 { margin: 0 0 6px; }
.modal p { color: var(--dim); margin: 0 0 16px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.look .im .pro-tag { position: absolute; right: 4px; top: 4px; background: rgba(0,0,0,.6); }

/* ---- app skins (Settings > App look) ---- */
@font-face { font-family: 'SG'; src: url(fonts/SpaceGrotesk_700Bold.ttf); font-weight: 700; }
@font-face { font-family: 'DMS'; src: url(fonts/DMSerifDisplay_400Regular.ttf); }
@font-face { font-family: 'BC'; src: url(fonts/BarlowCondensed_800ExtraBold.ttf); font-weight: 800; }
/* 1. Studio: graphite like a pro editor, one red, square corners */
:root[data-skin="studio"] { --bg: #1B1C1E; --panel: #222326; --raise: #2A2B2F; --hover: #313237; --line: #34363B; --line2: #43454B; --text: #F1F1F2; --dim: #A9ABB1; --faint: #74767D; --accent: #FF3B2F; --accent-ink: #FFFFFF; --r: 2px; }
:root[data-skin="studio"] .drop h1, :root[data-skin="studio"] .res-h h1, :root[data-skin="studio"] .side-h .t, :root[data-skin="studio"] .run .big, :root[data-skin="studio"] .hero h3 { font-family: 'BC', 'IS', sans-serif; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
:root[data-skin="studio"] .chip, :root[data-skin="studio"] .plan { border-radius: 2px; }
/* 2. Paper: light, editorial serif titles, black buttons */
:root[data-skin="paper"] { --bg: #EFEBE3; --panel: #F7F4EE; --raise: #FFFFFF; --hover: #E7E2D7; --line: #D9D3C6; --line2: #C9C1B1; --text: #141311; --dim: #57524A; --faint: #8C867A; --accent: #141311; --accent-ink: #F7F4EE; --red: #C23B22; --r: 4px; color-scheme: light; }
:root[data-skin="paper"] .drop h1, :root[data-skin="paper"] .res-h h1, :root[data-skin="paper"] .side-h .t, :root[data-skin="paper"] .run .big, :root[data-skin="paper"] .hero h3, :root[data-skin="paper"] .set .blk h3 { font-family: 'DMS', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
:root[data-skin="paper"] .tabs button.on { border-color: #C23B22; }
:root[data-skin="paper"] .logo .b2 { stroke: #C23B22; }
:root[data-skin="paper"] .run .big .lw, :root[data-skin="paper"] .pct .n small { color: #C23B22; }
/* 3. Night lab: true black, amber, mono titles */
:root[data-skin="lab"] { --bg: #050505; --panel: #0C0C0C; --raise: #141414; --hover: #1B1B1B; --line: #1F1F1F; --line2: #2E2E2E; --text: #E9E6DF; --dim: #9A968D; --faint: #625F58; --accent: #FFAA00; --accent-ink: #050505; --r: 0px; }
:root[data-skin="lab"] .drop h1, :root[data-skin="lab"] .res-h h1, :root[data-skin="lab"] .side-h .t, :root[data-skin="lab"] .run .big, :root[data-skin="lab"] .hero h3, :root[data-skin="lab"] .brand { font-family: 'JBM', monospace; font-weight: 500; letter-spacing: -0.02em; }
:root[data-skin="lab"] .drop { border-style: solid; border-width: 1px; }
:root[data-skin="lab"] .chip, :root[data-skin="lab"] .plan, :root[data-skin="lab"] .seg, :root[data-skin="lab"] .seg button { border-radius: 0; }
/* 4. Mono: no colour at all, white on charcoal, bold grotesk */
:root[data-skin="mono"] { --bg: #161616; --panel: #1C1C1C; --raise: #242424; --hover: #2B2B2B; --line: #2C2C2C; --line2: #3A3A3A; --text: #FAFAFA; --dim: #A6A6A6; --faint: #6B6B6B; --accent: #FAFAFA; --accent-ink: #111111; --r: 999px; }
:root[data-skin="mono"] .drop h1, :root[data-skin="mono"] .res-h h1, :root[data-skin="mono"] .side-h .t, :root[data-skin="mono"] .run .big, :root[data-skin="mono"] .hero h3, :root[data-skin="mono"] .brand { font-family: 'SG', 'IS', sans-serif; font-weight: 700; letter-spacing: -0.03em; }
:root[data-skin="mono"] .drop, :root[data-skin="mono"] .theme, :root[data-skin="mono"] .mode, :root[data-skin="mono"] .card .pv, :root[data-skin="mono"] .look .im, :root[data-skin="mono"] input, :root[data-skin="mono"] select, :root[data-skin="mono"] textarea { border-radius: 14px; }
:root[data-skin="mono"] .logo .b2 { stroke: #FAFAFA; }

/* ---- X1 ORBIT look (default): light grey room, white floating cards, blue glass buttons, the spectrum for emphasis ---- */
@font-face { font-family: 'Geist'; src: url(fonts/geist-sans-latin-400-normal.woff2) format('woff2'); font-weight: 400; }
@font-face { font-family: 'Geist'; src: url(fonts/geist-sans-latin-500-normal.woff2) format('woff2'); font-weight: 500; }
@font-face { font-family: 'Geist'; src: url(fonts/geist-sans-latin-600-normal.woff2) format('woff2'); font-weight: 600; }
@font-face { font-family: 'Geist'; src: url(fonts/geist-sans-latin-700-normal.woff2) format('woff2'); font-weight: 700; }
@font-face { font-family: 'Geist'; src: url(fonts/geist-sans-latin-800-normal.woff2) format('woff2'); font-weight: 800; }
@font-face { font-family: 'GeistMono'; src: url(fonts/geist-mono-latin-500-normal.woff2) format('woff2'); font-weight: 500; }
:root[data-skin="orbit"] {
  --bg: #F5F5F7; --panel: #FFFFFF; --raise: #F5F5F7; --hover: #EDEDF0; --line: #0000000F; --line2: #0000001F;
  --text: #1D1D1F; --dim: #3A3A3C; --faint: #6E6E73; --accent: #0071E3; --accent-ink: #FFFFFF; --red: #D70015; --ok: #1A8F4C;
  --spec: linear-gradient(90deg, #0A84FF, #5E5CE6 35%, #BF5AF2 68%, #FF375F); --r: 12px; color-scheme: light;
}
:root[data-skin="orbit"][data-theme="dark"] { --bg: #0B0B0F; --panel: #16161B; --raise: #1E1E25; --hover: #26262E; --line: #FFFFFF14; --line2: #FFFFFF24; --text: #F5F5F7; --dim: #C7C7CC; --faint: #8E8E93; --accent: #2A8CFF; color-scheme: dark; }
:root[data-skin="orbit"] body { font-family: 'Geist', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif; letter-spacing: -0.011em; background: var(--bg); }
:root[data-skin="orbit"] body::before { content: ''; position: fixed; inset: -10%; z-index: -1; pointer-events: none; animation: orbit-drift 40s ease-in-out infinite alternate;
  background: radial-gradient(42rem 30rem at 8% -6%, #0A84FF14, transparent 65%), radial-gradient(40rem 30rem at 100% 0%, #BF5AF212, transparent 65%),
    radial-gradient(44rem 30rem at 90% 110%, #FF375F0D, transparent 65%), radial-gradient(36rem 26rem at -4% 100%, #5E5CE60F, transparent 65%); }
@keyframes orbit-drift { from { transform: translate3d(-2%, -1%, 0); } to { transform: translate3d(2%, 2%, 0); } }
:root[data-skin="orbit"] .mono, :root[data-skin="orbit"] .num, :root[data-skin="orbit"] .pct .n, :root[data-skin="orbit"] .lab .r { font-family: 'GeistMono', Consolas, monospace; letter-spacing: -0.02em; }
:root[data-skin="orbit"] .top { background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(18px); border-bottom-color: var(--line); }
:root[data-skin="orbit"] .nav button.on { background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 1px 2px #0000000a; position: relative; }
:root[data-skin="orbit"] .nav button.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--spec); }
:root[data-skin="orbit"] .drop, :root[data-skin="orbit"] .side, :root[data-skin="orbit"] .modal, :root[data-skin="orbit"] .rows {
  background: var(--panel); border: 0; box-shadow: 0 0 0 1px #0000000A, 0 1px 2px #0000000A, 0 24px 48px -32px #1D1D4A40; }
:root[data-skin="orbit"] .drop { border-radius: 24px; }
:root[data-skin="orbit"] .drop.over { box-shadow: 0 0 0 2px var(--accent), 0 24px 48px -32px #1D1D4A40; }
:root[data-skin="orbit"] .rows { border-radius: 20px; padding: 6px 10px; }
:root[data-skin="orbit"] .row:last-child { border-bottom: 0; }
:root[data-skin="orbit"] .create { gap: 18px; padding: 18px; }
:root[data-skin="orbit"] .side { border-radius: 24px; overflow: hidden; }
:root[data-skin="orbit"] .stage-f { border-top: 0; }
:root[data-skin="orbit"] .side-f { border-top-color: var(--line); }
:root[data-skin="orbit"] .drop h1, :root[data-skin="orbit"] .res-h h1, :root[data-skin="orbit"] .run .big, :root[data-skin="orbit"] .hero h3, :root[data-skin="orbit"] .set .res-h h1 {
  font-weight: 800; letter-spacing: -0.035em; }
:root[data-skin="orbit"] .drop h1, :root[data-skin="orbit"] .res-h h1, :root[data-skin="orbit"] .set .res-h h1 { background: var(--spec); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
:root[data-skin="orbit"] .side-h .t { font-weight: 700; letter-spacing: -0.02em; }
:root[data-skin="orbit"] .btn { border-radius: 999px; background: var(--panel); border-color: var(--line2); }
:root[data-skin="orbit"] .btn.primary { background: linear-gradient(180deg, #2A8CFF, #0071E3); color: #fff; border: 0;
  box-shadow: inset 0 1px 0 #FFFFFF73, inset 0 -1px 0 #0000001F, 0 10px 22px -10px #0071E3CC; }
:root[data-skin="orbit"] .btn.ghost { background: none; }
:root[data-skin="orbit"] .chip { border-color: var(--line2); background: var(--panel); }
:root[data-skin="orbit"] .chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
:root[data-skin="orbit"] .seg { border-radius: 13px; background: #EFEFF2; border: 0; padding: 4px; }
:root[data-skin="orbit"][data-theme="dark"] .seg { background: var(--raise); }
:root[data-skin="orbit"] .seg button { border-radius: 10px; }
:root[data-skin="orbit"] .seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px #00000014, 0 0 0 1px #0000000A; }
:root[data-skin="orbit"] .mode, :root[data-skin="orbit"] .theme, :root[data-skin="orbit"] .look .im, :root[data-skin="orbit"] input, :root[data-skin="orbit"] select, :root[data-skin="orbit"] textarea { border-radius: 14px; }
:root[data-skin="orbit"] input, :root[data-skin="orbit"] select, :root[data-skin="orbit"] textarea { background: var(--raise); border-color: transparent; }
:root[data-skin="orbit"] .mode.on { border-color: var(--accent); background: #0071E30D; }
:root[data-skin="orbit"] .tabs button.on { border-image: var(--spec) 1; }
:root[data-skin="orbit"] .sw.on { background: #34C759; }
:root[data-skin="orbit"] .sw.on::after { background: #fff; }
:root[data-skin="orbit"] .sw::after { background: #fff; box-shadow: 0 1px 3px #0000003a; }
:root[data-skin="orbit"] .plan { border-radius: 999px; }
:root[data-skin="orbit"] .plan.pro { background: var(--spec); color: #fff; border: 0; }
:root[data-skin="orbit"] .card .pv, :root[data-skin="orbit"] .hero .poster, :root[data-skin="orbit"] .phone { border-radius: 22px; box-shadow: 0 0 0 1px #0000000A, 0 30px 60px -30px #1D1D4A66; }
:root[data-skin="orbit"] .card .sc.hi { background: var(--spec); color: #fff; }
:root[data-skin="orbit"] .track { height: 4px; border-radius: 4px; background: #0000000D; }
:root[data-skin="orbit"] .track i { background: var(--spec); border-radius: 4px; }
:root[data-skin="orbit"] .run .big .lw { background: var(--spec); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-skin="orbit"] .pct .n small { color: #5E5CE6; }
:root[data-skin="orbit"] .steps .now { color: #5E5CE6; }
:root[data-skin="orbit"] .logo .b2 { stroke: #5E5CE6; }
:root[data-skin="orbit"] .ed .side { border-radius: 0; box-shadow: none; border-left: 1px solid var(--line); }
:root[data-skin="orbit"] .grid9 button.on { background: var(--accent); }
:root[data-skin="orbit"] .stepper { border-radius: 999px; background: var(--panel); }
:root[data-skin="orbit"] #toast { border-radius: 999px; }

.prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 4px; max-width: 620px; }
.prices div { background: var(--raise); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; }
.prices span { color: var(--faint); font-size: 12.5px; }
.prices b { font-size: 18px; }

/* ---- phone and small windows ---- */
@media (max-width: 760px) {
  body { overflow: auto; }
  .top { gap: 10px; padding: 0 12px; height: 52px; position: sticky; top: 0; z-index: 10; }
  .brand span { display: none; }
  .nav { gap: 0; overflow-x: auto; }
  .nav button { padding: 6px 9px; }
  #themeT, #siteT { display: none; }
  main { overflow: visible; }
  .wrap { padding: 18px 16px 50px; }
  .drop { grid-template-columns: 1fr; padding: 24px 18px; gap: 16px; }
  .drop h1 { font-size: 24px; }
  .linkrow { flex-direction: column; }
  .linkrow .btn, .drop > .btn { width: 100%; }
  .capsw { flex-wrap: wrap; }
  .hero { grid-template-columns: 110px 1fr; gap: 14px; }
  .hero h3 { font-size: 18px; }
  .row { grid-template-columns: 56px 1fr auto; gap: 10px; }
  .row > :nth-child(3), .row > :nth-child(4), .row > :nth-child(5) { display: none; }
  .row .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .create, :root[data-skin="orbit"] .create { grid-template-columns: 1fr; height: auto; padding: 10px; gap: 12px; }
  .stage { order: -1; }
  .stage-b { padding: 8px; min-height: 0; }
  .stage-f { flex-wrap: wrap; padding: 8px 4px; }
  .side { min-height: 70vh; }
  .side-b { max-height: none; overflow: visible; }
  .side-f { position: sticky; bottom: 0; background: var(--panel); }
  .tabs { overflow-x: auto; padding: 10px 10px 0; }
  .tabs button { white-space: nowrap; }
  .themes { grid-template-columns: repeat(2, 1fr); }
  .looks { grid-template-columns: repeat(3, 1fr); }
  .two, .three { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr; }
  .ranges .rg { grid-template-columns: 1fr 70px 70px 30px; }
  .run { padding: 28px 16px; }
  .run .big { font-size: 30px; }
  .pct .n { font-size: 48px; }
  .steps { flex-wrap: wrap; gap: 6px 12px; }
  .res-h { flex-wrap: wrap; }
  .res-h h1 { font-size: 22px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
  .ed { grid-template-columns: 1fr; height: auto; }
  .ed .vid { padding: 10px; }
  .ed video { height: auto; max-height: 70vh; width: auto; max-width: 100%; }
  .prices { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: 1fr; }
  .modal { width: calc(100vw - 32px); }
}

/* ---- home: three sections ---- */
.sect-l { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.drop.main { box-shadow: 0 0 0 2px var(--accent), 0 24px 48px -32px #1D1D4A40; }
:root[data-skin="orbit"] .drop.main { box-shadow: 0 0 0 2px #0071E3, 0 30px 60px -34px #0071E366; }
.hs-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.tool { display: flex; align-items: center; gap: 16px; text-align: left; padding: 20px 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
:root[data-skin="orbit"] .tool { border: 0; box-shadow: 0 0 0 1px #0000000A, 0 1px 2px #0000000A, 0 24px 48px -32px #1D1D4A40; }
.tool:hover { background: var(--raise); }
.tool .ti { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--raise); color: var(--accent); flex: none; }
.tool b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.tool em { font-style: normal; color: var(--faint); font-size: 13px; }
.tool > span:nth-child(2) { flex: 1; }
.row.row2 { grid-template-columns: 64px 1fr auto; }
.row .noimg { display: grid; place-items: center; color: var(--faint); }

/* ---- video editor ---- */
.ve, .pe { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ve-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.ve-top .grow { flex: 1; }
.ve-top select { width: auto; }
.ve-name { width: 240px; font-weight: 600; background: transparent; border-color: transparent; }
.ve-name:hover, .ve-name:focus { border-color: var(--line2); }
.ve-mid { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px 1fr 330px; grid-template-rows: minmax(0, 1fr); }
.ve-bin { border-right: 1px solid var(--line); padding: 12px; overflow: auto; background: var(--panel); }
.ve-items { display: flex; flex-direction: column; gap: 6px; }
.ve-m { display: grid; grid-template-columns: 54px 1fr auto; gap: 8px; align-items: center; padding: 5px; border-radius: 10px; cursor: grab; }
.ve-m:hover { background: var(--raise); }
.ve-m img, .ve-mi { width: 54px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--raise); display: grid; place-items: center; color: var(--faint); }
.ve-mn { min-width: 0; } .ve-mn b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ve-mn span { font-size: 11.5px; color: var(--faint); }
.ve-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; padding: 12px; gap: 8px; }
.ve-frame { position: relative; overflow: hidden; border-radius: 12px; background: #000; box-shadow: 0 0 0 1px var(--line2), 0 22px 50px -24px rgba(0,0,0,.45); }
.ve-frame #veC { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.ve-ctrl { display: flex; align-items: center; gap: 10px; }
.ve-insp { border-left: 1px solid var(--line); overflow: auto; background: var(--panel); }
.ve-tabs { padding: 8px 10px 0; flex-wrap: wrap; row-gap: 2px; }
.ve-tabs button { white-space: nowrap; font-size: 13px; padding: 7px 8px 9px; }
.ve-ib { padding: 4px 16px 20px; }
.ve-tools { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.ve-tools .grow { flex: 1; }
.ve-sep { width: 1px; height: 22px; background: var(--line2); margin: 0 4px; }
.ve-tl { flex: none; height: 210px; overflow: auto; background: var(--bg); border-top: 1px solid var(--line); position: relative; user-select: none; touch-action: none; }
.ve-tli { position: relative; min-height: 100%; padding-bottom: 6px; }
.ve-ruler { height: 22px; position: relative; margin-left: 70px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ve-ruler span { position: absolute; top: 4px; font: 10.5px 'GeistMono', 'JBM', monospace; color: var(--faint); transform: translateX(-2px); }
.ve-track { position: relative; height: 40px; margin-top: 5px; padding-left: 70px; }
.ve-track > i { position: absolute; left: 8px; top: 12px; font-style: normal; font-size: 11px; color: var(--faint); font-weight: 600; }
.ve-b { position: absolute; top: 0; height: 38px; margin-left: 70px; border-radius: 8px; overflow: hidden; cursor: grab; background: var(--raise) center/auto 100% repeat-x; box-shadow: inset 0 0 0 1px var(--line2); }
.ve-b em { position: absolute; left: 8px; right: 8px; bottom: 3px; font-style: normal; font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ve-b.text { background: #5E5CE6; } .ve-b.over { background: #BF5AF2; } .ve-b.audio { background: #1A8F4C; } .ve-b.caps { background: #0071E3; opacity: .85; }
.ve-b.on { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--accent); z-index: 2; }
.ve-b .h { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; background: rgba(255,255,255,.0); }
.ve-b.on .h { background: rgba(255,255,255,.85); }
.ve-b .h.l { left: 0; } .ve-b .h.r { right: 0; }
.ve-b u { position: absolute; right: 0; transform: translateX(50%); top: 10px; width: 10px; height: 18px; background: rgba(255,255,255,.88); border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); z-index: 2; }
.ve-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); pointer-events: none; z-index: 5; }
.ve-head::before { content: ''; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: var(--red); }

/* ---- photo editor ---- */
.pe-mid { flex: 1; min-height: 0; display: grid; grid-template-columns: 96px 1fr 330px; grid-template-rows: minmax(0, 1fr); }
.pe-tools { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--panel); }
.pe-tools button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; color: var(--dim); font-size: 11.5px; font-weight: 600; text-align: center; }
.pe-tools button.on { background: var(--raise); color: var(--text); }
.pe-tools button.on .ic { color: var(--accent); }
.pe-stage { display: grid; place-items: center; min-width: 0; min-height: 0; padding: 14px; background: var(--bg); background-image: linear-gradient(45deg, #0000000a 25%, transparent 25%, transparent 75%, #0000000a 75%), linear-gradient(45deg, #0000000a 25%, transparent 25%, transparent 75%, #0000000a 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.pe-stage canvas { box-shadow: 0 0 0 1px var(--line2), 0 22px 50px -24px rgba(0,0,0,.45); border-radius: 6px; cursor: grab; touch-action: none; }
.looks canvas.im { width: 100%; height: auto; aspect-ratio: auto; max-height: 120px; object-fit: cover; }

@media (max-width: 760px) {
  .hs-tools { grid-template-columns: 1fr; }
  .ve-mid, .pe-mid { grid-template-columns: 1fr; }
  .ve-bin { max-height: 140px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ve-insp { border-left: 0; border-top: 1px solid var(--line); max-height: 40vh; }
  .pe-tools { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .ve-name { width: 130px; }
}

/* ---------------- Home: the stage (always a dark monitor, so video and captions read true) */
.home { max-width: 1240px; }
.hs { --st-bg: #0B0C10; --st-ink: #F5F5F7; --st-dim: #A1A1AA; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: 1fr auto; gap: 0 28px;
  min-height: 560px; padding: 56px 48px 0; border-radius: 28px; color: var(--st-ink); overflow: hidden; isolation: isolate;
  background: radial-gradient(60rem 30rem at 85% -10%, #1B2A4A 0%, transparent 60%), radial-gradient(40rem 26rem at -10% 110%, #2A1424 0%, transparent 60%), var(--st-bg);
  box-shadow: 0 0 0 1px #FFFFFF10 inset, 0 40px 80px -40px #0B0C1099; }
.hs.over { box-shadow: 0 0 0 2px #2A8CFF inset, 0 40px 80px -40px #0B0C1099; }
.hs-copy { align-self: center; max-width: 520px; padding-bottom: 40px; }
.hs h1 { font-family: 'Geist', system-ui, sans-serif; font-weight: 800; font-size: clamp(40px, 4.6vw, 64px); line-height: 1.0; letter-spacing: -0.045em; margin: 0 0 18px; color: var(--st-ink); text-wrap: balance; background: none; }
.hs p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--st-dim); max-width: 46ch; }
.hs-go { display: flex; align-items: center; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.hs-go span { font-size: 13px; color: var(--st-dim); }
.hs .btn.primary.big { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 999px; background: linear-gradient(180deg, #2A8CFF, #0071E3); color: #fff; border: 0; box-shadow: 0 1px 0 #FFFFFF40 inset, 0 14px 30px -12px #0A84FFAA; transition: transform .15s ease, box-shadow .15s ease; }
.hs .btn.primary.big:hover { transform: translateY(-1px); box-shadow: 0 1px 0 #FFFFFF40 inset, 0 18px 36px -12px #0A84FFCC; }
.hs-opts { margin-top: 26px; padding-top: 22px; border-top: 1px solid #FFFFFF14; }
.hs .linkrow { margin-top: 0; }
.hs .linkrow input { background: #FFFFFF0D; border: 1px solid #FFFFFF1A; color: var(--st-ink); border-radius: 999px; padding: 0 16px; }
.hs .linkrow input::placeholder { color: #8E8E93; }
.hs .linkrow .btn { background: #FFFFFF12; border: 1px solid #FFFFFF1F; color: var(--st-ink); height: 42px; }
.hs .capsw { color: var(--st-dim); margin-top: 14px; }
.hs .seg { background: #FFFFFF0D; border-color: #FFFFFF1A; border-radius: 999px; }
.hs .seg button { color: var(--st-dim); border-radius: 999px; }
.hs .seg button.on { background: #F5F5F7; color: #0B0C10; }
.hs-clips { position: relative; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px 0 26px; }
.hs-f { position: relative; width: 31%; max-width: 200px; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; background: #000; transform: scale(.9) translateY(10px); opacity: .78;
  box-shadow: 0 0 0 1px #FFFFFF14, 0 30px 60px -30px #000; transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .7s ease, box-shadow .7s ease; }
.hs-f.on { transform: scale(1.06) translateY(-6px); opacity: 1; box-shadow: 0 0 0 1px #FFFFFF2E, 0 40px 70px -28px #000, 0 0 0 6px #FFFFFF08; z-index: 1; }
.hs-f canvas { width: 100%; height: 100%; display: block; }
.hs-strip { grid-column: 1 / -1; width: calc(100% + 96px); margin: 0 -48px; height: 92px; display: block; border-top: 1px solid #FFFFFF12; background: linear-gradient(180deg, #FFFFFF05, #FFFFFF00); }
@media (prefers-reduced-motion: reduce) { .hs-f, .hs .btn.primary.big { transition: none; } }

/* the two editors: each shows a small picture of what it does */
.hs-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.hs-tool { display: grid; grid-template-columns: 148px 1fr auto; align-items: center; gap: 20px; padding: 18px 22px 18px 18px; border-radius: 22px; text-align: left; background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 24px 48px -36px #1D1D4A55; transition: box-shadow .2s ease, transform .2s ease; }
.hs-tool:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line2), 0 30px 54px -34px #1D1D4A77; }
.hs-tool:focus-visible, .hs-pos:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hs-tt b { display: block; font-size: 18px; letter-spacing: -0.02em; margin-bottom: 4px; }
.hs-tt em { font-style: normal; color: var(--faint); font-size: 13.5px; line-height: 1.45; display: block; max-width: 40ch; }
.hs-open { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: color-mix(in oklab, var(--accent) 10%, transparent); }
.hs-mini { position: relative; height: 104px; border-radius: 14px; overflow: hidden; background: #0B0C10; display: block; }
.ve-mini i { position: absolute; left: 10px; right: 10px; height: 16px; display: block; }
.ve-mini .r1 { top: 14px; } .ve-mini .r2 { top: 38px; } .ve-mini .r3 { top: 62px; }
.ve-mini b { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.ve-mini .r1 b { background: linear-gradient(180deg, #3B82F6, #2563EB); } .ve-mini .r2 b { background: #5E5CE6; } .ve-mini .r3 b { background: #1A8F4C; height: 10px; top: 3px; }
.ve-mini u { position: absolute; top: 8px; bottom: 8px; left: 14%; width: 2px; background: #FF375F; border-radius: 1px; box-shadow: 0 0 0 3px #FF375F22; }
.hs-tool:hover .ve-mini u { animation: hs-head 2.4s linear infinite; }
@keyframes hs-head { from { left: 4%; } to { left: 94%; } }
.pe-mini canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pe-mini .b { clip-path: inset(0 0 0 50%); }
.pe-mini i { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 10px #0009; display: block; }
.hs-tool:hover .pe-mini .b { animation: hs-clip 2.6s ease-in-out infinite alternate; }
.hs-tool:hover .pe-mini i { animation: hs-wipe 2.6s ease-in-out infinite alternate; }
@keyframes hs-clip { from { clip-path: inset(0 0 0 10%); } to { clip-path: inset(0 0 0 90%); } }
@keyframes hs-wipe { from { left: 10%; } to { left: 90%; } }

/* best clips as a reel */
.hs-h { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); margin: 40px 0 12px; }
.hs-reel { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; }
.hs-pos { position: relative; flex: none; width: 150px; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #000; scroll-snap-align: start; box-shadow: 0 0 0 1px var(--line), 0 20px 40px -28px #1D1D4A88; }
.hs-pos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.hs-pos:hover img { transform: scale(1.04); }
.hs-pos::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(180deg, #0000, #000C); }
.hs-pos .sc { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: 12px; color: #fff; background: #0009; padding: 2px 8px; border-radius: 999px; backdrop-filter: blur(6px); }
.hs-pos .tt { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: left; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) {
  .hs { grid-template-columns: 1fr; padding: 32px 22px 0; min-height: 0; }
  .hs-copy { padding-bottom: 20px; }
  .hs-strip { width: calc(100% + 44px); margin: 0 -22px; }
  .hs-tools { grid-template-columns: 1fr; }
  .hs-tool { grid-template-columns: 96px 1fr; } .hs-open { display: none; }
}

/* making clips: the moving picture of each step */
.run-viz { margin-top: 28px; height: 300px; border-radius: 24px; overflow: hidden; background: radial-gradient(50rem 22rem at 80% -20%, #1B2A4A 0%, transparent 60%), radial-gradient(36rem 20rem at 0% 120%, #2A1424 0%, transparent 60%), #0B0C10; box-shadow: 0 0 0 1px #FFFFFF10 inset, 0 30px 60px -36px #0B0C1099; }
.run-viz canvas { width: 100%; height: 100%; display: block; }
.pct .n .wk { font-size: 36px; }
.steps span { position: relative; padding-top: 10px; }
.steps span::before { content: ''; position: absolute; left: 0; top: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--line2); }
.steps span.done::before { background: var(--text); }
.steps span.now::before { background: #5E5CE6; box-shadow: 0 0 0 4px #5E5CE622; animation: run-dot 1.4s ease-in-out infinite; }
@keyframes run-dot { 50% { box-shadow: 0 0 0 7px #5E5CE600; } }
@media (prefers-reduced-motion: reduce) { .steps span.now::before { animation: none; } }

/* video editor export: the frames being made, then the finished video */
.modal.xm { width: min(920px, 94vw); display: grid; grid-template-columns: minmax(0, auto) minmax(280px, 1fr); gap: 28px; align-items: center; padding: 24px; }
.xm-pv { position: relative; height: min(64vh, 560px); max-width: 52vw; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px #FFFFFF14, 0 30px 60px -30px #000C; }
.xm-pv canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.xm.busy .xm-pv canvas { filter: saturate(.85); }
.xm-scan { position: absolute; left: 0; right: 0; top: 0; height: 22%; background: linear-gradient(180deg, #0A84FF00, #0A84FF40 85%, #FFFFFFCC 100%); animation: xm-scan 1.6s linear infinite; pointer-events: none; }
@keyframes xm-scan { from { transform: translateY(-100%); } to { transform: translateY(460%); } }
.xm-fr { position: absolute; right: 10px; bottom: 10px; font-size: 11px; color: #FFFFFFCC; background: #0008; padding: 2px 8px; border-radius: 999px; }
.xm-fr:empty { display: none; }
#exR video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.xm.done #exR video { animation: xm-reveal .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes xm-reveal { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(75% at 50% 50%); } }
.xm.done .xm-pv { box-shadow: 0 0 0 2px #34C759, 0 30px 60px -30px #000C; transition: box-shadow .4s ease; }
.xm-side h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.xm-n { font-size: 56px; line-height: 1; letter-spacing: -0.04em; margin-top: 22px; min-height: 56px; color: var(--text); }
.xm-n small { font-size: 22px; color: #5E5CE6; }
.xm.done .xm-n { color: #34C759; }
.xm-b { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
@media (prefers-reduced-motion: reduce) { .xm-scan { animation: none; display: none; } .xm.done #exR video { animation: none; } }
@media (max-width: 760px) { .modal.xm { grid-template-columns: 1fr; } .xm-pv { height: 46vh; max-width: none; margin: 0 auto; } }

/* editing: new blocks arrive, changes sweep over the picture */
.ve-b.new { animation: ve-in .32s cubic-bezier(.2, .9, .3, 1.2) both; transform-origin: left center; }
@keyframes ve-in { from { opacity: 0; transform: scaleX(.6) translateY(4px); } to { opacity: 1; transform: none; } }
.ve-frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, #FFFFFF00 35%, #FFFFFF38 50%, #FFFFFF00 65%); transform: translateX(-120%); }
.ve-frame.fx::after { animation: ve-sweep .6s ease-out; }
@keyframes ve-sweep { to { transform: translateX(120%); } }
.ve-tabs button { transition: color .15s ease; }
.ve-ib.enter { animation: ve-panel .22s ease-out; }
@keyframes ve-panel { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ve-b.new, .ve-ib.enter, .ve-frame.fx::after { animation: none; } }
.run .big { min-height: 1.1em; }

/* clips ready: one big player, the list beside it */
.rs-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: start; }
.rs-player { position: relative; height: min(72vh, 700px); aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px #0000000F, 0 40px 80px -40px #1D1D4A88; animation: rs-in .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rs-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.rs-player video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.rs-sc { position: absolute; top: 14px; left: 14px; font-size: 13px; color: #fff; padding: 3px 10px; border-radius: 999px; background: linear-gradient(90deg, #0A84FF, #BF5AF2); }
.rs-snd { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #0008; color: #fff; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(8px); }
.rs-snd.on { background: #FFFFFFE6; color: #111; }
.rs-bar { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 3px; border-radius: 3px; background: #FFFFFF33; overflow: hidden; }
.rs-bar i { display: block; height: 100%; width: 0; background: #fff; }
.rs-info { padding-top: 8px; max-width: 620px; }
.rs-n { font-size: 13px; color: var(--faint); }
.rs-info h2 { font-size: 34px; line-height: 1.12; letter-spacing: -0.03em; margin: 8px 0 10px; text-wrap: balance; }
.rs-info p { color: var(--dim); margin: 0; font-size: 15px; line-height: 1.5; }
.rs-acts { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; align-items: center; }
.rs-list { margin-top: 34px; display: grid; gap: 6px; }
.rs-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 14px; text-align: left; transition: background .15s ease; }
.rs-row:hover { background: var(--hover); }
.rs-row.on { background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 10px 24px -18px #1D1D4A66; }
.rs-row .pv { width: 40px; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: #000; display: block; }
.rs-row .pv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-row b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.rs-row em { font-style: normal; font-size: 12px; color: var(--faint); }
.rs-row .sc { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--raise); color: var(--dim); }
.rs-row .sc.hi { background: color-mix(in oklab, #5E5CE6 14%, transparent); color: #5E5CE6; }
@media (max-width: 900px) { .rs-main { grid-template-columns: 1fr; gap: 20px; } .rs-player { height: auto; width: 100%; max-width: 420px; margin: 0 auto; } .rs-info h2 { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .rs-player { animation: none; } }
@media (max-width: 700px) { .nav .navtool { display: none; } }

/* ---------------- X1 Photo: layered photo editor */
.px { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.px-top { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); min-height: 56px; }
.px-name { max-width: 200px; }
.px-opts { display: flex; align-items: center; gap: 14px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.px-opts .chips { flex-wrap: nowrap; }
.px-opts .hint { white-space: nowrap; }
.px-r { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.px-r input[type=range] { width: 110px; }
.px-r b { font-weight: 500; font-size: 12px; min-width: 34px; color: var(--text); }
.px-ib .px-r, .px-ex .px-r { display: grid; grid-template-columns: 96px 1fr 44px; width: 100%; margin: 2px 0; }
.px-ib .px-r input[type=range], .px-ex .px-r input[type=range] { width: 100%; }
.px-zoom { display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--raise); }
.px-zoom > button.mono { font-size: 12px; min-width: 52px; padding: 4px 6px; border-radius: 999px; }
.px-mid { flex: 1; min-height: 0; display: grid; grid-template-columns: 66px minmax(0, 1fr) 330px; grid-template-rows: minmax(0, 1fr); }
.px-tools { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; }
.px-tools button { width: 54px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 6px; border-radius: 12px; color: var(--dim); font-size: 10px; font-weight: 600; transition: background .15s ease, color .15s ease; }
.px-tools button:hover { background: var(--hover); color: var(--text); }
.px-tools button.on { background: color-mix(in oklab, #0A84FF 14%, transparent); color: #0A84FF; }
.px-sw { margin-top: 8px; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line2); display: block; }
.px-sw input { width: 60px; height: 60px; margin: -12px; padding: 0; border: 0; cursor: pointer; }
.px-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #26272C; background-image: radial-gradient(#FFFFFF0A 1px, transparent 1px); background-size: 18px 18px; }
.px-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: default; }
.px-side { display: grid; grid-template-rows: minmax(0, 1fr) minmax(170px, 40%); border-left: 1px solid var(--line); background: var(--panel); min-height: 0; }
.px-props { overflow: auto; min-height: 0; }
.px-h { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; padding: 14px 16px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-tabs { padding: 4px 10px 0; flex-wrap: wrap; row-gap: 0; }
.px-tabs button { font-size: 13px; padding: 7px 8px 9px; }
.px-ib { padding: 4px 16px 18px; }
.px-props > .f, .px-props > div > .f { padding: 0 16px; }
.px-looks { grid-template-columns: repeat(3, 1fr); }
.px-looks .im { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 8px; }
.px-layers { display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--line); }
.px-lh { display: flex; align-items: center; gap: 0; padding: 8px 8px 6px 16px; font-size: 13px; }
.px-lh b { font-weight: 650; }
.px-ll { overflow: auto; padding: 0 8px 10px; }
.px-l { display: grid; grid-template-columns: 30px 44px minmax(0, 1fr) 30px; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 12px; cursor: pointer; user-select: none; }
.px-l:hover { background: var(--hover); }
.px-l.on { background: color-mix(in oklab, #0A84FF 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, #0A84FF 35%, transparent); }
.px-l.off .px-th, .px-l.off .px-ln { opacity: .45; }
.px-th { width: 44px; height: 44px; border-radius: 8px; background: conic-gradient(#ddd 25%, #fff 0 50%, #ddd 0 75%, #fff 0) 0 0 / 10px 10px; box-shadow: 0 0 0 1px var(--line); display: block; }
.px-doc { grid-template-columns: 44px minmax(0, 1fr); padding-left: 44px; }
.px-ln { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-ln em { display: block; font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--faint); }
.px-l .ul { opacity: 0; } .px-l:hover .ul { opacity: .6; } .px-l .lk { color: #FF9F0A; }
.px-rename { height: 30px; font-size: 13px; }
.modal.px-ex { width: min(640px, 94vw); display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.px-ex canvas { border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -24px #0008; background: conic-gradient(#ddd 25%, #fff 0 50%, #ddd 0 75%, #fff 0) 0 0 / 14px 14px; max-width: 260px; }
.px-ex h3 { margin: 0 0 2px; }
@media (max-width: 760px) {
  .px-top { flex-wrap: wrap; row-gap: 6px; padding: 6px 8px; }
  .px-name { max-width: 120px; }
  .px-opts { order: 9; flex-basis: 100%; margin: 0; padding: 4px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .px-mid { grid-template-columns: 1fr; grid-template-rows: 48vh auto minmax(0, 1fr); overflow: auto; }
  .px-tools { flex-direction: row; order: 2; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; padding: 6px; }
  .px-tools button { flex: none; }
  .px-sw { margin: 0 6px; flex: none; }
  .px-stage { order: 1; }
  .px-side { order: 3; border-left: 0; grid-template-rows: auto auto; }
  .modal.px-ex { grid-template-columns: 1fr; }
}

/* ---------------- phones: editors stack top to bottom (preview, timeline, tools, media, settings) */
@media (max-width: 760px) {
  .ve, .px { height: auto; min-height: calc(100dvh - 52px); }
  .ve-top { flex-wrap: wrap; gap: 6px; padding: 8px 10px; position: sticky; top: 52px; z-index: 6; }
  .ve-top .ve-name { flex: 1; min-width: 0; width: auto; }
  .ve-top .btn.primary { padding: 0 14px; }
  .ve-mid { display: contents; }
  .ve-stage { order: 1; height: 46vh; flex: none; padding: 8px; }
  .ve-tl { order: 2; height: 190px; }
  .ve-tools { order: 3; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px 10px; }
  .ve-tools .btn { flex: none; }
  .ve-tools .grow, .ve-tools .hint, .ve-tools [data-ve-zoom] { display: none; }
  .ve-bin { order: 4; max-height: none; padding: 10px; border-bottom: 1px solid var(--line); }
  .ve-bin .hint { display: none; }
  .ve-items { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .ve-m { flex: none; width: 210px; }
  .ve-insp { order: 5; max-height: none; overflow: visible; border-top: 1px solid var(--line); }
  .ve-tabs { position: sticky; top: 104px; background: var(--panel); z-index: 2; }
  .modal.xm { padding: 16px; gap: 14px; }
  .px-top { position: sticky; top: 52px; z-index: 6; }
  .px-mid { overflow: visible; grid-template-rows: 50vh auto auto; }
  .px-side { grid-template-rows: auto auto; }
  .px-props { overflow: visible; }
  .px-layers { max-height: 50vh; }
  .px-zoom { display: none; }
  .steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .steps span { padding: 0 0 0 14px; }
  .steps span::before { top: 6px; }
  .run-viz { height: 220px; border-radius: 18px; }
}
@media (max-width: 760px) { .ve-top select[data-ve-aspect] { display: none; } }
@media (max-width: 760px) { .px-opts .hint { display: none; } .px-opts:empty, .px-opts:not(:has(*:not(.hint))) { display: none; } }
