:root {
  --bg: #e7ebf0;
  --bg-raise: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --line: #cfd6e0;
  --line-soft: #e0e5ec;
  --text: #141820;
  --muted: #4a5564;
  --accent: #d7b15e;
  --accent-ink: #16130c;
  --ok: #0e7a45;
  --danger: #c5363f;
  --warn: #8a5a10;
  --buy: #0e7a45;
  --sell: #c5363f;
  --admin: #fff1f2;
  --shadow: 0 10px 28px rgba(22, 28, 40, 0.06);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  font: 15px/1.5 "Segoe UI", Aptos, sans-serif;
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.skip {
  position: absolute; left: 12px; top: -40px; background: var(--accent); color: var(--accent-ink);
  padding: 8px 12px; border-radius: 8px; z-index: 20;
}
.skip:focus { top: 12px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 24px 48px; }
.topnav {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft); padding: 0 20px; min-height: 60px;
  background: #fff; position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(16px);
}
.appbar {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft); padding: 0 22px; min-height: 58px;
  background: #fff; position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; gap: 12px; align-items: center; color: var(--text); font-weight: 700; text-decoration: none; }
.brand small, .brand-copy small { display: block; color: var(--muted); font-weight: 560; letter-spacing: 0.12em; font-size: 10px; text-transform: uppercase; }
.mark {
  width: 36px; height: 36px; border-radius: 10px; display: block; flex: 0 0 auto;
  object-fit: cover; background: #12161c;
}
.topnav nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.topnav nav a { color: var(--muted); font-size: 14px; }
.topnav nav a:hover { color: var(--text); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: color-mix(in srgb, var(--accent) 72%, #1a242c); color: #fff; border: 0; border-radius: 9px;
  padding: 10px 16px; font-weight: 700; cursor: pointer; text-decoration: none; min-height: 40px;
  letter-spacing: 0.01em;
}
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: #8f2d36; color: #fff; }
.btn.slim { min-height: 32px; padding: 6px 10px; font-size: 13px; font-weight: 650; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:hover { text-decoration: none; filter: brightness(0.96); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: 0 1px 2px rgba(20, 28, 40, 0.04);
}
.card h2, .card h3 { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #2c3542; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.banner, .alert {
  background: #fff8ec; border: 1px solid #ead7b0; color: #6d5420;
  padding: 12px 14px; border-radius: 10px; margin: 0 0 14px;
}
.alert.warn { background: #fff8ec; color: #6d5420; }
.alert.err, .flash.err { background: #fff1f2; color: #8d2430; border: 1px solid #f3c5cb; }
.flash { padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; }
.flash.ok { background: #eefaf3; color: var(--ok); border: 1px solid #b7e4c9; }
.badge {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px;
  font-size: 12px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); gap: 6px;
  white-space: nowrap;
}
.badge.ok { background: #eefaf3; color: var(--ok); border-color: #b7e4c9; }
.badge.warn { background: #fff8ec; color: var(--warn); border-color: #ead7b0; }
.badge.danger { background: #fff1f2; color: var(--danger); border-color: #f3c5cb; }
.badge.demo { background: #f3f7fb; color: #2d5578; border-color: #d5e2ee; }
.badge.buy { background: #eefaf3; color: var(--buy); }
.badge.sell { background: #fff1f2; color: var(--sell); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--muted); font-weight: 650; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; background: #f7f8fb; }
tbody tr:hover td { background: rgba(20, 28, 40, 0.03); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.table-wrap table { margin: 0; }
input, select, textarea {
  width: 100%; background: #fff; color: var(--text); border: 1px solid #c3cbd6;
  border-radius: 9px; padding: 10px 12px; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 120px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.form { max-width: 460px; }
.qr-card { max-width: 520px; }
.qr-frame { background: #fff; border-radius: 12px; padding: 12px; line-height: 0; width: fit-content; margin-bottom: 14px; }
.qr-frame svg { display: block; width: 232px; height: 232px; }
.secret-key { font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: 0.06em; font-size: 16px; margin: 8px 0; word-break: break-word; }
.kpi { font-size: 28px; font-variant-numeric: tabular-nums; margin: 6px 0 0; font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: -0.04em; }
.kpi.pos, .pos-num { color: var(--ok); }
.kpi.neg { color: var(--danger); }
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: #fff;
  border-right: 1px solid #d5dbe3;
  padding: 16px 12px 12px;
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
}
.side .brand { padding: 2px 8px 12px; border-bottom: 1px solid var(--line-soft); }
.nav-kicker { margin: 12px 12px 4px; color: #7b8492; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.side-nav { flex: 1; overflow: auto; padding: 4px 0 0; display: grid; align-content: start; gap: 4px; }
.side-nav a, .side-foot a, .side > a:not(.brand), .nav-more summary {
  display: flex; align-items: center; gap: 10px; color: #1c2430; padding: 6px 8px; border-radius: 10px;
  text-decoration: none; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.6; }
.nav-more[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.side-nav a:hover, .side-foot a:hover, .side > a:not(.brand):hover, .nav-more summary:hover { background: #f4f6f8; color: var(--text); text-decoration: none; }
.side-nav a.active, .side > a.active {
  background: color-mix(in srgb, var(--accent) 16%, #fff);
  color: #122028;
  box-shadow: none;
}
.side-nav a.active .nav-ico, .side > a.active .nav-ico {
  background: color-mix(in srgb, var(--accent) 78%, #1a242c);
  color: #fff;
}
.nav-more { display: grid; gap: 2px; margin-top: 8px; }
.nav-ico { width: 30px; height: 30px; padding: 6px; box-sizing: border-box; border-radius: 8px; background: #eef1f5; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side h3 { display: none; }
.side-foot { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.command-side .btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 650;
}
.command-side .btn:not(.ghost) {
  background: color-mix(in srgb, var(--accent) 72%, #1a242c);
  color: #fff;
  border-color: transparent;
}
.ensemble .ensemble-hide,
.ensemble .basket-only { display: none !important; }
.ensemble .command-side { display: grid; gap: 12px; }
.ensemble .leg-table th:nth-child(6),
.ensemble .leg-table th:nth-child(7),
.ensemble .leg-table td:nth-child(6),
.ensemble .leg-table td:nth-child(7) { display: none; }
.ensemble .tape { grid-template-columns: 220px 1fr; }
.ensemble .tape-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ensemble .command-card h2 { margin: 18px 0 8px; }
.ensemble .command-card h2:first-child { margin-top: 0; }
.ensemble .decision-bar p { font-size: 16px; font-weight: 600; }
.ensemble #leg-empty { margin: 4px 0 0; }
.workspace { min-width: 0; background: var(--bg); }
.crumb { display: flex; flex-direction: column; min-width: 140px; }
.crumb strong { font-size: 14px; font-weight: 680; }
.crumb span, .who { color: var(--muted); font-size: 12px; }
.appbar .status { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; max-width: 100%; }
.appbar-actions { display: flex; align-items: center; gap: 10px; }
.topnav, .appbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--accent) 45%, #c5ccd6);
}
.appbar .crumb strong, .topnav .brand { color: var(--text); }
.appbar .badge {
  background: #fff;
  color: #1c2430;
  border-color: #e3e8ee;
  min-height: 28px;
  padding: 0 11px 0 9px;
  font-weight: 650;
  box-shadow: 0 1px 1px rgba(18, 22, 28, 0.04);
}
.appbar .badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5ccd4;
  box-shadow: 0 0 0 3px rgba(197, 204, 212, 0.35);
  flex: 0 0 auto;
}
.appbar .badge.ok {
  background: #eefbf4;
  color: #0d7a45;
  border-color: #b7e7cb;
}
.appbar .badge.ok::before {
  background: #1f9d55;
  box-shadow: 0 0 0 3px rgba(31, 157, 85, 0.16);
}
.appbar .badge.warn {
  background: #fff1f2;
  color: #b42334;
  border-color: #f5c2c8;
}
.appbar .badge.warn::before {
  background: #e11d2e;
  box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.12);
}
.appbar .btn.ghost, .topnav .btn {
  box-shadow: none;
}
.appbar .btn.ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}
.main { padding: 22px 22px 56px; max-width: 1280px; }
.main h1, .hero h1 {
  font-family: "Segoe UI", Aptos, sans-serif; font-weight: 650; letter-spacing: -0.035em;
  font-size: clamp(34px, 4vw, 56px); line-height: 1.05; margin: 0 0 8px;
}
.main .page-head h1, .command-head h1 { font-size: 28px; font-weight: 650; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.eyebrow { color: color-mix(in srgb, var(--accent) 48%, #1a242c); letter-spacing: 0.16em; text-transform: uppercase; font-size: 11px; margin: 0 0 6px; font-weight: 700; }
.adminbar { background: var(--admin); color: #8d2430; padding: 8px 16px; font-size: 13px; border-bottom: 1px solid #f3c5cb; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero { padding: 18px 0 8px; }
.hero .lede { max-width: 62ch; font-size: 18px; color: var(--muted); }
footer.site { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line-soft); margin-top: 28px; padding-top: 16px; }
code, .mono { font-family: Consolas, "Cascadia Mono", monospace; }
.why { border-left: 3px solid var(--accent); }
.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.answers article, .desk-stats article {
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
}
.answers span, .desk-stats span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.answers strong, .desk-stats strong { display: block; margin-top: 4px; font-size: 15px; font-weight: 650; }
.answers em { display: block; margin-top: 4px; color: var(--muted); font-style: normal; font-size: 12px; }
.split { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: 14px; margin-top: 14px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.spark { width: 100%; height: 92px; display: block; }
.stack { display: grid; gap: 12px; }
.pos { font-variant-numeric: tabular-nums; }
.empty { padding: 18px; color: var(--muted); }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.pair {
  text-align: left; background: #fff; color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-height: 64px; cursor: pointer; font: inherit;
}
.pair.on { border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.pair strong, .pair small { display: block; }
.pair small { color: var(--muted); margin-top: 3px; font-size: 12px; }
.desk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
dl.meta { display: grid; grid-template-columns: 108px 1fr; gap: 8px 10px; margin: 0; font-size: 13.5px; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; }
.steps { display: grid; gap: 8px; margin: 0; padding: 0; }
.steps li { list-style: none; border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 13.5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.command-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 14px; }
.command-head p { margin: 0; max-width: 68ch; }
.command-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.9fr); gap: 14px; align-items: start; }
.command-main, .command-side { display: grid; gap: 12px; }
.tape {
  display: grid; grid-template-columns: 250px 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 28, 40, 0.04);
}
.tape-net { padding: 18px 18px 16px; background: #f4f6f8; border-right: 1px solid var(--line); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 55%, #6a7568); }
.tape-net > span, .tape-cells article > span, .decision-bar > div:first-child > span {
  display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.tape-net strong { display: block; margin-top: 8px; font-size: 40px; line-height: 0.95; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; font-weight: 680; }
.tape-net strong.pos, .tape-cells strong.pos { color: var(--ok); }
.tape-net strong.neg, .tape-cells strong.neg { color: var(--danger); }
.tape-net em { display: block; margin-top: 8px; color: var(--text); font-style: normal; }
.day-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.day-meta b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.goal { height: 6px; border-radius: 99px; background: #e7ebf1; margin-top: 14px; overflow: hidden; }
.goal i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 99px; transition: width 0.35s ease; }
.market-card canvas { width: 100%; height: 220px; display: block; background: #f7f8fb; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tf-row { display: flex; gap: 6px; }
.tf { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; cursor: pointer; }
.tf.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.leg-table-wrap { overflow-x: auto; }
.leg-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
.leg-table th, .leg-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
.leg-table th { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.tape-cells { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.tape-cells article { padding: 14px 14px 12px; border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.quick-cell form { display: flex; gap: 6px; align-items: center; margin: 6px 0 0; }
.quick-cell input {
  width: 100%; box-sizing: border-box; margin: 0; padding: 7px 8px;
  font-size: 18px; font-weight: 680; font-variant-numeric: tabular-nums;
}
.quick-cell button {
  flex: 0 0 auto; margin: 0; padding: 7px 10px; font-size: 12px; font-weight: 700;
}
.quick-cell small { display: block; margin-top: 6px; color: var(--ok); font-size: 12px; line-height: 1.35; }
.quick-cell small.neg { color: var(--danger); }
.tape-cells strong { display: block; margin-top: 6px; font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 650; }
.decision-bar {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  box-shadow: 0 1px 2px rgba(20, 28, 40, 0.04);
}
.decision-bar p { margin: 6px 0 0; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.score-strip {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
  list-style: none; margin: 12px 0 0; padding: 0;
}
.score-strip li { padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; min-width: 0; background: var(--bg-raise); }
.score-strip span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.score-strip strong { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.analysis-log, #ensemble-log {
  list-style: none; margin: 12px 0 0; padding: 0;
  font-family: "Segoe UI", Aptos, sans-serif; font-size: 13px; line-height: 1.4; color: var(--text);
  max-height: 420px; overflow: auto;
}
.analysis-log li, #ensemble-log li {
  padding: 8px 2px; border-bottom: 1px solid var(--line-soft);
}
.analysis-log li:last-child, #ensemble-log li:last-child { color: var(--text); }
.decision-meta { color: var(--muted); white-space: nowrap; }
.decision-meta strong { color: var(--text); }
.command-buttons { display: grid; gap: 8px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 10px 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px;
}
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 204, 138, 0.55); animation: pulse 1.6s infinite; }
.live-pill.off i { background: var(--warn); animation: none; }
.live-pill time { color: var(--muted); font-variant-numeric: tabular-nums; padding-left: 6px; border-left: 1px solid var(--line); }
.log-card { padding: 0; overflow: hidden; background: #fff; }
.log-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.log-head h2 { margin: 0; }
#ensemble-log { max-height: 420px; }
#live-log {
  list-style: none; margin: 0; padding: 4px 0; max-height: 360px; min-height: 180px; overflow: auto;
  font-family: "Segoe UI", Aptos, sans-serif; font-size: 13px; background: var(--bg-raise);
}
#live-log li { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
#live-log li.up span { color: var(--ok); }
#live-log li.down span { color: var(--sell); }
#live-log time { color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(61, 204, 138, 0); } }

@media (max-width: 1180px) {
  .command-grid, .tape { grid-template-columns: 1fr; }
  .tape-net { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 980px) {
  .split, .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; display: block; max-width: 100vw; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line-soft); z-index: 11; padding: 8px; }
  .side .brand, .side h3, .side-foot, .nav-ico { display: none; }
  .side-nav { display: flex; gap: 4px; overflow-x: auto; max-width: 100%; }
  .side-nav a, .side > a:not(.brand) { white-space: nowrap; }
  .workspace, .appbar, .main { min-width: 0; max-width: 100%; }
  .appbar { height: auto; align-items: flex-start; padding: 10px 12px; }
  .appbar .status { order: 3; width: 100%; margin-left: 0; justify-content: flex-start; }
  .main { padding: 16px; }
  .tape-cells { grid-template-columns: 1fr 1fr; }
  .decision-bar, .command-head { flex-direction: column; align-items: flex-start; }
  .score-strip { grid-template-columns: 1fr 1fr; }
}
.settings { display: grid; gap: 12px; max-width: 980px; }
#bot-settings .style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#bot-settings label.style-card {
  position: relative; display: flex; gap: 10px; align-items: flex-start; margin: 0;
  text-align: left; text-transform: none; letter-spacing: 0; cursor: pointer;
  background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
#bot-settings .style-card input { width: 16px; height: 16px; margin: 3px 0 0; flex: 0 0 auto; position: static; opacity: 1; }
#bot-settings .style-card span { display: grid; gap: 4px; min-width: 0; }
#bot-settings .style-card strong { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); }
#bot-settings .style-card em {
  display: none; justify-self: start; font-style: normal; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 2px 7px; width: fit-content;
}
#bot-settings .style-card.on em { display: inline-flex; }
#bot-settings .style-card small { color: var(--muted); font-size: 12.5px; text-transform: none; letter-spacing: 0; line-height: 1.4; }
#bot-settings .style-card.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
#bot-settings .preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
#bot-settings .preview article { background: #fff; border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; min-width: 0; }
#bot-settings .preview span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
#bot-settings .preview strong { display: block; margin-top: 6px; font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 680; color: var(--text); }
.check {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; text-transform: none; letter-spacing: 0;
  color: var(--text); font-size: 14px;
}
.check input { width: 16px; height: 16px; margin-top: 3px; flex: 0 0 auto; }
.check strong { display: block; font-size: 14px; font-weight: 650; }
.check small, .choice label { text-transform: none; letter-spacing: 0; }
.check small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.choice { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.choice label {
  display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 14px; text-transform: none; letter-spacing: 0;
}
.choice input { width: 16px; height: 16px; }
details.card summary { cursor: pointer; color: var(--muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 650; }
details.card summary:hover { color: var(--text); }
@media (max-width: 800px) {
  #bot-settings .style-grid, #bot-settings .preview { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.command-head { align-items: center; margin-bottom: 12px; }
.command-head h1 { font-size: 22px; letter-spacing: 0.06em; font-weight: 700; }
.command-head p.muted { font-size: 13px; color: var(--muted); }
.command .live-pill { background: #fff; border-color: var(--line); box-shadow: 0 1px 2px rgba(20, 28, 40, 0.04); }
.command .tape-net strong,
.command .tape-cells strong,
.command .quick-cell input {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.ensemble .tape { align-items: stretch; }
.ensemble .tape-net { display: flex; flex-direction: column; justify-content: center; }
.ensemble .tape-net strong { font-size: 34px; }
.ensemble .tape-cells { align-items: stretch; }
.ensemble .tape-cells article {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 92px; background: #fff;
}
.ensemble .tape-cells strong { font-size: 18px; letter-spacing: -0.03em; }
.ensemble .quick-cell form { margin-top: 4px; }
.ensemble .quick-cell input { background: #f7f8fa; border-color: #c3cbd6; }
.ensemble .quick-cell button {
  background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.ensemble .quick-cell small { color: var(--muted); }
.ensemble .decision-bar { align-items: center; padding: 12px 16px; }
.ensemble .decision-bar p { margin: 2px 0 0; font-size: 14px; font-weight: 650; }
.ensemble .decision-meta { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.ensemble #legs-live { padding-top: 14px; padding-bottom: 14px; }
.ensemble #leg-empty { margin: 0; font-size: 13px; }
.ensemble .command-card { padding: 14px 14px 16px; }
.ensemble .command-card h2 {
  margin: 16px 0 8px; padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px; letter-spacing: 0.12em;
}
.ensemble .command-card h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ensemble .command-card .muted.small { margin: 8px 0 0; line-height: 1.45; }
.command-buttons.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f3f5f8;
}
.command-side .command-buttons.seg .btn {
  min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: #3c4654; box-shadow: none;
}
.command-side .command-buttons.seg .btn:not(.ghost) {
  background: #fff; color: var(--text);
  box-shadow: 0 1px 2px rgba(20, 28, 40, 0.08);
}
.command .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ensemble .command-card select,
.ensemble .command-card input[type="text"],
.ensemble .command-card input[inputmode="decimal"] { background: #f7f8fa; }
.ensemble .command-card .btn.block { min-height: 38px; }
.appbar { min-height: 52px; }
.appbar .badge { font-weight: 650; }
.side-nav a, .side-foot a, .nav-more summary { font-size: 14px; font-weight: 650; }

.home { display: grid; gap: 14px; }
.home-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; }
.home-head h1 { margin: 0 0 4px; font-size: 28px; letter-spacing: -0.03em; }
.home-head p { margin: 0; }
.home-status, .home-money { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.home-status article, .home-money article {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px;
  box-shadow: 0 1px 2px rgba(20, 28, 40, 0.04);
}
.home-status span, .home-money span {
  display: flex; align-items: center; gap: 8px;
  color: #5c6776; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.home .dot { width: 8px; height: 8px; border-radius: 50%; background: #c5ccd4; flex: 0 0 auto; }
.home .dot.on { background: var(--ok); }
.home .dot.off { background: var(--danger); }
.home-status strong, .home-money strong {
  display: block; margin-top: 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; color: var(--text);
}
.home-money strong { font-family: Consolas, "Cascadia Mono", monospace; font-size: 24px; font-weight: 680; }
.home-status em, .home-money em { display: block; margin-top: 6px; color: var(--muted); font-style: normal; font-size: 12.5px; }
.home-book { padding: 14px 14px 8px; }
.home-book-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.home-book-head h2 { margin: 0; }
.home-empty { text-align: center; padding: 28px 12px; color: var(--muted); }
@media (max-width: 980px) {
  .home-status, .home-money { grid-template-columns: 1fr 1fr; }
  .home-head { align-items: flex-start; flex-direction: column; }
}

.guide { max-width: 640px; color: #12161c; }
.guide-head h1 { margin: 0 0 8px; font-size: 36px; letter-spacing: -0.03em; color: #12161c; }
.guide-head p { margin: 0 0 16px; font-size: 16px; line-height: 1.45; color: #12161c; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.guide-steps li {
  display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; align-items: baseline;
  background: #fff; border: 1px solid #cfd6e0; border-radius: 12px; padding: 14px 16px;
}
.guide-steps li::before {
  content: counter(step); counter-increment: step;
  grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: #12161c; color: #fff;
}
.guide-steps { counter-reset: step; }
.guide-steps strong { font-size: 16px; color: #12161c; }
.guide-steps span { grid-column: 2; color: #12161c; font-size: 15px; line-height: 1.4; }
.guide-foot { margin: 14px 0 0; color: #12161c; font-size: 14px; }
.guide-next { margin: 12px 0 0; }

body:has(.site-hero) { background: #f3f5f7; }
.site-hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .9fr);
  gap: 56px; align-items: center; min-height: 0; margin: 8px 0 36px; padding: 36px 4px 8px;
  background: none; border-radius: 0;
}
.site-hero-copy { max-width: 540px; }
.site-frame {
  background: #12161c; color: #f3f6f8; border-radius: 22px; padding: 18px 18px 10px;
  box-shadow: 0 28px 60px rgba(18, 22, 28, 0.14);
}
.site-frame header { display: flex; align-items: center; gap: 10px; }
.site-frame header img { width: 28px; height: 28px; border-radius: 8px; }
.site-frame header strong { margin-right: auto; font-size: 14px; font-weight: 650; }
.site-frame header span { display: inline-flex; align-items: center; gap: 6px; color: #8b949e; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.site-frame header i { width: 7px; height: 7px; border-radius: 50%; background: #3ddec8; display: inline-block; }
.site-chart { width: 100%; height: 148px; display: block; margin: 6px 0 2px; }
.site-frame div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.08); color: #d7dee4; }
.site-frame b { color: #fff; font-weight: 650; }
.site-frame ol { list-style: none; margin: 0; padding: 10px 0 6px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 8px; }
.site-frame li { color: #d7dee4; font-size: 13px; line-height: 1.4; }
.site-frame time { display: block; color: #8b949e; font-size: 12px; font-variant-numeric: tabular-nums; }
.site-hero h1, .page-head h1, .site-close h2, .site-block > h2 {
  color: #12161c; letter-spacing: -0.03em; text-transform: none; font-weight: 700;
}
.site-hero h1 { margin: 0 0 12px; font-size: clamp(34px, 4vw, 48px); line-height: 1.05; }
.site-lead, .page-head p, .site-card p, .site-note, .site-faq p { color: #1c2430; font-size: 16px; line-height: 1.5; }
.site-lead { margin: 0 0 18px; max-width: 38rem; }
.site-desk { background: #fff; border: 1px solid #cfd6e0; border-radius: 16px; padding: 16px 16px 12px; box-shadow: 0 1px 2px rgba(20, 28, 40, 0.04); }
.site-desk div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #e6ebf1; color: #12161c; }
.site-desk b { font-variant-numeric: tabular-nums; }
.site-desk p { margin: 8px 0 0; color: #1c2430; font-size: 13px; }
.site-kpis, .site-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 0 8px; }
.site-kpis article, .site-steps article, .site-faq article, .site-close {
  background: #fff; border: 1px solid #cfd6e0; border-radius: 12px; padding: 14px 16px;
}
.site-kpis strong, .site-steps strong, .site-faq strong { display: block; color: #12161c; font-size: 16px; }
.site-kpis span, .site-steps span { display: block; margin-top: 4px; color: #1c2430; font-size: 14px; }
.site-steps b { display: block; margin-bottom: 8px; color: #12161c; font-size: 12px; letter-spacing: 0.08em; }
.site-block { margin: 28px 0; }
.site-block > h2, .site-close h2, .page-head h1 { margin: 0 0 12px; font-size: 28px; }
.site-card h2 { margin: 0 0 8px; font-size: 16px; letter-spacing: 0; text-transform: none; color: #12161c; }
.site-card .kpi { margin: 4px 0 8px; }
.site-note { margin: 10px 0 0; }
.site-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.site-faq p { margin: 6px 0 0; }
.site-band { padding: 28px; margin: 12px 0 36px; }
.site-close { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 8px; padding: 22px 24px; }
.site-close h2 { margin: 0; font-size: 22px; }
.lang-switch { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; }
.lang-switch a { color: #5c6776; text-decoration: none; }
.lang-switch a.on { color: #12161c; }
.page-head { margin-bottom: 16px; }
@media (max-width: 900px) {
  .site-kpis, .site-steps, .site-faq { grid-template-columns: 1fr 1fr; }
  .site-hero { grid-template-columns: 1fr; gap: 28px; padding: 20px 0 8px; min-height: 0; background: none; }
  .site-close { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 640px) {
  .site-kpis, .site-steps, .site-faq { grid-template-columns: 1fr; }
}

.site-hero h1 { font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.045em; }
.site-screen {
  background: #fff; border: 1px solid #cfd6e0; border-radius: 18px; padding: 16px 16px 8px;
  box-shadow: 0 16px 40px rgba(20, 28, 40, 0.06);
}
.site-screen header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.site-screen header strong { color: #12161c; font-size: 14px; }
.site-screen header span { display: inline-flex; align-items: center; gap: 6px; color: #5c6776; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.site-screen header i { width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; display: inline-block; }
.site-screen div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #e6ebf1; color: #12161c; }
.site-screen ol { list-style: none; margin: 8px 0 0; padding: 10px 0 4px; border-top: 1px solid #e6ebf1; display: grid; gap: 8px; }
.site-screen li { color: #1c2430; font-size: 13px; line-height: 1.4; }
.site-screen time { display: block; color: #5c6776; font-variant-numeric: tabular-nums; font-size: 12px; }
.site-intro { display: grid; grid-template-columns: 180px 1fr; gap: 24px; margin: 56px 0 8px; }
.site-intro h2, .site-head h2, .site-band h2 { margin: 0 0 10px; color: #12161c; letter-spacing: -0.03em; font-size: clamp(28px, 3vw, 40px); text-transform: none; }
.site-intro p, .site-tools p, .site-notes p, .site-band p { margin: 0; color: #1c2430; font-size: 16px; line-height: 1.55; }
.site-head { margin-bottom: 16px; }
.site-block { margin: 56px 0; }
.site-tools, .site-plans, .site-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.site-tools article, .site-plans article, .site-notes article, .site-faq article {
  background: #fff; border: 1px solid #e3e8ee; border-radius: 14px; padding: 20px 18px 18px;
  box-shadow: 0 1px 0 rgba(18, 22, 28, 0.02);
}
.site-tools article { border-top: 2px solid #12161c; }
.site-tools h3, .site-plans h3, .site-notes h3 { margin: 0 0 8px; color: #12161c; font-size: 18px; letter-spacing: 0; text-transform: none; }
.site-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.site-steps article { min-height: 160px; }
.site-steps b {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  background: #12161c; color: #fff; font-size: 13px; letter-spacing: 0;
}
.site-price { margin: 8px 0; color: #12161c; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.site-plans .btn { margin-top: 12px; }
.site-band {
  background: #12161c; min-height: 0; display: flex; align-items: center;
  padding: 42px 40px; border: 0; border-radius: 22px;
}
.site-band h2, .site-intro h2, .site-head h2 { color: #12161c; }
.site-band h2 { color: #fff; }
.site-band p { color: #c5ced6; max-width: 38rem; }
.site-band-copy { background: none; padding: 0; max-width: none; }
.site-close { background: #12161c; border: 0; border-radius: 22px; }
.site-close h2 { color: #fff; }
.site-faq { grid-template-columns: 1fr 1fr; }
.site-foot { border-top: 1px solid #cfd6e0; margin-top: 12px; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding-top: 28px; padding-bottom: 36px; }
.site-foot strong { display: block; margin-bottom: 8px; color: #12161c; }
.site-foot p { margin: 0; color: #1c2430; max-width: 36rem; }
.site-foot nav { display: grid; align-content: start; gap: 8px; }
.site-foot a { color: #1c2430; text-decoration: none; }
.site-foot a:hover { color: #12161c; }
@media (max-width: 900px) {
  .site-tools, .site-plans, .site-notes, .site-steps, .site-faq, .site-foot .wrap { grid-template-columns: 1fr 1fr; }
  .site-hero { grid-template-columns: 1fr; }
  .site-intro { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-tools, .site-plans, .site-notes, .site-steps, .site-faq, .site-foot .wrap { grid-template-columns: 1fr; }
  .site-hero { grid-template-columns: 1fr; }
}
.bot-pick { display: flex; gap: 8px; margin: 0 0 16px; }
.bot-pick a { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 148px; min-height: 64px; padding: 10px 16px; border: 1px solid #e3e8ee; border-radius: 14px; background: #fff; color: #12161c; text-decoration: none; }
.bot-pick a strong { font-size: 18px; font-weight: 750; letter-spacing: 0.04em; line-height: 1.1; }
.bot-pick a span { color: #6b7580; font-size: 12px; font-weight: 500; }
.bot-pick a.on { background: #fff; color: #12161c; border-color: #8fd9ce; box-shadow: inset 0 -3px 0 #3ddec8; }
.bot-pick a.on span { color: #3a6f68; }
.nav-fold { display: flex; align-items: center; margin-left: auto; flex: 0 0 auto; }
.nav-check { position: fixed; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.nav-fold label { display: none; margin: 0; letter-spacing: 0; text-transform: none; font-size: 14px; color: #12161c; }
.topnav .nav-fold nav { margin-left: 0; flex: 0 0 auto; flex-wrap: nowrap; }
.desk-log { background: #12161c; color: #f3f6f8; border-radius: 22px; padding: 16px 18px 8px; margin-top: 14px; box-shadow: 0 28px 60px rgba(18, 22, 28, 0.14); }
.desk-log header { display: flex; align-items: center; gap: 10px; }
.desk-log header img { width: 28px; height: 28px; border-radius: 8px; }
.desk-log header strong { margin-right: auto; font-size: 14px; font-weight: 650; }
.desk-log header span { display: inline-flex; align-items: center; gap: 6px; color: #8b949e; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.desk-log header i { width: 7px; height: 7px; border-radius: 50%; background: #3ddec8; display: inline-block; }
.desk-log header b { color: #d7dee4; font-weight: 650; letter-spacing: 0.14em; }
.desk-log > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.08); color: #d7dee4; margin-top: 8px; }
.desk-log > div b { color: #fff; font-weight: 650; text-align: right; }
.desk-log ol { list-style: none; margin: 0; padding: 10px 0 8px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 8px; }
.desk-log li { color: #d7dee4; font-size: 13px; line-height: 1.4; }
.desk-log time { display: block; color: #8b949e; font-size: 12px; font-variant-numeric: tabular-nums; }
.appbar .badge.ok { background: #eefbf4; color: #0d7a45; border-color: #b7e7cb; }
.scalper-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.scalper-modes label { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.scalper-modes label.on { background: #12161c; color: #fff; border-color: #12161c; }
.scalper-modes label.on small { color: #c5ced6; }
.scalper-modes small, .scalper-fields small { color: var(--muted); }
.scalper-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scalper-fields label, .scalper-confirm { display: grid; gap: 4px; font-size: 13px; }
.scalper-fields input, .scalper-confirm input { font: inherit; }
.scalper-fields input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.scalper-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.scalper-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.scalper-filters article { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.scalper-filters strong { display: block; margin-top: 4px; }
.scalper-filters strong.ok { color: var(--ok); }
.scalper-filters strong.bad { color: var(--danger); }
.scalper-pool { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.scalper-pool li { padding: 4px 8px; border-radius: 999px; background: #f4f6f8; font-size: 12px; }
.scalper-pool li.vote { background: #12161c; color: #fff; }
.scalper-confirm { margin: 10px 0; }
@media (max-width: 800px) {
  .scalper-modes, .scalper-fields, .scalper-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  body { overflow-x: clip; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .workspace, .appbar, .main { min-width: 0; max-width: 100%; }
  .side {
    position: sticky; top: 0; height: auto; z-index: 12;
    display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px;
    padding: 8px 10px; overflow: hidden;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .side .brand { display: flex; flex: 0 0 auto; border: 0; padding: 0; }
  .side .brand-copy, .side .brand small, .nav-kicker, .side h3 { display: none; }
  .side-nav {
    display: flex; flex: 1 1 auto; min-width: 0; gap: 4px;
    overflow-x: auto; padding: 0; align-items: center;
  }
  .nav-more { display: contents; }
  .nav-more summary { display: none; }
  .side .nav-ico { display: block; width: 22px; height: 22px; padding: 3px; }
  .side-nav a, .side-foot a, .side > a:not(.brand) { flex: 0 0 auto; white-space: nowrap; }
  .side-foot { display: flex; flex: 0 0 auto; border: 0; padding: 0; }
  .side:not(:has(.side-nav)) { overflow-x: auto; }
  .appbar { height: auto; align-items: flex-start; padding: 10px 12px; }
  .appbar .status { order: 3; width: 100%; margin-left: 0; justify-content: flex-start; }
  .who { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .crumb { min-width: 0; }
  .main { padding: 16px 14px 48px; }
  .command-head { align-items: flex-start; }
  .command-head h1, .main .page-head h1 { font-size: clamp(26px, 7vw, 34px); overflow-wrap: anywhere; }
  .bot-pick { display: grid; grid-template-columns: 1fr 1fr; }
  .bot-pick a { min-width: 0; }
  .tape, .card, .site-frame, .site-band, .site-close, .desk-log { max-width: 100%; }
  .ensemble .tape, .tape { grid-template-columns: 1fr; }
  .ensemble .tape-net, .tape-net { border-right: 0; border-bottom: 1px solid var(--line); }
  .ensemble .tape-cells, .tape-cells { grid-template-columns: 1fr 1fr; }
  .home-status, .home-money { grid-template-columns: 1fr 1fr; }
  .adminbar { padding: 8px 12px; font-size: 13px; }
  .desk-log li, .desk-log > div b { overflow-wrap: anywhere; }
}

@media (max-width: 900px) {
  .topnav { flex-wrap: nowrap; gap: 10px; padding: 0 14px; }
  .nav-fold { display: block; margin-left: auto; position: relative; flex: 0 0 auto; }
  .nav-fold label {
    display: inline-flex; align-items: center; cursor: pointer;
    min-height: 36px; padding: 0 12px; border: 1px solid #cfd6e0; border-radius: 10px;
    background: #fff; color: #12161c; font-weight: 700; font-size: 14px;
  }
  .nav-fold nav { display: none; margin: 0; }
  .nav-check:checked ~ nav {
    display: grid; position: absolute; right: 0; top: calc(100% + 8px);
    width: min(280px, calc(100vw - 24px)); padding: 8px; gap: 2px;
    background: #fff; border: 1px solid #cfd6e0; border-radius: 14px;
    box-shadow: 0 16px 40px rgba(18, 22, 28, 0.12); z-index: 30;
  }
  .nav-check:checked ~ nav a { display: flex; padding: 10px 12px; border-radius: 8px; }
  .nav-check:checked ~ nav .lang-switch { padding: 8px 12px; }
  .nav-check:checked ~ nav .btn { width: 100%; }
  .wrap { padding: 18px 14px 40px; }
  .site-hero { gap: 22px; padding: 8px 0 4px; }
  .site-hero h1 { font-size: clamp(32px, 10vw, 48px); }
  .site-hero .row .btn { flex: 1 1 140px; }
  .site-band, .site-close { padding: 22px 16px; }
  .site-block, .site-intro { margin: 32px 0; }
  .site-steps article { min-height: 0; }
  .site-foot .wrap { gap: 18px; }
}

@media (max-width: 640px) {
  .main { padding: 14px 12px 40px; }
  .ensemble .tape-net strong { font-size: 28px; }
  .bot-pick a strong { font-size: 16px; letter-spacing: 0.03em; }
  .appbar-actions { margin-left: auto; }
  input, select, textarea { font-size: 16px; }
  .form, .qr-card { max-width: 100%; }
  .qr-frame svg { width: min(232px, 70vw); height: auto; }
  #bot-settings .style-grid, #bot-settings .preview,
  .scalper-modes, .scalper-fields, .scalper-filters { grid-template-columns: 1fr; }
  .guide-head h1 { font-size: 30px; }
  .site-price { font-size: 24px; }
  .home-head h1 { font-size: 24px; }
}

button.btn{background:var(--accent);color:var(--accent-ink)}
.btn{background:var(--accent);color:var(--accent-ink)}
.btn.ghost{background:#fff;color:var(--text);border:1px solid var(--line)}
.btn.danger{background:#8f2d36;color:#fff}
.command-side .btn:not(.ghost){background:var(--accent);color:var(--accent-ink);border-color:transparent}
.side-nav a.active .nav-ico,.side>a.active .nav-ico{background:var(--accent);color:var(--accent-ink)}