@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #05060f;
  --fg: #eef0ff;
  --muted: #8a8fb3;
  --dim: #5b5f80;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .08);
  --accent: #7c5cff;
  --cyan: #22d3ee;
  --pink: #f472d0;
  --ok: #34d399;
  --danger: #f87171;
  --radius: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --grad: linear-gradient(100deg, var(--accent), var(--cyan) 55%, var(--pink));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 50%, transparent); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

/* ---------- backdrop ---------- */
#boids { position: fixed; inset: 0; z-index: 0; display: block; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; mix-blend-mode: screen; opacity: .55; }
.aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(110px); opacity: .35; animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: var(--accent); left: -20vmax; top: -25vmax; }
.aurora i:nth-child(2) { background: var(--cyan); right: -25vmax; top: 10vmax; opacity: .18; animation-duration: 32s; }
.aurora i:nth-child(3) { background: var(--pink); left: 20vmax; bottom: -35vmax; opacity: .16; animation-duration: 38s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
.grain { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; }

/* ---------- type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--grad); }
.eyebrow.pill { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); letter-spacing: .08em; text-transform: none; font-family: var(--font); font-size: 13px; }
.eyebrow.pill::before { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.display { font-size: clamp(38px, 6.4vw, 84px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; margin: 18px 0; }
.title { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; margin: 14px 0 12px; }
.lead { color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); max-width: 560px; margin: 0; }
.grad { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shift 6s linear infinite; }
@keyframes shift { to { background-position: 200% 0; } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
kbd { font: 500 11px var(--mono); padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; color: var(--muted); }

/* ---------- glass + buttons ---------- */
.glass { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); }
.btn { border: 1px solid var(--line-2); background: var(--glass); border-radius: 12px; padding: 10px 16px; display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
  transition: background .2s, border-color .2s, transform .15s; backdrop-filter: blur(10px); text-decoration: none; }
.btn:hover { background: var(--glass-2); border-color: rgba(255,255,255,.28); }
.btn:active { transform: scale(.97); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--fg); background: var(--glass); }
.btn.danger { color: var(--danger); }
.btn.on { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.btn:disabled { opacity: .4; pointer-events: none; }
.cta { position: relative; overflow: hidden; border: 0; border-radius: 14px; padding: 14px 26px; font-weight: 600; font-size: 16px; color: #fff; display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--cyan)));
  box-shadow: 0 10px 40px -8px color-mix(in srgb, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.3); transition: transform .2s var(--ease), box-shadow .2s; }
.cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); animation: shimmer 3.2s ease-in-out infinite; }
@keyframes shimmer { 60%, 100% { transform: translateX(120%); } }
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -8px color-mix(in srgb, var(--accent) 90%, transparent), inset 0 1px 0 rgba(255,255,255,.3); }
.cta:active { transform: translateY(0) scale(.98); }
.cta:disabled { filter: grayscale(.6); opacity: .5; pointer-events: none; }
.cta .arrow { transition: transform .2s; }
.cta:hover .arrow { transform: translateX(4px); }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.input { width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--line-2); border-radius: 14px; padding: 13px 15px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.input:focus { border-color: color-mix(in srgb, var(--accent) 70%, white); background: rgba(255,255,255,.06); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.6; }
.label { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: block; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; padding: 24px clamp(16px, 4vw, 56px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.mark { width: 30px; height: 30px; border-radius: 10px; background: conic-gradient(from 200deg, var(--accent), var(--cyan), var(--pink), var(--accent)); position: relative; box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 60%, transparent); flex: none; }
.mark::after { content: ""; position: absolute; inset: 6px; border-radius: 6px; background: var(--bg); }
.mark::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--fg); z-index: 1; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 420px); gap: clamp(32px, 6vw, 96px); align-items: center; max-width: 1240px; width: 100%; margin: 0 auto; }
.rotator { display: inline-block; }
.rotator span { display: inline-block; animation: wordIn .6s var(--ease); }
@keyframes wordIn { from { opacity: 0; transform: translateY(40%); filter: blur(8px); } }
.stats { display: flex; gap: 32px; margin-top: 36px; flex-wrap: wrap; }
.stat b { display: block; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.auth-card { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.seg { display: flex; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); position: relative; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 10px; color: var(--muted); font-weight: 500; position: relative; z-index: 1; transition: color .2s; }
.seg button.on { color: var(--fg); }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: rgba(255,255,255,.1); transition: transform .35s var(--ease); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.seg[data-i="1"] .thumb { transform: translateX(100%); }
.float { position: relative; }
.float .input { padding-top: 22px; padding-bottom: 8px; }
.float label { position: absolute; left: 16px; top: 15px; color: var(--muted); pointer-events: none; transition: all .2s var(--ease); }
.float .input:focus + label, .float .input:not(:placeholder-shown) + label { top: 6px; font-size: 11.5px; color: color-mix(in srgb, var(--accent) 50%, white); }
.err { color: var(--danger); font-size: 13px; min-height: 1.3em; }
.auth-foot { color: var(--dim); font-size: 12px; text-align: center; padding-top: 16px; }
@media (max-width: 900px) { .auth-grid { grid-template-columns: 1fr; } .stats { margin-top: 20px; gap: 22px; } }

/* ---------- wizard shell ---------- */
.wizard { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.topbar { display: flex; align-items: center; gap: 20px; padding: 18px clamp(16px, 3vw, 40px); position: sticky; top: 0; z-index: 5;
  background: linear-gradient(180deg, rgba(5,6,15,.9), rgba(5,6,15,0)); }
.topbar .brand { flex: 1; }
.progress { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.segs { display: flex; gap: 6px; }
.segs button { width: clamp(16px, 4vw, 44px); height: 5px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.1); position: relative; transition: background .3s; }
.segs button::before { content: ""; position: absolute; inset: -8px 0; }
.segs button.done { background: color-mix(in srgb, var(--accent) 80%, white 10%); }
.segs button.on { background: var(--grad); background-size: 200% 100%; animation: shift 2s linear infinite; box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent); }
.segs button:disabled { cursor: not-allowed; }
.step-label { font: 500 12px var(--mono); color: var(--muted); letter-spacing: .08em; white-space: nowrap; }
.step-label b { color: var(--fg); font-weight: 500; }
.user { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); min-width: 0; }
.user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-chip { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--grad); font-size: 13px; flex: none; }
.stage { position: relative; display: grid; padding: 8px clamp(16px, 4vw, 56px) 24px; min-width: 0; }
.screen { grid-area: 1 / 1; width: 100%; max-width: 1280px; margin: 0 auto; align-self: center; min-width: 0; animation: screenIn .7s var(--ease) both; }
.screen.out { animation: screenOut .32s ease-in both; pointer-events: none; }
.screen.back { animation-name: screenInBack; }
.screen.out.back { animation-name: screenOutBack; }
@keyframes screenIn { from { opacity: 0; transform: translateY(40px) scale(.98); filter: blur(10px); } }
@keyframes screenOut { to { opacity: 0; transform: translateY(-30px) scale(.99); filter: blur(8px); } }
@keyframes screenInBack { from { opacity: 0; transform: translateY(-40px) scale(.98); filter: blur(10px); } }
@keyframes screenOutBack { to { opacity: 0; transform: translateY(30px); filter: blur(8px); } }
.stagger > * { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.dock { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(16px, 3vw, 40px) max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(5,6,15,.94) 35%, rgba(5,6,15,0)); }
.dock .hint { color: var(--dim); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
@media (max-width: 700px) { .dock .hint { display: none; } .topbar .user span { display: none; } .step-label { display: none; } .topbar .brand span { display: none; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.center-head { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(24px, 4vw, 44px); }
.center-head .lead { text-align: center; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

/* ---------- welcome ---------- */
.welcome { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 3vh 0; }
.welcome .lead { text-align: center; margin: 0 auto; }
.journey { display: flex; align-items: stretch; margin-top: 44px; flex-wrap: wrap; justify-content: center; }
.journey .node { padding: 16px 20px; min-width: 200px; text-align: left; }
.journey .node b { display: block; font: 500 11px var(--mono); color: var(--muted); letter-spacing: .14em; margin-bottom: 6px; }
.journey .node div { font-weight: 600; }
.journey .node small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.journey .link { width: 48px; align-self: center; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); position: relative; overflow: hidden; }
.journey .link::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--grad); animation: flow 1.6s linear infinite; }
@keyframes flow { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (max-width: 700px) { .journey .link { display: none; } .journey { gap: 10px; } .journey .node { min-width: 0; width: 100%; } }

/* ---------- connect: orbit ---------- */
.orbit { position: relative; width: min(600px, 100%); aspect-ratio: 1; margin: 0 auto; }
.orbit .ring { position: absolute; inset: 9%; border-radius: 50%; border: 1px dashed rgba(255,255,255,.12); animation: spin 80s linear infinite; }
.orbit .ring.r2 { inset: 27%; border-style: solid; border-color: rgba(255,255,255,.06); animation-duration: 50s; animation-direction: reverse; }
.orbit svg.beams { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.beams line { stroke-width: 2; stroke-linecap: round; stroke-dasharray: 3 12; animation: dashflow .7s linear infinite; }
@keyframes dashflow { to { stroke-dashoffset: -15; } }
.core { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(var(--s, 1)); border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 32%), radial-gradient(circle, var(--accent), color-mix(in srgb, var(--accent) 40%, #000) 75%);
  box-shadow: 0 0 calc(40px + var(--n, 0) * 14px) color-mix(in srgb, var(--accent) 70%, transparent), inset 0 0 40px rgba(0,0,0,.35); transition: transform .6s var(--ease), box-shadow .6s; animation: corePulse 3s ease-in-out infinite; }
.core::before { content: ""; position: absolute; inset: -14%; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); animation: ripple 3s ease-out infinite; }
.core.hit { animation: coreHit .7s var(--ease); }
@keyframes coreHit { 40% { filter: brightness(1.8); } }
@keyframes corePulse { 50% { filter: brightness(1.15); } }
@keyframes ripple { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.core b { font-size: clamp(28px, 5vw, 54px); line-height: 1; letter-spacing: -.03em; display: block; }
.core small { display: block; font: 500 11px var(--mono); letter-spacing: .1em; color: rgba(255,255,255,.8); margin-top: 6px; }
.onode { position: absolute; width: 90px; margin: -34px 0 0 -45px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 0; }
.onode .bubble { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 22px; position: relative;
  background: rgba(14,16,32,.8); border: 1px solid var(--line-2); backdrop-filter: blur(10px); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, background .3s; color: var(--c); }
.onode:hover .bubble { transform: scale(1.12); border-color: var(--c); box-shadow: 0 0 24px -4px var(--c); }
.onode.on .bubble { background: var(--c); color: #fff; border-color: rgba(255,255,255,.4); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent), 0 0 36px var(--c); }
.onode.on .bubble::after { content: "✓"; position: absolute; right: -3px; top: -3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #04130c; font-size: 12px; display: grid; place-items: center; box-shadow: 0 0 10px var(--ok); }
.onode .name { font-size: 12px; color: var(--muted); white-space: nowrap; text-shadow: 0 1px 8px #000; }
.onode.on .name { color: var(--fg); }
@media (max-width: 520px) { .onode .bubble { width: 50px; height: 50px; font-size: 18px; } .onode { margin-top: -27px; } }
.feed { margin-top: 26px; overflow: hidden; }
.feed-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 500 12px var(--mono); color: var(--muted); letter-spacing: .06em; }
.feed-head .live { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); }
.feed-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: blink 1.4s infinite; }
.feed-head .live.off { color: var(--dim); } .feed-head .live.off::before { background: var(--dim); box-shadow: none; animation: none; }
@keyframes blink { 50% { opacity: .3; } }
.feed-body { height: 176px; overflow: hidden; padding: 10px 16px; font: 12.5px/1.9 var(--mono); display: flex; flex-direction: column; justify-content: flex-end;
  mask-image: linear-gradient(180deg, transparent, #000 40%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%); }
.feed-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: rise .4s var(--ease) both; color: #c9cdf0; }
.feed-line .src { color: var(--c); }
.feed-empty { color: var(--dim); }

/* ---------- mode cards ---------- */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); perspective: 1200px; }
@media (max-width: 960px) { .modes { grid-template-columns: 1fr; } }
.mcard { position: relative; text-align: left; padding: 0; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  backdrop-filter: blur(16px); transform-style: preserve-3d; transition: transform .25s var(--ease), border-color .3s; overflow: hidden; --mx: 50%; --my: 50%; }
.mcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255,255,255,.09), transparent 45%); }
.mcard.on { border-color: transparent; }
.mcard.on::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--ang), var(--accent), var(--cyan), var(--pink), var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: rot 4s linear infinite; z-index: 2; pointer-events: none; }
@keyframes rot { to { --ang: 360deg; } }
.mcard .demo { height: 230px; position: relative; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(80% 90% at 50% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%); border-bottom: 1px solid var(--line); }
.mcard .body { padding: 20px 22px 22px; }
.mcard h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.mcard p { margin: 0; color: var(--muted); font-size: 14px; }
.mcard .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.tag { font: 500 11px var(--mono); padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line); color: var(--muted); }
.mcard .key { position: absolute; top: 14px; left: 14px; z-index: 3; }
.mcard .check { position: absolute; top: 14px; right: 14px; z-index: 3; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 14px; transform: scale(0); transition: transform .35s var(--ease); }
.mcard.on .check { transform: scale(1); }
.demo-chat { width: 80%; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; height: 180px; overflow: hidden; }
.demo-chat .b { padding: 8px 12px; border-radius: 14px; font-size: 12.5px; max-width: 82%; animation: rise .4s var(--ease) both; }
.demo-chat .b.u { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.demo-chat .b.a { align-self: flex-start; background: rgba(255,255,255,.1); border-bottom-left-radius: 4px; }
.demo-orb { width: 110px; height: 110px; border-radius: 50%; position: relative; margin-bottom: 18px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.6), transparent 34%), radial-gradient(circle, var(--accent), color-mix(in srgb, var(--accent) 35%, #000));
  box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 70%, transparent); animation: orbTalk 1.8s ease-in-out infinite; }
.demo-orb::before, .demo-orb::after { content: ""; position: absolute; inset: -18px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); animation: ripple 2.4s ease-out infinite; }
.demo-orb::after { animation-delay: 1.2s; }
@keyframes orbTalk { 20% { transform: scale(1.08); } 40% { transform: scale(.98); } 60% { transform: scale(1.12); } 80% { transform: scale(1); } }
.demo-bars { position: absolute; bottom: 20px; display: flex; gap: 3px; align-items: center; height: 26px; }
.demo-bars i { width: 3px; border-radius: 2px; background: var(--cyan); animation: bar 1s ease-in-out infinite; animation-delay: calc(var(--i) * -90ms); }
@keyframes bar { 0%, 100% { height: 4px; } 50% { height: 24px; } }
.demo-face { width: 170px; height: 190px; }
.demo-face .la-stage, .lookc .f .la-stage, .hero-vis .face .la-stage { background: none !important; width: 100%; height: 100%; }

/* ---------- style step ---------- */
.style-opts { display: grid; gap: 12px; margin-top: 26px; }
.sopt { display: flex; align-items: center; gap: 16px; text-align: left; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.sopt:hover { background: var(--glass-2); transform: translateX(4px); }
.sopt.on { border-color: color-mix(in srgb, var(--accent) 70%, white 10%); background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.sopt b { display: block; font-size: 16px; }
.sopt span.d { color: var(--muted); font-size: 13px; }
.sopt .n { font: 500 12px var(--mono); color: var(--dim); margin-left: auto; }
.mini { width: 74px; height: 54px; border-radius: 10px; background: #e9eaf2; flex: none; position: relative; overflow: hidden; }
.mini::after { content: ""; position: absolute; background: var(--accent); }
.mini.bubble::after { width: 14px; height: 14px; border-radius: 50%; right: 6px; bottom: 6px; }
.mini.sidebar::after { width: 24px; top: 0; bottom: 0; right: 0; }
.mini.inline::after { inset: 10px 12px; border-radius: 6px; opacity: .7; }
.mini.orb::after { width: 24px; height: 24px; border-radius: 50%; left: 25px; top: 15px; box-shadow: 0 0 12px var(--accent); }
.mini.waveform::after { left: 9px; right: 9px; bottom: 7px; height: 10px; border-radius: 8px; }
.mini.pill::after { width: 34px; height: 11px; border-radius: 8px; left: 20px; bottom: 7px; }
.mini.studio::after { width: 28px; height: 40px; border-radius: 6px; left: 23px; top: 7px; }
.mini.pip::after { width: 18px; height: 18px; border-radius: 50%; right: 6px; bottom: 6px; }
.mini.kiosk { background: #0d0d14; } .mini.kiosk::after { width: 18px; height: 18px; border-radius: 50%; left: 28px; top: 12px; box-shadow: 0 0 14px var(--accent); }
.device-tools { display: flex; gap: 8px; margin-top: 18px; }
.device-wrap { display: grid; place-items: center; min-width: 0; }
.device { width: 100%; border-radius: 18px; overflow: hidden; background: #101223; border: 1px solid var(--line-2); box-shadow: 0 50px 120px -30px rgba(0,0,0,.8), 0 0 0 8px rgba(255,255,255,.02);
  transition: width .5s var(--ease), border-radius .5s var(--ease); }
.device.mobile { width: 380px; max-width: 100%; border-radius: 36px; border-width: 8px; border-color: #1b1d33; }
.device-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #15172b; border-bottom: 1px solid var(--line); }
.device-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.device-bar i:nth-child(2) { background: #febc2e; } .device-bar i:nth-child(3) { background: #28c840; }
.device-bar .url { flex: 1; margin-left: 8px; background: rgba(255,255,255,.06); border-radius: 8px; padding: 4px 12px; font: 12px var(--mono); color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.device.mobile .device-bar i { display: none; }
.screenbox { height: min(620px, 66vh); min-height: 460px; position: relative; background: #f6f6fb; color-scheme: light; overflow: hidden; }
.device.mobile .screenbox { height: min(640px, 70vh); }
.fake { position: absolute; inset: 0; padding: 26px; pointer-events: none; }
.fake .nav { display: flex; justify-content: space-between; margin-bottom: 36px; }
.fake .nav i { display: block; height: 10px; border-radius: 6px; background: #dcdde8; }
.fake .h { height: 26px; width: 55%; border-radius: 8px; background: #cfd0de; margin-bottom: 14px; }
.fake .p { height: 10px; border-radius: 6px; background: #e1e2ec; margin-bottom: 10px; }
.fake .hero { height: 170px; border-radius: 14px; background: linear-gradient(135deg, #e4e4f1, #ececf6); margin-top: 24px; }
.phost { position: absolute; inset: 0; }
.phost.center { display: grid; place-items: center; padding: 16px; overflow: auto; }

/* ---------- identity ---------- */
.narrow { max-width: 880px; margin: 0 auto; }
.mega { display: flex; align-items: baseline; gap: .3em; font-size: clamp(40px, 7vw, 92px); font-weight: 700; letter-spacing: -.04em; line-height: 1.15; margin: 10px 0 34px; }
.mega span { color: var(--dim); flex: none; }
.mega input { flex: 1; min-width: 0; width: 100%; border: 0; outline: none; background: transparent; font: inherit; letter-spacing: inherit; padding: 0 0 6px;
  background-image: var(--grad); background-size: 100% 3px; background-repeat: no-repeat; background-position: 0 100%; caret-color: var(--cyan); }
.mega input::placeholder { color: rgba(255,255,255,.15); }
.fields2 { display: grid; gap: 26px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pillbtn { border: 1px solid var(--line-2); background: var(--glass); border-radius: 999px; padding: 8px 16px; transition: all .2s; }
.pillbtn:hover { background: var(--glass-2); }
.pillbtn.on { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 600; }
.greet { display: flex; gap: 12px; align-items: flex-end; margin-top: 14px; }
.greet .ava { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: var(--accent); box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 60%, transparent); }
.greet .msg { padding: 13px 16px; border-radius: 18px 18px 18px 6px; background: rgba(255,255,255,.08); border: 1px solid var(--line); max-width: 560px; min-height: 48px; backdrop-filter: blur(10px); }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--cyan); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.chips-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chipx { display: inline-flex; align-items: center; gap: 6px; padding: 7px 8px 7px 14px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-size: 14px; animation: rise .3s var(--ease); }
.chipx button { border: 0; background: rgba(255,255,255,.1); width: 20px; height: 20px; border-radius: 50%; font-size: 12px; line-height: 1; color: var(--muted); padding: 0; }
.chips-edit input { flex: 1; min-width: 180px; border: 1px dashed var(--line-2); background: transparent; border-radius: 999px; padding: 7px 14px; outline: none; }
.chips-edit input:focus { border-color: var(--accent); }

/* ---------- persona ---------- */
.persona-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .persona-grid { grid-template-columns: 1fr; } .persona-grid .hero-vis { order: -1; min-height: 280px; } }
.tones { display: flex; flex-wrap: wrap; gap: 10px; }
.tone { border: 1px solid var(--line-2); background: var(--glass); border-radius: 14px; padding: 10px 14px; display: inline-flex; align-items: center; gap: 8px; transition: all .2s var(--ease); backdrop-filter: blur(10px); }
.tone:hover { transform: translateY(-2px); background: var(--glass-2); }
.tone.on { background: color-mix(in srgb, var(--accent) 26%, transparent); border-color: color-mix(in srgb, var(--accent) 70%, white 10%); box-shadow: 0 0 24px -6px var(--accent); }
.tone .e { font-size: 17px; }
.section { margin-top: 28px; }
.colors { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cdot { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--c); box-shadow: 0 0 0 2px var(--bg), 0 0 18px -4px var(--c); transition: transform .2s var(--ease), box-shadow .2s; padding: 0; }
.cdot:hover { transform: scale(1.12); }
.cdot.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c), 0 0 26px var(--c); transform: scale(1.08); }
.cpick { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; position: relative; background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #22d3ee, #6366f1, #d946ef, #f43f5e); }
.cpick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.looks { display: flex; gap: 12px; flex-wrap: wrap; }
.lookc { width: 96px; padding: 6px 6px 8px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); transition: all .2s var(--ease); font-size: 13px; }
.lookc:hover { transform: translateY(-3px); }
.lookc.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.lookc .f { height: 92px; border-radius: 12px; background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.12), transparent 70%); overflow: hidden; }
.hero-vis { position: relative; display: grid; place-items: center; min-height: 440px; }
.hero-vis > * { grid-area: 1 / 1; }
.hero-vis .halo { width: 82%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 65%); filter: blur(10px); animation: corePulse 4s ease-in-out infinite; }
.hero-vis .face { width: min(340px, 80%); aspect-ratio: 200 / 220; position: relative; }
.hero-vis .bigorb { width: 210px; height: 210px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.6), transparent 34%), radial-gradient(circle, var(--accent), color-mix(in srgb, var(--accent) 35%, #000));
  box-shadow: 0 0 90px color-mix(in srgb, var(--accent) 70%, transparent); animation: orbTalk 2.4s ease-in-out infinite; }
.hero-vis .bigorb::before, .hero-vis .bigorb::after { content: ""; position: absolute; inset: -30px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); animation: ripple 3s ease-out infinite; }
.hero-vis .bigorb::after { animation-delay: 1.5s; }
.hero-vis .chatcard { width: min(360px, 100%); padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.hero-vis .nameplate { align-self: end; margin-bottom: 6px; padding: 8px 16px; border-radius: 999px; font-weight: 600; z-index: 1; }

/* ---------- test ---------- */
.test-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .test-grid { grid-template-columns: 1fr; } }
.asks { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.asks h3 { margin: 0 0 4px; font-size: 16px; }
.ask { text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; transition: all .2s var(--ease); }
.ask:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); transform: translateX(4px); }
.ask .src { font: 500 10.5px var(--mono); color: var(--c, var(--muted)); border: 1px solid currentColor; border-radius: 6px; padding: 2px 6px; flex: none; }
.notice { font-size: 12.5px; color: #fbbf24; border: 1px solid rgba(251,191,36,.3); background: rgba(251,191,36,.07); border-radius: 12px; padding: 10px 12px; }

/* ---------- forge ---------- */
.forge { max-width: 780px; margin: 0 auto; text-align: center; }
.term { text-align: left; margin-top: 30px; overflow: hidden; }
.term-bar { display: flex; gap: 6px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.15); }
.term-bar span { margin-left: 8px; font: 12px var(--mono); color: var(--muted); }
.term-body { padding: 16px 18px; font: 13px/1.9 var(--mono); min-height: 290px; }
.term-body .ln { animation: rise .25s var(--ease) both; white-space: pre-wrap; word-break: break-all; }
.term-body .ok { color: var(--ok); } .term-body .dim { color: var(--dim); } .term-body .hl { color: var(--cyan); }
.meter { height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 0 18px 18px; }
.meter i { display: block; height: 100%; width: 0; background: var(--grad); background-size: 200% 100%; animation: shift 1.5s linear infinite; transition: width .3s var(--ease); box-shadow: 0 0 14px var(--accent); }
.done-head { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: 34px; }
.badge-ok { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.35); color: var(--ok); font-weight: 600; font-size: 14px; box-shadow: 0 0 30px -6px rgba(52,211,153,.6); }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .steps3 { grid-template-columns: 1fr; } }
.scard { padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; position: relative; overflow: hidden; }
.scard .num { font: 700 72px/1 var(--font); letter-spacing: -.05em; position: absolute; right: 16px; top: 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .16; }
.scard h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.scard p { margin: 0; }
.code { position: relative; background: rgba(0,0,0,.45); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; padding-right: 62px; font: 12.5px/1.7 var(--mono); color: #d7dbff; white-space: pre-wrap; word-break: break-all; }
.code .copy { position: absolute; top: 8px; right: 8px; border: 1px solid var(--line-2); background: rgba(255,255,255,.06); border-radius: 8px; padding: 4px 9px; font: 500 11.5px var(--font); color: var(--fg); }
.code .copy:hover { background: rgba(255,255,255,.14); }
.code .p { color: var(--accent); user-select: none; }
.keyrow { display: flex; gap: 8px; flex-wrap: wrap; }
.keyrow code { flex: 1 1 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(0,0,0,.45); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font: 12.5px var(--mono); }
.tabs2 { display: flex; gap: 4px; }
.tabs2 button { border: 0; background: transparent; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.tabs2 button.on { background: rgba(255,255,255,.1); color: var(--fg); }
.explorer { margin-top: 18px; display: grid; grid-template-columns: 260px minmax(0, 1fr); overflow: hidden; min-height: 460px; }
@media (max-width: 800px) { .explorer { grid-template-columns: 1fr; } }
.tree { border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; background: rgba(0,0,0,.2); }
@media (max-width: 800px) { .tree { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; } }
.tree .dir { font: 500 11px var(--mono); color: var(--dim); padding: 8px 10px 4px; letter-spacing: .06em; }
.tree button { text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: 9px; font: 12.5px var(--mono); color: var(--muted); }
.tree button:hover { color: var(--fg); background: rgba(255,255,255,.04); }
.tree button.on { color: var(--fg); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.viewer { margin: 0; padding: 18px 20px; overflow: auto; max-height: 600px; font: 12.5px/1.75 var(--mono); white-space: pre-wrap; word-break: break-word; color: #c9cdf0; }
.viewer .h { color: var(--cyan); font-weight: 500; }
.viewer .fm { color: var(--pink); }
.viewer .c { color: #fbbf24; }
.done-actions { display: flex; gap: 10px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* ---------- modal + toast ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(3,4,10,.6); backdrop-filter: blur(8px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(440px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 16px; animation: pop .4s var(--ease); background: rgba(16,18,36,.85); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.handshake { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 0; }
.handshake .lg { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-weight: 700; font-size: 22px; color: #fff; }
.handshake .dots { display: flex; gap: 5px; }
.handshake .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; animation-delay: calc(var(--i) * .2s); }
.modal h2 { margin: 0; text-align: center; font-size: 22px; letter-spacing: -.02em; }
.scopes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.scopes li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 13.5px; }
.scopes li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: all .35s var(--ease);
  padding: 11px 18px; border-radius: 14px; font-weight: 500; background: rgba(20,22,40,.85); border: 1px solid var(--line-2); backdrop-filter: blur(14px); box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
