/* HASHROOM — mining simulator UI
   Palette: graphite + acid lime + signal amber. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #070a08;
  --bg-soft: #0a0e0b;
  --panel: #0f1510;
  --panel-2: #121a13;
  --panel-3: #172019;
  --ink: #eef4e8;
  --muted: #93a395;
  --muted-2: #849487;
  --muted-3: #657468;
  --accent: #c6ff3d;
  --accent-soft: #e2ff9a;
  --accent-dim: #8fbf22;
  --accent-ink: #0b1005;
  --amber: #ffb020;
  --amber-soft: #ffd27a;
  --danger: #ff6b61;
  --danger-soft: #ffb1ac;
  --ok: #7cffb2;
  --line: rgba(198, 255, 61, 0.13);
  --line-strong: rgba(198, 255, 61, 0.3);
  --line-soft: rgba(238, 244, 232, 0.08);
  --font-display: "Unbounded", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --topbar-h: 68px;
  --sidenav-w: 234px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1100px 720px at 82% -12%, rgba(198, 255, 61, 0.09), transparent 62%),
    radial-gradient(900px 620px at -10% 38%, rgba(198, 255, 61, 0.045), transparent 66%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(198, 255, 61, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 255, 61, 0.032) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 70% at 55% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 55% 30%, #000 20%, transparent 78%);
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--lg {
  width: 22px;
  height: 22px;
}

.noscript {
  max-width: 680px;
  margin: 24px auto;
  padding: 18px 20px;
  border: 1px solid rgba(255, 176, 32, 0.3);
  border-radius: 6px;
  background: rgba(255, 176, 32, 0.06);
  color: var(--muted);
  font-size: 14px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: rgba(198, 255, 61, 0.28);
  color: var(--ink);
}

/* ---------- Shell ---------- */

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 10, 8, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 1480px;
  min-height: var(--topbar-h);
  margin: 0 auto;
  padding: 10px 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 44px;
  border-radius: 4px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(198, 255, 61, 0.18), rgba(198, 255, 61, 0.02));
  color: var(--accent);
}

.brand-mark .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-tag {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-live {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  min-width: 0;
}

.topbar-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.topbar-stat-label {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar-stat-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.topbar-stat--income .topbar-stat-value {
  color: var(--accent);
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid rgba(255, 176, 32, 0.35);
  border-radius: 3px;
  background: rgba(255, 176, 32, 0.1);
  color: var(--amber-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.demo-chip--big {
  padding: 7px 12px;
  font-size: 11px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.save-state {
  margin-right: 8px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  transition: color 0.25s;
}

.save-state.is-saving {
  color: var(--amber);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.icon-btn:hover {
  border-color: var(--line);
  background: rgba(198, 255, 61, 0.05);
  color: var(--ink);
}

.app-body {
  display: grid;
  grid-template-columns: var(--sidenav-w) minmax(0, 1fr);
  gap: 30px;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 28px 56px;
}

/* ---------- Side nav ---------- */

.sidenav {
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.sidenav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.nav-item .icon {
  width: 19px;
  height: 19px;
}

.nav-item:hover {
  background: rgba(198, 255, 61, 0.045);
  color: var(--ink);
}

.nav-item.is-active {
  border-color: var(--line);
  background: linear-gradient(90deg, rgba(198, 255, 61, 0.12), rgba(198, 255, 61, 0.03));
  color: var(--ink);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 9px;
  bottom: 9px;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(198, 255, 61, 0.7);
}

.nav-item.is-active .icon {
  color: var(--accent);
}

.nav-item-label {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-meta {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nav-item.is-active .nav-item-meta {
  color: var(--accent-dim);
}

.sidenav-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(15, 21, 16, 0.7);
}

.ai-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-mini-top,
.ai-mini-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.ai-mini-top span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-mini-top strong {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-soft);
}

.ai-mini-bottom {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.sidenav-note {
  color: var(--muted-3);
  font-size: 11px;
  line-height: 1.5;
}

.meter {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(238, 244, 232, 0.08);
}

.meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.45s var(--ease), background 0.3s;
}

.meter--thin {
  height: 3px;
}

.meter--temp > span {
  background: linear-gradient(90deg, var(--accent-dim), var(--amber), var(--danger));
}

.meter--ai > span {
  background: linear-gradient(90deg, #4b7a1a, var(--accent), var(--accent-soft));
}

/* ---------- Main / panels ---------- */

.main {
  min-width: 0;
}

.panel-view {
  animation: viewIn 0.35s var(--ease) both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(238, 244, 232, 0.025), transparent 36%),
    var(--panel);
  box-shadow: 0 1px 0 rgba(238, 244, 232, 0.02) inset;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head--simple {
  padding: 0 0 16px;
  border-bottom: 0;
}

.panel-head h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.panel-head p {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.45;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.chip--accent {
  border-color: var(--line-strong);
  background: rgba(198, 255, 61, 0.08);
  color: var(--accent);
}

.chip--demo {
  border-color: rgba(255, 176, 32, 0.3);
  background: rgba(255, 176, 32, 0.08);
  color: var(--amber-soft);
}

.chip--mono {
  color: var(--muted-3);
}

.chip--current {
  border-color: var(--line-strong);
  background: rgba(198, 255, 61, 0.1);
  color: var(--accent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow--danger {
  color: var(--danger);
}

.eyebrow-sep {
  color: var(--muted-3);
}

.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(198, 255, 61, 0.9);
}

.accent-text {
  color: var(--accent);
}

.fineprint {
  color: var(--muted-3);
  font-size: 11.5px;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.1s, box-shadow 0.18s;
}

.btn:active:not(:disabled) {
  transform: scale(0.985);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 rgba(198, 255, 61, 0);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-soft);
  box-shadow: 0 0 26px rgba(198, 255, 61, 0.18);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(198, 255, 61, 0.035);
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(198, 255, 61, 0.08);
}

.btn-danger {
  background: rgba(255, 107, 97, 0.14);
  border-color: rgba(255, 107, 97, 0.35);
  color: var(--danger-soft);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 107, 97, 0.22);
}

.btn--wide {
  width: 100%;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.text-link:hover {
  color: var(--accent-soft);
}

.text-link .icon {
  width: 14px;
  height: 14px;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 20px;
  overflow: hidden;
  border-color: var(--line);
  background:
    radial-gradient(760px 460px at 86% 18%, rgba(198, 255, 61, 0.12), transparent 64%),
    linear-gradient(115deg, rgba(198, 255, 61, 0.035), transparent 46%),
    var(--panel);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 49.8%, rgba(198, 255, 61, 0.055) 50%, transparent 50.2%);
  background-size: 210px 100%;
  opacity: 0.5;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 42px 14px 38px 42px;
}

.hero h1 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.3vw, 47px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 540px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.hero-balance {
  width: 100%;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.balance-label {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.balance-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.balance-value .currency {
  color: var(--accent);
  font-size: 0.45em;
  font-weight: 500;
  letter-spacing: 0;
}

.balance-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 12px;
}

.income-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(198, 255, 61, 0.06);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.income-pill .icon {
  width: 13px;
  height: 13px;
}

.balance-daily {
  font-family: var(--font-mono);
  font-size: 11px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta {
  margin-top: 12px;
  color: var(--muted-3);
  font-size: 11.5px;
}

.hero-meta.is-active {
  color: var(--accent);
}

.hero-meta.is-cooling {
  color: var(--amber);
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 36px;
}

.rig {
  position: relative;
  width: 100%;
  max-width: 390px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(198, 255, 61, 0.08), transparent 42%),
    linear-gradient(180deg, #121a13, #090d0a);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(198, 255, 61, 0.05),
    inset 0 1px 0 rgba(238, 244, 232, 0.08);
  transform: perspective(1100px) rotateY(-5deg) rotateX(1.5deg);
  transform-style: preserve-3d;
}

.rig::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(198, 255, 61, 0.08);
  border-radius: 5px;
  pointer-events: none;
}

.rig-top,
.rig-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 10px;
}

.rig-foot {
  padding: 10px 4px 2px;
}

.rig-code,
.rig-label,
.rig-live {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.rig-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.rig-led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: ledPulse 2s ease-in-out infinite;
}

@keyframes ledPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.rig-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rig-slot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 12px;
  border: 1px solid rgba(198, 255, 61, 0.16);
  border-radius: 4px;
  background: linear-gradient(90deg, #151f16, #0d120e);
  overflow: hidden;
}

.rig-slot::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(198, 255, 61, 0.07));
}

.rig-slot.is-empty {
  justify-content: center;
  border-style: dashed;
  border-color: rgba(238, 244, 232, 0.12);
  background: rgba(238, 244, 232, 0.015);
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rig-slot.is-overflow {
  justify-content: center;
  border-color: var(--line);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.fan {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(238, 244, 232, 0.15);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0b100c 0 18%, transparent 19%),
    conic-gradient(from 15deg, #2b3a2d 0 22%, #111a12 22% 33%, #3a4c3c 33% 55%, #111a12 55% 66%, #2b3a2d 66% 88%, #111a12 88% 100%);
  animation: fanSpin var(--fan-duration, 2.4s) linear infinite;
}

.fan::after {
  content: "";
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px rgba(198, 255, 61, 0.7);
}

@keyframes fanSpin {
  to { transform: rotate(360deg); }
}

.rig-slot-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.rig-slot-hash {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent-dim);
  white-space: nowrap;
}

.rig-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.rig-bars i {
  display: block;
  width: 2px;
  height: 100%;
  background: var(--accent-dim);
  animation: barPulse 1.6s ease-in-out infinite;
}

.rig-bars i:nth-child(2) { animation-delay: 0.1s; height: 62%; }
.rig-bars i:nth-child(3) { animation-delay: 0.2s; height: 84%; }
.rig-bars i:nth-child(4) { animation-delay: 0.3s; height: 48%; }
.rig-bars i:nth-child(5) { animation-delay: 0.4s; height: 92%; }
.rig-bars i:nth-child(6) { animation-delay: 0.5s; height: 58%; }
.rig-bars i:nth-child(7) { animation-delay: 0.6s; height: 76%; }
.rig-bars i:nth-child(8) { animation-delay: 0.7s; height: 44%; }

@keyframes barPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

.rig-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 390px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.rig-caption-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
}

.rig-caption-status .dot {
  width: 4px;
  height: 4px;
}

/* ---------- Stats ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 17px 18px 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(15, 21, 16, 0.86);
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: rgba(198, 255, 61, 0.035);
  color: var(--accent-dim);
}

.stat-icon .icon {
  width: 14px;
  height: 14px;
}

.stat-icon--small {
  width: 30px;
  height: 30px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.stat-foot {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
}

.stat-card.is-hot .stat-value {
  color: var(--danger);
}

.stat-card.is-warm .stat-value {
  color: var(--amber);
}

/* ---------- Farm grid ---------- */

.farm-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.installed-panel {
  grid-column: span 7;
  display: flex;
  flex-direction: column;
}

.missions-preview {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
}

.log-panel {
  grid-column: span 7;
}

.leaderboard-panel {
  grid-column: span 5;
}

.installed-panel > .text-link,
.missions-preview > .text-link {
  margin: auto 22px 16px;
}

.installed-list {
  display: flex;
  flex-direction: column;
}

.installed-next {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 12px 22px 4px;
  padding: 11px 12px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: rgba(198, 255, 61, 0.028);
}

.installed-next-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--accent-dim);
}

.installed-next-icon .icon {
  width: 14px;
  height: 14px;
}

.installed-next strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.installed-next p {
  margin-top: 1px;
  color: var(--muted-3);
  font-size: 10.5px;
  line-height: 1.4;
}

.installed-next .btn {
  min-height: 34px;
  padding: 0 11px;
  font-size: 10.5px;
}

.installed-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.installed-row:last-child {
  border-bottom: 0;
}

.installed-art {
  display: grid;
  place-items: center;
  width: 38px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(145deg, #182219, #0c110d);
  color: var(--accent);
}

.installed-art .icon {
  width: 19px;
  height: 19px;
}

.installed-info {
  min-width: 0;
}

.installed-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.installed-name span {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
}

.installed-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.installed-total {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.installed-total span {
  display: block;
  color: var(--muted-3);
  font-size: 9px;
  font-weight: 400;
}

.empty-state {
  padding: 26px 22px;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.55;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
}

/* Mission mini */

.mission-mini-list {
  display: flex;
  flex-direction: column;
}

.mission-mini {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.mission-mini:last-child {
  border-bottom: 0;
}

.mission-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  color: var(--muted-3);
}

.mission-check .icon {
  width: 12px;
  height: 12px;
}

.mission-mini.is-ready .mission-check {
  border-color: var(--line-strong);
  background: rgba(198, 255, 61, 0.12);
  color: var(--accent);
}

.mission-mini.is-claimed .mission-check {
  border-color: rgba(124, 255, 178, 0.3);
  background: rgba(124, 255, 178, 0.1);
  color: var(--ok);
}

.mission-mini-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.mission-mini-sub {
  margin-top: 2px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.mission-mini-reward {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.mission-mini .mini-claim {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

/* Console */

.console {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 260px;
  overflow: auto;
  padding: 8px 0;
  background:
    linear-gradient(180deg, rgba(198, 255, 61, 0.02), transparent),
    #0a0e0b;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.console-line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted-2);
}

.console-line time {
  color: var(--muted-3);
}

.console-line.is-good {
  color: var(--accent-soft);
}

.console-line.is-warn {
  color: var(--amber-soft);
}

.console-line.is-buy {
  color: var(--ink);
}

/* Leaderboard */

.leaderboard {
  display: flex;
  flex-direction: column;
}

.leader-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

.leader-row:last-child {
  border-bottom: 0;
}

.leader-row.is-player {
  background: rgba(198, 255, 61, 0.07);
}

.leader-row.is-player .leader-name {
  color: var(--accent);
}

.leader-rank {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.leader-name {
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader-name small {
  margin-left: 6px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
}

.leader-hash {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* How */

.how {
  margin-top: 14px;
  padding: 30px;
}

.how-head {
  max-width: 620px;
}

.how-head h2 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.how-head p {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 13px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.how-step {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: rgba(198, 255, 61, 0.018);
}

.how-num {
  color: var(--accent-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.how-step h3 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
}

.how-step p {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ---------- View head ---------- */

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.view-head h1 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.view-head p {
  max-width: 620px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
}

.view-balance {
  flex: 0 0 auto;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(198, 255, 61, 0.04);
  text-align: right;
}

.view-balance span {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.view-balance strong {
  font-family: var(--font-mono);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Shop ---------- */

.segmented {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 18px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--panel);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
  display: none;
}

.segmented-btn {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.segmented-btn:hover {
  color: var(--ink);
}

.segmented-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.shop-cat-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.5;
}

.shop-cat-note .chip {
  flex: 0 0 auto;
}

.shop-cat-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.chip--button {
  min-height: 28px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.chip--button:hover {
  background: rgba(198, 255, 61, 0.16);
  color: var(--accent-soft);
}

.gpu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gpu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(198, 255, 61, 0.055), transparent 60%),
    var(--panel);
  transition: border-color 0.2s, transform 0.2s;
}

.gpu-card:hover {
  border-color: var(--line);
}

.gpu-card.is-featured {
  border-color: var(--line-strong);
  background:
    radial-gradient(460px 260px at 100% 0%, rgba(198, 255, 61, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(198, 255, 61, 0.045), transparent 42%),
    var(--panel);
}

.gpu-card.is-locked {
  opacity: 0.68;
}

.gpu-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tier {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge {
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(198, 255, 61, 0.1);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.badge--lock {
  border-color: var(--line-soft);
  background: rgba(238, 244, 232, 0.03);
  color: var(--muted-3);
}

.gpu-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  margin: 14px 0 12px;
  perspective: 700px;
}

.gpu-art-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 270px);
  height: 62px;
  padding: 0 16px;
  border: 1px solid rgba(238, 244, 232, 0.14);
  border-radius: 5px;
  background:
    linear-gradient(120deg, rgba(198, 255, 61, 0.13), transparent 46%),
    linear-gradient(180deg, #1a241b, #0b100c);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38);
  transform: rotateX(8deg) rotateZ(-1.5deg);
}

.gpu-art-card::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -5px;
  height: 5px;
  border-radius: 0 0 3px 3px;
  background: rgba(198, 255, 61, 0.18);
  filter: blur(3px);
}

.gpu-art .fan {
  width: 34px;
  height: 34px;
}

.gpu-art-label {
  margin-left: auto;
  color: var(--accent-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
}

.gpu-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.gpu-note {
  min-height: 34px;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.45;
}

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.specs div {
  min-width: 0;
}

.specs dt {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.specs dd {
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.gpu-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.gpu-price span {
  display: block;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gpu-price strong {
  font-family: var(--font-mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.gpu-owned {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.gpu-owned strong {
  color: var(--accent-dim);
  font-weight: 500;
}

.upgrade-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--panel);
}

.upgrade-row.is-current {
  border-color: var(--line-strong);
  background: linear-gradient(90deg, rgba(198, 255, 61, 0.07), transparent 52%), var(--panel);
}

.upgrade-row.is-locked {
  opacity: 0.6;
}

.upgrade-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--accent-dim);
  background: rgba(198, 255, 61, 0.03);
}

.upgrade-info h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
}

.upgrade-info p {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.5px;
}

.upgrade-spec {
  color: var(--accent-dim);
  font-family: var(--font-mono);
}

.upgrade-action {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upgrade-action .btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 12px;
}

/* ---------- AI ---------- */

.ai-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  overflow: hidden;
  border-color: var(--line);
  background:
    radial-gradient(700px 520px at 82% 48%, rgba(198, 255, 61, 0.1), transparent 66%),
    var(--panel);
}

.ai-copy {
  padding: 40px;
}

.ai-copy h1 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.ai-lead {
  max-width: 520px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.ai-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.ai-metric {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: rgba(198, 255, 61, 0.025);
}

.ai-metric span {
  display: block;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-metric strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.ai-perk {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.ai-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 32px 26px 0;
}

.neural-wrap {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 1;
}

.neural-map {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.neural-ring {
  fill: none;
  stroke: rgba(198, 255, 61, 0.18);
  stroke-width: 1;
}

.neural-ring--dash {
  stroke: rgba(198, 255, 61, 0.24);
  stroke-dasharray: 3 9;
  transform-origin: 210px 210px;
  animation: ringSpin 50s linear infinite;
}

.neural-ring--faint {
  stroke: rgba(198, 255, 61, 0.1);
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

.neural-links path {
  fill: none;
  stroke: rgba(198, 255, 61, 0.22);
  stroke-width: 0.8;
  stroke-dasharray: 2 5;
}

.neural-outer path {
  fill: none;
  stroke: rgba(198, 255, 61, 0.12);
  stroke-width: 0.8;
}

.neural-nodes .node {
  fill: var(--accent);
  opacity: calc(0.25 + var(--ai-intensity, 0.1) * 0.75);
  filter: drop-shadow(0 0 4px rgba(198, 255, 61, 0.55));
}

.neural-nodes .node--inner {
  opacity: calc(0.2 + var(--ai-intensity, 0.1) * 0.6);
}

.neural-nodes .node--core {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 1;
}

.neural-core-label {
  fill: var(--accent);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.neural-badge {
  position: absolute;
  right: 6px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(7, 10, 8, 0.78);
  font-family: var(--font-mono);
}

.neural-badge span {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.neural-badge small {
  margin-top: 2px;
  color: var(--muted-3);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.neural-caption {
  max-width: 340px;
  margin-top: 8px;
  color: var(--muted-3);
  font-size: 10.5px;
  text-align: center;
}

.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.level-list {
  display: flex;
  flex-direction: column;
}

.level-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.level-row:last-child {
  border-bottom: 0;
}

.level-row.is-current {
  background: rgba(198, 255, 61, 0.06);
}

.level-row.is-passed {
  opacity: 0.62;
}

.level-num {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.level-row.is-current .level-num {
  color: var(--accent);
}

.level-info {
  min-width: 0;
}

.level-name {
  font-size: 12px;
  font-weight: 600;
}

.level-perk {
  margin-top: 1px;
  color: var(--muted-3);
  font-size: 10.5px;
}

.level-mult {
  color: var(--accent-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

.prestige-panel {
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
}

.prestige-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px 22px 0;
}

.prestige-stats div {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}

.prestige-stats span {
  display: block;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prestige-stats strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.prestige-progress {
  padding: 18px 22px 12px;
}

.prestige-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.prestige-panel > .btn,
.prestige-panel > .fineprint {
  margin-left: 22px;
  margin-right: 22px;
}

.prestige-panel > .btn {
  margin-top: 4px;
}

.prestige-panel > .fineprint {
  margin-top: 10px;
}

/* ---------- Cash ---------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 176, 32, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 176, 32, 0.055);
}

.notice-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 176, 32, 0.3);
  border-radius: 50%;
  color: var(--amber);
}

.notice-icon .icon {
  width: 16px;
  height: 16px;
}

.notice p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.notice strong {
  color: var(--amber-soft);
}

.cash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
}

.payout-form {
  padding: 22px;
}

.method-fieldset {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.method-fieldset legend {
  margin-bottom: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.method-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.method-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.method-option-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: rgba(238, 244, 232, 0.018);
  transition: border-color 0.18s, background 0.18s;
}

.method-option:hover .method-option-inner {
  border-color: var(--line);
}

.method-option input:checked + .method-option-inner {
  border-color: var(--line-strong);
  background: rgba(198, 255, 61, 0.075);
}

.method-option input:focus-visible + .method-option-inner {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.method-icon {
  color: var(--accent-dim);
}

.method-icon .icon {
  width: 20px;
  height: 20px;
}

.method-name {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
}

.method-note {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #0a0e0b;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: border-color 0.18s;
}

.field input:hover {
  border-color: var(--line);
}

.field input:focus {
  border-color: var(--line-strong);
  outline: none;
  box-shadow: 0 0 0 3px rgba(198, 255, 61, 0.09);
}

.field input[aria-invalid="true"] {
  border-color: rgba(255, 107, 97, 0.6);
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted-3);
  font-size: 10px;
  line-height: 1.4;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.45;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 97, 0.3);
  border-radius: 4px;
  background: rgba(255, 107, 97, 0.08);
  color: var(--danger-soft);
  font-size: 11.5px;
}

.cash-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cash-side .panel {
  padding: 18px;
}

.method-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.method-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.method-list li:last-child {
  border-bottom: 0;
}

.method-list-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--accent-dim);
}

.method-list-icon .icon {
  width: 15px;
  height: 15px;
}

.method-list strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.method-list div span {
  display: block;
  color: var(--muted-3);
  font-size: 9.5px;
}

.office-panel {
  text-align: center;
}

.office-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent-dim);
}

.office-panel h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
}

.office-panel p {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.5;
}

.office-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cash-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cash-summary div {
  min-width: 0;
}

.cash-summary span {
  display: block;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cash-summary strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.history-panel {
  margin-top: 14px;
}

.payout-history {
  display: flex;
  flex-direction: column;
}

.payout-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

.payout-row:last-child {
  border-bottom: 0;
}

.payout-time {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.payout-method {
  font-weight: 600;
}

.payout-amount {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Missions ---------- */

.mission-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  margin-bottom: 14px;
  border-color: var(--line);
  background:
    linear-gradient(90deg, rgba(198, 255, 61, 0.07), transparent 55%),
    var(--panel);
}

.mission-summary-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mission-summary-main strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
}

.mission-summary-main > span:last-child {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
}

.mission-summary-bar {
  width: min(340px, 45%);
}

.mission-summary-bar .meter {
  height: 7px;
}

.mission-summary-bar > span {
  display: block;
  margin-top: 6px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-align: right;
}

.mission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mission-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
}

.mission-card.is-ready {
  border-color: var(--line-strong);
  background:
    linear-gradient(180deg, rgba(198, 255, 61, 0.07), transparent 60%),
    var(--panel);
}

.mission-card.is-claimed {
  opacity: 0.62;
}

.mission-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mission-card h3 {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
}

.mission-card p {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.45;
}

.mission-reward {
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.mission-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mission-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.mission-card .btn {
  min-height: 38px;
  font-size: 12px;
}

.mission-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mission-status {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mission-card.is-ready .mission-status {
  color: var(--accent);
}

.mission-card.is-claimed .mission-status {
  color: var(--ok);
}

/* ---------- Footer ---------- */

.footer {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  background: rgba(7, 10, 8, 0.66);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px 28px 36px;
}

.footer-brand {
  max-width: 620px;
}

.brand--footer {
  min-height: 34px;
}

.brand--footer .brand-mark {
  width: 28px;
  height: 28px;
}

.brand--footer .brand-word {
  font-size: 15px;
}

.footer-brand p {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.55;
}

.footer-brand .footer-fine {
  margin-top: 6px;
  color: var(--muted-3);
  font-size: 10.5px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.footer-links button,
.footer-links a {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  text-align: right;
  transition: color 0.18s;
}

.footer-links button:hover,
.footer-links a:hover {
  color: var(--accent);
}

/* ---------- Dialogs ---------- */

.dlg {
  width: min(560px, calc(100vw - 32px));
  max-height: min(86dvh, 820px);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(198, 255, 61, 0.09), transparent 60%),
    #0d130e;
  color: var(--ink);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
  overflow: auto;
  overscroll-behavior: contain;
}

.dlg::backdrop {
  background: rgba(3, 5, 3, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dlg[open] {
  animation: dlgIn 0.28s var(--ease);
}

@keyframes dlgIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dlg-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}

.dlg-close:hover {
  border-color: var(--line);
  color: var(--ink);
}

.dlg-head h2 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.dlg-head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 22px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.welcome-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.welcome-step:last-child {
  border-bottom: 0;
}

.welcome-num {
  color: var(--accent-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.welcome-step strong {
  font-size: 12.5px;
  font-weight: 700;
}

.welcome-step p {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.5;
}

.dlg-note {
  margin-top: 16px;
  padding: 10px 12px;
  border-left: 2px solid var(--amber);
  background: rgba(255, 176, 32, 0.05);
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.55;
}

.dlg-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.offline-amount {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(198, 255, 61, 0.07);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.prestige-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.prestige-summary div {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}

.prestige-summary span {
  display: block;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prestige-summary strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 16px;
}

.help-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.help-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.help-num {
  color: var(--accent-dim);
  font-family: var(--font-mono);
  font-size: 10px;
}

.help-row p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.help-row strong {
  color: var(--ink);
}

.dlg--receipt {
  width: min(500px, calc(100vw - 32px));
}

.receipt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9px;
}

.receipt h2 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

.receipt-lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.receipt-list {
  margin-top: 18px;
  border-top: 1px dashed var(--line);
}

.receipt-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.receipt-list dt {
  color: var(--muted-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.receipt-list dd {
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
}

/* ---------- Toasts ---------- */

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(13, 19, 14, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  animation: toastIn 0.24s var(--ease) both;
  pointer-events: auto;
}

.toast.is-out {
  animation: toastOut 0.2s var(--ease) both;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(198, 255, 61, 0.12);
  color: var(--accent);
}

.toast-icon .icon {
  width: 12px;
  height: 12px;
}

.toast.is-warn {
  border-color: rgba(255, 176, 32, 0.35);
}

.toast.is-warn .toast-icon {
  background: rgba(255, 176, 32, 0.12);
  color: var(--amber);
}

.toast.is-error {
  border-color: rgba(255, 107, 97, 0.35);
}

.toast.is-error .toast-icon {
  background: rgba(255, 107, 97, 0.12);
  color: var(--danger);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(12px);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1240px) {
  .app-body {
    gap: 22px;
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero-copy {
    padding-left: 30px;
  }

  .hero-visual {
    padding-right: 26px;
  }

  .gpu-grid {
    gap: 12px;
  }
}

@media (max-width: 1080px) {
  :root {
    --sidenav-w: 210px;
  }

  .topbar-stat--income {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }

  .hero-copy {
    padding: 32px 10px 30px 26px;
  }

  .hero h1 {
    font-size: clamp(28px, 3.4vw, 38px);
  }

  .hero-visual {
    padding: 24px;
  }

  .rig {
    transform: none;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .installed-panel,
  .missions-preview,
  .log-panel,
  .leaderboard-panel {
    grid-column: span 6;
  }

  .ai-hero {
    grid-template-columns: 1fr;
  }

  .ai-copy {
    padding: 32px 30px 0;
  }

  .ai-visual {
    padding: 8px 30px 30px;
  }

  .ai-grid {
    grid-template-columns: 1fr;
  }

  .cash-grid {
    grid-template-columns: 1fr;
  }

  .cash-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .cash-summary {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-h: 62px;
  }

  body {
    padding-bottom: 76px;
  }

  .topbar-inner {
    padding: 8px 16px;
    gap: 12px;
    min-height: var(--topbar-h);
  }

  .brand-tag,
  .save-state {
    display: none;
  }

  .topbar-live {
    gap: 14px;
  }

  .topbar-stat-label {
    font-size: 8px;
  }

  .topbar-stat-value {
    font-size: 13px;
  }

  .app-body {
    display: block;
    padding: 16px 16px 24px;
  }

  .sidenav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 200;
    display: block;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(7, 10, 8, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .sidenav-group {
    flex-direction: row;
    gap: 2px;
  }

  .nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex: 1 1 0;
    min-width: 0;
    min-height: 56px;
    padding: 5px 2px;
    text-align: center;
  }

  .nav-item.is-active::before {
    left: 18%;
    right: 18%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 2px;
    box-shadow: 0 0 10px rgba(198, 255, 61, 0.55);
  }

  .nav-item .icon {
    width: 18px;
    height: 18px;
  }

  .nav-item-label {
    font-size: 10px;
    font-weight: 600;
  }

  .nav-item-meta {
    display: none;
  }

  .sidenav-foot {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 26px 22px 4px;
  }

  .hero h1 {
    font-size: clamp(28px, 5.6vw, 40px);
  }

  .hero-visual {
    padding: 18px 22px 24px;
  }

  .rig {
    max-width: 100%;
  }

  .farm-grid {
    grid-template-columns: 1fr;
  }

  .installed-panel,
  .missions-preview,
  .log-panel,
  .leaderboard-panel {
    grid-column: auto;
  }

  .how {
    padding: 24px 20px;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .gpu-grid {
    grid-template-columns: 1fr;
  }

  .view-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .view-balance {
    text-align: left;
  }

  .mission-list {
    grid-template-columns: 1fr;
  }

  .mission-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .mission-summary-bar {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    gap: 18px;
    padding: 24px 16px 28px;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 18px;
  }

  .footer-links a,
  .footer-links button {
    text-align: left;
  }

  .toast-stack {
    right: 12px;
    bottom: 84px;
    width: calc(100vw - 24px);
  }

  .dlg {
    padding: 24px 20px;
  }
}

@media (max-width: 620px) {
  .topbar-inner {
    flex-wrap: wrap;
  }

  .topbar-live {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
    padding-top: 6px;
    border-top: 1px solid var(--line-soft);
  }

  .topbar-stat--income {
    display: flex;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .hero-copy {
    padding: 22px 18px 0;
  }

  .hero h1 {
    font-size: clamp(26px, 7.8vw, 34px);
  }

  .hero-lead {
    font-size: 13px;
  }

  .balance-value {
    font-size: clamp(34px, 10vw, 46px);
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-visual {
    padding: 16px 18px 20px;
  }

  .rig-slot-name {
    font-size: 9px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-head {
    font-size: 9px;
  }

  .stat-value {
    font-size: 21px;
  }

  .panel-head {
    padding: 16px 18px;
  }

  .installed-row,
  .mission-mini,
  .leader-row,
  .level-row,
  .payout-row {
    padding-left: 18px;
    padding-right: 18px;
  }

  .installed-panel > .text-link,
  .missions-preview > .text-link {
    margin-left: 18px;
    margin-right: 18px;
  }

  .installed-next {
    grid-template-columns: 28px minmax(0, 1fr);
    margin-left: 18px;
    margin-right: 18px;
  }

  .installed-next .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .how {
    padding: 20px 18px;
  }

  .ai-copy {
    padding: 24px 18px 0;
  }

  .ai-visual {
    padding: 6px 18px 24px;
  }

  .ai-metrics {
    grid-template-columns: 1fr;
  }

  .ai-actions {
    align-items: stretch;
  }

  .ai-actions .btn {
    flex: 1 1 100%;
  }

  .prestige-panel > .btn,
  .prestige-panel > .fineprint {
    margin-left: 18px;
    margin-right: 18px;
  }

  .prestige-stats,
  .prestige-progress {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cash-side {
    grid-template-columns: 1fr;
  }

  .cash-summary {
    grid-column: auto;
  }

  .shop-cat-note {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .shop-cat-actions {
    justify-content: flex-start;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-option-inner {
    min-height: 64px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .method-note {
    margin-left: auto;
  }

  .upgrade-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .upgrade-icon {
    width: 34px;
    height: 34px;
  }

  .upgrade-action {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 2px;
  }

  .payout-row {
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
  }

  .payout-time {
    grid-column: 1 / -1;
    order: 3;
  }

  .mission-summary {
    padding: 16px 18px;
  }

  .gpu-card {
    padding: 18px;
  }

  .gpu-art {
    height: 78px;
  }

  .gpu-art-card {
    height: 56px;
  }

  .footer-brand {
    max-width: none;
  }

  .welcome-step {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
  }
}

@media (max-width: 400px) {
  .brand-word {
    font-size: 15px;
  }

  .topbar-stat-value {
    font-size: 12px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .prestige-summary,
  .prestige-stats,
  .cash-summary {
    grid-template-columns: 1fr;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .rig {
    transform: none;
  }

  .panel-view {
    animation: none;
  }

  .dlg[open] {
    animation: none;
  }
}

/* ---------- Forced colors ---------- */

@media (forced-colors: active) {
  .btn,
  .panel,
  .stat-card,
  .gpu-card,
  .mission-card,
  .nav-item.is-active {
    border: 1px solid ButtonText;
  }

  .meter > span {
    background: Highlight;
  }
}
