/* ==========================================================================
   SHLX STUDIO — v7 interface
   Apple-style glass surfaces · dark / light themes · accent driven by admin
   ========================================================================== */

:root {
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    --accent: #2f6bff;
    --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
    --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
    --accent-hi: color-mix(in srgb, var(--accent) 72%, #9cc2ff);
    --accent-lo: color-mix(in srgb, var(--accent) 82%, #000);
    --danger: #ff5a64;
    --ok: #34d27b;
    --warn: #ffb340;

    --r-xs: 10px;
    --r-sm: 14px;
    --r-md: 20px;
    --r-lg: 28px;
    --r-xl: 36px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #04060c;
    --bg-2: #080b14;
    --card: rgba(16, 20, 32, 0.72);
    --card-solid: #0e1220;
    --card-2: rgba(255, 255, 255, 0.045);
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #f4f6fb;
    --muted: #8d96aa;
    --faint: #5c6579;
    --shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.8);
    --glow: color-mix(in srgb, var(--accent) 34%, transparent);
    --nav-bg: rgba(6, 8, 14, 0.62);
    --input-bg: rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f3f4f8;
    --bg-2: #ffffff;
    --card: rgba(255, 255, 255, 0.78);
    --card-solid: #ffffff;
    --card-2: rgba(10, 16, 32, 0.04);
    --line: rgba(10, 16, 32, 0.09);
    --line-strong: rgba(10, 16, 32, 0.16);
    --text: #10131b;
    --muted: #5d6576;
    --faint: #8a92a3;
    --shadow: 0 28px 60px -26px rgba(30, 40, 80, 0.28);
    --glow: color-mix(in srgb, var(--accent) 20%, transparent);
    --nav-bg: rgba(255, 255, 255, 0.72);
    --input-bg: rgba(10, 16, 32, 0.045);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}
body.is-loading { overflow: hidden; }
body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: inherit; }
img, video, canvas { display: block; max-width: 100%; }
ul { list-style: none; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
.section { padding: 96px 0 40px; }

/* ------------------------------------------------------------------ backdrop */
.bg-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-glow::before {
    content: ""; position: absolute; left: 50%; top: -22vh; width: 1200px; height: 760px; margin-left: -600px;
    background: radial-gradient(closest-side, var(--glow), transparent 72%);
    animation: breathe 9s ease-in-out infinite;
}
.bg-glow::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.2px);
    background-size: 36px 36px;
    mask-image: radial-gradient(70% 55% at 50% 0%, #000, transparent 75%);
    -webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000, transparent 75%);
}
html[data-theme="light"] .bg-glow::after { background-image: radial-gradient(rgba(10, 16, 32, 0.1) 1px, transparent 1.2px); }
.bg-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; animation: drift 18s ease-in-out infinite; }
.bg-orb.o1 { width: 420px; height: 420px; right: -120px; top: 38vh; background: var(--glow); }
.bg-orb.o2 { width: 360px; height: 360px; left: -140px; top: 90vh; background: var(--glow); animation-delay: -7s; }

@keyframes breathe { 0%, 100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes drift { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(30px, -40px, 0); } }

/* -------------------------------------------------------------------- splash */
.splash {
    position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: var(--bg);
    transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.splash.is-hidden { opacity: 0; visibility: hidden; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: splashIn 0.9s var(--ease) both; }
.splash-mark { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; overflow: hidden;
    background: linear-gradient(145deg, var(--accent-hi), var(--accent-lo)); box-shadow: 0 18px 50px var(--glow), inset 0 1px 0 rgba(255,255,255,.35); }
.splash-mark img { width: 100%; height: 100%; object-fit: cover; }
.splash-name { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.32em; }
.splash-bar { width: 120px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--accent); animation: sweep 1s ease-in-out infinite; }
@keyframes splashIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* ----------------------------------------------------------------------- nav */
.nav {
    position: fixed; top: 14px; left: 0; right: 0; z-index: 100; padding: 0 18px;
    transition: transform 0.4s var(--ease);
}
.nav-inner {
    max-width: 1120px; margin: 0 auto; height: 60px; padding: 0 14px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
    background: var(--nav-bg); border: 1px solid var(--line); border-radius: 999px;
    backdrop-filter: saturate(180%) blur(26px); -webkit-backdrop-filter: saturate(180%) blur(26px);
    box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.55);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; overflow: hidden;
    background: linear-gradient(145deg, var(--accent-hi), var(--accent-lo)); box-shadow: 0 6px 18px var(--glow), inset 0 1px 0 rgba(255,255,255,.35); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark span { width: 12px; height: 12px; border-radius: 4px; background: #fff; opacity: 0.95; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-weight: 700; font-size: 0.98rem; letter-spacing: 0.14em; white-space: nowrap; }
.brand-tag { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; }

.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 15px; border-radius: 999px; font-size: 0.9rem; font-weight: 500; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--card-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); background: var(--card-2); transition: all 0.2s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------- buttons etc */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; font-size: 0.94rem;
    padding: 11px 22px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
    transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
    color: #fff; background: linear-gradient(180deg, var(--accent-hi) -40%, var(--accent) 45%, var(--accent-lo) 130%);
    border-color: color-mix(in srgb, var(--accent) 60%, #fff); box-shadow: 0 10px 28px -8px var(--accent-line), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 34px -8px var(--accent-line), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost { background: var(--card-2); border-color: var(--line); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: var(--line-strong); transform: translateY(-1px); }
.btn-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 24%, transparent); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-xs { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; border: 1px solid var(--line); background: var(--card-2); color: var(--muted); }
.chip-accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hi); }
html[data-theme="light"] .chip-accent { color: var(--accent-lo); }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-hi); }
html[data-theme="light"] .eyebrow { color: var(--accent); }

.role-pill { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; }
.role-free { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.role-premium { background: var(--accent-soft); color: var(--accent-hi); border: 1px solid var(--accent-line); }
.role-admin { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 42%, transparent); }

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
    backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
    position: relative;
}

/* ------------------------------------------------------- account menu (nav) */
.acct { position: relative; }
.avatar-btn {
    width: 40px; height: 40px; border-radius: 50%; font-weight: 700; font-size: 0.95rem; color: #fff; display: grid; place-items: center;
    background: linear-gradient(145deg, var(--accent-hi), var(--accent-lo)); border: 2px solid var(--line-strong);
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.avatar-btn:hover { transform: scale(1.06); box-shadow: 0 8px 22px var(--glow); }
.acct-menu {
    position: absolute; right: 0; top: calc(100% + 14px); width: 292px; padding: 20px; border-radius: 24px;
    background: color-mix(in srgb, var(--card-solid) 92%, transparent); border: 1px solid var(--line-strong);
    backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
    box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.7), 0 0 60px -20px var(--glow);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.97); transform-origin: top right;
    transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
}
.acct.open .acct-menu { opacity: 1; visibility: visible; transform: none; }
.acct-menu .role-pill { margin-bottom: 12px; }
.acct-name { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.acct-mail { display: block; color: var(--muted); font-size: 0.88rem; margin: 2px 0 16px; overflow: hidden; text-overflow: ellipsis; }
.acct-list { margin: 16px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.acct-list a, .acct-list button {
    width: 100%; display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 14px; font-size: 0.95rem; font-weight: 500; text-align: left;
    transition: background 0.2s;
}
.acct-list a:hover, .acct-list button:hover { background: var(--card-2); }
.acct-list svg { width: 21px; height: 21px; flex: none; stroke-width: 1.7; }
.acct-list em { margin-left: auto; font-style: normal; font-size: 0.78rem; color: var(--muted); font-family: var(--mono); }
.theme-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 14px 4px 0; border-top: 1px solid var(--line); font-weight: 600; }
.theme-toggle { display: flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
.theme-toggle button { width: 36px; height: 32px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); transition: all 0.25s var(--ease); }
.theme-toggle button svg { width: 18px; height: 18px; }
.theme-toggle button.on { background: var(--accent); color: #fff; box-shadow: 0 4px 14px var(--accent-line); }

/* ---------------------------------------------------------------------- hero */
.hero { padding: 168px 28px 30px; text-align: center; }
.hero .eyebrow { margin-bottom: 20px; }
.hero-title {
    font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; margin: 0 auto 22px; max-width: 900px;
    background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 55%, var(--accent)) 130%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-lead { color: var(--muted); font-size: clamp(1.02rem, 1.7vw, 1.28rem); max-width: 640px; margin: 0 auto 38px; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.showcase { padding-top: 56px; padding-bottom: 8px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.shot { border-radius: var(--r-xl); overflow: hidden; position: relative; background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 0.5s var(--ease); }
.shot:hover { transform: translateY(-6px); }
.shot.is-after { border-color: var(--accent-line); box-shadow: var(--shadow), 0 0 80px -24px var(--glow); }
.shot-media { aspect-ratio: 4 / 5; background: #02030a; position: relative; }
.shot-media video, .shot-media canvas { width: 100%; height: 100%; object-fit: cover; }
.shot-bar { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px;
    border-radius: 18px; background: rgba(8, 10, 18, 0.62); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: #fff; font-size: 0.85rem; font-weight: 600; }
.shot-bar small { font-family: var(--mono); font-size: 0.74rem; opacity: 0.75; }
.shot.is-after .shot-bar small { color: var(--accent-hi); opacity: 1; }
.showcase-ctrl { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }

.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.feature { padding: 26px 26px 28px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); transition: transform 0.4s var(--ease), border-color 0.3s; }
.feature:hover { transform: translateY(-4px); border-color: var(--accent-line); }
.feature-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); margin-bottom: 18px; }
html[data-theme="light"] .feature-ico { color: var(--accent); }
.feature-ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 0.94rem; }

/* ------------------------------------------------------------ section heads */
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 12px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 0 auto; }

/* -------------------------------------------------------------------- studio */
.studio-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 24px; align-items: start; }
.studio-card, .output-card { padding: 32px; }
.studio-card form { display: grid; gap: 26px; }
.gate {
    position: absolute; inset: 0; z-index: 5; border-radius: inherit; display: grid; place-items: center; text-align: center; padding: 30px;
    background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.gate-box { max-width: 300px; }
.gate-box h4 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.gate-box p { color: var(--muted); font-size: 0.95rem; margin-bottom: 22px; }
.gate-box .btn + .btn { margin-top: 8px; }

.quota { padding: 16px 18px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); }
.quota-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.9rem; margin-bottom: 10px; }
.quota-top strong { font-weight: 700; }
.quota-top span { color: var(--muted); font-size: 0.82rem; }
.quota-track { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.quota-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); transition: width 0.8s var(--ease); }
.quota.is-empty .quota-fill { background: var(--danger); }
.quota-note { margin-top: 9px; font-size: 0.82rem; color: var(--muted); }

.step-title { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1rem; margin-bottom: 14px; }
.step-title i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; background: var(--accent-soft); color: var(--accent-hi); border: 1px solid var(--accent-line); }
html[data-theme="light"] .step-title i { color: var(--accent); }

.dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 38px 24px; cursor: pointer;
    border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--card-2);
    transition: border-color 0.25s, background 0.25s, transform 0.3s var(--ease);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.dropzone.has-file { border-style: solid; border-color: var(--accent-line); }
.dz-ico { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); }
html[data-theme="light"] .dz-ico { color: var(--accent); }
.dz-ico svg { width: 26px; height: 26px; }
.dropzone strong { font-size: 1.04rem; font-weight: 700; overflow-wrap: anywhere; }
.dropzone span { color: var(--muted); font-size: 0.88rem; }

.probe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.probe div { padding: 12px 14px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line); }
.probe span { display: block; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.probe strong { font-size: 0.92rem; font-weight: 700; font-family: var(--mono); }

.opt-grid { display: grid; gap: 10px; }
.opt {
    display: block; padding: 16px 18px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--card-2); cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease);
}
.opt:hover { border-color: var(--line-strong); }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.opt-top strong { font-size: 0.98rem; font-weight: 700; }
.opt p { color: var(--muted); font-size: 0.86rem; }
.opt-2col { grid-template-columns: 1fr 1fr; }

.tune { display: grid; gap: 18px; padding: 20px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); }
.tune-row label { display: flex; justify-content: space-between; font-size: 0.88rem; font-weight: 600; margin-bottom: 10px; }
.tune-row label span { font-family: var(--mono); color: var(--accent-hi); font-weight: 600; }
html[data-theme="light"] .tune-row label span { color: var(--accent); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: var(--line-strong); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); box-shadow: 0 4px 12px var(--accent-line); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); cursor: grab; }

.field-input, select.field-input {
    width: 100%; padding: 13px 16px; border-radius: var(--r-sm); background: var(--input-bg); border: 1px solid var(--line); transition: border-color 0.2s, box-shadow 0.2s;
}
select.field-input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-input::placeholder { color: var(--faint); }

.locked-box { padding: 20px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); background: var(--card-2); }
.locked-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.locked-head strong { display: flex; align-items: center; gap: 9px; font-size: 0.95rem; }
.locked-head svg { width: 18px; height: 18px; color: var(--accent-hi); }
.locked-list { display: grid; gap: 8px; }
.locked-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--card-2); color: var(--faint); font-size: 0.88rem; }
.locked-list li svg { width: 15px; height: 15px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); }
.switch-row strong { display: block; font-size: 0.95rem; }
.switch-row span.sub { color: var(--muted); font-size: 0.82rem; }
.switch { position: relative; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; z-index: 2; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background 0.3s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.3); transition: transform 0.35s var(--ease); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }

/* ------------------------------------------------------------- output panel */
.out-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.out-head h3 { font-size: 1.15rem; font-weight: 700; }
.out-idle { text-align: center; padding: 18px 6px 6px; }
.out-orb { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em;
    background: radial-gradient(circle at 30% 25%, var(--accent-hi), var(--accent-lo)); color: #fff; box-shadow: 0 20px 50px -10px var(--glow), inset 0 2px 0 rgba(255,255,255,.35); animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.out-idle h4 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.out-idle > p { color: var(--muted); font-size: 0.95rem; max-width: 340px; margin: 0 auto 24px; }
.spec { text-align: left; border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; }
.spec li { display: flex; justify-content: space-between; gap: 14px; padding: 13px 18px; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.spec li:last-child { border-bottom: 0; }
.spec li span { color: var(--muted); }
.spec li strong { text-align: right; font-weight: 600; }

.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.progress-head strong { font-size: 1rem; font-weight: 600; }
.progress-head span { font-family: var(--mono); font-weight: 700; color: var(--accent-hi); }
.progress-track { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-bottom: 20px; }
.progress-bar { height: 100%; width: 8%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); position: relative; transition: width 0.6s var(--ease); }
.progress-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: sweep 1.4s linear infinite; }
.live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.live-stats div { padding: 12px 14px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line); }
.live-stats span { display: block; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.live-stats strong { font-size: 0.92rem; font-family: var(--mono); }

.result-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 18px; }
.res-box { padding: 14px 16px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); }
.res-box.is-out { border-color: var(--accent-line); background: var(--accent-soft); }
.res-box .tag { display: block; font-size: 0.66rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.res-box strong { display: block; font-family: var(--mono); font-size: 0.98rem; }
.res-box small { color: var(--muted); font-size: 0.78rem; }
.res-arrow { color: var(--accent-hi); font-size: 1.3rem; }
.notice { padding: 13px 16px; border-radius: var(--r-sm); background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 0.88rem; margin-bottom: 14px; }
.video-wrap { border-radius: var(--r-md); overflow: hidden; background: #000; margin-bottom: 14px; border: 1px solid var(--line); }
.video-wrap video { width: 100%; max-height: 420px; }
.stack { display: grid; gap: 10px; }
.tips { margin-top: 20px; padding: 18px 20px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card-2); }
.tips strong { display: block; font-size: 0.86rem; margin-bottom: 10px; }
.tips li { display: flex; gap: 10px; color: var(--muted); font-size: 0.85rem; padding: 4px 0; }
.tips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 8px; flex: none; }

/* --------------------------------------------------------------------- plans */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 860px; margin: 0 auto; }
.plan { padding: 38px 34px; display: flex; flex-direction: column; }
.plan.is-featured { border-color: var(--accent-line); box-shadow: var(--shadow), 0 0 90px -30px var(--glow); }
.plan-name { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.plan-name h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.plan-price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; margin: 14px 0 4px; }
.plan-price small { font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-desc { color: var(--muted); font-size: 0.93rem; margin-bottom: 24px; }
.plan ul { display: grid; gap: 12px; margin-bottom: 30px; flex: 1; }
.plan li { display: flex; gap: 12px; font-size: 0.94rem; }
.plan li svg { width: 20px; height: 20px; flex: none; color: var(--accent-hi); margin-top: 1px; }
html[data-theme="light"] .plan li svg { color: var(--accent); }
.plan li.off { color: var(--faint); }
.plan li.off svg { color: var(--faint); }

/* ------------------------------------------------------------------- tools */
.tool-card { padding: 34px; max-width: 760px; margin: 0 auto; }
.tool-card h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 6px; }
.tool-card > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 20px; }
.inline-form { display: flex; gap: 10px; }
.tt-result { margin-top: 20px; padding: 18px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); }
.tt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tt-grid span { display: block; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.tt-grid strong { font-size: 0.92rem; font-family: var(--mono); overflow-wrap: anywhere; }
.tt-caption { margin-top: 12px; color: var(--muted); font-size: 0.88rem; }

/* ------------------------------------------------------------------- footer */
.footer { margin-top: 110px; border-top: 1px solid var(--line); padding: 34px 0 44px; position: relative; z-index: 2; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
.footer-inner strong { color: var(--text); letter-spacing: 0.12em; margin-right: 6px; }
.founders { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.founder { padding: 6px 14px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 0.86rem; transition: all 0.25s; }
.founder:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }

/* -------------------------------------------------------------------- modals */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 4, 10, 0.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sheet {
    position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; padding: 34px; border-radius: 30px;
    background: color-mix(in srgb, var(--card-solid) 94%, transparent); border: 1px solid var(--line-strong); box-shadow: 0 50px 120px -20px rgba(0,0,0,.75), 0 0 80px -30px var(--glow);
    transform: translateY(24px) scale(0.96); transition: transform 0.45s var(--ease);
}
.modal.open .sheet { transform: none; }
.sheet.wide { max-width: 560px; }
.sheet-x { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); color: var(--muted); font-size: 1.2rem; transition: all 0.2s; }
.sheet-x:hover { color: var(--text); background: var(--line); }
.sheet h3 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.sheet .sub { color: var(--muted); font-size: 0.93rem; margin-bottom: 22px; }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); margin-bottom: 24px; }
.seg button { flex: 1; padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; color: var(--muted); transition: all 0.3s var(--ease); }
.seg button.on { background: var(--accent); color: #fff; box-shadow: 0 6px 18px var(--accent-line); }
.form { display: grid; gap: 14px; }
.form label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-msg { min-height: 20px; font-size: 0.86rem; color: var(--danger); }
.form-msg.ok { color: var(--ok); }
.form-hint { font-size: 0.78rem; color: var(--faint); margin-top: 5px; }

.acc-hero { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); margin-bottom: 18px; }
.acc-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; color: #fff; background: linear-gradient(145deg, var(--accent-hi), var(--accent-lo)); }
.acc-hero strong { display: block; font-size: 1.1rem; }
.acc-hero span.m { color: var(--muted); font-size: 0.85rem; }
.job-list { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.job-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line); font-size: 0.88rem; }
.job-item b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.job-item small { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 0.92rem; }

/* -------------------------------------------------------------------- toasts */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 500; display: grid; gap: 10px; justify-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast { pointer-events: auto; max-width: 440px; padding: 13px 20px; border-radius: 16px; font-size: 0.92rem; font-weight: 500; color: var(--text);
    background: color-mix(in srgb, var(--card-solid) 94%, transparent); border: 1px solid var(--line-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px -12px rgba(0,0,0,.6); animation: toastIn 0.5s var(--ease) both; }
.toast.err { border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------- scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */
.admin-main { padding: 124px 28px 40px; max-width: 1120px; margin: 0 auto; position: relative; z-index: 2; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.admin-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.admin-head p { color: var(--muted); margin-top: 6px; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); margin-bottom: 26px; flex-wrap: wrap; }
.tabs button { padding: 9px 20px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; color: var(--muted); transition: all 0.3s var(--ease); }
.tabs button.on { background: var(--accent); color: #fff; box-shadow: 0 6px 18px var(--accent-line); }
.tab-pane { display: none; animation: paneIn 0.5s var(--ease); }
.tab-pane.on { display: block; }
@keyframes paneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { padding: 24px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.stat span { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.stat strong { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat small { display: block; margin-top: 8px; color: var(--faint); font-size: 0.78rem; }

.panel { padding: 30px; margin-bottom: 20px; }
.panel h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.panel > .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .field-input { flex: 1; min-width: 200px; }
.toolbar select.field-input { flex: none; width: 170px; }

.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); }
table.users { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 820px; }
table.users th { text-align: left; padding: 14px 16px; font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); background: var(--card-2); font-weight: 600; }
table.users td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
table.users tr:hover td { background: var(--card-2); }
.u-cell { display: flex; align-items: center; gap: 12px; }
.u-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 0.85rem; color: #fff; background: linear-gradient(145deg, var(--accent-hi), var(--accent-lo)); }
.u-cell b { display: block; font-weight: 600; }
.u-cell small { color: var(--muted); }
.u-banned { opacity: 0.55; }
.role-select { padding: 8px 34px 8px 12px; font-size: 0.85rem; font-weight: 600; border-radius: 12px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: var(--muted); font-size: 0.86rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.video-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.slot { padding: 20px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.slot.is-after { border-color: var(--accent-line); }
.slot-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slot video { width: 100%; border-radius: var(--r-sm); background: #000; max-height: 200px; }
.file-btn { display: flex; align-items: center; justify-content: center; padding: 11px; border-radius: var(--r-sm); border: 1.5px dashed var(--accent-line); color: var(--accent-hi); font-weight: 600; font-size: 0.86rem; cursor: pointer; text-align: center; transition: background 0.2s; }
.file-btn:hover { background: var(--accent-soft); }
.logo-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); flex-wrap: wrap; margin-bottom: 22px; }
.logo-row .l { display: flex; align-items: center; gap: 14px; }
.logo-row img { height: 44px; width: 44px; border-radius: 12px; object-fit: cover; }
.color-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--input-bg); border: 1px solid var(--line); }
.color-row input[type="color"] { width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; padding: 0; cursor: pointer; }
.swatches { display: flex; gap: 8px; margin-left: auto; }
.swatches button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); transition: transform 0.2s; }
.swatches button:hover { transform: scale(1.18); }
.auth-center { min-height: 100vh; display: grid; place-items: center; padding: 100px 20px 40px; position: relative; z-index: 2; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 980px) {
    .nav-links { display: none; }
    .studio-grid, .compare, .plans, .video-slots, .form-grid { grid-template-columns: 1fr; }
    .feature-row { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .shot-media { aspect-ratio: 16 / 11; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 18px; }
    .hero { padding-top: 132px; }
    .section { padding-top: 70px; }
    .studio-card, .output-card, .plan, .tool-card { padding: 24px; }
    .probe, .tt-grid { grid-template-columns: repeat(2, 1fr); }
    .opt-2col, .live-stats { grid-template-columns: 1fr; }
    .result-pair { grid-template-columns: 1fr; }
    .res-arrow { transform: rotate(90deg); justify-self: center; }
    .inline-form { flex-direction: column; }
    .brand-tag { display: none; }
    .nav-actions .btn-ghost { display: none; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .sheet { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .reveal { opacity: 1; transform: none; }
}
