:root {
  --bg: #05070e;
  --panel: rgba(13, 18, 32, 0.74);
  --panel-solid: #0b1120;
  --line: rgba(34, 211, 238, 0.18);
  --cyan: #22d3ee;
  --pink: #ec4899;
  --purple: #a855f7;
  --up: #00f29b;
  --down: #ff2a55;
  --wait: #f59e0b;
  --text: #e6f1ff;
  --muted: #8b9cb8;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(700px 460px at 90% 8%, rgba(236, 72, 153, 0.10), transparent 62%),
    radial-gradient(700px 500px at 50% 110%, rgba(168, 85, 247, 0.10), transparent 60%);
  pointer-events: none;
  z-index: -2;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 20%, #000 35%, transparent 82%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, #000 35%, transparent 82%);
}

.glow { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: -1; }
.glow--cyan { width: 300px; height: 300px; background: rgba(34, 211, 238, 0.16); top: -90px; left: -80px; }
.glow--pink { width: 320px; height: 320px; background: rgba(236, 72, 153, 0.14); bottom: -120px; right: -100px; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.22);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.86em;
}

/* ---------- GATE ---------- */
.gate {
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}

.brand { text-align: center; }

.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.28);
  background: #05070e;
}

.eyebrow {
  margin: 14px 0 4px;
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--cyan);
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.wordmark {
  margin: 2px 0 6px;
  font-size: clamp(34px, 10vw, 46px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.wordmark span:last-child { color: #fff; }
.wordmark em {
  font-style: normal;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(236, 72, 153, 0.35);
}

.tagline {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.42em;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.orb-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 6px 0 0;
}
.orb-stage canvas { width: min(340px, 86vw); height: auto; display: block; }
.orb-stage--gate canvas { width: min(300px, 78vw); }

.orb-caption {
  margin: -6px 0 0;
  font-size: 10px;
  letter-spacing: 0.26em;
  color: rgba(139, 156, 184, 0.9);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
  min-height: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 16px;
}

.card--gate { display: flex; flex-direction: column; gap: 10px; }

.field-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.input {
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(2, 6, 16, 0.85);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.06em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: #4b5b75; }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--block { width: 100%; }

.btn--primary {
  background: linear-gradient(135deg, #0ea5b7 0%, #22d3ee 42%, #a855f7 100%);
  color: #041016;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28), 0 0 0 1px rgba(34, 211, 238, 0.25) inset;
}
.btn--primary:hover { box-shadow: 0 14px 40px rgba(34, 211, 238, 0.36); }

.btn--wa {
  background: linear-gradient(135deg, #0f7a4d, #25d366);
  color: #04120b;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.22);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  padding: 11px 14px;
}

.btn--mic {
  flex: 1;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.22), rgba(168, 85, 247, 0.22));
  border-color: rgba(236, 72, 153, 0.45);
}
.btn--mic.is-live {
  background: linear-gradient(135deg, #db2777, #a855f7);
  color: #fff;
  animation: pulseMic 1.1s ease-in-out infinite;
}

@keyframes pulseMic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(236, 72, 153, 0); }
}

.msg {
  margin: 0;
  min-height: 18px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.msg.is-error { color: #ff8fa8; }
.msg.is-ok { color: var(--up); }

.card--steps summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #b9cbe6;
}
.card--steps ol { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.card--steps li { margin-bottom: 4px; }

.risk-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: #63748f;
  text-align: center;
  padding: 0 8px;
}

/* ---------- APP ---------- */
.app { min-height: 100dvh; max-width: 560px; margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(5, 7, 14, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.14);
}

.topbar-brand { display: flex; align-items: center; gap: 9px; }
.topbar-brand img { border-radius: 10px; border: 1px solid rgba(34, 211, 238, 0.3); }
.topbar-name { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.topbar-name em {
  font-style: normal;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #7dffc8;
  border: 1px solid rgba(0, 242, 155, 0.28);
  background: rgba(0, 242, 155, 0.08);
  padding: 5px 8px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 10px var(--up);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  width: 36px; height: 36px;
  font-size: 15px;
  cursor: pointer;
  color: var(--text);
}
.icon-btn.is-off { opacity: 0.45; }

.screens { padding: 14px 14px 104px; display: flex; flex-direction: column; gap: 14px; }

.screen { display: flex; flex-direction: column; gap: 14px; animation: fadeUp 0.28s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-title {
  margin: 4px 0 0;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.card--hero { display: flex; flex-direction: column; gap: 10px; }
.broker-row { display: flex; align-items: center; gap: 12px; }
.broker-badge {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  font-weight: 900;
  font-size: 20px;
  color: #041016;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
  flex: 0 0 auto;
}
.broker-meta { flex: 1; }
.broker-meta .eyebrow { margin: 0 0 2px; }
.broker-meta h2 { margin: 0; font-size: 18px; }

.pill {
  font-size: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
}
.pill--ok { color: #7dffc8; background: rgba(0, 242, 155, 0.10); border: 1px solid rgba(0, 242, 155, 0.3); }

.muted { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.65; }

.card--warn { border-color: rgba(245, 158, 11, 0.32); background: rgba(245, 158, 11, 0.07); }
.card--warn b { color: #ffcf70; font-size: 13px; }
.card--note { border-color: rgba(34, 211, 238, 0.25); }

.seg {
  display: grid;
  grid-auto-flow: column;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(10, 16, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 8px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.seg-btn.is-active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(168, 85, 247, 0.22));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25) inset;
}
.seg--sm { padding: 3px; flex: 0 0 auto; }
.seg--sm button { padding: 8px 10px; font-size: 11px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; font-weight: 700; }
.seg--sm button.is-active { background: rgba(34, 211, 238, 0.18); color: #fff; }

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.asset {
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 17, 32, 0.7);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.12s;
  font-family: inherit;
}
.asset:hover { border-color: rgba(34, 211, 238, 0.35); }
.asset:active { transform: scale(0.99); }
.asset.is-active {
  border-color: rgba(34, 211, 238, 0.65);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(168, 85, 247, 0.12));
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.22) inset;
}
.asset-name { display: block; font-weight: 700; font-size: 13.5px; letter-spacing: 0.01em; }
.asset-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f91ad;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.asset-tag.is-otc { color: #ffcf70; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(11, 17, 32, 0.7);
  color: var(--muted);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transition: all 0.18s;
}
.chip.is-active {
  color: #041016;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.3);
}

.micro { margin: 0; text-align: center; font-size: 10.5px; color: #5c6c86; }

/* ---------- RESULT ---------- */
.result {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 16px;
  background: rgba(11, 17, 32, 0.8);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeUp 0.3s ease both;
}
.result--up { border-color: rgba(0, 242, 155, 0.45); background: linear-gradient(160deg, rgba(0, 242, 155, 0.13), rgba(11, 17, 32, 0.85) 60%); }
.result--down { border-color: rgba(255, 42, 85, 0.45); background: linear-gradient(160deg, rgba(255, 42, 85, 0.13), rgba(11, 17, 32, 0.85) 60%); }
.result--wait { border-color: rgba(245, 158, 11, 0.42); background: linear-gradient(160deg, rgba(245, 158, 11, 0.11), rgba(11, 17, 32, 0.85) 60%); }

.result-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result-asset { font-weight: 800; font-size: 15px; }
.result-tf { font-size: 10px; letter-spacing: 0.16em; color: var(--muted); font-family: ui-monospace, monospace; }
.result-dir {
  font-size: clamp(34px, 11vw, 46px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.result--up .result-dir { color: var(--up); text-shadow: 0 0 30px rgba(0, 242, 155, 0.45); }
.result--down .result-dir { color: var(--down); text-shadow: 0 0 30px rgba(255, 42, 85, 0.45); }
.result--wait .result-dir { color: var(--wait); text-shadow: 0 0 30px rgba(245, 158, 11, 0.4); }

.result-sub { font-size: 12.5px; color: #b7c7dd; line-height: 1.6; }
.confluence { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 10.5px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--muted);
  font-family: ui-monospace, monospace;
}
.tag--bull { color: #8dffd3; border-color: rgba(0, 242, 155, 0.3); background: rgba(0, 242, 155, 0.07); }
.tag--bear { color: #ff9db2; border-color: rgba(255, 42, 85, 0.3); background: rgba(255, 42, 85, 0.07); }
.tag--neutral { color: #ffd789; border-color: rgba(245, 158, 11, 0.28); background: rgba(245, 158, 11, 0.06); }

.price-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-top: 1px dashed rgba(255, 255, 255, 0.10); padding-top: 10px; }
.price-line span { font-size: 11px; color: var(--muted); }
.price-line b { font-size: 18px; font-family: ui-monospace, monospace; }

/* indicator table */
.ind-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ind-list { display: flex; flex-direction: column; gap: 7px; }
.ind-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.055);
}
.ind-name { font-size: 12.5px; font-weight: 600; }
.ind-val { font-size: 11.5px; color: #a9bad2; font-family: ui-monospace, monospace; text-align: right; }
.ind-vote { grid-column: 1 / -1; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; font-family: ui-monospace, monospace; }
.ind-vote.bull { color: var(--up); }
.ind-vote.bear { color: var(--down); }
.ind-vote.neutral { color: var(--wait); }

.bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  display: flex;
}
.bar i { display: block; height: 100%; }
.bar .b { background: var(--up); }
.bar .r { background: var(--down); }
.bar .n { background: var(--wait); }

.backtest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 17, 32, 0.7);
  padding: 11px;
  text-align: center;
}
.stat b { display: block; font-size: 19px; font-family: ui-monospace, monospace; }
.stat span { font-size: 9px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }

.row-actions { display: flex; gap: 8px; }
.row-actions > * { flex: 1; }

/* ---------- VOICE ---------- */
.orb-stage--voice canvas { width: min(300px, 76vw); }
.card--chat { padding: 12px; }
.chat-log { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  animation: fadeUp 0.2s ease both;
}
.bubble--bot { align-self: flex-start; background: rgba(34, 211, 238, 0.09); border: 1px solid rgba(34, 211, 238, 0.2); }
.bubble--me { align-self: flex-end; background: rgba(236, 72, 153, 0.12); border: 1px solid rgba(236, 72, 153, 0.24); }

.quick-chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.quick-chips::-webkit-scrollbar { display: none; }
.quick-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(11, 17, 32, 0.8);
  color: #b9cbe6;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- PROFILE ---------- */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.08); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-family: ui-monospace, monospace; font-weight: 600; text-align: right; word-break: break-all; }

.hist { display: flex; flex-direction: column; gap: 7px; }
.hist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}
.hist-row b { font-family: ui-monospace, monospace; }
.hist-row .up { color: var(--up); }
.hist-row .down { color: var(--down); }
.hist-row .wait { color: var(--wait); }
.hist-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 12px; border: 1px dashed rgba(255, 255, 255, 0.10); border-radius: 12px; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(5, 7, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(34, 211, 238, 0.14);
}
.nav-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 9px 4px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.03em;
  transition: color 0.2s, background 0.2s;
}
.nav-btn.is-active { color: #fff; background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.14)); }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(8, 14, 26, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--text);
  font-size: 12.5px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.2s ease both;
}

.spinner {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(4, 16, 22, 0.3);
  border-top-color: #041016;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- V2: catalog, quality, model ---------- */
.asset-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input--search {
  width: 100%;
  padding: 11px 13px;
  font-size: 12.5px;
}
.asset-tools .micro { text-align: left; }
.chips--groups { margin-top: 2px; }
.chips--groups .chip {
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 600;
}
.chip:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  filter: grayscale(1);
}
.chip:disabled:hover { box-shadow: none; }

.dir-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.quality {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: ui-monospace, monospace;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  white-space: nowrap;
}
.quality--ok { color: #8dffd3; border-color: rgba(0, 242, 155, 0.4); background: rgba(0, 242, 155, 0.08); }
.quality--thin { color: #ffd789; border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); }
.quality--low { color: #ff9db2; border-color: rgba(255, 42, 85, 0.35); background: rgba(255, 42, 85, 0.08); }

.proxy-banner {
  border: 1px solid rgba(255, 207, 112, 0.35);
  background: rgba(255, 207, 112, 0.07);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #f3dca6;
}
.proxy-banner b { color: #ffcf70; letter-spacing: 0.1em; font-size: 10px; }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.mini-stat {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  padding: 8px 6px;
  text-align: center;
}
.mini-stat b { display: block; font-size: 14px; font-family: ui-monospace, monospace; }
.mini-stat span { font-size: 8.5px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }

.ind-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ind-weight {
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  color: #7f91ad;
  font-family: ui-monospace, monospace;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 1px 4px;
  vertical-align: middle;
}
.ind-note { font-size: 10px; color: #7f91ad; }

.bt-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.bt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 7px;
  font-size: 11px;
  color: var(--muted);
}
.bt-row b { font-family: ui-monospace, monospace; color: #c8d8ee; font-weight: 600; text-align: right; }

.hist-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hist-right .quality { font-size: 8px; padding: 3px 6px; }

@media (min-width: 480px) {
  .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
