/* ================= fonts (self-hosted; Chinese uses system fonts) ================= */
@font-face { font-family: "Sora"; font-weight: 500; font-display: swap; src: url(fonts/sora-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url(fonts/sora-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url(fonts/sora-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }

/* ================= tokens ================= */
:root {
  --bar-h: 62px;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-app: #f4f5fa;
  --card: #ffffff;
  --line: #e6e8f0;
  --line-2: #d8dbe7;
  --ink: #0d0f1f;
  --ink-2: #2b2f45;
  --muted: #62687f;
  --dim: #9aa0b4;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --err: #e11d48;
  --err-bg: #fff1f3;
  --grad: linear-gradient(110deg, #2563eb 0%, #4f46e5 35%, #7c3aed 70%, #c026d3 100%);
  --grad-soft: linear-gradient(135deg, #eef2ff, #f5f3ff 60%, #fdf4ff);
  --shadow-sm: 0 1px 2px rgba(16, 20, 45, .06), 0 1px 1px rgba(16, 20, 45, .04);
  --shadow: 0 1px 2px rgba(16, 20, 45, .05), 0 8px 24px -6px rgba(16, 20, 45, .1);
  --shadow-lg: 0 2px 4px rgba(16, 20, 45, .04), 0 24px 60px -16px rgba(40, 36, 120, .22);
  --r: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --display: "Sora", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { height: 100%; box-sizing: border-box; background: var(--bg); }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
input, textarea, select { user-select: text; -webkit-user-select: text; font: inherit; color: inherit; }
button { font: inherit; color: inherit; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(79, 70, 229, .18); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d6d9e4; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ================= primitives ================= */
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.eyebrow b { color: var(--dim); font-weight: 500; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }

.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; cursor: pointer;
  padding: 10px 18px; border-radius: 11px; font-weight: 600; font-size: 14.5px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: transform .12s, box-shadow .2s, background .2s, border-color .2s, opacity .2s; overflow: hidden; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 6px 16px -6px rgba(13, 15, 31, .5); }
.btn-dark:hover { background: #22253d; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px -8px rgba(79, 70, 229, .65); }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s; }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-outline { background: #fff; border-color: var(--line-2); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: #b9bdd0; background: #fbfbfe; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 24px; font-size: 15.5px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:disabled::after { display: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 500;
  background: #fff; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip svg { width: 14px; height: 14px; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.chip.live .dot { animation: pulse 1.4s ease-in-out infinite; }
.chip.ok { color: var(--ok); background: var(--ok-bg); border-color: #a7f3d0; } .chip.ok .dot { background: var(--ok); }
.chip.bad { color: var(--err); background: var(--err-bg); border-color: #fecdd3; } .chip.bad .dot { background: var(--err); }
.chip.work { color: var(--brand); background: #eef2ff; border-color: #c7d2fe; }
.chip.brand { color: #fff; background: var(--grad); border: 0; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }

label.f { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 7px; }
label.f .muted { font-weight: 400; }
.input { width: 100%; background: #fff; border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s; min-width: 0; }
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
textarea.input { resize: vertical; line-height: 1.55; min-height: 96px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2362687f'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; padding: 7px; color: var(--muted); border-radius: 8px; }
.pw-eye:hover { background: var(--bg-soft); }
.pw-eye svg { width: 18px; height: 18px; display: block; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; }
.err { color: var(--err); font-size: 13.5px; }
/* EN / 中文 switch: pill with a sliding thumb */
.lang { position: relative; display: inline-flex; align-items: center; gap: 0; padding: 3px 3px 3px 9px; flex: none;
  border: 1px solid var(--line); border-radius: 99px; background: #fff; box-shadow: var(--shadow-sm); }
.lang > svg { width: 15px; height: 15px; color: var(--dim); margin-right: 5px; flex: none; }
.lang button { position: relative; z-index: 1; width: 44px; height: 26px; padding: 0; background: transparent; border: 0; border-radius: 99px;
  cursor: pointer; font: 600 12.5px/1 var(--font); color: var(--muted); transition: color .2s; }
.lang button:hover { color: var(--ink); }
.lang button.on, .lang[data-on="en"] button[data-lang="en"], .lang[data-on="zh"] button[data-lang="zh"] { color: #fff; }
.lang[data-on="en"] button[data-lang="zh"], .lang[data-on="zh"] button[data-lang="en"] { color: var(--muted); }
.lang button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.lang .thumb { position: absolute; top: 3px; bottom: 3px; left: 29px; width: 44px; border-radius: 99px; background: var(--grad);
  box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .6); transition: transform .22s cubic-bezier(.3, .7, .2, 1); }
.lang[data-on="zh"] .thumb { transform: translateX(44px); }
.lang.bare > svg { display: none; }
.lang.bare { padding-left: 3px; }
.lang.bare .thumb { left: 3px; }

/* logo */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; text-decoration: none; color: var(--ink); flex: none; }
.brand .mark { width: 32px; height: 32px; }
.brand .mark svg { width: 100%; height: 100%; display: block; }

/* ================= public site ================= */
.site-nav { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-nav.scrolled { border-bottom-color: var(--line); }
.site-nav .in { max-width: var(--maxw); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 28px; }
.site-nav nav { display: flex; gap: 4px; }
.site-nav nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14.5px; padding: 7px 12px; border-radius: 9px; }
.site-nav nav a:hover, .site-nav nav a.on { background: var(--bg-soft); color: var(--ink); }
.site-nav .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* hero */
.hero { position: relative; text-align: center; padding: 64px 0 20px; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 720px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 50% 45% at 30% 30%, rgba(99, 102, 241, .14), transparent 70%),
              radial-gradient(ellipse 45% 40% at 72% 25%, rgba(192, 38, 211, .1), transparent 70%),
              radial-gradient(ellipse 40% 35% at 50% 60%, rgba(6, 182, 212, .09), transparent 70%); }
.dotgrid { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image: radial-gradient(#c9cde0 1px, transparent 1px); background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%); }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 5vw, 62px); line-height: 1.06; letter-spacing: -.045em; margin: 18px auto 18px; max-width: 1000px; text-wrap: balance; }
.hero p.sub { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto 30px; text-wrap: balance; }
.hero .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
html[lang="zh-CN"] .hero h1 { letter-spacing: -.01em; line-height: 1.2; font-size: clamp(34px, 5vw, 60px); }

/* hero "AI factory" scene */
.factory { position: relative; height: 470px; margin: 46px auto 0; max-width: 1180px; }
.factory .rail { position: absolute; left: 0; right: 0; top: 70px; height: 330px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 86%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 86%, transparent); }
.factory .track { position: absolute; top: 20px; left: 0; display: flex; gap: 26px; width: max-content; animation: belt 34s linear infinite; }
.factory:hover .track { animation-play-state: paused; }
.factory .phone { position: relative; width: 150px; height: 266px; border-radius: 22px; padding: 5px; background: #0d0f1f; box-shadow: 0 18px 40px -14px rgba(13,15,31,.45); flex: none; }
.factory .phone video, .factory .phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 17px; }
.factory .phone .tag { position: absolute; left: 10px; bottom: 10px; font-size: 10.5px; font-family: var(--mono); background: rgba(13,15,31,.72); color: #fff; padding: 3px 7px; border-radius: 6px; }
/* everything left of the gate looks like raw input */
.factory .before { position: absolute; top: 0; bottom: 0; left: 0; width: 42%; z-index: 2; pointer-events: none;
  backdrop-filter: grayscale(1) contrast(.9) brightness(1.05); -webkit-backdrop-filter: grayscale(1) contrast(.9) brightness(1.05); }
.factory .gate { position: absolute; left: 42%; top: 40px; height: 390px; width: 64px; transform: translateX(-50%); z-index: 3; pointer-events: none; }
.factory .gate .frame { position: absolute; inset: 0; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.25));
  border: 1px solid rgba(79,70,229,.35); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); box-shadow: 0 0 0 6px rgba(79,70,229,.06), 0 20px 50px -10px rgba(79,70,229,.45); }
.factory .gate .beam { position: absolute; left: 50%; top: 18px; bottom: 18px; width: 3px; transform: translateX(-50%); background: var(--grad); border-radius: 3px;
  box-shadow: 0 0 18px 4px rgba(99,102,241,.55), 0 0 40px 10px rgba(192,38,211,.25); animation: beam 1.6s ease-in-out infinite; }
.factory .gate .spark { position: absolute; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px 3px var(--cyan); animation: spark 2.2s linear infinite; }
.factory .gate .spark.s2 { animation-delay: .7s; } .factory .gate .spark.s3 { animation-delay: 1.4s; }
.factory .gate .label { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.factory .belt { position: absolute; left: 0; right: 0; top: 410px; height: 30px; border-radius: 99px; background: #fff; border: 1px solid var(--line);
  box-shadow: inset 0 -3px 0 #eef0f6, var(--shadow-sm); overflow: hidden; }
.factory .belt::before { content: ""; position: absolute; inset: 9px 0; background-image: radial-gradient(circle, #1c1f35 4.5px, transparent 5px); background-size: 36px 12px;
  animation: dots 1.4s linear infinite; }
.factory .bins { position: absolute; right: 0; top: 90px; display: flex; flex-direction: column; gap: 14px; z-index: 4; }
.factory .bin { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: 13.5px; }
.factory .bin i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-style: normal; }
.factory .bin svg { width: 18px; height: 18px; }
.factory .floating { position: absolute; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 12px; font-size: 12.5px; text-align: left; animation: float 6s ease-in-out infinite; }
.factory .floating .k { font-family: var(--mono); font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.factory .floating.f1 { left: 4%; top: 0; }
.factory .floating.f2 { left: 49%; top: -6px; animation-delay: 1.5s; }
.bar { height: 6px; border-radius: 6px; background: #eef0f6; overflow: hidden; margin-top: 6px; width: 150px; }
.bar i { display: block; height: 100%; width: 40%; background: var(--grad); border-radius: 6px; animation: load 2.8s ease-in-out infinite; }
@keyframes belt { to { transform: translateX(-50%); } }
@keyframes dots { to { background-position: 36px 0; } }
@keyframes beam { 50% { opacity: .55; } }
@keyframes spark { from { top: 10px; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { top: calc(100% - 18px); opacity: 0; } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes load { 0% { width: 8%; } 70% { width: 96%; } 100% { width: 96%; } }
@media (prefers-reduced-motion: reduce) { .factory .track, .factory .belt::before, .factory .floating { animation: none; } }

.stack { display: flex; align-items: center; justify-content: center; gap: 12px 30px; flex-wrap: wrap; padding: 26px 0 10px; color: var(--dim); font-size: 13px; }
.stack b { font-family: var(--display); color: #8a90a6; font-size: 17px; letter-spacing: -.01em; }

section.block { padding: 96px 0; }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 46px; }
.sec-head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.035em; margin: 10px 0 12px; line-height: 1.12; text-wrap: balance; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* tools grid */
.tools { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tool-card { grid-column: span 2; padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: transform .15s, box-shadow .2s, border-color .2s; }
.tool-card.wide { grid-column: span 3; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c7cbe0; }
.tool-card .art { height: 150px; border-radius: 12px; background: var(--grad-soft); border: 1px solid #eceef8; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; }
.tool-card h3 { font-family: var(--display); font-size: 20px; letter-spacing: -.02em; margin: 6px 0 0; }
.tool-card p { color: var(--muted); margin: 0; font-size: 14.5px; }
.tool-card .go { margin-top: auto; font-family: var(--mono); font-size: 13px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.mini-phone { width: 64px; height: 112px; border-radius: 12px; padding: 3px; background: #0d0f1f; box-shadow: var(--shadow); flex: none; }
.mini-phone video, .mini-phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.art .arrow { color: var(--brand); font-size: 20px; }
.art .ptile { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.art .ptile img { width: 100%; height: 100%; object-fit: cover; }
.art .prompt-pill { font-family: var(--mono); font-size: 11.5px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; max-width: 170px; text-align: left; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.wave { display: flex; align-items: center; gap: 3px; height: 60px; }
.wave i { width: 5px; border-radius: 3px; background: var(--grad); animation: wave 1.2s ease-in-out infinite; }
@keyframes wave { 50% { transform: scaleY(.35); } }

/* tech panel (shot analysis) */
.tech { display: grid; grid-template-columns: 1.15fr .85fr; overflow: hidden; }
.tech .code { padding: 22px 0; background: #fbfbfe; border-right: 1px solid var(--line); font-family: var(--mono); font-size: 13px; line-height: 2.05; color: var(--ink-2); counter-reset: ln; min-width: 0; }
.tech .code .ln { display: flex; padding-right: 20px; }
.tech .code .ln > span { min-width: 0; }
.tech .code .ln::before { counter-increment: ln; content: counter(ln); width: 46px; flex: none; text-align: right; padding-right: 16px; color: #b3b8cb; }
.tech .code .ln.hl { background: rgba(79,70,229,.05); }
.tk { color: #7c3aed; } .tv { color: #0891b2; } .ts { color: #16a34a; }
.at { display: inline-block; padding: 0 6px; border-radius: 6px; background: #eef2ff; color: var(--brand); border: 1px solid #c7d2fe; line-height: 1.6; margin: 0 1px; }
.at.p { background: #fdf2f8; color: #be185d; border-color: #fbcfe8; }
.tech .shots { display: flex; gap: 6px; padding: 0 20px 0 46px; margin: 4px 0 10px; flex-wrap: wrap; }
.tech .shots figure { margin: 0; width: 64px; }
.tech .shots img { width: 64px; height: 88px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); }
.tech .shots figcaption { font-size: 10px; color: var(--dim); text-align: center; margin-top: 2px; }
.tech .preview { display: grid; place-items: center; padding: 30px; background: radial-gradient(ellipse at center, #f1f0ff, #fff 70%); position: relative; }
.tech .preview .phone-lg { width: 230px; aspect-ratio: 9/16; border-radius: 28px; padding: 6px; background: #0d0f1f; box-shadow: var(--shadow-lg); }
.tech .preview video { width: 100%; height: 100%; object-fit: cover; border-radius: 23px; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; }
.plans > * { min-width: 0; }
.plan { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border: 1.5px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: var(--shadow-lg); }
.plan .top { display: flex; justify-content: space-between; align-items: center; min-height: 26px; gap: 8px; }
.plan h3 { font-family: var(--display); font-size: 19px; margin: 0; letter-spacing: -.02em; }
.plan .pts { font-family: var(--display); font-size: 42px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.plan .pts small { font-family: var(--font); font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.plan .bonus { color: var(--ok); font-size: 13px; font-weight: 600; min-height: 20px; }
.plan .price { font-size: 22px; font-weight: 700; }
.plan .price small { color: var(--muted); font-size: 13px; font-weight: 500; margin-left: 6px; }
.plan .btn { margin-top: auto; }
.plan .incl { border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; background: var(--grad); color: #fff; white-space: nowrap; }
.tag.alt { background: var(--ok-bg); color: var(--ok); border: 1px solid #a7f3d0; }

/* download band + page */
.band { padding: 48px; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; background: var(--grad-soft); border-color: #e5e3fb; overflow: hidden; position: relative; }
.band h2 { font-family: var(--display); font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; margin: 8px 0 8px; }
.band p { color: var(--muted); margin: 0; }
.win-card { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 44px; }
.win-card > * { min-width: 0; }
.win-card h1 { font-family: var(--display); font-size: clamp(30px, 4vw, 46px); letter-spacing: -.04em; line-height: 1.1; margin: 12px 0; }
.win-card ul { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; }
.win-card li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.win-card li svg { width: 20px; height: 20px; color: var(--ok); flex: none; margin-top: 2px; }
.app-window { border-radius: 14px; border: 1px solid var(--line-2); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.app-window .tb { height: 34px; background: #f3f4f9; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-size: 11px; color: var(--muted); }
.app-window .tb-brand { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12px; }
.app-window .tb-brand svg { width: 16px; height: 16px; }
.app-window .ctl { display: flex; gap: 14px; } .app-window .ctl i { font-style: normal; }
.app-window .body { display: grid; grid-template-columns: 64px 1fr; height: 300px; }
.app-window .sb { background: #fafbfe; border-right: 1px solid var(--line); padding: 12px 9px; display: grid; gap: 9px; align-content: start; }
.app-window .sb i { height: 10px; border-radius: 5px; background: #e7e9f3; } .app-window .sb i:first-child { background: var(--grad); }
.app-window .main2 { padding: 14px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; min-height: 0; }
.app-window .fake { border-radius: 10px; border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.app-window .fake .drops { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.app-window .fake .drops span { border-radius: 8px; background: var(--grad-soft); border: 1px dashed #d4d6f2; }
.app-window .fake i { height: 9px; border-radius: 5px; background: #eceef6; } .app-window .fake i.s { width: 60%; }
.app-window .fake b { height: 24px; border-radius: 7px; background: var(--grad); width: 55%; align-self: flex-end; }
.app-window .stage2 { border-radius: 10px; background: #0d0f1f; overflow: hidden; min-width: 0; min-height: 0; position: relative; }
.app-window .stage2 video { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: contain; object-position: center; display: block; z-index: 1; }
/* ambient fill: a blurred copy of the same video replaces the black side bars with the clip's own colours */
.app-window .stage2 video.amb { object-fit: cover; z-index: 0; filter: blur(22px) saturate(1.35) brightness(.9); transform: scale(1.3); }
.reqs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.reqs .card { padding: 20px; }
.reqs .k { font-family: var(--mono); font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.reqs .v { font-weight: 600; margin-top: 4px; }

footer.site { border-top: 1px solid var(--line); margin-top: 40px; background: var(--bg-soft); }
footer.site .in { max-width: var(--maxw); margin: 0 auto; padding: 52px 24px 36px; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
footer.site .f-brand p { margin: 14px 0 18px; max-width: 300px; font-size: 14px; color: var(--muted); }
footer.site .f-brand .btn svg { width: 15px; height: 15px; }
footer.site h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 6px 0 14px; font-weight: 500; }
footer.site .f-col a { display: block; width: fit-content; text-decoration: none; color: var(--ink-2); padding: 4px 0; font-size: 14px; transition: color .15s; }
footer.site .f-col a:hover { color: var(--brand); }
footer.site .copy { max-width: var(--maxw); margin: 0 auto; padding: 16px 24px 28px; color: var(--dim); font-size: 13px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ================= auth (split screen) ================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: linear-gradient(160deg, #f4f5ff 0%, #ffffff 45%, #fbf7ff 100%); }
.auth > * { min-width: 0; }
.auth .left { display: flex; flex-direction: column; padding: 28px 48px; }
.auth .left .head { display: flex; align-items: center; justify-content: space-between; }
.auth .left .body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 0; }
.auth h1 { font-family: var(--display); font-size: 40px; letter-spacing: -.04em; margin: 0 0 8px; text-align: center; }
.auth .lead { color: var(--muted); margin: 0 0 28px; text-align: center; font-size: 16px; }
.auth form { width: 100%; max-width: 420px; padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); }
.auth .field { margin-bottom: 18px; }
.auth .row2 { display: flex; justify-content: space-between; align-items: center; margin: -2px 0 20px; font-size: 13.5px; }
.auth .alt { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.auth .alt a { color: var(--brand); text-decoration: none; font-weight: 600; }
.auth .codebox { display: flex; gap: 8px; }
.auth .feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; max-width: 460px; }
.auth .right { padding: 24px 24px 24px 0; }
.showcase { position: relative; height: 100%; min-height: 560px; border-radius: 28px; overflow: hidden; background: #0d0f1f; box-shadow: var(--shadow-lg); isolation: isolate; }
.showcase .bgv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(26px) saturate(1.3) brightness(.7); transform: scale(1.2); z-index: -2; }
.showcase::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(#ffffff22 1px, transparent 1px); background-size: 22px 22px; opacity: .6; }
.showcase .cap { position: absolute; left: 36px; right: 36px; bottom: 34px; color: #fff; }
.showcase .cap h2 { font-family: var(--display); font-size: 30px; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 10px; }
.showcase .cap p { margin: 0; color: rgba(255,255,255,.78); max-width: 460px; }
/* login: TikTok-style feed */
.tok .tkphone { position: absolute; left: 50%; top: calc((100% - 150px) / 2 + 8px); transform: translate(-50%, -50%); height: min(580px, calc(100% - 230px)); aspect-ratio: 9 / 16;
  border-radius: 36px; padding: 7px; background: #05060d; box-shadow: 0 40px 90px -24px rgba(0,0,0,.85), inset 0 0 0 1.5px rgba(255,255,255,.08); z-index: 2; }
.tok .tk-feed { position: absolute; inset: 7px; border-radius: 29px; overflow: hidden; background: #000; }
.tok .tk-feed::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0, transparent 18%, transparent 55%, rgba(0,0,0,.72) 100%); }
.tok .tk-slide { position: absolute; inset: 0; transform: translateY(100%); }
.tok .tk-slide.on { transform: none; transition: transform .65s cubic-bezier(.7, 0, .2, 1); }
.tok .tk-slide.out { transform: translateY(-100%); transition: transform .65s cubic-bezier(.7, 0, .2, 1); }
.tok .tk-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tok .tk-top { position: absolute; top: 24px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 16px; color: rgba(255,255,255,.7); font-size: 13.5px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.tok .tk-top b { color: #fff; position: relative; }
.tok .tk-top b::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 22px; height: 2.5px; border-radius: 2px; background: #fff; transform: translateX(-50%); }
.tok .tk-rail { position: absolute; right: 12px; bottom: 96px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 13px; color: #fff; }
.tok .tk-rail > span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tok .tk-rail svg { width: 27px; height: 27px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
.tok .tk-rail b { font-size: 10.5px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.tok .tk-rail .av { position: relative; margin-bottom: 6px; }
.tok .tk-rail .av img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1.5px solid #fff; display: block; }
.tok .tk-rail .av i { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; background: #fe2c55; color: #fff; font: 700 13px/18px var(--font); text-align: center; font-style: normal; }
.tok .tk-rail .lk.liked svg { color: #fe2c55; animation: likepop .45s var(--spring, ease); }
@keyframes likepop { 40% { transform: scale(1.35); } }
.tok .tk-rail .disc { width: 36px; height: 36px; border-radius: 50%; padding: 7px; background: radial-gradient(#2b2b2b, #111 70%); margin-top: 4px; animation: spin 5s linear infinite; }
.tok .tk-rail .disc img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.tok .tk-meta { position: absolute; left: 18px; right: 70px; bottom: 26px; z-index: 3; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.tok .tk-meta b { font-size: 14px; }
.tok .tk-meta p { margin: 4px 0 8px; font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tok .tk-meta .snd { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.tok .tk-meta .snd svg { width: 13px; height: 13px; flex: none; }
.tok .tk-meta .snd span { overflow: hidden; white-space: nowrap; flex: 1; mask-image: linear-gradient(90deg, #000 80%, transparent); }
.tok .tk-meta .snd i { display: inline-block; font-style: normal; padding-left: 100%; animation: ticker 7s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }
.tok .tk-prog { position: absolute; left: 22px; right: 22px; bottom: 13px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.25); z-index: 3; overflow: hidden; }
.tok .tk-prog i { display: block; height: 100%; width: 0; background: #fff; }
.tok .fly-heart { position: absolute; right: 22px; bottom: 260px; z-index: 4; width: 26px; color: #fe2c55; pointer-events: none; animation: flyheart 1.6s ease-out forwards; opacity: 0; }
.tok .fly-heart svg { width: 100%; height: auto; display: block; }
@keyframes flyheart { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -150px) scale(1.15); } }
.tok .side-ph { position: absolute; left: 50%; top: calc((100% - 150px) / 2 + 8px); height: min(460px, calc(100% - 300px)); aspect-ratio: 9 / 16; border-radius: 28px; padding: 5px;
  background: #05060d; opacity: .5; z-index: 1; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); transition: opacity .3s; }
.tok .side-ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 23px; display: block; }
.tok .side-ph.l { transform: translate(calc(-50% - 250px), -50%) rotate(-7deg); }
.tok .side-ph.r { transform: translate(calc(-50% + 250px), -50%) rotate(7deg); }
.tok .chip-float { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border-radius: 16px; color: #fff;
  background: rgba(13,15,31,.5); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 13px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.6); animation: float 6s ease-in-out infinite; }
.tok .chip-float .k { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.tok .chip-float > span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: rgba(255,255,255,.14); }
.tok .chip-float .ok { background: var(--grad); font-weight: 700; }
.tok .chip-float.c1 { left: 26px; top: 26px; }
.tok .chip-float.c2 { right: 26px; top: 26px; animation-delay: 2.5s; }
@media (max-width: 1280px) { .tok .side-ph, .tok .chip-float.c1 { display: none; } }
@media (max-height: 700px) { .tok .chip-float { display: none; } }
@media (prefers-reduced-motion: reduce) { .tok .tk-rail .disc, .tok .tk-meta .snd i, .tok .chip-float, .marquee .row { animation: none; } }

/* homepage: scrolling wall of creator-style clips */
.ugc-wall { overflow: hidden; }
.marquee { overflow: hidden; padding: 10px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.marquee { padding-bottom: 36px; } /* room for the cards' shadow, so it isn't cut off in a hard line */
.marquee + .marquee { margin-top: -18px; }
.marquee .row { display: flex; gap: 20px; width: max-content; animation: marq 70s linear infinite; }
/* computer: rows sit in the same centered frame as the hero belt (space left and right, never a gap in the row);
   each row's 6 different clips (6 × 220px) are wider than the frame, so nobody shows up twice at once */
@media (min-width: 601px) { .ugc-rows { max-width: 1180px; margin: 0 auto; padding: 0 24px; } }
.marquee.rev .row { animation-direction: reverse; animation-duration: 80s; }
.marquee:hover .row { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(calc(-50% - 10px)); } }
.tok-card { position: relative; width: 200px; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; flex: none; background: #0d0f1f; box-shadow: 0 18px 40px -18px rgba(13,15,31,.5); transition: transform .3s var(--ease, ease); }
.tok-card:hover { transform: translateY(-4px); }
.tok-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tok-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.7)); }
.tok-card .tk-side { position: absolute; right: 8px; bottom: 64px; z-index: 2; display: flex; flex-direction: column; gap: 10px; color: #fff; align-items: center; }
.tok-card .tk-side span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tok-card .tk-side svg { width: 21px; height: 21px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
.tok-card .tk-side b { font-size: 9.5px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.tok-card .tk-meta { position: absolute; left: 12px; right: 40px; bottom: 12px; z-index: 2; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.tok-card .tk-meta b { font-size: 12.5px; }
.tok-card .tk-meta p { margin: 2px 0 0; font-size: 11px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ugc-cta { display: flex; align-items: center; justify-content: center; gap: 12px 18px; margin-top: 34px; flex-wrap: wrap; }
.ugc-cta .muted { font-size: 12.5px; }
@media (max-width: 600px) { .tok-card { width: 150px; border-radius: 18px; } .tok-card .tk-side { bottom: 56px; } .tok-card .tk-meta p { display: none; } }
@keyframes scan { from { background-position: 0 -40%; } to { background-position: 0 140%; } }

/* ================= app shell ================= */
body.in-app { background: var(--bg-app); }
.appbar { position: sticky; top: 0; z-index: 30; height: var(--bar-h); background: rgba(255,255,255,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.appbar .in { height: 100%; padding: 0 20px; display: flex; align-items: center; gap: 14px; position: relative; }
.appbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.balance-pill .v { font-family: var(--mono); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.coin { width: 18px; height: 18px; border-radius: 50%; background: var(--grad); display: inline-grid; place-items: center; color: #fff; font-size: 10px; box-shadow: 0 2px 6px rgba(79,70,229,.45); flex: none; }
.avatar-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 4px 10px 4px 4px; cursor: pointer; box-shadow: var(--shadow-sm); }
.avatar-btn:hover { border-color: var(--line-2); }
.avatar { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; text-transform: uppercase; flex: none; }
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }
.avatar-btn .nm { font-size: 13px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-btn svg { width: 16px; height: 16px; color: var(--muted); }
.menu { position: absolute; right: 20px; top: 58px; width: 264px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; animation: pop .14s ease; }
.menu .who { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.menu .who > div { min-width: 0; }
.menu .who .e { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; border: 0; background: none; text-decoration: none; color: var(--ink-2); font-size: 14px; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--bg-soft); color: var(--ink); }
.menu .lang button { display: block; width: 44px; height: 26px; padding: 0; text-align: center; font-size: 12.5px; background: transparent; }
.menu .lang button:hover { background: transparent; }
.menu svg { width: 17px; height: 17px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

.shell { display: grid; grid-template-columns: 244px 1fr; min-height: calc(100vh - var(--bar-h)); }
.sidebar { position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); overflow-y: auto; background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar .grp { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 14px 12px 6px; }
.sidebar .grp:first-child { padding-top: 2px; }
.sidebar a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; position: relative; }
.sidebar a:hover { background: var(--bg-soft); color: var(--ink); }
.sidebar a.on { background: #eef2ff; color: var(--brand); font-weight: 600; }
.sidebar a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.sidebar a svg { width: 18px; height: 18px; flex: none; }
.sidebar a .pts { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.sidebar .promo { margin-top: auto; padding: 14px; border-radius: 14px; background: var(--grad-soft); border: 1px solid #e5e3fb; font-size: 13px; }
.sidebar .promo b { display: block; font-family: var(--display); font-size: 14px; margin-bottom: 4px; }
.sidebar .promo .btn { margin-top: 10px; }
.scrim { display: none; }

.main { min-width: 0; padding: 26px 30px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-size: 26px; letter-spacing: -.03em; margin: 4px 0 4px; }
.page-head p { margin: 0; color: var(--muted); }

/* workspace */
.workspace { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; align-items: start; }
.panel { padding: 22px; }
.panel h2 { font-size: 14.5px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 9px; }
.num { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-family: var(--mono); font-size: 11.5px; color: var(--brand); background: #eef2ff; border: 1px solid #c7d2fe; flex: none; }
.form { display: flex; flex-direction: column; gap: 20px; }
.uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.uploads.one { grid-template-columns: 1fr; }
.uploads > div { min-width: 0; }
.drop { position: relative; height: 210px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: #fafbfe; cursor: pointer; overflow: hidden;
  transition: border-color .15s, background .15s; display: flex; flex-direction: column; }
.drop:hover, .drop.over { border-color: var(--brand); background: #f5f6ff; }
.drop .ph { margin: auto; text-align: center; padding: 14px; }
.drop .ph .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin: 0 auto 10px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--brand); }
.drop .ph .ic svg { width: 22px; height: 22px; }
.drop .ph b { display: block; font-size: 14px; }
.drop .ph span { color: var(--muted); font-size: 12.5px; }
.drop video, .drop > img { width: 100%; height: 100%; object-fit: contain; background: #0d0f1f; }
.drop .tag2 { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; pointer-events: none; }
.drop .tag2 span { background: rgba(13,15,31,.75); color: #fff; padding: 3px 9px; border-radius: 99px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.drop .tag2 span:last-child { flex: none; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 6px; padding: 6px; height: 100%; }
.thumb, .add { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); min-height: 0; background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(13,15,31,.75); color: #fff; cursor: pointer; line-height: 1; }
.add { display: grid; place-items: center; color: var(--dim); font-size: 22px; border-style: dashed; }
.fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields2 > * { min-width: 0; }
.settings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.settings.three { grid-template-columns: repeat(3, 1fr); }
.settings.two { grid-template-columns: repeat(2, 1fr); }
.settings > * { min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.voices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.voice-opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; background: #fff; text-align: left; transition: border-color .15s, box-shadow .15s; }
.voice-opt:hover { border-color: var(--line-2); }
.voice-opt.on { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,70,229,.1); }
.voice-opt b { display: block; font-size: 13.5px; }
.voice-opt span { color: var(--muted); font-size: 12px; }
.counter { text-align: right; font-size: 12px; color: var(--dim); margin-top: 4px; }
.actions { display: flex; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.actions .meta { flex: 1; min-width: 0; font-size: 13.5px; color: var(--muted); }
.actions .meta b { color: var(--ink); font-family: var(--mono); }
.actions .btn { min-width: 210px; }

.result { position: sticky; top: 88px; padding: 18px; }
.result .stage { border-radius: 14px; background: #0d0f1f; min-height: 420px; display: grid; place-items: center; overflow: hidden; position: relative; }
.result .stage video, .result .stage img { width: 100%; max-height: 62vh; object-fit: contain; }
.result .empty-stage { text-align: center; color: rgba(255,255,255,.62); padding: 30px; font-size: 14px; }
.result .empty-stage svg { width: 44px; height: 44px; color: rgba(255,255,255,.35); margin: 0 auto 10px; }
.result .res-bar { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; min-width: 0; }
.result .res-info { min-width: 0; font-size: 13.5px; }
.result .res-info b { display: block; margin-bottom: 6px; overflow-wrap: anywhere; }
.result .res-info .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.result .res-text { margin: 0; color: var(--ink-2); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
  padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; }
.result .res-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .result .res-actions .btn { flex: 1 1 0; } }
.scanner { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(99,102,241,.35), transparent 70%), #0d0f1f; }
.scanner::before { content: ""; position: absolute; left: 0; right: 0; height: 40%; top: -40%; background: linear-gradient(180deg, transparent, rgba(34,211,238,.22), transparent); animation: sweep 2.4s linear infinite; }
.scanner::after { content: ""; position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 24px 24px; }
.scanner > div { position: relative; z-index: 1; padding: 20px; }
.scanner .big { font-family: var(--display); font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.scanner .sm { color: rgba(255,255,255,.65); font-size: 13.5px; max-width: 320px; margin: 0 auto; }
.ring { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: #22d3ee; border-right-color: #a78bfa; animation: spin 1s linear infinite; }
@keyframes sweep { to { top: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
.audio-card { width: 100%; padding: 30px; text-align: center; color: #fff; }
.audio-card .wave { justify-content: center; margin-bottom: 18px; }
.audio-card audio { width: 100%; }

.recent { margin-top: 20px; padding: 18px; }
.recent-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.rthumb { width: 96px; flex: none; cursor: pointer; }
.rthumb .im { width: 96px; height: 96px; border-radius: 12px; background: #0d0f1f center / cover no-repeat; border: 1px solid var(--line); position: relative; display: grid; place-items: center; overflow: hidden; }
.rthumb .im .chip { position: absolute; left: 5px; bottom: 5px; padding: 2px 7px; font-size: 10.5px; }
.rthumb .im svg { width: 26px; height: 26px; color: rgba(255,255,255,.6); }
.rthumb .t { font-size: 12px; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

/* creations grid */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.filters button { border: 1px solid var(--line); background: #fff; padding: 7px 13px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.filters button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.vcard { overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .2s; padding: 0; }
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.vcard .poster { aspect-ratio: 4 / 5; background: #0d0f1f center / cover no-repeat; position: relative; display: grid; place-items: center; }
.vcard .poster > .chip { position: absolute; top: 10px; left: 10px; z-index: 2; }
.vcard .poster .kind { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--ink); z-index: 2; }
.vcard .poster .kind svg { width: 16px; height: 16px; }
.vcard .poster .fail { color: rgba(255,255,255,.72); font-size: 12.5px; padding: 16px; text-align: center; }
.vcard .poster .aud svg { width: 40px; height: 40px; color: rgba(255,255,255,.5); }
.vcard .info { padding: 12px 14px; font-size: 12.5px; }
.vcard .info b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 2px; }
.empty-state { padding: 60px 20px; text-align: center; }
.empty-state .ic { width: 64px; height: 64px; border-radius: 18px; background: var(--grad-soft); display: grid; place-items: center; margin: 0 auto 16px; color: var(--brand); }
.empty-state .ic svg { width: 30px; height: 30px; }
.empty-state h3 { font-family: var(--display); margin: 0 0 6px; }
.empty-state p { color: var(--muted); margin: 0 0 18px; }

/* billing / account */
.billing { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: stretch; }
.billing > * { min-width: 0; }
.balance-card { background: var(--ink); color: #fff; border: 0; position: relative; overflow: hidden; }
.balance-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--grad); opacity: .55; filter: blur(30px); }
.balance-card > * { position: relative; z-index: 1; }
.balance-card h3, .balance-card .pts small, .balance-card .bonus { color: rgba(255,255,255,.7); }
.balance-card .price { color: #fff; font-size: 15px; font-weight: 500; }
.balance-card .btn-outline { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; box-shadow: none; }
.notice { padding: 12px 15px; border-radius: 12px; font-size: 13.5px; background: var(--warn-bg); border: 1px solid #fde68a; color: var(--warn); margin-bottom: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; align-items: stretch; }
.two > .card { display: flex; flex-direction: column; }
.two > .card > .table-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); }
.two > .card > .table-wrap > .nothing { align-self: center; border-top: 0; }
.two > .card > .table-wrap:has(> .nothing) { border-top: 1px solid var(--line); }
.two > * { min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.card-h h3 { margin: 0; font-family: var(--display); font-size: 16px; letter-spacing: -.02em; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); white-space: nowrap; background: #fafbfe; }
table.t td { padding: 11px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.pos { color: var(--ok); font-weight: 600; } table.t td.neg { color: var(--err); font-weight: 600; }
.nothing { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.profile { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: stretch; }
.profile .side { display: grid; grid-template-rows: auto 1fr; gap: 18px; min-width: 0; }
.profile .me { display: flex; flex-direction: column; }
.profile .me .me-actions { display: grid; gap: 8px; margin-top: auto; padding-top: 18px; }
.profile .me-recent { text-align: left; border-top: 1px solid var(--line); padding-top: 14px; }
.profile .me-recent .rh { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.profile .me-recent .nothing { padding: 14px 0; border-top: 0; text-align: left; }
.profile .act b.pos { color: var(--ok); } .profile .act b.neg { color: var(--err); }
.profile .act { display: flex; align-items: center; gap: 11px; padding: 8px 0; font-size: 13.5px; }
.profile .act + .act { border-top: 1px dashed var(--line); }
.profile .act .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--bg-soft); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.profile .act .ic svg { width: 16px; height: 16px; }
.profile .act .tx { flex: 1; min-width: 0; font-weight: 600; }
.profile .act .tx small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.profile .act b { font-size: 13px; }
.profile > * { min-width: 0; }
.profile .me { padding: 26px; text-align: center; }
.profile .me .avatar { margin: 0 auto 14px; }
.profile .me h3 { margin: 0 0 4px; font-size: 17px; overflow-wrap: anywhere; }
.profile .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; margin: 20px 0; border: 1px solid var(--line); }
.profile .stats div { background: #fff; padding: 12px 6px; }
.profile .stats b { display: block; font-family: var(--display); font-size: 20px; }
.profile .stats span { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 14px 20px; padding: 6px 22px 22px; font-size: 14px; align-items: center; }
.kv .k { color: var(--muted); }
.kv > div { min-width: 0; overflow-wrap: anywhere; }
.form-narrow { padding: 4px 22px 22px; display: grid; gap: 14px; max-width: 460px; }

/* admin */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { padding: 18px; }
.tile .k { color: var(--muted); font-size: 12.5px; }
.tile .v { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; }
.row-actions { display: flex; gap: 6px; }

/* modal + toast */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(13,15,31,.55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal .box { width: 100%; max-width: 620px; max-height: 92vh; display: flex; flex-direction: column; padding: 16px; }
.modal .stagebox { background: #0d0f1f; border-radius: 12px; overflow: hidden; display: grid; place-items: center; min-height: 160px; }
.modal video, .modal img { max-width: 100%; max-height: 72vh; }
.modal .bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 70; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); animation: up .25s ease; max-width: calc(100% - 32px); }
.toast.ok { background: #065f46; } .toast.bad { background: #9f1239; }
@keyframes up { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ================= responsive ================= */
@media (max-width: 1100px) {
  .tools { grid-template-columns: repeat(2, 1fr); }
  .tool-card, .tool-card.wide { grid-column: span 1; }
  .tech { grid-template-columns: 1fr; }
  .tech .code { border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace { grid-template-columns: 1fr; }
  .result { position: static; }
  .factory .bins { display: none; }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth .right { display: none; }
  .auth .left { padding: 20px; }
  .band, .win-card { grid-template-columns: 1fr; }
  .billing, .two, .profile { grid-template-columns: 1fr; }
  footer.site .in { grid-template-columns: 1fr 1fr 1fr; }
  footer.site .f-brand { grid-column: 1 / -1; }
  .reqs { grid-template-columns: 1fr; }
  .site-nav nav { display: none; }
  /* app: sidebar becomes a drawer */
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: min(290px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform .28s var(--ease, ease); box-shadow: var(--shadow-lg); padding-top: 14px; }
  body.drawer-open .sidebar { transform: none; }
  body.drawer-open .scrim { display: block; position: fixed; inset: 0; background: rgba(13,15,31,.4); z-index: 45; animation: fadeIn .2s ease; }
  .main { padding: 20px 16px 120px; }
  .avatar-btn .nm, .avatar-btn svg { display: none; }
  .avatar-btn { padding: 4px; }
  .actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(13,15,31,.15); }
  .menu { right: 12px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .site-nav .in { padding: 10px 16px; gap: 10px; }
  .hide-sm { display: none !important; }
  .hero { padding-top: 40px; }
  .factory { height: 380px; margin-top: 30px; }
  .factory .rail { top: 60px; height: 260px; }
  .factory .phone { width: 120px; height: 213px; border-radius: 18px; }
  .factory .phone video, .factory .phone img { border-radius: 14px; }
  .factory .gate { top: 40px; height: 310px; }
  .factory .belt { top: 330px; }
  .factory .floating.f1 { left: 2%; } .factory .floating.f2 { display: none; }
  section.block { padding: 64px 0; }
  .tools { grid-template-columns: 1fr; }
  .band { padding: 28px; }
  .win-card { padding: 26px; }
  .auth h1 { font-size: 30px; }
  .auth form { padding: 22px; }
  .uploads, .fields2, .voices { grid-template-columns: 1fr; }
  .settings, .settings.three, .settings.two { grid-template-columns: 1fr 1fr; }
  .drop { height: 170px; }
  .actions { flex-direction: column-reverse; align-items: stretch; gap: 6px; }
  .actions .btn { min-width: 0; width: 100%; }
  .actions .meta { text-align: center; }
  .appbar .in { padding: 0 12px; gap: 8px; }
  .appbar .brand span:last-child { display: none; }
  .balance-pill { padding-left: 9px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv .k { margin-top: 8px; }
  .vgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  footer.site .in { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-top: 40px; }
}

/* =====================================================================
   Native desktop feel + interaction & motion
   ===================================================================== */
:root { --ease: cubic-bezier(.2, .7, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1); }

/* fixed app window: only the content pane scrolls */
body.in-app { height: 100%; overflow: hidden; }
body.in-app #app { height: 100%; display: flex; flex-direction: column; }
body.in-app .appbar { position: relative; flex: none; }
body.in-app .shell { flex: 1; min-height: 0; }
body.in-app .sidebar { position: relative; top: 0; height: 100%; }
body.in-app .main { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
body.in-app .result { top: 0; }

/* top loading line (shows while requests are in flight) */
#progress { position: fixed; left: 0; top: 0; height: 2.5px; width: 0; z-index: 100; background: var(--grad); box-shadow: 0 0 10px rgba(99,102,241,.7);
  opacity: 0; transition: width .4s var(--ease), opacity .3s; pointer-events: none; }
#progress.on { opacity: 1; width: 75%; transition: width 8s cubic-bezier(.1,.6,.1,1), opacity .2s; }
#progress.done { opacity: 0; width: 100%; transition: width .25s, opacity .4s .2s; }

/* page transitions + staggered entrance */
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
#view > * { animation: viewIn .38s var(--ease) both; }
#view > *:nth-child(2) { animation-delay: .04s; } #view > *:nth-child(3) { animation-delay: .08s; } #view > *:nth-child(4) { animation-delay: .12s; }
.stagger > * { animation: riseIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* sidebar: sliding active highlight */
.sidebar { --glide-y: 0px; --glide-h: 0px; }
.sidebar .glider { position: absolute; left: 12px; right: 12px; top: 0; height: var(--glide-h); transform: translateY(var(--glide-y)); border-radius: 10px;
  background: #eef2ff; transition: transform .32s var(--spring), height .25s var(--ease), opacity .2s; z-index: 0; pointer-events: none; opacity: 0; }
.sidebar .glider.ready { opacity: 1; }
.sidebar .glider::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.sidebar a { z-index: 1; transition: color .2s; }
.sidebar.has-glider a.on { background: transparent; }
.sidebar.has-glider a.on::before { display: none; }
.sidebar a svg { transition: transform .25s var(--spring); }
.sidebar a:hover svg { transform: scale(1.12) rotate(-4deg); }

/* buttons: ripple, press, ready glow */
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .22; pointer-events: none; animation: ripple .6s var(--ease); }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.btn:not(:disabled):active { transform: translateY(1px) scale(.985); }
.btn-primary.ready { animation: readyGlow 2.4s ease-in-out infinite; }
@keyframes readyGlow { 50% { box-shadow: 0 8px 26px -6px rgba(79,70,229,.8), 0 0 0 5px rgba(124,58,237,.12); } }
.btn svg { transition: transform .25s var(--spring); }
.btn:hover svg { transform: translateX(1px) scale(1.06); }

/* 3D tilt + glare */
.tilt { transform-style: preserve-3d; transition: transform .35s var(--ease), box-shadow .3s; will-change: transform; }
.tilt.tilting { transition: transform .08s linear, box-shadow .3s; }
.tilt .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.55), transparent 55%); mix-blend-mode: soft-light; }
.tilt.tilting .glare { opacity: 1; }
.plan, .tool-card { position: relative; }

/* hero: glow that follows the mouse */
.hero .spot { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(124,58,237,.12), transparent 70%); }
.hero:hover .spot { opacity: 1; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* skeleton shimmer */
.skel { position: relative; overflow: hidden; background: #eceef5; border-radius: 12px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); animation: shimmer 1.3s infinite;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-card { height: 300px; } .skel-row { height: 44px; margin: 10px 18px; } .skel-tile { height: 96px; width: 96px; flex: none; }

/* drop zones: lively hover / drag */
.drop .ph .ic { transition: transform .3s var(--spring), box-shadow .3s; }
.drop:hover .ph .ic { transform: translateY(-4px) scale(1.06); box-shadow: 0 10px 22px -8px rgba(79,70,229,.45); }
.drop.over { box-shadow: 0 0 0 5px rgba(79,70,229,.12); }
.drop.over .ph .ic { animation: bob .8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-7px) scale(1.08); } }
.thumb { animation: riseIn .35s var(--ease) both; }
.voice-opt { transition: border-color .15s, box-shadow .2s, transform .2s var(--spring); }
.voice-opt:hover { transform: translateY(-2px); }
.voice-opt.on { transform: translateY(-2px); }
.chip[data-ex] { transition: background .15s, border-color .15s, transform .2s var(--spring); }
.chip[data-ex]:hover { background: #eef2ff; border-color: #c7d2fe; color: var(--brand); transform: translateY(-1px); }

/* result reveal + sparkle burst */
.stage .reveal-in { animation: popIn .55s var(--spring) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.94); filter: blur(6px); } }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.burst i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c);
  animation: burst .9s var(--ease) forwards; }
@keyframes burst { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* cards: hover lift */
.vcard, .tool-card, .plan { transition: transform .25s var(--ease), box-shadow .3s, border-color .2s; }
.vcard .poster { transition: transform .5s var(--ease); }
.vcard:hover .poster { transform: scale(1.03); }
.tile { transition: transform .25s var(--ease), box-shadow .3s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* balance pill: flash when points change */
.balance-pill.bump { animation: bump .6s var(--spring); }
@keyframes bump { 30% { transform: scale(1.07); box-shadow: 0 0 0 5px rgba(79,70,229,.15); } }
.coin { animation: coinSpin 6s linear infinite; }
@keyframes coinSpin { 0%, 88% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }

/* desktop-style notifications (top right) */
.toast { top: 74px; right: 20px; left: auto; bottom: auto; transform: none; display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 12px 16px 12px 12px; min-width: 260px; max-width: 380px; animation: toastIn .35s var(--spring); }
.toast .ti { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: #eef2ff; color: var(--brand); }
.toast .ti svg { width: 16px; height: 16px; }
.toast.ok { background: #fff; } .toast.ok .ti { background: var(--ok-bg); color: var(--ok); }
.toast.bad { background: #fff; } .toast.bad .ti { background: var(--err-bg); color: var(--err); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* command palette (Ctrl+K) */
.palette { position: fixed; inset: 0; z-index: 80; background: rgba(13,15,31,.35); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 0 16px; animation: fade .15s; }
.palette .box { width: 100%; max-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: popIn .25s var(--spring); }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 16px; outline: none; }
.palette .list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette .it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--ink-2); }
.palette .it svg { width: 18px; height: 18px; color: var(--muted); }
.palette .it.on { background: #eef2ff; color: var(--brand); } .palette .it.on svg { color: var(--brand); }
.palette .it .hint { margin-left: auto; font-size: 12px; color: var(--dim); }
.palette .foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); background: #fafbfe; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: #fff; color: var(--muted); }
.kbd-hint { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; font-size: 13px; color: var(--muted); cursor: pointer; box-shadow: var(--shadow-sm); }
.kbd-hint:hover { border-color: var(--line-2); color: var(--ink); }
.kbd-hint svg { width: 15px; height: 15px; }

@media (max-width: 960px) {
  body.in-app .sidebar { position: fixed; top: 0; height: 100vh; }
  .kbd-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   Sidebar toggle (hamburger): icon rail on desktop, slide-in drawer on phones
   ===================================================================== */
.burger { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .2s, background .2s; }
.burger:hover { border-color: var(--line-2); background: var(--bg-soft); }
.burger .lines { display: grid; gap: 4px; justify-items: start; }
.burger i { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink-2); transition: transform .3s var(--spring), opacity .2s, width .3s var(--ease); }
body.sb-collapsed .appbar .burger i:nth-child(2) { width: 11px; }
.site-nav.open .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-nav.open .burger i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.site-nav.open .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@keyframes fadeIn { from { opacity: 0; } }

.sb-head { display: none; }
.sb-close { border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.sb-close svg { width: 18px; height: 18px; }
.sb-tip { position: fixed; z-index: 70; transform: translateY(-50%); pointer-events: none; white-space: nowrap; background: var(--ink); color: #fff;
  font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); animation: tipIn .16s var(--ease); }
.sb-tip::before { content: ""; position: absolute; left: -4px; top: 50%; width: 8px; height: 8px; background: inherit; transform: translateY(-50%) rotate(45deg); border-radius: 1px; }
@keyframes tipIn { from { opacity: 0; transform: translate(-4px, -50%); } }

@media (min-width: 961px) {
  .shell { grid-template-columns: auto 1fr; }
  .sidebar { width: 244px; transition: width .26s var(--ease); overflow-x: hidden; }
  .sidebar a { white-space: nowrap; transition: color .2s, padding .26s var(--ease); }
  .sidebar a > span { transition: opacity .18s; }
  .sidebar .grp { white-space: nowrap; position: relative; transition: color .18s; }
  body.sb-collapsed .sidebar { width: 72px; }
  body.sb-collapsed .sidebar a { padding-left: 15px; padding-right: 15px; }
  body.sb-collapsed .sidebar a > span { opacity: 0; }
  body.sb-collapsed .sidebar .grp { color: transparent; }
  body.sb-collapsed .sidebar .grp:not(:first-child)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 10px; border-top: 1px solid var(--line); }
  body.sb-collapsed .sidebar .promo { display: none; }
}

@media (max-width: 960px) {
  .sb-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .sb-head .brand { font-size: 17px; }
  /* public site: hamburger opens the page links as a dropdown panel */
  .site-nav .in { position: relative; }
  .site-nav .burger { order: 9; }
  .site-nav.open nav { display: flex; flex-direction: column; gap: 2px; position: absolute; left: 12px; right: 12px; top: calc(100% + 6px); padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); animation: pop .18s var(--ease); z-index: 40; }
  .site-nav.open nav a { padding: 12px 14px; font-size: 15.5px; }
}
@media (min-width: 961px) { .site-nav .burger, .site-nav .nav-login { display: none; } }
.site-nav .nav-cta { display: none; }
@media (max-width: 600px) {
  /* phone header: logo · EN/中文 · menu — the sign-up button moves into the menu */
  .site-nav .in { gap: 12px; padding: 10px 16px; }
  .site-nav .right .main-cta { display: none; }
  .site-nav.open nav .nav-cta { display: flex; justify-content: center; margin-top: 6px; padding: 12px 14px; color: #fff; }
  .site-nav .lang > svg, .auth .head .lang > svg { display: none; }
  .site-nav .lang, .auth .head .lang { padding-left: 3px; }
  .site-nav .lang .thumb, .auth .head .lang .thumb { left: 3px; }
}

/* tool page, two columns: Result + Recent end level with the form card (Recent fills the gap) */
@media (min-width: 1101px) {
  .workspace { align-items: stretch; }
  .ws-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  .ws-side .result { position: static; }
  .ws-side .recent { margin-top: 0; flex: 1; display: flex; flex-direction: column; }
  .ws-side .recent-row { flex: 1; flex-wrap: wrap; align-content: flex-start; overflow-y: auto; contain: size; min-height: 124px; padding-bottom: 14px;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 22px), transparent); mask-image: linear-gradient(#000 calc(100% - 22px), transparent); }
  .panel { display: flex; flex-direction: column; }
  .panel > .form { flex: 1; }
  .panel .actions { margin-top: auto; }
}
@media (max-width: 640px) {
  .win-card .btn-lg { width: 100%; white-space: normal; text-align: center; }
  .app-window .body { height: 240px; grid-template-columns: 44px 1fr; }
  .app-window .main2 { padding: 10px; gap: 8px; }
}

/* confirm dialogs, delete buttons, danger zone */
.btn-danger { background: var(--err); color: #fff; box-shadow: 0 8px 22px -10px rgba(225,29,72,.7); }
.btn-danger:hover { filter: brightness(1.06); }
.btn-danger-outline { background: #fff; border-color: #fecdd3; color: var(--err); }
.btn-danger-outline:hover { background: var(--err-bg); border-color: #fda4af; }
.btn-danger-outline svg { width: 15px; height: 15px; }
.modal .box.ask { max-width: 440px; min-width: 0; padding: 24px; gap: 14px; }
.ask h3 { margin: 0; font-family: var(--display); font-size: 18px; }
.ask .ask-text { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.ask .err:empty { display: none; }
.ask .ask-bar { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
@media (max-width: 480px) { .ask .ask-bar { flex-direction: column-reverse; } .ask .ask-bar .btn { width: 100%; justify-content: center; } }
.vcard .vdel { position: absolute; top: 10px; right: 46px; z-index: 3; width: 28px; height: 28px; border-radius: 8px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--err); display: grid; place-items: center; opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s; }
.vcard .vdel svg { width: 15px; height: 15px; }
.vcard:hover .vdel, .vcard .vdel:focus-visible { opacity: 1; transform: none; }
.vcard .vdel:hover { background: var(--err); color: #fff; }
@media (hover: none) { .vcard .vdel { opacity: 1; transform: none; } }
.profile .side { grid-template-rows: auto 1fr auto; }
.danger-zone { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: #fde2e6; }
.danger-zone h3 { margin: 0 0 4px; font-size: 15px; color: var(--err); }
.danger-zone p { margin: 0; font-size: 13.5px; max-width: 520px; }
.danger-zone .btn { flex: none; }
@media (max-width: 640px) { .danger-zone { flex-direction: column; align-items: stretch; } }
table.t tr.gone td { color: var(--muted); }

/* ---- phone fixes (tested at Redmi Note 11, 393px) ---- */
/* a long "Recent" strip must scroll inside its card, never widen the page */
.ws-side { min-width: 0; }
@media (max-width: 1100px) { .workspace { grid-template-columns: minmax(0, 1fr); } }
/* touch screens have no hover: a tap must not freeze the conveyor */
@media (hover: none) { .factory:hover .track { animation-play-state: running; } }
@media (max-width: 640px) {
  .factory .floating.f1 { display: none; } /* it covered the "AI engine" label */
}
/* the drawer fits the visible screen (100vh runs under the phone's address bar) */
@media (max-width: 960px) {
  .sidebar, body.in-app .sidebar { height: auto; }
}

/* phone/tablet: the Generate button sits at the end of the form and scrolls with the page */
@media (max-width: 960px) {
  .main { padding-bottom: 28px; }
  .actions { position: static; margin: 0; padding: 18px 0 0; background: none; backdrop-filter: none; box-shadow: none; border-radius: 0; }
}
/* when the side panels are hidden, the scanner and its label sit in the middle of the screen */
@media (max-width: 1100px) {
  .factory .gate { left: 50%; }
  .factory .before { width: 50%; }
}
/* "AI remix engine" sits clear above the scanner (it touched the top of it) */
.factory .gate .label { top: -50px; }
.factory .floating.f2 { left: calc(50% + 96px); } /* clear of the centered "AI remix engine" label */

/* admin: user details */
#ud > * + * { margin-top: 18px; }
.ud-head { display: flex; align-items: center; gap: 18px; padding: 22px; flex-wrap: wrap; }
.ud-who { flex: 1; min-width: 220px; }
.ud-who h2 { margin: 0 0 8px; font-family: var(--display); font-size: 20px; overflow-wrap: anywhere; }
.ud-who .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ud-who .muted { font-size: 13.5px; }
.ud-head .row-actions { flex-wrap: wrap; }
.ud-head .btn svg, .row-actions .btn-dark svg { width: 15px; height: 15px; }
.uthumb { width: 44px; height: 44px; border-radius: 9px; background: #0d0f1f center / cover no-repeat; display: grid; place-items: center; color: rgba(255,255,255,.7); }
.uthumb svg { width: 18px; height: 18px; }
/* prompt cells wrap inside their own column ("table.t td" = nowrap has to be beaten, or long prompts spill over the next columns) */
table.t td.ptext { min-width: 260px; max-width: 520px; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
a.ulink { color: var(--ink); font-weight: 600; text-decoration: none; } a.ulink:hover { color: var(--brand); text-decoration: underline; }
table.t.ud-jobs td.ptext { width: 45%; }
.ud-jobs td:nth-child(8) { white-space: normal; min-width: 110px; }
.ud-jobs td:nth-child(8) .chip { margin: 2px 0; }
@media (max-width: 640px) { #ud .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---------- Windows app (desktop/): the app bar doubles as the window title bar ----------
   Windows draws the real minimize / maximize / close buttons in the top-right corner (titleBarOverlay),
   so the page keeps that corner free and makes empty bar space draggable. */
html.desktop { --bar-h: 48px; --wco: 138px; }
html.desktop-darwin { --wco: 0px; }
.desktop .appbar { -webkit-app-region: drag; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.desktop .appbar .in { padding-right: calc(var(--wco) + 8px); gap: 10px; }
.desktop .appbar a, .desktop .appbar button, .desktop .appbar .lang, .desktop .appbar .balance-pill, .desktop .menu { -webkit-app-region: no-drag; }
.desktop .appbar .brand { font-size: 15.5px; }
.desktop .appbar .brand .mark { width: 26px; height: 26px; }
.desktop .appbar .burger { width: 34px; height: 34px; }
@media (max-width: 1199px) { .desktop .appbar .avatar-btn .nm { display: none; } }
.desktop .appbar .btn-sm { padding-top: 5px; padding-bottom: 5px; }
.desktop .auth { padding-top: 40px; min-height: 100vh; box-sizing: border-box; }
.desktop .auth::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 40px; -webkit-app-region: drag; z-index: 60; }
.desktop .auth .right { padding-top: 4px; }
.desktop .auth .showcase { min-height: 0; height: calc(100vh - 68px); }
/* app-like: chrome isn't selectable or draggable like a web page */
.desktop .appbar, .desktop .sidebar, .desktop .menu, .desktop .btn, .desktop .chip, .desktop label, .desktop h1, .desktop .eyebrow { -webkit-user-select: none; user-select: none; }
.desktop img, .desktop a { -webkit-user-drag: none; }
.desktop ::-webkit-scrollbar { width: 10px; height: 10px; }
.desktop ::-webkit-scrollbar-thumb { background: rgba(43, 47, 69, .22); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.desktop ::-webkit-scrollbar-thumb:hover { background-color: rgba(43, 47, 69, .38); }
.desktop ::-webkit-scrollbar-track { background: transparent; }
/* 961–1100px (e.g. half-width window): the nav + language switch must fit on one line */
@media (min-width: 961px) and (max-width: 1100px) {
  .site-nav .in { gap: 14px; }
  .site-nav nav a { padding: 7px 8px; }
  .site-nav .lang > svg { display: none; }
  .site-nav .lang { padding-left: 3px; }
  .site-nav .lang .thumb { left: 3px; }
}
.site-nav nav a { white-space: nowrap; }

/* admin: "Sign out all users" bar under the stat tiles */
.sess-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin: 16px 0 18px; }
.sess-bar > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sess-bar .muted { font-size: 13.5px; }
.sess-bar .btn svg { width: 15px; height: 15px; }

/* Viral Clone: "paste a link" rows above the upload boxes */
.lk-cap { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: text; }
.lk-cap svg { width: 14px; height: 14px; flex: none; color: var(--brand); }
.lk-cap span { min-width: 0; }
.lk-note { margin: 6px 0 10px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.linkrow { display: flex; gap: 8px; margin: 0 0 10px; }
.linkrow .input { flex: 1; min-width: 0; padding: 9px 12px; font-size: 13.5px; }
.linkrow .btn { flex: none; padding: 9px 14px; font-size: 13.5px; }
.drop .ph.fetching { cursor: progress; }
.ring.dark { width: 34px; height: 34px; margin: 0 auto 10px; border-color: var(--line); border-top-color: var(--brand); border-right-color: #a78bfa; }

/* "Generate 3 hook variations" switch */
.hooks-toggle { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid #fed7aa; border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed, #fff1f2); cursor: pointer; }
.hooks-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.hooks-toggle .sw { flex: none; width: 38px; height: 22px; border-radius: 99px; background: #e5e7eb; position: relative; margin-top: 1px; transition: background .2s; }
.hooks-toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--spring, ease); }
.hooks-toggle input:checked + .sw { background: linear-gradient(90deg, #f97316, #e11d48); }
.hooks-toggle input:checked + .sw::after { transform: translateX(16px); }
.hooks-toggle input:focus-visible + .sw { outline: 2px solid var(--brand); outline-offset: 2px; }
.hooks-toggle b { display: block; font-size: 14px; color: var(--ink); }
.hooks-toggle small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* result area: 3 variations side by side */
.result .stage .batch { width: 100%; align-self: stretch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.bcell { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bcell .blabel { color: #fff; font-size: 12px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcell .bmedia { position: relative; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #171a2e; display: grid; place-items: center; }
.result .stage .bcell video { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.bcell .bwork { text-align: center; display: grid; justify-items: center; gap: 4px; }
.bcell .bwork .ring { width: 30px; height: 30px; margin: 0 0 6px; }
.bcell .bwork .chip { font-size: 10.5px; padding: 3px 7px; }
.bcell .bfail { color: #fda4af; font-size: 12.5px; font-weight: 600; text-align: center; display: grid; gap: 8px; justify-items: center; padding: 8px; }
.bcell .btn { justify-content: center; padding: 6px 8px; font-size: 12px; }
.bcell .btn svg { width: 13px; height: 13px; }

/* Admin alerts: problems on our side (HypiHub credits etc.), admins only, bottom-right on every page */
.admin-alerts { position: fixed; right: 20px; bottom: 20px; z-index: 65; width: min(400px, calc(100vw - 32px)); display: grid; gap: 10px; }
.admin-alerts .aa { display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 16px; border-radius: 14px; background: #fff;
  border: 1px solid #fecdd3; border-left: 4px solid var(--err); box-shadow: var(--shadow-lg); animation: fade .2s; }
.admin-alerts .aa > svg { width: 20px; height: 20px; flex: none; color: var(--err); margin-top: 1px; }
.admin-alerts .aa-body { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.admin-alerts .aa-body b { display: block; color: var(--err); font-size: 13px; letter-spacing: .02em; text-transform: uppercase; margin-bottom: 2px; }
.admin-alerts .aa-body p { margin: 0 0 4px; color: var(--ink); font-weight: 500; }
.admin-alerts .aa-body span { font-size: 12px; color: var(--muted); }
.admin-alerts details { margin-top: 6px; font-size: 12px; }
.admin-alerts summary { cursor: pointer; color: var(--muted); }
.admin-alerts code { display: block; margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: var(--bg-soft); font: 11.5px/1.4 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-alerts .aa-x { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 10px; font: 600 12.5px var(--font); color: var(--ink-2); cursor: pointer; }
.admin-alerts .aa-x:hover { background: var(--bg-soft); }
@media (max-width: 600px) { .admin-alerts { right: 16px; left: 16px; bottom: 16px; width: auto; } }

/* model picker (all tools) */
.model-pick { display: grid; gap: 8px; margin-bottom: 18px; }
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.model-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 11px 14px 11px 12px; border: 1.5px solid var(--line);
  border-radius: 14px; background: #fff; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .2s var(--spring); }
.model-opt:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.model-opt.on { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: 0 10px 24px -12px rgba(79,70,229,.5); }
.model-opt .mb { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--c); color: #fff;
  font-size: 12.5px; font-weight: 700; letter-spacing: .03em; box-shadow: inset 0 -8px 16px -10px rgba(0,0,0,.35); }
.model-opt .mt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.model-opt .mt b { font-size: 13.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.model-opt .mt span { justify-self: start; padding: 1px 7px; border-radius: 99px; background: var(--bg-soft); color: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.model-opt.on .mt span { background: #eef2ff; color: var(--brand); }
.model-opt .tick { flex: none; position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); transition: background .2s, border-color .2s; }
.model-opt.on .tick { border-color: transparent; background: var(--grad); }
.model-opt.on .tick::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translate(-50%, -62%) rotate(45deg); }
.model-opt .sticker { position: absolute; top: -10px; left: 12px; padding: 2px 9px; border-radius: 99px; background: var(--grad); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 4px 10px -4px rgba(79,70,229,.7); white-space: nowrap; }
.model-pick + .f { display: block; margin-bottom: 8px; }
.model-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0 0; padding: 9px 12px; border-radius: 10px;
  background: var(--bg-soft); font-size: 12.5px; line-height: 1.45; color: var(--ink, inherit); }
.model-note:empty { display: none; }
.model-note em { font-style: normal; color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.check .xtra { margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: #eef2ff; color: var(--brand); font-size: 11.5px; font-family: var(--mono); }
.check .xtra[hidden] { display: none; }
.fields2.inner { gap: 12px; }
#tierBox[hidden] { display: none; }
@media (max-width: 760px) {
  .models { grid-template-columns: 1fr; }
}
