:root {
  --ink: #020817;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --line: #e2e8f0;
  --paper: #ffffff;
  --mist: #f8fafc;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --mint: #d1fae5;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --btn-hover: #1e293b;
  --accent-hover: #4338ca;
  --notice-text: #3730a3;
  --on-dark-2: #cbd5e1;
  --on-dark-3: #94a3b8;
  --on-dark-tag: #e0e7ff;
  --on-dark-tag-bg: rgba(255, 255, 255, 0.12);
  --topbar-bg: rgba(255, 255, 255, 0.85);
  --nav-mobile-bg: rgba(255, 255, 255, 0.96);
  --focus-ring: rgba(79, 70, 229, 0.15);
  --page-glow-a: rgba(79, 70, 229, 0.10);
  --page-glow-b: rgba(16, 185, 129, 0.09);
  --stage-bg: #141414;
  --stage-line: rgba(255, 255, 255, 0.06);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #e8edf5;
  --slate-900: #eef2f8;
  --slate-700: #c3cad6;
  --slate-500: #8b95a7;
  --slate-300: #364152;
  --line: #1e2633;
  --paper: #0b0f17;
  --mist: #131a26;
  --accent: #8b93ff;
  --accent-soft: rgba(139, 147, 255, 0.14);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
  --btn-hover: #d6dde8;
  --accent-hover: #a5abff;
  --notice-text: #c7cbff;
  --on-dark-2: #334155;
  --on-dark-3: #64748b;
  --on-dark-tag: #3730a3;
  --on-dark-tag-bg: #e0e7ff;
  --topbar-bg: rgba(11, 15, 23, 0.82);
  --nav-mobile-bg: rgba(11, 15, 23, 0.96);
  --focus-ring: rgba(139, 147, 255, 0.25);
  --page-glow-a: rgba(99, 102, 241, 0.14);
  --page-glow-b: rgba(16, 185, 129, 0.07);
  --stage-bg: #101010;
  --stage-line: rgba(255, 255, 255, 0.08);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 30rem at 85% -5%, var(--page-glow-a), transparent 60%),
    radial-gradient(50rem 28rem at -10% 20%, var(--page-glow-b), transparent 60%);
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.topbar { position: sticky; top: 0; z-index: 20; background: var(--topbar-bg); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -0.03em; }
.brand-logo { width: 32px; height: 32px; filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.28)); transition: transform 0.25s ease; }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.05); }
.brand-word { color: var(--ink); }
.brand-accent { background: linear-gradient(90deg, #f59e0b, #ea580c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a { padding: 8px 14px; border-radius: var(--r-sm); text-decoration: none; font-size: 15px; color: var(--slate-700); }
.nav a:hover { background: var(--mist); }
.nav a.active { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--slate-700); cursor: pointer; transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}
.icon-btn:hover { background: var(--mist); color: var(--ink); }
.icon-btn:active { transform: rotate(-20deg) scale(0.94); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--slate-900); color: var(--mist); font-weight: 500; cursor: pointer; text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.lg { height: 60px; padding: 0 44px; font-size: 18px; border-radius: 16px; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--mist); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-hover); }
.btn.danger { background: var(--bad); }
.btn.block { width: 100%; }

.hero { padding: 72px 0 56px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.12; }
.hero h1 .accent { color: var(--accent); display: block; }
.hero p.lead { color: var(--slate-700); font-size: 19px; max-width: 34ch; margin: 22px 0 32px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.seg { display: flex; gap: 8px; margin-top: 40px; max-width: 360px; }
.seg i { flex: 1; height: 3px; border-radius: 3px; background: var(--slate-300); }
.seg i.on { background: var(--slate-900); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--paper); }
.chip.on { background: var(--slate-900); color: var(--mist); border-color: var(--slate-900); }
button.chip { cursor: pointer; }

.stage {
  position: relative; overflow: hidden; isolation: isolate; margin: 24px 0 8px; border-radius: 28px;
  background: radial-gradient(70% 90% at 72% 40%, #2a1d12 0%, var(--stage-bg) 62%); color: #f5f5f4;
  border: 1px solid var(--stage-line); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
}
.stage-inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: end; gap: 24px; padding: 0 0 0 56px; min-height: 560px; }
.stage-copy { padding: 64px 0; align-self: center; will-change: transform, opacity; }
.stage-kicker { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #fbbf24; margin-bottom: 18px; }
.stage h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; color: #fafaf9; }
.stage h1 .accent { display: block; background: linear-gradient(90deg, #fbbf24, #f97316 60%, #fb7185); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stage p.lead { color: #d6d3d1; font-size: 19px; max-width: 34ch; margin: 22px 0 32px; }
.stage .btn.stage-btn { background: #fbbf24; color: #1c1917; }
.stage .btn.stage-btn:hover { background: #fcd34d; }
.stage .btn.stage-ghost { color: #fafaf9; border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.04); }
.stage .btn.stage-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.stage .chip { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.14); color: #e7e5e4; }
.stage-art { position: relative; height: 100%; min-height: 520px; display: flex; align-items: flex-end; justify-content: center; }
.char-wrap { position: relative; width: min(460px, 100%); animation: rise 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.stage-char {
  display: block; width: 100%; height: auto; transform-origin: 50% 100%; will-change: transform; mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%), linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 72%, transparent 98%), linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.stage-glow {
  position: absolute; z-index: -1; left: 72%; top: 8%; width: 520px; height: 520px; border-radius: 50%; transform: translate3d(-50%, 0, 0);
  background: radial-gradient(circle, rgba(251, 146, 60, 0.28), rgba(251, 146, 60, 0) 65%); filter: blur(10px); will-change: transform;
}
.sparks { position: absolute; inset: 0; z-index: 1; pointer-events: none; will-change: transform; }
.sparks i {
  position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fdba74;
  box-shadow: 0 0 8px 2px rgba(251, 146, 60, 0.75), 0 0 18px 6px rgba(251, 146, 60, 0.25); opacity: 0;
  animation: ember 7s linear infinite;
}
@keyframes ember {
  0% { opacity: 0; transform: translate3d(0, 20px, 0) scale(0.6); }
  15% { opacity: 0.9; }
  70% { opacity: 0.6; }
  100% { opacity: 0; transform: translate3d(30px, -120px, 0) scale(1); }
}
@keyframes rise { from { opacity: 0; transform: translate3d(0, 60px, 0); } to { opacity: 1; transform: none; } }
.stage .float-card { z-index: 3; will-change: transform; }
.stage .float-card.a { top: 64px; left: -12px; transform: rotate(-4deg); width: 200px; background: rgba(28, 25, 23, 0.72); color: #fafaf9; border-color: rgba(255, 255, 255, 0.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stage .float-card.a .kicker, .stage .float-card.a .num small { color: #a8a29e; }
.stage .float-card.b { top: 210px; right: 24px; transform: rotate(3deg); width: 190px; background: #fafaf9; color: #1c1917; border-color: transparent; }
.stage .float-card.b .kicker, .stage .float-card.b .num small { color: #78716c; }
.stage .float-card.c { bottom: 36px; left: 4%; transform: rotate(-1deg); background: rgba(28, 25, 23, 0.78); color: #fafaf9; border-color: rgba(255, 255, 255, 0.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stage .float-card .num { font-size: 34px; display: flex; align-items: center; gap: 10px; }
.stage .float-card .num small { margin-left: 0; align-self: flex-end; padding-bottom: 6px; }
.ico { display: inline-block; flex: none; width: 1em; height: 1em; line-height: 0; }
.float-card .ico { width: 34px; height: 34px; filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.35)); }
.float-card .ico-uc { width: 50px; height: 35px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)); }
.float-card .ico-star { width: 36px; height: 36px; }
.stack { position: relative; min-height: 340px; }
.float-card {
  position: absolute; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 22px 24px; width: min(300px, 80%);
}
.float-card .kicker { font-size: 13px; color: var(--slate-500); }
.float-card .num { font-family: var(--display); font-weight: 600; font-size: 40px; letter-spacing: -0.03em; margin-top: 4px; }
.float-card .num small { font-size: 16px; color: var(--slate-500); margin-left: 6px; font-weight: 500; }
.float-card.a { top: 0; left: 0; transform: rotate(-3deg); }
.float-card.b { top: 130px; right: 0; transform: rotate(2.5deg); background: var(--slate-900); color: var(--mist); border-color: var(--slate-900); }
.float-card.b .kicker { color: var(--on-dark-3); }
.float-card.c { bottom: 0; left: 18%; transform: rotate(-1deg); padding: 14px 20px; display: flex; align-items: center; gap: 12px; width: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18); }

.section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 500; }
.muted { color: var(--slate-500); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }

.product {
  display: block; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--paper); text-decoration: none; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.product:hover { border-color: var(--slate-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.product .tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.product h3 { font-size: 26px; margin: 16px 0 8px; font-weight: 500; }
.product p { margin: 0 0 20px; color: var(--slate-700); }
.product .from { font-size: 14px; color: var(--slate-500); }
.product.dark { background: var(--slate-900); color: var(--mist); border-color: var(--slate-900); }
.product.dark p { color: var(--on-dark-2); }
.product.dark .tag { background: var(--on-dark-tag-bg); color: var(--on-dark-tag); }
.product.dark .from { color: var(--on-dark-3); }

.steps { counter-reset: s; }
.step { padding: 24px; border-radius: var(--r-md); background: var(--mist); border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--display); color: var(--accent); font-weight: 600; font-size: 14px; }
.step h3 { font-size: 19px; margin: 8px 0; font-weight: 500; }
.step p { margin: 0; color: var(--slate-700); font-size: 15px; }

.pack {
  text-align: left; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper);
  cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease; display: block; width: 100%;
}
.pack:hover { border-color: var(--slate-300); }
.pack.selected { border-color: var(--slate-900); box-shadow: 0 0 0 1px var(--slate-900); }
.pack .amt { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.pack .amt small { font-size: 14px; color: var(--slate-500); font-weight: 500; margin-left: 4px; }
.pack .price { margin-top: 6px; color: var(--slate-700); font-size: 15px; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.panel + .panel { margin-top: 20px; }
.page-title { padding: 40px 0 24px; }
.page-title h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 500; }
.page-title p { color: var(--slate-700); margin: 8px 0 0; }
.breadcrumb { font-size: 14px; color: var(--slate-500); text-decoration: none; display: inline-block; margin-bottom: 12px; }
.layout-2 { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; padding-bottom: 64px; }
.summary { position: sticky; top: 88px; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; }
.summary dt { color: var(--slate-500); }
.summary dd { margin: 0; text-align: right; font-weight: 500; word-break: break-word; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.summary .total b { font-family: var(--display); font-size: 26px; font-weight: 600; }

label.field { display: block; margin-bottom: 18px; }
label.field > span { display: block; font-size: 14px; color: var(--slate-700); margin-bottom: 8px; font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--slate-300); border-radius: var(--r-sm);
  background: var(--paper); outline: none; transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
textarea.input { height: auto; padding: 12px 14px; min-height: 96px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.hint { font-size: 13px; color: var(--slate-500); margin-top: 6px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.space { justify-content: space-between; }
.grow { flex: 1; }

.notice { padding: 14px 16px; border-radius: var(--r-md); font-size: 14px; background: var(--accent-soft); color: var(--notice-text); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

.card-number {
  font-family: var(--display); font-size: 19px; letter-spacing: 0.03em; padding: 16px 18px; border-radius: var(--r-md);
  background: var(--slate-900); color: var(--mist); display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow-wrap: anywhere;
}
.card-number .btn { flex: none; white-space: nowrap; }
@keyframes shine { to { background-position: 200% 0; } }
.bank-card {
  position: relative; overflow: hidden; border-radius: 18px; padding: 20px 20px 18px; color: #fff; aspect-ratio: 1.586 / 1; max-width: 400px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 55%, #312e81 100%); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
}
.bank-card.humo { background: linear-gradient(135deg, #0f766e 0%, #0f172a 62%, #1e1b4b 100%); }
.bank-card.uzcard { background: linear-gradient(135deg, #1d4ed8 0%, #0f172a 62%, #1e1b4b 100%); }
.bank-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.12) 48%, transparent 66%); background-size: 250% 100%; animation: shine 6s linear infinite;
}
.bank-card::after {
  content: ''; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, 0.06); pointer-events: none;
}
.bank-card-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.chip-icon { width: 42px; height: 31px; border-radius: 6px; background: linear-gradient(135deg, #fde68a, #d4a017); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.bank-card-system { font-family: var(--display); font-weight: 600; letter-spacing: 0.14em; font-size: 14px; opacity: 0.9; }
.bank-card-number { position: relative; z-index: 1; font-family: var(--display); font-size: clamp(18px, 6vw, 25px); letter-spacing: 0.1em; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.bank-card-bottom { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.bank-card-bottom small { display: block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.65; margin-bottom: 3px; }
.bank-card-bottom b { font-weight: 500; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; overflow-wrap: anywhere; }
.bank-card-copy {
  flex: none; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.12); color: #fff; font: inherit; font-size: 13px;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(4px);
}
.bank-card-copy:hover { background: rgba(255, 255, 255, 0.22); }
.amount-big { font-family: var(--display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }

.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 6px; }
.progress i { height: 4px; border-radius: 4px; background: var(--line); }
.progress i.done { background: var(--slate-900); }
.progress i.live { background: linear-gradient(90deg, var(--slate-900), var(--accent), var(--slate-900)); background-size: 200% 100%; animation: slide 1.4s linear infinite; }
.progress-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-size: 12px; color: var(--slate-500); }
@keyframes slide { to { background-position: -200% 0; } }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mist); color: var(--slate-700); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.list { display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; background: var(--paper); }
.list-item:hover { border-color: var(--slate-300); }
.list-item .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); font-size: 18px; flex: none; }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .meta b { display: block; font-weight: 600; }
.list-item .meta span { font-size: 13px; color: var(--slate-500); }

.empty { text-align: center; padding: 56px 16px; color: var(--slate-500); }

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; }
.toast { padding: 12px 16px; background: var(--slate-900); color: var(--mist); border-radius: var(--r-md); box-shadow: var(--shadow); max-width: 360px; font-size: 14px; }
.toast.bad { background: var(--bad); }

.modal-back { position: fixed; inset: 0; background: rgba(2, 8, 23, 0.45); z-index: 60; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--paper); border-radius: var(--r-lg); width: min(640px, 100%); padding: 28px; box-shadow: var(--shadow); max-height: 92vh; overflow-y: auto; }
.modal h3 { font-size: 22px; font-weight: 500; margin-bottom: 16px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab { padding: 10px 16px; border: 0; background: none; cursor: pointer; color: var(--slate-500); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--ink); border-bottom-color: var(--slate-900); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--slate-500); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--mist); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--mist); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 14px; margin: 0 0 20px; }
.kv dt { color: var(--slate-500); }
.kv dd { margin: 0; word-break: break-word; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.stat h4 { margin: 0 0 12px; font-family: var(--display); font-weight: 500; font-size: 15px; color: var(--slate-500); }
.stat .big { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.stat .sub { font-size: 13px; color: var(--slate-500); margin-top: 6px; }
.stat ul { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 13px; display: grid; gap: 6px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--slate-300); position: relative; transition: background 0.15s ease; margin: 0; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s ease; }
.switch input:checked { background: var(--slate-900); }
.switch input:checked::after { transform: translateX(18px); }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; margin-top: 48px; color: var(--slate-500); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.spin { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--slate-900); border-radius: 50%; animation: rot 0.7s linear infinite; margin: 40px auto; }
@keyframes rot { to { transform: rotate(360deg); } }

.tg .topbar .nav { display: none; }
.tg .stage { margin-top: 12px; }

@media (max-width: 880px) {
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .hero { grid-template-columns: 1fr; padding: 40px 0 32px; gap: 32px; }
  .stack { min-height: 300px; }
  .stage { border-radius: 22px; margin-top: 16px; }
  .stage-inner { grid-template-columns: 1fr; padding: 0 22px; min-height: 0; gap: 0; }
  .stage-copy { padding: 40px 0 8px; }
  .stage p.lead { font-size: 17px; margin: 16px 0 24px; }
  .stage-art { min-height: 360px; margin: 0 -22px; }
  .char-wrap { width: min(340px, 86%); }
  .stage-glow { left: 50%; top: auto; bottom: -60px; width: 380px; height: 380px; }
  .stage .float-card.a { top: 28px; left: 12px; width: 150px; padding: 14px 16px; }
  .stage .float-card.b { top: 120px; right: 12px; width: 140px; padding: 14px 16px; }
  .stage .float-card .num { font-size: 26px; gap: 8px; }
  .float-card .ico { width: 26px; height: 26px; }
  .float-card .ico-uc { width: 38px; height: 27px; }
  .float-card .ico-star { width: 28px; height: 28px; }
  .stage .float-card .num small { padding-bottom: 4px; }
  .stage .float-card.c { bottom: 18px; left: 50%; translate: -50% 0; padding: 10px 14px; font-size: 13px; white-space: nowrap; }
  .grid-3, .stat-grid { grid-template-columns: 1fr; }
  .layout-2 { grid-template-columns: 1fr; }
  .summary { position: static; }
  .topbar .wrap { gap: 12px; }
  .top-actions { margin-left: auto; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; background: var(--nav-mobile-bg); border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .nav a { flex: 1; text-align: center; font-size: 13px; padding: 10px 4px; }
  body { padding-bottom: 64px; }
  .tg .topbar .nav { display: flex; }
  .btn.lg { height: 54px; padding: 0 32px; font-size: 17px; }
}
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .panel { padding: 20px; }
  .top-actions .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
