/* Neo Agent Studio — one stylesheet. Dark by default, light when Telegram is light.
 * Palette: ink violet base, iris accent; the one loud element is the aura around the prompt composer. */
:root {
  --bg: #13111f;
  --bg-2: #181527;
  --surface: #1e1b2e;
  --surface-2: #29253d;
  --surface-3: #342f4c;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f4f1fb;
  --muted: #a69fbd;
  --faint: #6f6888;
  --accent: #8d7bff;
  --accent-2: #b39cff;
  --accent-ink: #ffffff;
  --orchid: #ff8fcf;
  --sky: #6fd3ff;
  --ok: #5fe3b2;
  --bad: #ff6b81;
  --warn: #ffc861;
  --glass: rgba(30, 27, 46, .72);
  --shadow: 0 18px 40px rgba(4, 2, 12, .5);
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --spring: cubic-bezier(.2, 1.3, .35, 1);
  --out: cubic-bezier(.16, .84, .3, 1);
  --top: max(env(safe-area-inset-top, 0px), calc(var(--tg-sa-top, 0px) + var(--tg-csa-top, 0px)));
  --bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-sa-bottom, 0px));
  --gutter: 18px;
  color-scheme: dark;
}
html[data-scheme="light"] {
  --bg: #f5f3fb;
  --bg-2: #efecf8;
  --surface: #ffffff;
  --surface-2: #f0edf8;
  --surface-3: #e5e0f3;
  --line: rgba(30, 20, 70, .08);
  --line-2: rgba(30, 20, 70, .14);
  --text: #18142a;
  --muted: #696283;
  --faint: #9a94b0;
  --accent: #6c55f2;
  --accent-2: #8a76ff;
  --glass: rgba(255, 255, 255, .78);
  --shadow: 0 14px 34px rgba(40, 24, 110, .14);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
body.sheet-open, body.story-open { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
input, textarea { font: inherit; color: inherit; }
img, svg, video, audio { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
[hidden] { display: none !important; }
.ic { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pad { padding: 4px 8px; }
h1, h2, h3, p { margin: 0; }

/* ------------------------------------------------------------------ layout */
.view {
  min-height: 100vh;
  padding: calc(var(--top) + 14px) var(--gutter) calc(var(--bottom) + 112px);
  max-width: 560px;
  margin: 0 auto;
  outline: none;
  overflow-x: clip;
}
.view.screen-result, .view.screen-agent, .view.screen-setup { padding-top: calc(var(--top) + 6px); padding-bottom: calc(var(--bottom) + 128px); }
.boot { display: grid; place-items: center; min-height: 60vh; }

.bar { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 6px; min-height: 52px; margin: 0 -6px 10px; }
.tg-back .bar { grid-template-columns: 1fr auto; margin-left: 0; }
.tg-back .bar > [data-act="back"] { display: none; }
.bar-title { font-size: 17px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-end { display: flex; justify-content: flex-end; min-width: 0; }
.section-title { font-size: 19px; font-weight: 700; letter-spacing: -.015em; margin: 26px 0 12px; }
.page-top { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.page-title { font-size: 30px; font-weight: 750; letter-spacing: -.03em; }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 16px;
  font-weight: 650; font-size: 15px; letter-spacing: -.005em;
  transition: transform .35s var(--spring), background .2s, opacity .2s, box-shadow .3s;
  user-select: none;
}
.btn:active { transform: scale(.965); }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); box-shadow: 0 8px 22px rgba(124, 99, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.sm { min-height: 36px; padding: 0 12px; border-radius: 12px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn.busy { opacity: .6; pointer-events: none; }
.btn.glow { position: relative; }
.btn.glow::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 0 0 rgba(141, 123, 255, .45); animation: pulse 2.4s var(--out) infinite; pointer-events: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(141, 123, 255, .45); } 70%, 100% { box-shadow: 0 0 0 14px rgba(141, 123, 255, 0); } }

.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--text); transition: transform .3s var(--spring), background .2s; }
.icon-btn:active { transform: scale(.9); background: var(--surface-2); }
.icon-btn.round { border-radius: 50%; background: var(--surface-2); width: 40px; height: 40px; }
.icon-btn.quiet { color: var(--muted); }
.icon-btn.sm { width: 32px; height: 32px; }
.text-btn { color: var(--accent-2); font-weight: 600; padding: 10px 4px; }
.text-btn.center { display: block; margin: 4px auto 0; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 550; padding: 12px 2px; margin-top: 4px; }
.link-btn:active { color: var(--text); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; scroll-padding: 0 var(--gutter); }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.tight { margin-top: 10px; }
.chip {
  flex: none; height: 38px; padding: 0 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, transform .3s var(--spring);
}
.chip:active { transform: scale(.94); }
.chip.on { background: var(--text); color: var(--bg); border-color: transparent; }
.chip.sm { height: 34px; padding: 0 13px; font-size: 13.5px; }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.seg-btn { flex: 1; min-height: 38px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--muted); padding: 0 8px; white-space: nowrap; transition: background .25s, color .25s; }
.seg-btn.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset; }
.seg-btn .count { color: var(--faint); font-weight: 500; margin-left: 2px; }
.seg-btn.on .count { color: var(--muted); }
.seg.sm .seg-btn { min-height: 32px; font-size: 13px; }

.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 14px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); margin: 12px 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--text); height: 100%; }
.search input::-webkit-search-cancel-button { display: none; }
.input { width: 100%; height: 50px; padding: 0 14px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); color: var(--text); outline: none; transition: border-color .2s; }
.input:focus, .input:focus-within { border-color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: rgba(141, 123, 255, .2); color: var(--accent-2); }
html[data-scheme="light"] .demo-pill { color: #8a5a00; background: rgba(255, 190, 70, .2); border-color: rgba(200, 140, 20, .35); }
.demo-pill { height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 650; color: var(--warn); background: rgba(255, 200, 97, .12); border: 1px solid rgba(255, 200, 97, .25); }
.prov { display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .32); font-size: calc(var(--s) * .4); font-weight: 800; letter-spacing: -.02em; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent-2); animation: spin .8s linear infinite; display: inline-block; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { border-radius: var(--r-m); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.skel.row { height: 58px; margin-bottom: 10px; }
.skel.block { height: 140px; margin-bottom: 10px; }
.skel.card { height: 200px; margin-bottom: 10px; }
.skel.card.tall { height: 260px; }
.skel.tile { aspect-ratio: 1; }
@keyframes shimmer { to { background-position: -300% 0; } }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 32px 18px; color: var(--muted); }
.empty b { color: var(--text); font-size: 17px; }
.empty-line { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 14px 2px; }
.note-card { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-top: 16px; }
.note-card .ic { color: var(--accent-2); margin-top: 1px; }

/* ------------------------------------------------------------------ create */
.home-top { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.hello { color: var(--muted); font-weight: 550; font-size: 16px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-variant-numeric: tabular-nums; font-size: 14px; }
.bal .ic { color: var(--warn); }
.headline { font-size: clamp(30px, 9vw, 38px); line-height: 1.04; font-weight: 780; letter-spacing: -.035em; margin: 10px 0 20px; text-wrap: balance; }
.create .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 0 var(--gutter); }
.create .chips::-webkit-scrollbar { display: none; }

.composer { position: relative; border-radius: var(--r-l); padding: 1px; isolation: isolate; }
.composer::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(179, 156, 255, .7), rgba(255, 143, 207, .35) 45%, rgba(111, 211, 255, .45)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: 1; pointer-events: none; }
.aura { position: absolute; inset: -14% 0; z-index: -1; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--orchid), var(--sky), var(--accent)); filter: blur(42px); opacity: .22; transition: opacity .6s var(--out), transform .6s var(--out); animation: aura 14s linear infinite; pointer-events: none; }
.composer.typing .aura, .composer:focus-within .aura { opacity: .42; }
@keyframes aura { to { transform: rotate(360deg); } }
.composer-in { position: relative; z-index: 0; background: var(--surface); border-radius: calc(var(--r-l) - 1px); padding: 14px 12px 12px 16px; }
.composer textarea { display: block; width: 100%; min-height: 96px; max-height: 260px; resize: none; border: 0; outline: none; background: none; color: var(--text); font-size: 17px; line-height: 1.45; padding: 0 4px 0 0; }
.composer textarea::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-width: 0; height: 40px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: 14px; color: var(--text); transition: transform .3s var(--spring); }
.pill:active { transform: scale(.95); }
.pill .pill-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill .ic { color: var(--muted); }
.send { margin-left: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(140deg, var(--accent-2), var(--accent) 55%, #6b5cf5); box-shadow: 0 8px 22px rgba(124, 99, 255, .45); transition: transform .4s var(--spring), opacity .25s, filter .25s; }
.send[aria-disabled="true"] { filter: saturate(.2); opacity: .45; box-shadow: none; }
.send:active { transform: scale(.88); }
.send.busy .ic { animation: spin .8s linear infinite; }
.composer.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.files { display: flex; gap: 8px; overflow-x: auto; margin: -2px 0 10px; scrollbar-width: none; }
.file { position: relative; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 30px 0 6px; border-radius: 14px; background: var(--surface-2); max-width: 190px; flex: none; }
.file-thumb { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.file.busy .file-thumb { animation: breathe 1s ease-in-out infinite alternate; }
@keyframes breathe { to { opacity: .4; } }
.file-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }

.agent-card { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px; padding: 16px 14px 16px 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); text-align: left; transition: transform .35s var(--spring); }
.agent-card:active { transform: scale(.98); }
.agent-card-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.agent-card-text b { font-size: 16px; letter-spacing: -.01em; }
.agent-card-text span { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.stack { display: flex; flex: none; }
.stack-av { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2.5px var(--surface); }
.stack-av + .stack-av { margin-left: -12px; }
.chev { color: var(--faint); }

/* ------------------------------------------------------------------ nav */
.nav { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom) + 12px); z-index: 30; display: flex; justify-content: center; pointer-events: none; transition: transform .45s var(--spring), opacity .3s; }
body.typing .nav, body.sheet-open .nav { transform: translateY(140%); opacity: 0; }
.nav-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr 64px; width: min(330px, calc(100% - 40px)); height: 64px; padding: 6px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); pointer-events: auto; }
.nav-glider { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px - 64px) / 2); border-radius: 999px; background: var(--surface-3); transform: translateX(calc(var(--i) * 100%)); transition: transform .5s var(--spring), width .5s var(--spring); }
.nav-inner[data-i="2"] .nav-glider { opacity: 0; transform: translateX(200%) scale(.6); }
.nav-glider { transition: transform .5s var(--spring), opacity .25s; }
.nav-btn { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; color: var(--muted); font-weight: 650; font-size: 14px; transition: color .25s; }
.nav-btn.on { color: var(--text); }
.nav-me { justify-self: center; width: 52px; }
.nav-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(140deg, var(--accent-2), var(--orchid)); color: #1b1530; font-weight: 800; box-shadow: 0 0 0 2px transparent; transition: box-shadow .3s; }
.nav-me.on .nav-av { box-shadow: 0 0 0 2px var(--accent-2); }
.nav-av img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ sheets */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(6, 4, 14, .55); opacity: 0; transition: opacity .3s; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: calc(100% - var(--top) - 40px); display: flex; flex-direction: column; background: var(--bg-2); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); transform: translateY(105%); transition: transform .5s var(--spring); touch-action: pan-y; }
.sheet.tall .sheet-panel { height: calc(100% - var(--top) - 40px); }
.sheet.open .sheet-bg { opacity: 1; }
.sheet.open .sheet-panel { transform: translateY(0); }
.sheet.closing .sheet-panel { transform: translateY(105%); transition: transform .3s var(--out); }
.sheet-panel.dragging { transition: none; }
.sheet-grip { display: grid; place-items: center; height: 22px; flex: none; cursor: grab; }
.sheet-grip span { width: 38px; height: 5px; border-radius: 3px; background: var(--line-2); }
.sheet-head { display: flex; align-items: flex-start; gap: 8px; padding: 0 10px 8px var(--gutter); flex: none; }
.sheet-titles { flex: 1; min-width: 0; padding-top: 6px; }
.sheet-titles h2 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.sheet-titles p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px var(--gutter) 18px; -webkit-overflow-scrolling: touch; }
.sheet-foot { flex: none; padding: 10px var(--gutter) calc(var(--bottom) + 14px); border-top: 1px solid var(--line); background: var(--bg-2); }
.sheet-foot[hidden] + * { display: none; }
.sheet-body:last-child { padding-bottom: calc(var(--bottom) + 22px); }

.how { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 16px; }
.how li { display: flex; gap: 14px; }
.how-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); font-weight: 750; color: var(--accent-2); }
.how b { display: block; margin-bottom: 2px; }
.how p { color: var(--muted); font-size: 14px; }

/* level slider */
.lvl { position: relative; padding: 18px 4px 6px; touch-action: none; user-select: none; outline: none; --x: 0; }
.lvl-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); margin: 0 12px; }
.lvl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--x) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--sky), var(--accent), var(--orchid)); transition: width .45s var(--spring); }
.lvl-stop { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; display: grid; place-items: center; }
.lvl-stop::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); transition: background .3s, transform .3s var(--spring); }
.lvl-stop.on::after { background: #fff; }
.lvl-stop:nth-of-type(1) { left: 0; } .lvl-stop:nth-of-type(2) { left: 33.333%; } .lvl-stop:nth-of-type(3) { left: 66.666%; } .lvl-stop:nth-of-type(4) { left: 100%; }
.lvl-thumb { position: absolute; top: 50%; left: calc(var(--x) * 100%); width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .35), 0 0 0 6px rgba(141, 123, 255, .25); transition: left .45s var(--spring), transform .3s var(--spring); pointer-events: none; }
.lvl.dragging .lvl-thumb { transform: scale(1.15); }
.lvl.is-auto .lvl-thumb { opacity: 0; transform: scale(.4); }
.lvl.is-auto .lvl-fill { width: 0; }
.lvl-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 16px; font-size: clamp(11px, 3.2vw, 12.5px); color: var(--faint); text-align: center; }
.lvl-labels span { transition: color .25s; }
.lvl-labels span.on { color: var(--text); font-weight: 650; }
.lvl-info { margin: 14px 0 4px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.lvl-info.auto p { color: var(--muted); }
.lvl-info.picked { display: flex; gap: 12px; align-items: center; }
.lvl-info.picked p { color: var(--muted); font-size: 13.5px; }
.lvl-desc { font-size: 15.5px; }
.lvl-info .muted { font-size: 13.5px; }
.disclosure { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 50px; margin-top: 14px; padding: 0 4px; font-weight: 650; border-top: 1px solid var(--line); }
.list-head { font-size: 13px; color: var(--muted); margin: 2px 2px 6px; }
.group-label { font-size: 12.5px; color: var(--faint); margin: 12px 2px 4px; font-weight: 600; }
.model-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 14px; text-align: left; transition: background .2s; }
.model-row:active { background: var(--surface); }
.model-row.on { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent); }
.model-main { flex: 1; min-width: 0; display: grid; }
.model-main span { font-size: 12.5px; color: var(--muted); }
.model-price { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tick { color: var(--accent-2); }

/* ------------------------------------------------------------------ result / chat */
.model-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { display: grid; gap: 14px; }
.msg { display: flex; gap: 8px; align-items: flex-end; }
.msg.me { justify-content: flex-end; }
.msg .bubble { max-width: 88%; padding: 11px 14px; border-radius: 20px; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.msg.me .bubble { background: linear-gradient(160deg, var(--accent-2), var(--accent)); color: #fff; border-bottom-right-radius: 6px; }
.msg.bot .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.bot .bubble.bad { border-color: rgba(255, 107, 129, .35); }
.bot-av { width: 32px; height: 32px; flex: none; border-radius: 50%; overflow: hidden; }
.msg-files { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.msg-files img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.file-chip { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .18); }
.rich p + p, .rich p + ul, .rich ul + p, .rich p + ol, .rich ol + p, .rich pre + p, .rich p + pre { margin-top: 10px; }
.rich ul, .rich ol { margin: 0; padding-left: 20px; }
.rich li + li { margin-top: 4px; }
.rich code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }
.rich pre { background: var(--bg); padding: 10px 12px; border-radius: 12px; overflow-x: auto; }
.rich pre code { background: none; padding: 0; }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.typing { display: inline-flex; gap: 5px; align-items: center; padding: 15px 16px !important; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.cost { color: var(--faint); font-size: 12.5px; margin: 2px 0 0 40px; }
.media-card { position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.media-card.k-video { max-width: 300px; }
.media-card img, .media-card video { width: 100%; height: auto; object-fit: cover; }
.media-card.pending { display: grid; place-items: center; min-height: 180px; }
.media-card .shimmer { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(179, 156, 255, .14) 50%, transparent 70%) 0 0 / 250% 100%; animation: shimmer 1.6s linear infinite; }
.media-wait { position: relative; display: grid; justify-items: center; gap: 12px; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.fake-video { position: relative; }
.play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 8, 20, .45); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.play.sm { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.music-card { display: flex; gap: 14px; align-items: center; padding: 16px; }
.disc { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; flex: none; background: conic-gradient(from 30deg, var(--accent), var(--orchid), var(--warn), var(--accent)); color: #fff; }
.music-main { flex: 1; min-width: 0; display: grid; gap: 10px; }
.music-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-main audio { width: 100%; height: 40px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 14px var(--gutter) calc(var(--bottom) + 14px); background: linear-gradient(180deg, transparent, var(--bg) 38%); }
.dock .btn { max-width: 524px; margin: 0 auto; display: flex; }
body.typing .dock { position: static; background: none; padding-left: 0; padding-right: 0; }

/* ------------------------------------------------------------------ showcase */
.showcase { min-height: calc(100vh - var(--top) - var(--bottom) - 190px); display: flex; flex-direction: column; }
.showcase .intro { margin: 4px 0 18px; }
.showcase-mid { margin: auto 0; padding: 8px 0 20px; display: grid; gap: 14px; }
.showcase .intro .bubble { font-size: 16px; }
.showcase .bot-av { width: 36px; height: 36px; }
.marquee { margin: 0 calc(-1 * var(--gutter)); display: grid; gap: 10px; overflow: hidden; padding: 4px 0; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mq-row { overflow: hidden; }
.mq-track { display: flex; gap: 10px; width: max-content; animation: mq var(--d) linear infinite; }
.mq-row.rev .mq-track { animation-direction: reverse; }
.marquee.held .mq-track, .marquee:hover .mq-track { animation-play-state: paused; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 5px)); } }
.task { display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 16px 0 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: transform .3s var(--spring), background .2s; }
.task:active { transform: scale(.95); background: var(--surface-2); }
.task-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: hsl(var(--h) 70% 62% / .2); color: hsl(var(--h) 80% 72%); }
html[data-scheme="light"] .task-ic { color: hsl(var(--h) 60% 40%); }
.task-ic.big { width: 40px; height: 40px; }
.list { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 4px; }
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border-radius: 14px; text-align: left; }
button.list-row:active { background: var(--surface-2); }
.list-row > .ic:first-child { color: var(--muted); }
.list-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.list-main b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-main span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* story */
.story { position: fixed; inset: 0; z-index: 60; background: radial-gradient(120% 70% at 50% 0%, #2b2350, var(--bg) 60%); display: flex; flex-direction: column; padding: calc(var(--top) + 10px) var(--gutter) calc(var(--bottom) + 14px); opacity: 0; transform: scale(.96); transition: opacity .3s, transform .45s var(--spring); }
html[data-scheme="light"] .story { background: radial-gradient(120% 70% at 50% 0%, #e2dbff, var(--bg) 60%); }
.story.open { opacity: 1; transform: none; }
.story-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.story-bars span { height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.story-bars i { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(0); }
.story-head { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.story-head b { flex: 1; min-width: 0; font-size: 15.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story.ended .skip { visibility: hidden; }
.skip { padding: 8px 6px; }
.story-stage { position: relative; flex: 1; min-height: 0; margin-top: 10px; cursor: pointer; }
.scene { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .45s var(--out), transform .6s var(--spring); pointer-events: none; overflow: hidden; }
.scene.on { opacity: 1; transform: none; }
.scene.past { transform: translateY(-18px) scale(.98); }
.st-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.st-steps li { display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .5s var(--spring), color .3s; }
.st-steps li.shown { opacity: 1; transform: none; }
.st-steps li.done { color: var(--muted); }
.st-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.st-dot .ic { display: none; color: var(--ok); }
.st-steps li.done .st-dot .spinner { display: none; }
.st-steps li.done .st-dot .ic { display: block; }
.st-card { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .55s var(--spring); }
.st-card.shown { opacity: 1; transform: none; }
.st-opt { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); font-weight: 600; font-size: 15px; transition: opacity .4s, background .3s; }
.st-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); color: transparent; transition: background .3s, color .3s; }
.st-txt { position: relative; }
.st-txt::after { content: ""; position: absolute; left: 0; top: 52%; height: 2px; width: 100%; background: var(--bad); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--out); }
.st-opt.struck { opacity: .45; }
.st-opt.struck .st-txt::after { transform: scaleX(1); }
.st-opt.struck .st-mark { background: rgba(255, 107, 129, .2); color: var(--bad); }
.st-opt.kept { background: rgba(95, 227, 178, .12); }
.st-opt.kept .st-mark { background: var(--ok); color: #0c2a1f; }
.st-caption { margin-top: 22px; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .55s var(--spring); text-wrap: balance; }
.st-caption.shown { opacity: 1; transform: none; }
.s-chat { gap: 14px; }
.s-chat .msg.me, .s-chat .answer-card, .s-chat .typing, .s-chat .bot-av { opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .5s var(--spring); }
.s-chat .shown { opacity: 1 !important; transform: none !important; }
.s-chat .msg.bot { align-items: flex-end; position: relative; min-height: 50px; }
.s-chat .typing:not(.shown) { position: absolute; left: 40px; }
.s-chat .typing.shown { position: absolute; left: 40px; bottom: 0; }
.answer-card { max-width: 88%; padding: 14px 15px; border-radius: 20px 20px 20px 6px; background: var(--surface); border: 1px solid var(--line); }
.answer-card p { font-size: 15.5px; }
.src { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); padding: 5px 9px; border-radius: 8px; background: var(--surface-2); }
.btn.square { width: 48px; padding: 0; }
.story-foot { display: grid; grid-template-columns: 48px 1fr; gap: 10px; opacity: .0; transform: translateY(16px); transition: opacity .35s, transform .5s var(--spring); pointer-events: none; }
.story.ended .story-foot { opacity: 1; transform: none; pointer-events: auto; }

/* ------------------------------------------------------------------ setup */
.av-carousel { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 14px calc(50% - 56px) 6px; }
.av-carousel::-webkit-scrollbar { display: none; }
.av { flex: none; width: 112px; height: 112px; border-radius: 50%; scroll-snap-align: center; transform: scale(.58); opacity: .55; transition: transform .5s var(--spring), opacity .3s, box-shadow .3s; }
.av.on { transform: scale(1); opacity: 1; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-2), 0 16px 34px rgba(124, 99, 255, .35); }
.av .avatar-svg { width: 100%; height: 100%; }
.av-label { text-align: center; color: var(--muted); font-weight: 600; margin: 6px 0 8px; min-height: 22px; }
.field { margin-top: 18px; }
.field > label, .field > .label { display: block; font-size: 13.5px; font-weight: 650; color: var(--muted); margin: 0 2px 8px; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.input-row .chip { height: 50px; border-radius: 15px; color: var(--text); }
.uname { display: flex; align-items: center; gap: 0; padding: 0 14px; }
.uname .at { color: var(--faint); margin-right: 2px; }
.uname input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--text); }
.uname .tail { color: var(--muted); font-weight: 600; white-space: nowrap; }
.uname-status { display: flex; align-items: center; gap: 7px; font-size: 13.5px; margin: 10px 2px 0; color: var(--muted); min-height: 20px; overflow-wrap: anywhere; }
.uname-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.uname-status.free { color: var(--ok); } .uname-status.free .dot { background: var(--ok); }
.uname-status.taken, .uname-status.invalid { color: var(--bad); } .uname-status.taken .dot, .uname-status.invalid .dot { background: var(--bad); }
.uname-status.checking .dot { animation: breathe .6s ease-in-out infinite alternate; }
.select { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 14px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.select > .ic:first-child { color: var(--accent-2); }
.select-main { flex: 1; display: grid; }
.select-main b { font-size: 18px; font-variant-numeric: tabular-nums; }
.select-main span { color: var(--muted); font-size: 13px; }
.hint { color: var(--faint); font-size: 12.5px; margin: 8px 2px 0; }
.tz-list { display: grid; gap: 2px; }
.tz-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; border-radius: 14px; text-align: left; color: var(--muted); transition: background .2s; }
.tz-row b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.tz-row em { font-style: normal; font-size: 11.5px; color: var(--accent-2); margin-left: 4px; }
.tz-row.on { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent); color: var(--text); }

/* ------------------------------------------------------------------ prompts */
.prompts .seg { margin-bottom: 2px; }
.prompts #pr-tags { margin-bottom: 14px; }
.masonry { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; margin-top: 4px; }
.col { display: grid; gap: 10px; min-width: 0; }
.pcard { position: relative; display: block; width: 100%; text-align: left; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .35s var(--spring); }
.pcard:active { transform: scale(.97); }
.cover { position: relative; overflow: hidden; background: var(--surface-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.audio { aspect-ratio: 1; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 20%, hsl(var(--h) 80% 65%), hsl(calc(var(--h) + 60) 70% 35%)); }
.cover.audio .eq { position: absolute; bottom: 14px; left: 14px; display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.cover.audio .eq i { width: 4px; border-radius: 2px; background: rgba(255, 255, 255, .8); animation: eq 1s ease-in-out infinite alternate; }
.cover.audio .eq i:nth-child(1) { height: 40%; } .cover.audio .eq i:nth-child(2) { height: 90%; animation-delay: .2s; } .cover.audio .eq i:nth-child(3) { height: 60%; animation-delay: .4s; } .cover.audio .eq i:nth-child(4) { height: 100%; animation-delay: .1s; } .cover.audio .eq i:nth-child(5) { height: 50%; animation-delay: .3s; }
@keyframes eq { to { transform: scaleY(.4); } }
.cover.textual { aspect-ratio: 1 / 1.1; padding: 40px 14px 14px; background: linear-gradient(160deg, hsl(var(--h) 60% 30% / .55), var(--surface-2)); }
html[data-scheme="light"] .cover.textual { background: linear-gradient(160deg, hsl(var(--h) 70% 85%), var(--surface-2)); }
.cover.textual p { font-size: 13.5px; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.pbadges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 5px; flex-wrap: wrap; pointer-events: none; }
.pbadges .badge { background: rgba(12, 10, 22, .55); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pbadges .badge.hot { background: linear-gradient(140deg, #ff8a5c, #ff4f88); }
.ptitle { display: block; padding: 10px 12px 12px; font-weight: 650; font-size: 14px; line-height: 1.3; }
.more { display: grid; place-items: center; padding: 18px; }
.sentinel { height: 1px; }

/* ------------------------------------------------------------------ profile */
.me { display: flex; align-items: center; gap: 14px; margin: 8px 0 18px; }
.me-av { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: linear-gradient(140deg, var(--accent-2), var(--orchid)); color: #1b1530; font-size: 26px; font-weight: 800; }
.me-av img { width: 100%; height: 100%; object-fit: cover; }
.me-main { min-width: 0; display: grid; gap: 6px; justify-items: start; }
.me-main h1 { font-size: 24px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.free-card { display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px; border-radius: var(--r-l); background: linear-gradient(140deg, rgba(141, 123, 255, .22), rgba(255, 143, 207, .1)); border: 1px solid rgba(179, 156, 255, .25); }
.free-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(141, 123, 255, .25); color: var(--accent-2); }
.free-card b { font-size: 16px; letter-spacing: -.01em; }
.free-card p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.bal-card { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.bal-main { flex: 1; display: grid; min-width: 0; }
.bal-big { font-size: 32px; font-weight: 780; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; align-content: center; gap: 6px; padding: 8px; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-ic { color: var(--accent-2); }
.tile-txt { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.works-empty { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-l); }
.works-empty > .ic { color: var(--accent-2); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding: 10px 12px 10px 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.setting > span { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; color: var(--muted); }
.setting .seg { background: var(--surface-2); border: 0; flex: none; }

/* ------------------------------------------------------------------ wallet */
.w-sec + .w-sec { margin-top: 24px; }
.w-sec h3 { font-size: 17px; font-weight: 720; letter-spacing: -.01em; margin-bottom: 6px; }
.w-sec > .muted { font-size: 13.5px; margin-bottom: 12px; }
.plans { display: grid; gap: 8px; margin-bottom: 12px; }
.plan { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: border-color .25s, background .25s, transform .3s var(--spring); }
.plan:active { transform: scale(.985); }
.plan.on { border-color: var(--accent); background: linear-gradient(140deg, rgba(141, 123, 255, .16), var(--surface)); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); flex: none; display: grid; place-items: center; transition: border-color .2s; }
.plan.on .radio { border-color: var(--accent-2); }
.plan.on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); animation: pop .35s var(--spring); }
@keyframes pop { from { transform: scale(0); } }
.plan-main { flex: 1; min-width: 0; display: grid; }
.plan-main span { color: var(--muted); font-size: 13px; }
.plan-price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 14px; }
.pack { position: relative; height: 54px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; align-content: center; font-variant-numeric: tabular-nums; transition: border-color .2s, background .2s, transform .3s var(--spring); }
.pack b { font-size: 15px; }
.pack .pack-off { font-size: 10.5px; font-weight: 700; color: var(--ok); }
.pack.on { border-color: var(--accent); background: rgba(141, 123, 255, .16); }
.pack:active { transform: scale(.95); }
.access { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.access > .muted { font-size: 13.5px; }
.prov-row { display: flex; gap: 4px; flex-wrap: wrap; }
.desc { color: var(--muted); font-size: 13.5px; margin: 10px 0; }
.eqs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.eq-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.eq-chip .ic { color: var(--accent-2); }
.op-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.op-ic.in, .op-amt.in { color: var(--ok); }
.op-ic.out { color: var(--muted); }
.op-amt { font-variant-numeric: tabular-nums; }
.methods { display: grid; gap: 8px; }
.method { display: flex; align-items: center; gap: 12px; padding: 12px; min-height: 64px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: transform .3s var(--spring); }
.method:active { transform: scale(.98); }
.method.busy { opacity: .6; pointer-events: none; }
.m-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.m-sbp { background: rgba(111, 211, 255, .16); color: var(--sky); }
.m-card { background: rgba(141, 123, 255, .18); color: var(--accent-2); }
.m-usdt { background: rgba(95, 227, 178, .16); color: var(--ok); }
.m-stars { background: rgba(255, 200, 97, .16); color: var(--warn); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 2px; font-weight: 650; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa[open] summary .ic { transform: rotate(180deg); }
.qa summary .ic { transition: transform .3s var(--spring); color: var(--muted); }
.qa p { color: var(--muted); font-size: 14px; padding: 0 2px 15px; }

/* ------------------------------------------------------------------ gate, toast */
.gate { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 0 12px; }
.gate h1 { font-size: 24px; letter-spacing: -.02em; }
.gate p { color: var(--muted); max-width: 300px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 92px); z-index: 80; max-width: calc(100% - 36px); padding: 12px 16px; border-radius: 16px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; text-align: center; transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: transform .45s var(--spring), opacity .25s; box-shadow: var(--shadow); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.warn { background: var(--warn); color: #2a1d00; }
.toast.ok { background: var(--ok); color: #082419; }
body.sheet-open .toast, body.story-open .toast { bottom: calc(var(--bottom) + 24px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .mq-track { animation: none !important; }
  .mq-row { overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter); }
  .mq-track > [aria-hidden="true"] { display: none; }
  .aura { animation: none !important; }
}
@media (min-width: 600px) {
  .view { padding-left: 24px; padding-right: 24px; }
}
