/* ------------------------------------------------------------------ tokens */
:root {
  --night: #141833;
  --panel: #1d2246;
  --raised: #272d5c;
  --line: #333a72;
  --text: #f2f3ff;
  --muted: #9aa0cc;
  --brick: #ffc83d;
  --brick-ledge: #c98f00;
  --brick-ink: #2a1c00;
  --plastic: #5b8cff;
  --plastic-ledge: #2f57c9;
  --ok: #39d98a;
  --bad: #ff5c6c;
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-panel: 14px;
  --r-control: 9px;
  --sidebar: 248px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--text);
  font: 16px/1.55 var(--font-ui); -webkit-font-smoothing: antialiased;
  /* stud grid — the baseplate everything sits on */
  background-image: radial-gradient(circle at 12px 12px, rgba(255,255,255,.035) 0 5px, transparent 5.5px);
  background-size: 24px 24px;
}
img, video { max-width: 100%; display: block; }
a { color: var(--plastic); }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--plastic); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; stroke: none; }
.ic-lg { width: 26px; height: 26px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  --ledge: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--font-ui); color: var(--text); text-decoration: none; cursor: pointer;
  padding: 11px 16px; border-radius: var(--r-control); border: 0;
  background: var(--raised); box-shadow: 0 4px 0 var(--ledge);
  transition: transform .08s, box-shadow .08s, filter .15s;
  margin-bottom: 4px; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ledge); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--ledge); filter: none; }
.btn-brick { background: var(--brick); color: var(--brick-ink); --ledge: var(--brick-ledge); }
.btn-plastic { background: var(--plastic); color: #fff; --ledge: var(--plastic-ledge); }
.btn-ghost { background: transparent; box-shadow: none; border: 1.5px solid var(--line); margin-bottom: 0; }
.btn-ghost:active { transform: none; box-shadow: none; }
.btn-lg { padding: 15px 22px; font-size: 16px; }
.btn-sm { padding: 8px 12px; font-size: 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-control); border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--raised); color: var(--text); }

/* ------------------------------------------------------------------ forms */
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.field small { font-weight: 400; }
input, textarea, select {
  width: 100%; font: 15px/1.4 var(--font-ui); color: var(--text);
  background: #10132a; border: 1.5px solid var(--line); border-radius: var(--r-control); padding: 11px 12px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--plastic); box-shadow: 0 0 0 3px rgba(91,140,255,.25); }
.form-msg { min-height: 20px; font-size: 14px; color: var(--bad); }
.form-msg.ok { color: var(--ok); }

.seg { display: inline-flex; background: #10132a; border: 1.5px solid var(--line); border-radius: 11px; padding: 4px; gap: 4px; }
.seg button { font: 600 14px var(--font-ui); color: var(--muted); background: transparent; border: 0; padding: 8px 14px; border-radius: 7px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.seg button.on { background: var(--raised); color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 600 14px var(--font-ui); color: var(--text); background: var(--raised); border: 0; cursor: pointer;
  padding: 8px 13px; border-radius: 999px; box-shadow: 0 3px 0 var(--line); margin-bottom: 3px;
}
.chip[aria-pressed="true"] { background: var(--brick); color: var(--brick-ink); box-shadow: 0 3px 0 var(--brick-ledge); }

.toggle { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; cursor: pointer; }
.toggle input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; padding: 0; border: 0; cursor: pointer; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle input:checked { background: var(--ok); }
.toggle input:checked::after { left: 21px; }

/* ------------------------------------------------------------------ panels */
.panel { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-panel); padding: 22px; }
.panel h3 { font-size: 19px; margin-bottom: 4px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h3 { margin: 0; }

.empty { display: grid; place-items: center; gap: 10px; text-align: center; padding: 40px 16px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r-panel); }
.empty .ic { width: 34px; height: 34px; color: var(--line); }

/* ------------------------------------------------------------------ marketing nav */
.topnav { position: sticky; top: 0; z-index: 20; background: rgba(20,24,51,.86); backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--line); }
.topnav-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 22px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 21px var(--font-display); color: var(--text); text-decoration: none; letter-spacing: -0.03em; }
.logo img { width: 34px; height: 34px; }
.navlinks { display: flex; gap: 4px; }
.navlinks a { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.navlinks a:hover { color: var(--text); background: var(--raised); }
.navlinks .ic { width: 18px; height: 18px; }
.nav-burger { display: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 96px 0 0; }
.section-title { font-size: clamp(30px, 4.2vw, 46px); max-width: 18ch; }
.section-lead { color: var(--muted); font-size: 18px; max-width: 60ch; margin-top: 12px; }

/* ------------------------------------------------------------------ hero */
.hero { display: grid; grid-template-columns: 1.02fr 1fr; gap: 48px; align-items: center; padding: 72px 0 24px; }
.hero h1 { font-size: clamp(42px, 6.4vw, 78px); font-weight: 800; letter-spacing: -0.045em; line-height: .98; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 46ch; margin: 22px 0 30px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .proof { margin-top: 26px; display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.hero .proof span { display: inline-flex; gap: 7px; align-items: center; }
.hero .proof .ic { width: 17px; height: 17px; color: var(--ok); }

/* Studio window demo */
.studio { background: #1a1e3f; border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,.7); }
.studio-bar { display: flex; gap: 7px; align-items: center; padding: 11px 14px; background: #161a37; border-bottom: 1.5px solid var(--line); font-size: 13px; color: var(--muted); }
.studio-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: block; }
.studio-bar span { margin-left: 8px; }
.studio-body { display: grid; grid-template-columns: 1fr 190px; min-height: 360px; }
.viewport { position: relative; background: linear-gradient(#5b8cff22, #141833 70%); overflow: hidden; }
.viewport svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dock { border-left: 1.5px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; background: #171b39; }
.dock .dock-title { font-weight: 700; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.dock .dock-title img { width: 16px; height: 16px; }
.dock .prompt { background: #10132a; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px; min-height: 92px; line-height: 1.4; }
.dock .prompt .caret { display: inline-block; width: 2px; height: 14px; background: var(--brick); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.dock .log { color: var(--muted); display: grid; gap: 4px; }
.dock .log .done { color: var(--ok); }
.dock .fake-btn { background: var(--brick); color: var(--brick-ink); font-weight: 700; text-align: center; padding: 7px; border-radius: 7px; box-shadow: 0 3px 0 var(--brick-ledge); }
@keyframes blink { 50% { opacity: 0; } }

.blk { opacity: 0; transform: translateY(-40px); }
.go .blk { animation: drop .45s cubic-bezier(.3,1.5,.6,1) forwards; }
.flag-wave { transform-origin: left center; transform-box: fill-box; animation: wave 1.6s ease-in-out infinite alternate; }
@keyframes wave { to { transform: skewY(6deg) scaleX(.9); } }
.dock .fake-btn.pressed { animation: tpress .3s; }
@keyframes drop { to { opacity: 1; transform: none; } }
.fadein { opacity: 0; animation: fade .4s forwards; }
@keyframes fade { to { opacity: 1; } }

/* ------------------------------------------------------------------ tool rows */
.tools { display: grid; gap: 22px; margin-top: 40px; }
.tool { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center; background: var(--panel); border: 1.5px solid var(--line); border-radius: 22px; padding: 34px; }
.tool:nth-child(even) { grid-template-columns: 1.1fr 1fr; }
.tool:nth-child(even) .tool-copy { order: 2; }
.tool-copy h3 { font-size: 30px; margin: 14px 0 10px; }
.tool-copy p { color: var(--muted); font-size: 17px; max-width: 46ch; }
.tool-copy ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.tool-copy li { display: flex; gap: 10px; align-items: flex-start; }
.tool-copy li .ic { color: var(--ok); margin-top: 3px; width: 18px; height: 18px; }
.tool-badge { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brick); color: var(--brick-ink); box-shadow: 0 4px 0 var(--brick-ledge); }
.tool-badge.blue { background: var(--plastic); color: #fff; box-shadow: 0 4px 0 var(--plastic-ledge); }
.tool-badge.green { background: var(--ok); color: #05301b; box-shadow: 0 4px 0 #1f9d5f; }
.tool-badge .ic { width: 26px; height: 26px; }
.price-tag { display: inline-flex; gap: 6px; align-items: center; margin-top: 18px; font-weight: 700; font-size: 14px; background: #10132a; border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 12px; }
.price-tag .ic { width: 16px; height: 16px; color: var(--brick); }

.code-mini { background: #10132a; border: 1.5px solid var(--line); border-radius: 14px; padding: 18px; font: 13.5px/1.6 ui-monospace, "Cascadia Code", Menlo, monospace; color: #c9cdf2; overflow: hidden; }
.code-mini .k { color: #ff9ad5; } .code-mini .s { color: #ffd479; } .code-mini .c { color: #6f76ad; } .code-mini .f { color: #7fd3ff; }

.tile-demo { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; }
.game-tile { width: 150px; }
.game-tile .art { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--raised); }
.game-tile .art img { width: 100%; height: 100%; object-fit: cover; }
.game-tile .name { font-weight: 700; font-size: 14px; margin-top: 8px; line-height: 1.25; }
.game-tile .meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.game-tile .meta span { display: inline-flex; gap: 4px; align-items: center; }
.game-tile .meta .ic { width: 13px; height: 13px; }
.thumb-demo { aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--raised); }
.thumb-demo img { width: 100%; height: 100%; object-fit: cover; }

.trailer-demo { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #0f1230; border: 1.5px solid var(--line); }
.trailer-demo svg { width: 100%; height: 100%; }
.trailer-demo .play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; background: rgba(255,200,61,.95); display: grid; place-items: center; color: var(--brick-ink); box-shadow: 0 5px 0 var(--brick-ledge); }
.trailer-demo .play .ic { width: 28px; height: 28px; margin-left: 4px; }
.trailer-demo .timeline { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 6px; background: rgba(255,255,255,.18); border-radius: 9px; overflow: hidden; }
.trailer-demo .timeline i { display: block; width: 38%; height: 100%; background: var(--brick); }

/* steps (a real sequence, so numbered) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; counter-reset: s; }
.step { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-panel); padding: 24px; position: relative; }
.step::before { counter-increment: s; content: counter(s); font: 800 20px var(--font-display); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--plastic); box-shadow: 0 4px 0 var(--plastic-ledge); margin-bottom: 18px; }
.step h4 { font-size: 20px; margin-bottom: 6px; }
.step p { color: var(--muted); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; align-items: stretch; }
.plan { background: var(--panel); border: 1.5px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.plan.best { border-color: var(--brick); background: linear-gradient(180deg, #2b2a4f, var(--panel) 45%); }
.plan .ribbon { align-self: flex-start; background: var(--brick); color: var(--brick-ink); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 99px; }
.plan h3 { font-size: 22px; }
.plan .amt { font: 800 42px/1 var(--font-display); letter-spacing: -0.03em; margin: 6px 0 2px; }
.plan .amt small { font: 600 16px var(--font-ui); color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 8px 0 18px; display: grid; gap: 8px; color: var(--muted); }
.plan li { display: flex; gap: 9px; }
.plan li .ic { width: 18px; height: 18px; color: var(--ok); margin-top: 3px; }
.plan .btn { margin-top: auto; }
.topups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.topup { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-panel); padding: 16px 18px; }
.topup .t-amt { font: 800 22px var(--font-display); }
.topup .btn { margin-left: auto; }
.costs { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1.5px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.cost { padding: 18px; background: #181c3d; display: grid; gap: 4px; }
.cost + .cost { border-left: 1.5px solid var(--line); }
.cost .ic { color: var(--brick); }
.cost b { font: 800 22px var(--font-display); }

/* download band */
.dl-band { margin-top: 96px; background: var(--brick); color: var(--brick-ink); border-radius: 26px; padding: 44px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; box-shadow: 0 8px 0 var(--brick-ledge); }
.dl-band h2 { font-size: clamp(30px, 4vw, 44px); }
.dl-band p { margin-top: 10px; font-size: 17px; max-width: 46ch; }
.dl-buttons { display: grid; gap: 12px; }
.dl-btn { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: 12px; background: var(--night); color: var(--text); text-decoration: none; font-weight: 700; box-shadow: 0 4px 0 #070918; }
.dl-btn small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.dl-btn .ic { width: 24px; height: 24px; color: var(--brick); }
.dl-btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }

/* faq */
.faq { margin-top: 30px; display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; display: flex; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { margin-left: auto; transition: transform .2s; color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; max-width: 70ch; }

.footer { margin-top: 110px; border-top: 1.5px solid var(--line); padding: 34px 0 50px; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ------------------------------------------------------------------ app shell */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #161a38; border-right: 1.5px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; }
.sidebar .logo { padding: 4px 8px 18px; }
.side-group { font-size: 13px; color: var(--muted); padding: 14px 10px 6px; font-weight: 600; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c3c7ea; text-decoration: none; font-weight: 600; font-size: 15px; position: relative; }
.side-link:hover { background: var(--raised); color: var(--text); }
.side-link.on { background: var(--raised); color: var(--text); }
.side-link.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brick); }
.side-link.on .ic { color: var(--brick); }
.side-link .cost-pill { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.balance-card { background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; }
.balance-card .lbl { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.balance-card .lbl .ic { width: 16px; height: 16px; color: var(--brick); }
.balance-card .num { font: 800 26px var(--font-display); margin: 2px 0 8px; }
.meter { height: 8px; border-radius: 99px; background: #10132a; display: flex; overflow: hidden; }
.meter span { height: 100%; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--plastic); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; box-shadow: 0 3px 0 var(--plastic-ledge); }
.user-row .email { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 32px; border-bottom: 1.5px solid var(--line); position: sticky; top: 0; z-index: 10; background: rgba(20,24,51,.9); backdrop-filter: blur(10px); }
.topbar h1 { font-size: 24px; display: flex; gap: 10px; align-items: center; }
.topbar .burger { display: none; }
.token-chip { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; background: var(--panel); border: 1.5px solid var(--line); border-radius: 99px; padding: 7px 14px; text-decoration: none; color: var(--text); font-size: 14px; }
.token-chip .ic { width: 17px; height: 17px; color: var(--brick); }
.content { padding: 28px 32px 60px; max-width: 1240px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.studio-layout { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 22px; align-items: start; }

.welcome { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background: linear-gradient(110deg, #2d346d, var(--panel)); border: 1.5px solid var(--line); border-radius: 18px; padding: 26px; margin-bottom: 20px; }
.welcome h2 { font-size: 28px; }
.quick { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--text); background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-panel); padding: 20px; transition: border-color .15s; }
.quick:hover { border-color: var(--plastic); }
.quick h4 { font-size: 19px; }
.quick p { color: var(--muted); font-size: 14.5px; }
.quick .foot { margin-top: auto; display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.quick .foot .ic { width: 15px; height: 15px; color: var(--brick); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.stat { background: #181c3d; border-radius: 10px; padding: 12px; }
.stat .k { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.stat .k i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.stat .v { font: 800 20px var(--font-display); }

.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1.5px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid #262c5a; vertical-align: top; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table td.trunc { max-width: 1px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.keybox { display: flex; gap: 10px; align-items: center; background: #10132a; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 10px 10px 14px; margin: 16px 0; }
.keybox code { flex: 1; font: 14px ui-monospace, Menlo, monospace; color: var(--brick); word-break: break-all; }

.setup-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: st; }
.setup-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.setup-steps li::before { counter-increment: st; content: counter(st); width: 30px; height: 30px; border-radius: 9px; background: var(--raised); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.setup-steps li > div { padding-top: 3px; }
.setup-steps b { display: block; margin-bottom: 2px; }

.idea { display: flex; gap: 10px; align-items: center; padding: 11px 12px; background: #181c3d; border-radius: 10px; font-size: 14.5px; }
.idea span { flex: 1; }

/* media studio */
.cost-line { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 12px 14px; background: #10132a; border-radius: 10px; border: 1.5px solid var(--line); }
.cost-line .ic { color: var(--brick); }
.cost-line .spacer + span { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.preview-stage { background: #10132a; border: 1.5px solid var(--line); border-radius: var(--r-panel); padding: 22px; display: grid; gap: 16px; }
.preview-stage .stage-label { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.preview-stage .stage-label .ic { width: 15px; height: 15px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.media-grid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.media-card { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-panel); overflow: hidden; display: flex; flex-direction: column; }
.media-card .art { position: relative; background: #10132a; display: grid; place-items: center; }
.media-card .art.sq { aspect-ratio: 1; }
.media-card .art.wd { aspect-ratio: 16/9; }
.media-card .art img, .media-card .art video { width: 100%; height: 100%; object-fit: cover; }
.media-card .art .kind { position: absolute; top: 10px; left: 10px; background: rgba(20,24,51,.85); border-radius: 99px; padding: 4px 9px; font-size: 12px; font-weight: 700; display: inline-flex; gap: 5px; align-items: center; }
.media-card .art .kind .ic { width: 14px; height: 14px; }
.media-card .body { padding: 12px 14px; display: grid; gap: 8px; }
.media-card .body p { font-size: 14px; color: #c9cdf2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.media-card .actions { display: flex; gap: 4px; align-items: center; }
.media-card .actions .muted { font-size: 12.5px; margin-right: auto; }
.media-card .variants { display: flex; gap: 6px; padding: 0 14px; }
.media-card .variants button { width: 38px; height: 38px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: #10132a; }
.media-card .variants button.on { border-color: var(--brick); }
.media-card .variants img { width: 100%; height: 100%; object-fit: cover; }

.building { display: grid; place-items: center; gap: 12px; color: var(--muted); font-size: 14px; text-align: center; padding: 16px; }
.brick-loader { display: flex; gap: 6px; align-items: flex-end; height: 34px; }
.brick-loader i { width: 16px; height: 12px; border-radius: 3px; background: var(--brick); animation: stack 1.2s ease-in-out infinite; }
.brick-loader i:nth-child(2) { background: var(--plastic); animation-delay: .15s; }
.brick-loader i:nth-child(3) { background: var(--ok); animation-delay: .3s; }
@keyframes stack { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px); } }

.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; max-height: 210px; overflow: auto; padding: 2px; }
.picker button { aspect-ratio: 16/9; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #10132a; cursor: pointer; }
.picker button.on { border-color: var(--brick); }
.picker button img { width: 100%; height: 100%; object-fit: cover; }
.picker .none { display: grid; place-items: center; color: var(--muted); font-size: 12.5px; font-weight: 600; border: 2px dashed var(--line); }
.picker .none.on { border-style: solid; border-color: var(--brick); color: var(--text); }

.status-pill { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 700; border-radius: 99px; padding: 3px 9px; background: var(--raised); }
.status-pill.failed { background: #4a1f33; color: #ffb1b9; }

/* toasts */
#toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 10px; z-index: 100; max-width: min(380px, calc(100vw - 40px)); }
.toast { background: var(--raised); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); animation: toast-in .2s ease-out; font-size: 14.5px; }
.toast .ic { color: var(--ok); margin-top: 1px; }
.toast.err .ic { color: var(--bad); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* dialogs */
dialog { background: var(--panel); color: var(--text); border: 1.5px solid var(--line); border-radius: 18px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 40px 100px -20px rgba(0,0,0,.8); }
dialog::backdrop { background: rgba(8,10,26,.7); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 12px; right: 12px; margin: 0; }
.auth-wrap { padding: 30px; display: grid; gap: 14px; }
.auth-wrap h2 { font-size: 27px; }
.auth-wrap .seg { width: 100%; }
.auth-wrap .seg button { flex: 1; justify-content: center; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .studio-layout { grid-template-columns: 1fr; }
  .plans, .topups { grid-template-columns: 1fr 1fr; }
  .plans .plan:first-child { grid-column: span 2; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .tool, .tool:nth-child(even) { grid-template-columns: 1fr; padding: 24px; }
  .tool:nth-child(even) .tool-copy { order: 0; }
  .steps, .grid-3 { grid-template-columns: 1fr; }
  .costs { grid-template-columns: 1fr 1fr; }
  .cost:nth-child(3) { border-left: 0; }
  .cost:nth-child(n+3) { border-top: 1.5px solid var(--line); }
  .dl-band { grid-template-columns: 1fr; padding: 30px; }
  .navlinks { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--night); border-bottom: 1.5px solid var(--line); padding: 10px 16px 16px; }
  .navlinks.open { display: flex; }
  .nav-burger { display: inline-grid; }
  .topnav-inner .btn-ghost.signin { display: none; }

  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 284px; z-index: 50; transform: translateX(-100%); transition: transform .22s ease; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(8,10,26,.6); }
  .topbar { padding: 14px 16px; }
  .topbar .burger { display: inline-grid; }
  .content { padding: 20px 16px 50px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 620px) {
  .studio-body { grid-template-columns: 1fr; }
  .dock { border-left: 0; border-top: 1.5px solid var(--line); }
  .viewport { min-height: 250px; }
  .plans, .topups { grid-template-columns: 1fr; }
  .plans .plan:first-child { grid-column: auto; }
  .topbar h1 { font-size: 20px; }
  .topbar .token-chip span.lbl { display: none; }
  .tile-demo { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition: none !important; }
}

/* ------------------------------------------------------------------ desktop app */
.titlebar { position: fixed; inset: 0 0 auto 0; height: 38px; z-index: 200; display: flex; align-items: center; background: #10132a; border-bottom: 1.5px solid var(--line); -webkit-app-region: drag; user-select: none; }
.tb-title { display: flex; align-items: center; gap: 8px; font: 700 13px var(--font-ui); color: var(--muted); padding-left: 14px; }
.os-darwin .tb-title { padding-left: 84px; }
.tb-title img { width: 18px; height: 18px; }
.tb-controls { margin-left: auto; display: flex; height: 100%; -webkit-app-region: no-drag; }
.tb-controls button { width: 46px; height: 100%; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.tb-controls button:hover { background: var(--raised); color: var(--text); }
.tb-controls button.close:hover { background: #e5404f; color: #fff; }
.tb-controls svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.is-desktop { padding-top: 38px; }
.is-desktop .sidebar { top: 38px; height: calc(100vh - 38px); }
.is-desktop .topbar, .is-desktop .topnav { top: 38px; }
.is-desktop .footer, .is-desktop .topnav .navlinks a[href="#/download"] { display: none; }

.desk-welcome { min-height: calc(100vh - 38px); display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 30%, #2b3480 0%, transparent 60%); }
.desk-card { width: min(460px, 100%); text-align: center; background: var(--panel); border: 1.5px solid var(--line); border-radius: 22px; padding: 38px 32px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.8); }
.desk-card h1 { font-size: 32px; margin: 18px 0 8px; }
.desk-logo { width: 84px; height: 84px; margin: 0 auto; animation: hop 1.2s cubic-bezier(.3,1.6,.5,1) both; filter: drop-shadow(0 10px 18px rgba(255,200,61,.35)); }
@keyframes hop { 0% { transform: translateY(-50px) scale(.6); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }

/* ------------------------------------------------------------------ tutorial */
.tut { max-width: 1240px; margin: 0 auto; padding: 0 20px 80px; }
.tut.in-app { padding: 0; }
.tut-head { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1.5px solid var(--line); margin-bottom: 8px; flex-wrap: wrap; }
.tut-intro { padding: 34px 0 26px; }
.tut-intro h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; letter-spacing: -0.04em; max-width: 18ch; }
.tut-intro p { margin-top: 10px; font-size: 18px; }
.in-app .tut-intro { padding-top: 4px; }
.in-app .tut-intro h1 { font-size: 32px; }
.tut-grid { display: grid; grid-template-columns: 330px 1fr; gap: 24px; align-items: start; }
.tut-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tut-step { width: 100%; text-align: left; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 13px 14px 16px; border-radius: 13px; border: 1.5px solid transparent; background: transparent; color: var(--text); cursor: pointer; font: inherit; position: relative; overflow: hidden; }
.tut-step:hover { background: var(--panel); }
.tut-step[aria-selected="true"] { background: var(--panel); border-color: var(--line); }
.tut-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--raised); color: var(--muted); }
.tut-step[aria-selected="true"] .tut-ico { background: var(--brick); color: var(--brick-ink); box-shadow: 0 3px 0 var(--brick-ledge); }
.tut-step.past .tut-ico { color: var(--ok); }
.tut-txt b { display: block; font-size: 15.5px; margin-top: 2px; }
.tut-txt span { display: none; color: var(--muted); font-size: 14px; margin-top: 4px; line-height: 1.45; }
.tut-step[aria-selected="true"] .tut-txt span { display: block; }
.tut-bar { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; border-radius: 3px; background: transparent; }
.tut-step[aria-selected="true"] .tut-bar { background: var(--line); }
.tut-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brick); transform-origin: left; transform: scaleX(var(--p, 0)); }
.tut-step:not([aria-selected="true"]) .tut-bar i { display: none; }
.tut-stage-wrap { position: sticky; top: 90px; }
.is-desktop .tut-stage-wrap { top: 128px; }
.tut-stage { position: relative; aspect-ratio: 16 / 10.5; border-radius: 20px; overflow: hidden; border: 1.5px solid var(--line); background: radial-gradient(ellipse at 30% 0%, #2b3480, #171b3b 65%); container-type: inline-size; }
.tut-stage.paused * { animation-play-state: paused !important; }
.tut-controls { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tut-help { margin-top: 70px; }
.tut-help h2 { font-size: 30px; }

.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; font-size: clamp(11px, 1.9cqi, 15px); }
.scene.active { opacity: 1; visibility: visible; transition: opacity .35s; }
.scene .ic { width: 1.25em; height: 1.25em; }

.t-window { position: absolute; left: 7%; top: 8%; width: 86%; height: 80%; background: #1a1e3f; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 60px -25px rgba(0,0,0,.8); }
.t-half { width: 48%; left: 5%; height: 62%; top: 19%; }
.t-bar { height: 2.4em; flex: none; display: flex; align-items: center; gap: .5em; padding: 0 .9em; background: #161a37; border-bottom: 1.5px solid var(--line); color: var(--muted); font-size: .85em; }
.t-bar > i { width: .8em; height: .8em; border-radius: 50%; background: var(--line); }
.t-bar img { width: 1.3em; }
.t-appbar span { font-weight: 700; }
.t-url { display: inline-flex; align-items: center; gap: .4em; margin-left: .8em; background: #10132a; border-radius: 99px; padding: .25em .9em; }
.t-body { padding: 1.4em; display: grid; gap: .9em; align-content: start; flex: 1; }
.t-center { place-items: center; align-content: center; }
.t-h { font-size: 1.45em; }
.t-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font-weight: 700; padding: .75em 1.2em; border-radius: .6em; background: var(--raised); box-shadow: 0 .28em 0 var(--line); width: fit-content; }
.t-btn.sm { padding: .55em .9em; font-size: .92em; }
.t-brick { background: var(--brick); color: var(--brick-ink); box-shadow: 0 .28em 0 var(--brick-ledge); }
.t-ghost { background: transparent; box-shadow: none; border: 1.5px solid var(--line); color: var(--muted); }
.scene.active .t-click { animation: tpress .32s var(--t) both; }
@keyframes tpress { 40% { transform: translateY(.22em); box-shadow: 0 .06em 0 var(--brick-ledge); filter: brightness(1.12); } }

.cursor { position: absolute; width: 2em; height: 2em; z-index: 9; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); left: 72%; top: 92%; }
.scene.active .c-download { animation: c-download 2.4s .2s both cubic-bezier(.5,0,.3,1); }
@keyframes c-download { 0% { left: 76%; top: 95%; } 70%, 100% { left: 51%; top: 47%; } }
.scene.active .c-account { animation: c-account 3s .2s both cubic-bezier(.5,0,.3,1); }
@keyframes c-account { 0% { left: 70%; top: 95%; } 40% { left: 30%; top: 34%; } 80%, 100% { left: 20%; top: 48%; } }
.scene.active .c-plugin { animation: c-plugin 1.4s 0s both cubic-bezier(.5,0,.3,1); }
@keyframes c-plugin { 0% { left: 70%; top: 95%; } 80%, 100% { left: 24%; top: 42%; } }
.scene.active .c-studio { animation: c-studio 5.4s 0s both cubic-bezier(.45,0,.3,1); }
@keyframes c-studio { 0% { left: 60%; top: 96%; } 17%, 20% { left: 19.5%; top: 25.5%; } 64%, 74% { left: 72%; top: 59%; } 86%, 100% { left: 60%; top: 60%; } }
.scene.active .c-build { animation: c-build 2.4s 0s both cubic-bezier(.5,0,.3,1); }
@keyframes c-build { 0% { left: 45%; top: 96%; } 85%, 100% { left: 66%; top: 41%; } }

.t-file { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); display: flex; gap: .7em; align-items: center; background: var(--panel); border: 1.5px solid var(--line); border-radius: .8em; padding: .7em 1em; opacity: 0; z-index: 4; box-shadow: 0 14px 30px -10px rgba(0,0,0,.7); }
.t-file .ic { color: var(--brick); width: 1.8em; height: 1.8em; }
.t-file span { display: grid; font-weight: 700; font-size: .95em; }
.t-file small { display: block; width: 11em; height: .4em; border-radius: 9px; background: var(--line); margin-top: .4em; overflow: hidden; }
.t-progress { display: block; height: 100%; background: var(--ok); transform-origin: left; transform: scaleX(0); }
.scene.active .t-fly-down { animation: flydown .6s 1.5s both cubic-bezier(.3,1.4,.5,1); }
@keyframes flydown { from { opacity: 0; transform: translate(-50%, -160%) scale(.7); } to { opacity: 1; transform: translate(-50%, 0); } }
.scene.active .t-progress { animation: fill 1.4s 2.1s both ease-in-out; }
@keyframes fill { to { transform: scaleX(1); } }
.t-done, .t-note, .t-ok, .t-log, .t-cost, .t-toast { opacity: 0; display: inline-flex; gap: .45em; align-items: center; font-weight: 700; }
.t-done { position: absolute; right: 10%; bottom: 6%; background: var(--ok); color: #05301b; padding: .5em .9em; border-radius: 99px; z-index: 5; }
.t-note, .t-ok { color: var(--ok); }
.t-log { color: var(--muted); font-weight: 500; }
.t-cost { color: var(--muted); font-weight: 600; font-size: .9em; }
.t-cost .ic { color: var(--brick); }
.scene.active :is(.t-done, .t-note, .t-ok, .t-log, .t-cost, .t-toast) { animation: pop .4s var(--t) both cubic-bezier(.3,1.5,.5,1); }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(.4em); } to { opacity: 1; transform: none; } }

.t-split { grid-template-columns: 1fr 1fr; align-items: center; gap: 1.5em; }
.t-form { display: grid; gap: .8em; }
.t-input { height: 2.6em; border: 1.5px solid var(--line); background: #10132a; border-radius: .55em; display: flex; align-items: center; padding: 0 .8em; color: var(--text); font-size: .95em; overflow: hidden; white-space: nowrap; }
.t-input.sm { height: 2.2em; font-size: .85em; }
.t-input span::after, .t-prompt span::after { content: ""; display: inline-block; width: 2px; height: 1em; background: var(--brick); margin-left: 1px; vertical-align: -.15em; animation: blink 1s steps(1) infinite; }
.t-coins { display: grid; justify-items: center; gap: 1em; }
.t-coinstack { position: relative; width: 6em; height: 6em; }
.t-coinstack i { position: absolute; left: 0; width: 6em; height: 2em; border-radius: 50%; background: var(--brick); border: .25em solid var(--brick-ledge); bottom: calc(var(--i) * .75em); opacity: 0; }
.scene.active .t-coinstack i { animation: coin .4s calc(3s + var(--i) * .13s) both cubic-bezier(.3,1.6,.5,1); }
@keyframes coin { from { opacity: 0; transform: translateY(-3em); } to { opacity: 1; transform: none; } }
.t-count { text-align: center; }
.t-count b { display: block; font: 800 2.6em var(--font-display); color: var(--brick); font-variant-numeric: tabular-nums; }
.t-count span { color: var(--muted); font-weight: 600; }

.t-plugfile { position: absolute; left: 23%; top: 37%; width: 3em; height: 3em; border-radius: .7em; background: var(--brick); color: var(--brick-ink); display: grid; place-items: center; box-shadow: 0 .3em 0 var(--brick-ledge); opacity: 0; z-index: 6; }
.t-plugfile .ic { width: 1.6em; height: 1.6em; }
.scene.active .t-plugfile { animation: plugfly 1.6s 1.25s both cubic-bezier(.45,0,.35,1); }
@keyframes plugfly { 0% { opacity: 1; left: 23%; top: 37%; transform: scale(1) rotate(0); } 50% { left: 52%; top: 14%; transform: scale(1.15) rotate(-14deg); } 92% { opacity: 1; } 100% { opacity: 0; left: 76%; top: 50%; transform: scale(.5) rotate(8deg); } }
.t-folder { position: absolute; right: 8%; top: 36%; width: 24%; display: grid; justify-items: center; gap: .5em; font-weight: 700; color: var(--muted); }
.t-folder svg { width: 100%; }
.scene.active .t-folder svg { animation: bump .45s 2.75s both; }
@keyframes bump { 50% { transform: scale(1.12) translateY(-.3em); } }

.t-studio .t-bar { background: #20243a; }
.t-ribbon { flex: none; background: #232740; border-bottom: 1.5px solid var(--line); padding: .45em .8em 0; font-size: .82em; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 1.2em; }
.t-ribbon > span { padding-bottom: .4em; }
.t-ribbon > span.on { color: var(--text); border-bottom: 2px solid var(--plastic); }
.t-ribbon-btns { flex-basis: 100%; display: flex; gap: .8em; padding: .5em 0; border-top: 1px solid #2f3456; }
.t-rb { display: grid; justify-items: center; gap: .15em; padding: .35em .6em; border-radius: .4em; }
.t-rb small { font-size: .85em; }
.t-rb img { width: 1.6em; height: 1.6em; }
.t-brickbtn { background: #2d3260; }
.scene.active .t-brickbtn { animation: tpress .32s var(--t) both, glow 1s .2s 1 both; }
@keyframes glow { 50% { box-shadow: 0 0 0 .3em rgba(255,200,61,.35); } }
.t-studio-body { flex: 1; display: grid; grid-template-columns: 1fr 36%; min-height: 0; }
.t-vp { background: linear-gradient(#8cc8ff, #d9efff 55%, #63c16b 55%); position: relative; }
.t-iso { background: linear-gradient(#5b8cff22, #141833 75%); }
.t-iso svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-panel { border-left: 1.5px solid var(--line); background: #1c2040; padding: .9em; display: grid; gap: .6em; align-content: start; transform: translateX(105%); }
.scene.active .t-panel { animation: slidein .45s 1.5s both cubic-bezier(.3,1.2,.5,1); }
.scene-build.active .t-panel { animation-delay: 0s; }
@keyframes slidein { to { transform: none; } }
.t-prompt { min-height: 4.6em; border: 1.5px solid var(--line); background: #10132a; border-radius: .55em; padding: .6em; font-size: .9em; line-height: 1.4; }
.t-dialog { position: absolute; left: 34%; top: 40%; width: 34%; background: #262b4d; border: 1.5px solid var(--line); border-radius: .7em; padding: 1em; display: grid; gap: .5em; font-size: .85em; opacity: 0; z-index: 8; box-shadow: 0 20px 40px -10px rgba(0,0,0,.7); }
.t-dialog span { color: var(--muted); }
.t-dialog .row { justify-content: flex-end; gap: .5em; }
.t-dialog i { font-style: normal; font-weight: 700; padding: .35em .8em; border-radius: .4em; background: var(--raised); }
.t-dialog i.allow { background: var(--plastic); color: #fff; }
.scene.active .t-dialog { animation: dlg 1.25s var(--t) both; }
@keyframes dlg { 0% { opacity: 0; transform: scale(.9); visibility: visible; } 15%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }
.scene.active .t-dialog .allow { animation: tpress .32s .7s both; }

.t-art { position: absolute; inset: 9% 6%; display: grid; grid-template-columns: .8fr 1.1fr 1.1fr; gap: 1.2em; align-items: center; }
.t-card { background: var(--panel); border: 1.5px solid var(--line); border-radius: .9em; padding: .7em; display: grid; gap: .45em; }
.t-card b { font-size: 1em; }
.t-card > span { display: inline-flex; gap: .35em; align-items: center; color: var(--muted); font-size: .85em; font-weight: 600; }
.t-card > span .ic { color: var(--brick); }
.t-art-sq, .t-art-wd { position: relative; border-radius: .6em; overflow: hidden; background: #10132a; display: grid; place-items: center; }
.t-art-sq { aspect-ratio: 1; }
.t-art-wd { aspect-ratio: 16 / 9; }
.t-paint { position: absolute; inset: 0; z-index: 1; clip-path: inset(0 100% 0 0); background:
  radial-gradient(circle at 50% 60%, #ffd166 0 18%, transparent 19%),
  linear-gradient(transparent 70%, #9cff8f 70%),
  linear-gradient(160deg, #ff8ad8, #7b5cff); }
.t-paint.t2 { background: linear-gradient(transparent 72%, #7bdc6b 72%), radial-gradient(circle at 80% 25%, #fff6 0 9%, transparent 10%), linear-gradient(#57c7ff, #b6f0ff); }
.t-paint.t3 { background: linear-gradient(transparent 80%, #2a1d5c 80%), radial-gradient(circle at 75% 30%, #ffe7a3 0 10%, transparent 11%), linear-gradient(#1b1446, #55267a); }
.scene.active .t-paint { animation: wipe .9s 1.4s both ease-out; }
.scene.active .t-paint.t2 { animation-delay: 2.5s; }
.scene.active .t-paint.t3 { animation-delay: 3.8s; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
.t-loader { position: relative; z-index: 0; display: flex; gap: .3em; align-items: flex-end; height: 1.8em; }
.t-loader i { width: .8em; height: .6em; border-radius: .15em; background: var(--brick); animation: stack 1.2s ease-in-out infinite; }
.t-loader i:nth-child(2) { background: var(--plastic); animation-delay: .15s; }
.t-loader i:nth-child(3) { background: var(--ok); animation-delay: .3s; }
.t-play { position: absolute; z-index: 2; width: 2.6em; height: 2.6em; border-radius: 50%; background: var(--brick); color: var(--brick-ink); display: grid; place-items: center; opacity: 0; box-shadow: 0 .2em 0 var(--brick-ledge); }
.t-play .ic { margin-left: .2em; }
.scene.active .t-play { animation: pop .4s 4.6s both cubic-bezier(.3,1.5,.5,1); }
.t-tl { position: absolute; z-index: 2; left: .6em; right: .6em; bottom: .5em; height: .3em; border-radius: 9px; background: rgba(255,255,255,.2); overflow: hidden; }
.t-tl i { display: block; height: 100%; background: var(--brick); transform-origin: left; transform: scaleX(0); }
.scene.active .t-tl i { animation: fill 2.2s 5s both linear; }
.t-toast { position: absolute; right: 5%; bottom: 7%; background: var(--raised); border: 1.5px solid var(--line); border-radius: .8em; padding: .7em 1em; box-shadow: 0 16px 30px -10px rgba(0,0,0,.7); }
.t-toast .ic { color: var(--ok); }

@media (max-width: 980px) {
  .tut-grid { grid-template-columns: 1fr; }
  .tut-stage-wrap { position: static; order: -1; }
  .tut-steps { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 560px) {
  .t-split { grid-template-columns: 1fr; }
  .t-coins { display: none; }
  .t-art { grid-template-columns: 1fr 1fr; }
  .t-art .t-card:first-child { display: none; }
}

/* ================================================================== v1.1 — sleeker finish */
:root { --glow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 1px 0 rgba(255,255,255,.05) inset; }
.panel, .quick, .plan, .topup, .media-card, .step, .tool { box-shadow: var(--glow), 0 18px 40px -28px rgba(0,0,0,.7); }
.panel { background: linear-gradient(180deg, #20255096, #1b2044) , var(--panel); }
.sidebar { background: linear-gradient(180deg, #181c3f 0%, #13173a 100%); }
.side-link { transition: background .15s, color .15s; }
.side-link.on { background: linear-gradient(90deg, rgba(255,200,61,.14), rgba(255,200,61,.02) 70%); box-shadow: inset 0 0 0 1px rgba(255,200,61,.16); }
.topbar { background: rgba(20,24,51,.72); }
.token-chip { position: relative; transition: border-color .2s; }
.live-on .token-chip::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(57,217,138,.6); animation: livepulse 2s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(57,217,138,.55); } 70% { box-shadow: 0 0 0 7px rgba(57,217,138,0); } 100% { box-shadow: 0 0 0 0 rgba(57,217,138,0); } }
.tick-up { animation: tickup .9s ease-out; }
.tick-down { animation: tickdown .9s ease-out; }
@keyframes tickup { 0% { color: var(--ok); transform: translateY(-3px); } 100% { color: inherit; transform: none; } }
@keyframes tickdown { 0% { color: var(--brick); transform: translateY(2px); } 100% { color: inherit; transform: none; } }

.status-pill.ok { background: rgba(57,217,138,.14); color: #8ff0c0; }
.status-pill.todo { background: rgba(255,200,61,.13); color: #ffd978; }
.status-pill .ic { width: 14px; height: 14px; }
.notice { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; background: linear-gradient(100deg, rgba(255,200,61,.14), rgba(255,200,61,.04)); border: 1px solid rgba(255,200,61,.3); }
.notice > .ic { color: var(--brick); width: 26px; height: 26px; }
.notice b { display: block; }
.notice p { color: var(--muted); font-size: 14px; }
.notice .btn { margin-left: auto; }
.notice-inline { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: #ffd978; margin-top: 8px; }

/* owner payments steps (a real sequence) */
.pay-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: ps; }
.pay-steps li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid #2a3063; }
.pay-steps li:first-child { border-top: 0; }
.pay-steps li::before { counter-increment: ps; content: counter(ps); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--raised); }
.pay-steps li.done::before { content: "✓"; background: var(--ok); color: #05301b; }
.pay-steps b { font-size: 16px; }
.pay-steps p { margin-top: 3px; }
.pay-steps code, .codebox pre, .setup-steps code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #10132a; padding: 1px 6px; border-radius: 5px; }

/* build chat */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 160px); min-height: 520px; max-width: 920px; margin: 0 auto; }
.is-desktop .chat-wrap { height: calc(100vh - 198px); }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; }
.studio-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 7px 13px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.studio-pill i { width: 9px; height: 9px; border-radius: 50%; background: #6b7199; }
.studio-pill.on i { background: var(--ok); animation: livepulse 2s infinite; }
.studio-pill a { color: var(--brick); }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 4px 20px; display: flex; flex-direction: column; gap: 22px; scroll-behavior: smooth; }
.chat-turn { display: grid; gap: 10px; }
.bubble { max-width: 78%; padding: 13px 16px; border-radius: 16px; line-height: 1.5; font-size: 15px; animation: fade .25s; }
.bubble.me { justify-self: end; background: linear-gradient(135deg, #5b8cff, #4a6fe0); color: #fff; border-bottom-right-radius: 5px; white-space: pre-wrap; }
.bubble.ai { justify-self: start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 5px; box-shadow: var(--glow); }
.bubble.ai.pending { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.bubble.ai.failed { display: flex; gap: 10px; color: #ffb1b9; border-color: #5a2a3e; }
.bubble.ai.test { border-color: rgba(255,200,61,.4); }
.bubble-meta { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.bubble-meta .ic { width: 15px; height: 15px; color: var(--ok); }
.bubble-warn { margin-top: 8px; font-size: 13px; color: #ffd978; }
.bubble-warn summary { cursor: pointer; }
.bubble-warn ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.brick-loader.sm { height: 20px; gap: 4px; }
.brick-loader.sm i { width: 10px; height: 8px; }
.chat-empty { margin: auto; text-align: center; max-width: 640px; padding: 30px 10px; }
.chat-empty h2 { font-size: clamp(28px, 4vw, 40px); margin: 18px 0 8px; letter-spacing: -0.035em; }
.chat-orb { width: 78px; height: 78px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center; color: var(--brick-ink); background: radial-gradient(circle at 30% 25%, #ffe08a, var(--brick) 55%, #e0a400); box-shadow: 0 6px 0 var(--brick-ledge), 0 20px 50px -10px rgba(255,200,61,.5); }
.chat-orb .ic { width: 34px; height: 34px; }
.chat-empty .chip { font-weight: 500; text-align: left; }
.composer { display: flex; gap: 10px; align-items: flex-end; background: var(--panel); border: 1.5px solid var(--line); border-radius: 18px; padding: 10px 10px 10px 16px; box-shadow: var(--glow), 0 20px 50px -25px rgba(0,0,0,.8); transition: border-color .15s; }
.composer:focus-within { border-color: var(--plastic); }
.composer textarea { border: 0; background: transparent; padding: 8px 0; min-height: 24px; max-height: 180px; resize: none; box-shadow: none !important; font-size: 16px; }
.composer .send { margin-bottom: 4px; border-radius: 12px; }
.composer-hint { text-align: center; margin-top: 8px; }

/* connect AI tools */
.connect-card h3 { margin: 0; }
.codebox { position: relative; background: #0e1128; border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; }
.codebox pre { margin: 0; padding: 14px 16px; padding-right: 92px; background: none; white-space: pre-wrap; word-break: break-all; color: #c9cdf2; line-height: 1.55; }
.codebox .btn { position: absolute; top: 8px; right: 8px; }

/* website buy page */
.buy { padding-bottom: 20px; }
.buy-hero { padding: 56px 0 10px; }
.buy-hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -0.045em; }
.buy-hero > p { font-size: 18px; max-width: 58ch; margin-top: 10px; }
.buy-account { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.buy-plans { grid-template-columns: 1fr 1fr 1.1fr; margin-top: 26px; }
.plan.chosen, .topup-row.chosen { outline: 2px solid var(--plastic); outline-offset: 2px; }
.plan .btn.loading { opacity: .7; pointer-events: none; }
.topup-list { display: grid; gap: 10px; margin-top: 8px; }
.topup-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; border-radius: 12px; background: #181c3d; border: 1px solid var(--line); color: var(--text); cursor: pointer; font: inherit; text-align: left; transition: border-color .15s, transform .1s; }
.topup-row:hover { border-color: var(--brick); }
.topup-row:active { transform: translateY(1px); }
.topup-row .t-amt { font: 800 22px var(--font-display); }
.topup-row .ic { width: 16px; height: 16px; color: var(--muted); }
.pay-strip { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--line); }
.pay-strip .row .ic { color: var(--ok); }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-methods span { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: #f2f3ff; color: #1b1f3b; }
.buy-success { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 30px; padding: 20px; border-radius: 16px; background: linear-gradient(100deg, rgba(57,217,138,.16), rgba(57,217,138,.04)); border: 1px solid rgba(57,217,138,.35); }
.buy-success h2 { font-size: 24px; }
.buy-success .btn { margin-left: auto; }
@media (max-width: 980px) { .buy-plans { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .bubble { max-width: 92%; } .chat-wrap { height: calc(100vh - 130px); } }
.sidebar { overflow-y: auto; scrollbar-width: thin; gap: 2px; }
.side-link { padding: 9px 12px; }
.side-group { padding: 10px 10px 4px; }
@media (max-height: 820px) { .balance-card .num { font-size: 21px; margin-bottom: 6px; } .balance-card .btn { margin-top: 8px !important; } }

/* ================================================================== tutorial v2 */
.tut-chapter { font-size: 13px; font-weight: 700; color: var(--muted); padding: 14px 14px 4px; list-style: none; }
.tut-chapter:first-child { padding-top: 0; }
.tut-steps { gap: 4px; }
.tut-step { padding: 10px 14px 13px; }
.tut-details { margin-top: 16px; }
.tut-detail { display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--glow); animation: fade .3s; }
.tut-detail.on { display: block; }
.tut-detail h3 { display: flex; gap: 10px; align-items: center; font-size: 20px; margin-bottom: 12px; }
.tut-detail h3 .ic { color: var(--brick); }
.tut-detail ol { margin: 0; padding: 0; list-style: none; counter-reset: td; display: grid; gap: 10px; }
.tut-detail li { counter-increment: td; display: grid; grid-template-columns: 28px 1fr; gap: 10px; line-height: 1.5; }
.tut-detail li::before { content: counter(td); width: 26px; height: 26px; border-radius: 8px; background: var(--raised); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.tut-tip { margin-top: 14px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(255,200,61,.1); border: 1px solid rgba(255,200,61,.25); color: #ffe39a; font-size: 14.5px; }
.tut-tip .ic { flex: none; color: var(--brick); margin-top: 2px; }

/* chat scene */
.t-chatwin { left: 4%; top: 10%; width: 54%; height: 78%; }
.t-livepill { margin-left: auto; color: var(--ok); font-weight: 700; font-size: .9em; }
.t-chatbody { gap: .8em; }
.t-bub { max-width: 92%; padding: .65em .9em; border-radius: .9em; font-size: .92em; line-height: 1.4; opacity: 0; display: flex; gap: .5em; align-items: center; }
.t-bub.me { justify-self: end; background: var(--plastic); color: #fff; border-bottom-right-radius: .25em; min-height: 2.4em; }
.t-bub.ai { background: var(--raised); border-bottom-left-radius: .25em; }
.t-bub.ai .ic { color: var(--ok); flex: none; }
.t-bub.pend { color: var(--muted); }
.scene.active .t-bub { animation: pop .4s var(--t) both cubic-bezier(.3,1.4,.5,1); }
.scene.active .t-bub.pend { animation: pop .4s var(--t) both, fadeout .3s 4.9s forwards; }
@keyframes fadeout { to { opacity: 0; height: 0; padding: 0; margin: 0; } }
.t-dots { display: inline-flex; gap: 3px; }
.t-dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--brick); animation: stack 1s infinite; }
.t-dots b:nth-child(2) { animation-delay: .15s; } .t-dots b:nth-child(3) { animation-delay: .3s; }
.t-beam { position: absolute; left: 58%; top: 46%; width: 8%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--brick), transparent); background-size: 200% 100%; opacity: 0; }
.scene.active .t-beam { animation: beam 1.2s var(--t) 2 both; }
@keyframes beam { 0% { opacity: 0; background-position: 100% 0; } 30% { opacity: 1; } 100% { opacity: 0; background-position: -100% 0; } }
.t-mini { left: 66%; top: 22%; width: 31%; height: 52%; }
.t-mini .t-vp { flex: 1; }

/* undo scene */
.scene.active .t-undo .blk { animation: drop .01s forwards, undofade .5s 2.3s forwards; }
@keyframes undofade { to { opacity: 0; transform: translateY(-10px); } }
.t-explorer { transform: none !important; animation: none !important; }
.t-tree { display: grid; gap: .3em; font-size: .85em; color: var(--muted); }
.t-tree .sel { color: var(--text); background: rgba(91,140,255,.25); border-radius: .3em; padding: .1em .3em; }
.scene.active .t-tree .sel { animation: fadeout .4s 2.3s forwards; }
.t-keys { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: .5em; font-size: 1.6em; opacity: 0; z-index: 6; }
.t-keys kbd { font: 800 .9em var(--font-ui); background: #f2f3ff; color: #1b1f3b; padding: .35em .6em; border-radius: .35em; box-shadow: 0 .2em 0 #9aa0cc; }
.scene.active .t-keys { animation: keys 1.4s var(--t) both; }
@keyframes keys { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.8); } 20%, 70% { opacity: 1; transform: translate(-50%, -50%); } 45% { transform: translate(-50%, -46%) scale(.96); } 100% { opacity: 0; } }

/* code + terminal scenes */
.t-code, .t-term { left: 6%; top: 8%; width: 70%; height: 82%; }
.t-term { width: 88%; }
.t-pre { margin: 0; padding: 1em 1.2em; font: .82em/1.65 ui-monospace, Menlo, monospace; color: #c9cdf2; white-space: pre-wrap; flex: 1; background: #10132a; }
.t-pre .g { color: var(--ok); }
.t-out { display: inline-block; color: #8ff0c0; opacity: 0; }
.scene.active .t-out { animation: fade .3s var(--t) forwards; }
.t-leader { position: absolute; right: 4%; bottom: 10%; width: 24%; background: var(--panel); border: 1px solid var(--line); border-radius: .8em; padding: .8em; display: grid; gap: .3em; font-size: .9em; opacity: 0; box-shadow: 0 16px 30px -10px rgba(0,0,0,.7); }
.t-leader span { display: flex; justify-content: space-between; color: var(--muted); }
.t-leader i { font-style: normal; color: var(--brick); font-weight: 800; }
.scene.active .t-leader { animation: pop .4s var(--t) both cubic-bezier(.3,1.5,.5,1); }

/* buy scene */
.t-buyapp { width: 38%; left: 4%; top: 20%; height: 56%; }
.t-big { font: 800 2em var(--font-display); color: var(--brick); font-variant-numeric: tabular-nums; }
.t-checkout { left: 47%; top: 12%; width: 49%; height: 74%; background: #f7f8ff; color: #1b1f3b; opacity: 0; }
.t-checkout .t-bar { background: #e9ebf7; color: #4a4f72; border-color: #d8dbec; }
.t-checkout .t-url { background: #fff; }
.t-checkout .t-input { background: #fff; color: #1b1f3b; border-color: #cfd3ea; }
.scene.active .t-checkout { animation: pop .45s 1.4s both cubic-bezier(.3,1.3,.5,1); }
.t-amt { font: 800 1.8em var(--font-display); }
.t-amt small { font-size: .45em; color: #6a6f92; }
.t-paybtns { display: flex; gap: .4em; flex-wrap: wrap; }
.t-paybtns i { font-style: normal; font-weight: 700; font-size: .8em; background: #1b1f3b; color: #fff; padding: .4em .7em; border-radius: .4em; }
.t-plastic { background: var(--plastic); color: #fff; box-shadow: 0 .28em 0 var(--plastic-ledge); }
