:root {
  --bg: #070d15;
  --panel: rgba(21, 31, 44, 0.86);
  --panel-strong: rgba(28, 40, 56, 0.96);
  --line: rgba(120, 164, 203, 0.22);
  --text: #f4f8ff;
  --muted: #92a4b8;
  --accent: #68b8ff;
  --accent-2: #72ffd5;
  --coin: #ffc845;
  --danger: #ff6b8a;
  --miner-bg-black: #020407;
  --miner-bg-graphite: #070b11;
  --miner-bg-navy: #09121f;
  --miner-panel-glass: rgba(8, 13, 20, 0.92);
  --miner-panel-metal: rgba(14, 21, 31, 0.96);
  --miner-panel-deep: rgba(3, 6, 10, 0.98);
  --miner-border-soft: rgba(67, 94, 124, 0.42);
  --miner-border-hairline: rgba(154, 185, 220, 0.08);
  --miner-highlight: rgba(255, 255, 255, 0.075);
  --miner-cyan-soft: rgba(93, 218, 255, 0.12);
  --miner-blue-soft: rgba(49, 151, 255, 0.11);
  --miner-green-soft: rgba(120, 223, 77, 0.12);
  --miner-stat-fill: linear-gradient(180deg, rgba(160, 248, 255, 0.98) 0%, rgba(61, 203, 232, 0.96) 48%, rgba(35, 137, 218, 0.92) 100%);
  --miner-stat-fill-blue: linear-gradient(180deg, rgba(130, 202, 255, 0.98) 0%, rgba(75, 147, 243, 0.96) 54%, rgba(42, 87, 190, 0.92) 100%);
  --miner-stat-empty: linear-gradient(180deg, rgba(13, 24, 39, 0.78), rgba(7, 15, 28, 0.86));
  --miner-stat-glow: 0 0 12px rgba(73, 200, 255, 0.16);
  --miner-focus-ring: 0 0 0 2px rgba(104, 184, 255, 0.34), 0 0 14px rgba(104, 184, 255, 0.16);
  --miner-shadow-deep: 0 22px 54px rgba(0, 0, 0, 0.42);
  --miner-shadow-panel: 0 14px 34px rgba(0, 0, 0, 0.28);
  --miner-inner-line: inset 0 1px 0 var(--miner-highlight);
  --miner-radius-lg: 22px;
  --miner-radius-md: 18px;
  --miner-radius-sm: 12px;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.045), transparent 30rem),
    linear-gradient(180deg, #07090d 0%, #030508 56%, #010204 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 86%, transparent);
}

body:has(.cst-app[data-active-tab="Dashboard"]) {
  background:
    radial-gradient(circle at 50% -8%, rgba(78, 130, 186, 0.12), transparent 29rem),
    radial-gradient(circle at 16% 18%, rgba(77, 225, 255, 0.045), transparent 16rem),
    linear-gradient(180deg, #07090d 0%, #030508 55%, #010204 100%);
}

button,
input { font: inherit; }

button { cursor: pointer; }

h1,
h2,
h3,
p { margin-top: 0; }

.cst-app {
  position: relative;
  width: min(100vw, 430px);
  height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  padding: max(14px, env(safe-area-inset-top)) 22px max(14px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.045), transparent 9rem),
    radial-gradient(circle at 86% 2%, rgba(255, 255, 255, 0.032), transparent 11rem),
    linear-gradient(180deg, rgba(9, 12, 17, 0.96), rgba(3, 5, 8, 0.985));
}

.cst-app::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(205, 216, 226, 0.13);
  border-radius: 30px;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.screen {
  position: relative;
  z-index: 1;
  height: calc(100svh - max(28px, env(safe-area-inset-top)) - max(28px, env(safe-area-inset-bottom)));
  overflow: hidden;
  animation: enter 0.28s ease both;
}

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

.welcome-screen {
  display: grid;
  align-content: center;
  gap: 12px;
  text-align: center;
  padding: 10px 8px 18px;
}

.welcome-lang {
  justify-self: center;
  align-self: end;
  order: 10;
  margin-top: 2px;
}

.game-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: min(62vw, 230px);
  aspect-ratio: 1;
  margin: 0 auto 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(114, 255, 213, 0.28) 0 22%, rgba(104, 184, 255, 0.14) 23% 42%, transparent 43%),
    radial-gradient(circle at 50% 60%, rgba(255, 200, 69, 0.16), transparent 46%);
  filter: drop-shadow(0 0 34px rgba(104, 184, 255, 0.34));
}

.orb-ring,
.mining-ring {
  position: absolute;
  inset: 14%;
  border: 2px solid rgba(114, 255, 213, 0.46);
  border-radius: 50%;
  animation: spin 12s linear infinite;
}

.orb-ring::before,
.mining-ring::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: -7px;
  left: 50%;
  border-radius: 50%;
  background: var(--coin);
  box-shadow: 0 0 18px rgba(255, 200, 69, 0.9);
}

.orb-core,
.mining-chip {
  display: grid;
  place-items: center;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #08121d;
  background: linear-gradient(135deg, var(--accent-2), #dffbf5);
  font-family: Sora, Manrope, sans-serif;
  font-weight: 800;
  box-shadow: 0 0 34px rgba(114, 255, 213, 0.45);
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto;
  color: var(--accent-2);
  font-family: Sora, Manrope, sans-serif;
  font-weight: 500;
}

.brand-mark span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 20px rgba(114, 255, 213, 0.9);
}

.brand-mark.small {
  margin: 0;
  font-size: 15px;
}

h1 {
  margin: 0;
  font-family: Sora, Manrope, sans-serif;
  font-size: clamp(28px, 9vw, 42px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 10px;
  font-family: Sora, Manrope, sans-serif;
  font-size: 22px;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.welcome-screen p,
.top-subtitle,
.tiny-note,
.auto-note,
.coming {
  color: var(--muted);
}

.welcome-screen p {
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 14px;
}

.ton-connect-slot {
  display: flex;
  justify-content: center;
  min-height: 56px;
}

.ton-connect-slot > div {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

.ton-connect-slot tc-root,
.ton-connect-slot button {
  width: min(100%, 300px) !important;
}

.ton-connect-slot button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  min-height: 54px !important;
  border-radius: 18px !important;
  color: #f7fbff !important;
  background: linear-gradient(135deg, #159cff, #0077ff) !important;
  box-shadow: 0 14px 34px rgba(0, 135, 255, 0.34) !important;
  font-family: Manrope, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

.ton-connect-slot button svg {
  display: none !important;
}

.ton-connect-slot button div,
.ton-connect-slot button span {
  font-size: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ton-connect-slot button::after {
  content: "Connect TON";
  font-size: 16px;
}

.primary-btn,
.ghost-btn {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.primary-btn {
  color: #07121a;
  background: linear-gradient(135deg, var(--accent-2), #c8fff1);
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(114, 255, 213, 0.2);
}

.connect-ton-btn {
  justify-self: center;
  width: min(100%, 260px);
  color: #f7fbff;
  background: linear-gradient(135deg, #159cff, #0077ff);
  box-shadow: 0 14px 34px rgba(0, 135, 255, 0.34);
}

.primary-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.ghost-btn {
  border-color: rgba(255, 255, 255, 0.13);
  color: #dbe8f7;
  background: rgba(255, 255, 255, 0.07);
}

.app-top,
.dash-header,
.section-head,
.process-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-top,
.dash-header {
  height: 54px;
  margin-bottom: 4px;
  padding: 4px 6px 0;
}

.top-subtitle {
  margin: 3px 0 0;
  font-size: 13px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-spacer {
  width: 1px;
  height: 1px;
}

.lang-switch {
  position: relative;
}

.lang-switch summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  color: #f1f7ff;
  background: rgba(255, 255, 255, 0.07);
  font-size: 15px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.lang-switch summary::-webkit-details-marker {
  display: none;
}

.lang-switch summary::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(241, 247, 255, 0.76);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  min-width: 74px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(13, 22, 35, 0.96);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
}

.welcome-lang .lang-menu {
  top: auto;
  right: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(50%);
}

.settings-switch {
  position: relative;
}

.settings-switch summary {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  color: #f1f7ff;
  background: rgba(255, 255, 255, 0.07);
  font-size: 25px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.settings-switch summary::-webkit-details-marker {
  display: none;
}

.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 22;
  display: grid;
  gap: 0;
  width: min(318px, calc(100vw - 42px));
  overflow: hidden;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(13, 22, 35, 0.97);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
}

.settings-row {
  display: grid;
  grid-template-columns: 38px 1fr auto 16px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 6px;
  color: #f3f8ff;
  font-size: 17px;
}

.settings-row + .settings-row {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-row b {
  max-width: 118px;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-row i {
  color: rgba(255, 255, 255, 0.35);
  font-size: 32px;
  font-style: normal;
  line-height: 1;
}

.settings-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.wallet-icon { background: linear-gradient(135deg, #159cff, #0077ff); }
.referral-icon { background: linear-gradient(135deg, #b94cff, #8d4dff); }

.settings-disconnect {
  min-height: 38px;
  margin: 8px 6px 4px;
  border: 0;
  border-radius: 14px;
  color: #07121a;
  background: var(--accent-2);
  font-weight: 800;
}

.lang-menu button {
  min-height: 30px;
  border: 0;
  border-radius: 11px;
  color: #dce8f8;
  background: transparent;
  font-weight: 800;
}

.lang-menu button:hover {
  color: #07121a;
  background: var(--accent-2);
}

.panel,
.agent-card,
.metric-card,
.process-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--panel), rgba(12, 20, 31, 0.9));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.onboarding-screen {
  display: grid;
  grid-template-rows: 54px 1fr;
}

.onboarding-panel {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 0;
  padding: 18px;
}

.scroll-copy {
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
  color: #d6e2ef;
}

.scroll-copy p {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.accept-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  color: #e9f3ff;
  font-size: 13px;
}

.accept-row input {
  width: 19px;
  height: 19px;
  accent-color: var(--accent-2);
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}

.agent-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
}

.agent-card::before {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -34px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(104, 184, 255, 0.18), transparent 65%);
}

.agent-card.premium {
  border-color: rgba(255, 200, 69, 0.45);
  box-shadow: 0 0 36px rgba(255, 200, 69, 0.12);
}

.agent-card h3 {
  min-height: 40px;
  margin-right: 58px;
  font-family: Sora, Manrope, sans-serif;
  font-size: 14px;
  line-height: 1.12;
}

.price-pill {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #07121a;
  background: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
}

.agent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0 8px;
}

.agent-meta span,
.agent-badge,
.eyebrow {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 7px;
  color: #c9d7e8;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
}

.benefits {
  min-height: 0;
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  list-style: none;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.benefits li {
  margin: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-card .primary-btn {
  justify-self: start;
  min-height: 36px;
  border-radius: 14px;
  padding: 0 12px;
  font-size: 12px;
}

.dashboard-screen {
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr) 76px;
}

.cst-app[data-active-tab="Dashboard"] .dashboard-screen {
  grid-template-rows: 0 minmax(0, 1fr) 68px;
}

.cst-app[data-active-tab="Dashboard"] {
  background:
    radial-gradient(circle at 22% 7%, rgba(80, 171, 255, 0.08), transparent 10rem),
    radial-gradient(circle at 86% 12%, rgba(93, 218, 255, 0.05), transparent 11rem),
    linear-gradient(180deg, rgba(8, 11, 16, 0.98), rgba(3, 5, 8, 0.995));
}

.cst-app[data-active-tab="Dashboard"]::before {
  display: none;
}

.cst-app[data-active-tab="Dashboard"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.017) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    radial-gradient(circle at 50% 26%, rgba(75, 166, 255, 0.055), transparent 17rem);
  background-size: 28px 28px, 28px 28px, auto;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.cst-app[data-active-tab="Dashboard"] .dash-header {
  display: none;
}

body:has(.dashboard-screen:not([hidden])) .cst-app {
  padding-left: max(10px, env(safe-area-inset-left));
  padding-right: max(10px, env(safe-area-inset-right));
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .miner-wallet,
body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .process-card,
body:has(.dashboard-screen:not([hidden])) .dashboard-screen > .tabs {
  justify-self: center;
  width: 100%;
}

body:has(.dashboard-screen:not([hidden])) .dashboard-screen {
  grid-template-rows: 0 minmax(0, 1fr) 58px;
}

.cst-app[data-active-tab="Case"] .dashboard-screen,
.cst-app[data-active-tab="Ludix"] .dashboard-screen,
.cst-app[data-active-tab="Casino"] .dashboard-screen {
  grid-template-rows: 14px minmax(0, 1fr) 76px;
}

.cst-app[data-active-tab="Ludix"] .dashboard-screen {
  grid-template-rows: 14px minmax(0, 1fr) 76px;
}

.cst-app[data-active-tab="Casino"] .dashboard-screen {
  grid-template-rows: 8px minmax(0, 1fr) 76px;
}

.cst-app[data-active-tab="Case"] .dash-header,
.cst-app[data-active-tab="Ludix"] .dash-header,
.cst-app[data-active-tab="Casino"] .dash-header {
  display: none;
}

.tabs {
  align-self: end;
  display: grid;
  grid-row: 3;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 8px 0 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background: rgba(7, 14, 24, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.cst-app[data-active-tab="Dashboard"] .tabs {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  border-color: var(--miner-border-hairline);
  background:
    radial-gradient(circle at 18% 4%, rgba(93, 218, 255, 0.065), transparent 45%),
    radial-gradient(circle at 72% 110%, rgba(120, 223, 77, 0.035), transparent 42%),
    linear-gradient(180deg, rgba(8, 14, 22, 0.92), rgba(3, 7, 12, 0.98));
  box-shadow:
    var(--miner-inner-line),
    inset 0 -12px 22px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(22, 43, 68, 0.34),
    0 18px 38px rgba(0, 0, 0, 0.32);
}

.cst-app[data-active-tab="Dashboard"] .tabs::before {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 38%);
}

.cst-app[data-active-tab="Dashboard"] .tabs button {
  position: relative;
  z-index: 1;
  color: rgba(166, 183, 203, 0.8);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  transition: color 140ms ease, filter 140ms ease, transform 140ms ease;
}

.cst-app[data-active-tab="Dashboard"] .tabs button:active {
  transform: translateY(1px);
}

.cst-app[data-active-tab="Dashboard"] .tabs button:focus-visible {
  outline: 0;
  box-shadow: var(--miner-focus-ring);
}

.cst-app[data-active-tab="Dashboard"] .tab-icon img {
  filter: grayscale(0.55) brightness(1.05) opacity(0.58)
    drop-shadow(0 0 7px rgba(110, 172, 220, 0.08));
}

.cst-app[data-active-tab="Dashboard"] .tabs button b {
  color: rgba(176, 193, 213, 0.86);
  font-weight: 800;
}

.tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 50px;
  border: 0;
  border-radius: 20px;
  color: #9fb2c7;
  background: transparent;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
}

.tabs button b {
  font: inherit;
  white-space: nowrap;
}

.tab-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #6bd8ff;
  line-height: 1;
}

.tab-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(114, 255, 213, 0.24));
}

.tab-icon-dashboard {
  color: #6bd8ff;
}

.tab-icon-case {
  color: #6bd8ff;
}

.tab-icon-ludix {
  color: #6bd8ff;
}

.tab-icon-casino {
  color: #6bd8ff;
}

.tabs button.active .tab-icon {
  color: #6bd8ff;
}

.tabs button.active .tab-icon img {
  filter: grayscale(1) brightness(1.55) opacity(0.72);
}

.tabs button.active {
  color: #9fb2c7;
  font-weight: 800;
  background: transparent;
  box-shadow: none;
}

.tabs button.tab-dashboard.active b {
  color: #78df4d;
  text-shadow: 0 0 12px rgba(120, 223, 77, 0.5);
}

.cst-app[data-active-tab="Dashboard"] .tabs button.tab-dashboard.active {
  color: #78df4d;
}

.cst-app[data-active-tab="Dashboard"] .tabs button.tab-dashboard.active .tab-icon img {
  filter: grayscale(0.22) brightness(1.38) saturate(1.14)
    drop-shadow(0 0 8px rgba(120, 223, 77, 0.24));
}

.cst-app[data-active-tab="Dashboard"] .tabs button.tab-dashboard.active .tab-icon::after {
  content: "";
  position: absolute;
  inset: 8px 2px -4px;
  z-index: -1;
  border-radius: 999px;
  background: rgba(120, 223, 77, 0.16);
  filter: blur(10px);
}

.cst-app[data-active-tab="Dashboard"] .tabs button.tab-dashboard.active b {
  color: #78df4d;
  text-shadow:
    0 0 8px rgba(120, 223, 77, 0.3),
    0 1px 0 rgba(0, 0, 0, 0.55);
}

.tabs button.tab-case.active b {
  color: #ff9f12;
  text-shadow: 0 0 13px rgba(255, 159, 18, 0.68);
}

.tabs button.tab-case.active .tab-icon img {
  filter: grayscale(1) brightness(1.55) sepia(1) saturate(2.2) hue-rotate(350deg) opacity(0.82)
    drop-shadow(0 0 10px rgba(255, 159, 18, 0.42));
}

.tabs button.tab-ludix.active b {
  color: #ff5f73;
  text-shadow: 0 0 12px rgba(255, 95, 115, 0.56);
}

.tabs button.tab-casino.active b {
  color: #61b8ff;
  text-shadow: 0 0 14px rgba(74, 166, 255, 0.72);
}

.tab-panel {
  grid-row: 2;
  min-height: 0;
  overflow: hidden;
  animation: enter 0.2s ease both;
}

.tab-panel[data-tab-panel="Dashboard"] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.miner-top {
  min-height: 0;
  margin-top: 10px;
}

.miner-wallet {
  align-content: start;
  justify-self: center;
  width: calc(100% - 14px);
  min-height: 126px;
  padding-top: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.018), transparent 30%),
    linear-gradient(145deg, rgba(3, 5, 8, 0.998), rgba(0, 1, 3, 0.998) 62%, rgba(2, 3, 5, 0.998));
}

.casino-wallet.miner-wallet {
  border-color: rgba(22, 43, 68, 0.42);
  background:
    radial-gradient(circle at 20% 0%, rgba(93, 218, 255, 0.095), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(49, 151, 255, 0.055), transparent 25%),
    linear-gradient(145deg, rgba(10, 15, 23, 0.94), rgba(2, 5, 9, 0.99) 62%, rgba(5, 8, 13, 0.99));
  box-shadow:
    var(--miner-inner-line),
    inset 0 -18px 34px rgba(0, 0, 0, 0.24),
    inset 0 0 22px rgba(49, 151, 255, 0.032),
    0 0 0 1px rgba(22, 43, 68, 0.42),
    var(--miner-shadow-panel);
}

.miner-balance-grid {
  grid-column: 1 / -1;
  gap: 7px;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.metric-card {
  min-height: 56px;
  padding: 8px 9px;
  text-align: center;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-family: Sora, Manrope, sans-serif;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.miner-balance-grid .metric-card {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 64px;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 28% 10%, rgba(255, 255, 255, 0.13), transparent 28%),
    linear-gradient(145deg, rgba(39, 48, 60, 0.96), rgba(19, 27, 38, 0.98) 55%, rgba(8, 13, 21, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.095),
    inset 0 -12px 22px rgba(0, 0, 0, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.24);
}

.miner-balance-grid .metric-card::before {
  display: none;
}

.miner-balance-grid .metric-card span {
  color: rgba(178, 196, 216, 0.92);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 800;
}

.miner-balance-grid .metric-card strong {
  color: #f4f8ff;
  font-size: 17px;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.26);
}

.miner-balance-grid .metric-card:first-child span {
  transform: translateY(-2px);
  font-size: 11.5px;
  font-weight: 600;
}

.miner-balance-grid .metric-card:first-child strong {
  color: #78df4d;
  font-size: 9px;
  font-weight: 900;
}

.agent-online-card {
  display: grid;
  align-items: center;
}

.agent-online-card .process-state {
  display: grid;
  align-items: center;
  min-height: 100%;
  padding: 0;
}

.agent-online-card .process-state .eyebrow {
  max-width: 78px;
  overflow: visible;
  color: #f3f8ff;
  font-size: 12px;
  line-height: 1.05;
  text-align: left;
  white-space: normal;
}

.agent-online-card .process-state h2 {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
  margin: 0;
  overflow: visible;
  color: #f3f8ff;
  font-family: Sora, Manrope, sans-serif;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.agent-online-card .process-state h2 span,
.agent-online-card .process-state h2 b {
  display: block;
  color: #f3f8ff;
  font-size: 9px;
  line-height: 1.08;
}

.agent-online-card .process-state h2 span {
  color: rgba(178, 196, 216, 0.92);
  font-family: Manrope, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
}

.agent-online-card .process-state h2 b {
  color: #78df4d;
  font-weight: 900;
}

.achievement-card {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  min-height: 56px;
  padding: 8px 7px;
  text-align: center;
}

.achievement-card .achievement-icon {
  display: none;
  place-items: center;
  width: 23px;
  height: 23px;
  margin-bottom: 4px;
  border-radius: 50%;
  color: #07121a;
  background: linear-gradient(135deg, var(--coin), #fff0a8);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255, 200, 69, 0.45));
}

.achievement-card strong {
  margin: 0;
  font-size: 12px;
  line-height: 1.05;
}

.achievement-card span:not(.achievement-icon) {
  color: #f3f8ff;
  font-size: 11px;
  line-height: 1.05;
}

.achievement-card button {
  min-height: 19px;
  margin-top: 3px;
  padding: 0 11px;
  border: 1px solid rgba(104, 184, 255, 0.2);
  border-radius: 7px;
  color: #7bc8ff;
  background: linear-gradient(180deg, rgba(104, 184, 255, 0.18), rgba(47, 140, 255, 0.1));
  font-weight: 800;
  font-size: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.miner-balance-grid .achievement-card strong {
  color: rgba(178, 196, 216, 0.92);
  font-family: Manrope, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
}

.ton-card { grid-column: auto; }

.process-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  min-height: 0;
  margin-top: 0;
  padding: 10px 0 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.process-nav {
  align-self: start;
  justify-self: end;
}

.quick-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(7, 14, 24, 0.72);
}

.quick-tabs button,
.panel-nav button {
  min-width: 82px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  color: #c9d7e8;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.quick-tabs button:hover,
.panel-nav button:hover {
  color: #06110d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.panel-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(11, 20, 31, 0.88);
}

.panel-nav button.active {
  color: #06110d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.mining-core {
  position: relative;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: min(44vw, 188px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(114, 255, 213, 0.3) 0 21%, rgba(104, 184, 255, 0.12) 22% 48%, transparent 49%),
    radial-gradient(circle at 50% 50%, rgba(255, 200, 69, 0.14), transparent 58%);
}

.ring-one { inset: 9%; }
.ring-two {
  inset: 23%;
  border-color: rgba(104, 184, 255, 0.4);
  animation-duration: 8s;
  animation-direction: reverse;
}

.mining-chip {
  width: 38%;
  font-size: 16px;
}

.miner-lab {
  display: grid;
  grid-template-rows: auto;
  gap: 0;
  height: 100%;
  min-height: 0;
  padding: 0 0 4px;
}

.lab-field {
  position: relative;
  width: 100%;
  height: min(100%, clamp(462px, 58svh, 548px));
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: none;
}

.lab-field::before {
  display: none;
}

.miner-sim {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 4%, rgba(93, 218, 255, 0.06), transparent 18rem),
    linear-gradient(180deg, var(--miner-panel-glass), var(--miner-panel-deep));
  box-shadow:
    var(--miner-inner-line),
    inset 0 0 28px rgba(49, 151, 255, 0.045),
    0 0 0 1px rgba(22, 43, 68, 0.42),
    var(--miner-shadow-panel);
}

.miner-sim::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 8;
  pointer-events: none;
  border-radius: 21px;
  box-shadow: inset 0 0 0 1px rgba(22, 43, 68, 0.42);
}

.hash-chart {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background:
    linear-gradient(rgba(120, 223, 77, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 223, 77, 0.045) 1px, transparent 1px),
    rgba(18, 21, 25, 0.96);
  background-size: 22px 22px;
}

.hash-chart svg {
  position: absolute;
  inset: 15px 54px 38px 10px;
  width: calc(100% - 64px);
  height: calc(100% - 53px);
  overflow: visible;
}

.hash-chart > span[data-miner-chart-label] {
  position: absolute;
  top: 7px;
  left: 50%;
  color: rgba(205, 218, 225, 0.58);
  font-size: 10px;
  font-weight: 800;
  transform: translateX(-50%);
}

.chart-fill {
  fill: url("#minerChartGlow");
  opacity: 0.22;
}

.chart-line {
  fill: none;
  stroke: var(--chart-color, #78df4d);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--chart-color, #78df4d) 34%, transparent));
  stroke-dasharray: 520;
  transition: none;
  animation: chartPulse 1.45s ease-in-out infinite;
}

.chart-line-agent {
  stroke-width: 2.6;
}

.chart-dot {
  fill: var(--chart-color, #b6ff2a);
  stroke: rgba(255, 245, 178, 0.95);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--chart-color, #b6ff2a) 52%, transparent));
  transform-box: fill-box;
  transform-origin: center;
  animation: chartDotPulse 1.1s ease-in-out infinite;
}

.chart-axis {
  position: absolute;
  top: 15px;
  right: 8px;
  bottom: 38px;
  display: grid;
  align-content: space-between;
  width: 44px;
  padding-left: 8px;
  border-left: 1px solid rgba(120, 223, 77, 0.2);
  color: rgba(190, 198, 211, 0.72);
  font-family: Sora, Manrope, sans-serif;
  font-size: 9px;
  font-weight: 700;
  text-align: left;
}

.chart-axis span {
  position: static;
  color: inherit;
  font: inherit;
  transform: none;
}

.chart-current {
  position: absolute;
  right: 8px;
  z-index: 4;
  min-width: 42px;
  padding: 4px 6px;
  border-radius: 8px;
  color: #080804;
  background: linear-gradient(135deg, #78df4d, #b0f36a);
  box-shadow: 0 0 8px rgba(120, 223, 77, 0.22);
  font-family: Sora, Manrope, sans-serif;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  transform: translateY(-50%);
}

.chart-agent-tags {
  position: absolute;
  top: 15px;
  right: 8px;
  bottom: 38px;
  z-index: 5;
  width: 44px;
  pointer-events: none;
}

.chart-agent-tags span {
  position: absolute;
  right: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 6px;
  border-radius: 8px;
  color: #060b12;
  background: linear-gradient(135deg, var(--chart-color, #2f8cff), color-mix(in srgb, var(--chart-color, #2f8cff) 58%, #ffffff));
  box-shadow: 0 0 8px color-mix(in srgb, var(--chart-color, #2f8cff) 24%, transparent);
  font-family: Sora, Manrope, sans-serif;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-shadow: none;
  transform: translateY(-50%);
}

.chart-agent-tags i {
  display: none;
}

.chart-agent-tags b {
  font: inherit;
}

.chart-periods {
  position: absolute;
  left: 10px;
  right: 54px;
  bottom: 6px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, auto));
  align-items: center;
  justify-content: start;
  gap: 9px;
  min-height: 24px;
  color: rgba(158, 167, 184, 0.78);
  font-family: Sora, Manrope, sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.chart-periods button {
  min-width: 0;
  min-height: 22px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
}

.chart-periods button.active {
  color: #78df4d;
}

.hash-chart.miner-efficiency-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 10px 5px;
  border-top: 0;
  background: transparent;
}

.miner-signal-rows {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  padding: 0 4px;
}

.miner-signal-row {
  display: grid;
  grid-template-columns: 63px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  color: rgba(219, 229, 241, 0.9);
  font-family: Manrope, Sora, sans-serif;
}

.miner-signal-row > span {
  padding-left: 0;
  color: rgba(229, 238, 249, 0.9);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: left;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.miner-signal-row > b {
  color: rgba(238, 245, 255, 0.94);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.48);
}

.miner-signal-meter {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.miner-signal-meter i {
  display: block;
  height: 17px;
  border-radius: 4px;
  background: var(--miner-stat-empty);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 -7px 12px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(71, 118, 165, 0.035);
  transition: background-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.miner-signal-meter i.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 22%),
    linear-gradient(180deg, color-mix(in srgb, var(--meter-fill, var(--meter-color, #27f6ff)) 74%, #ffffff), var(--meter-fill, var(--meter-color, #27f6ff)) 52%, color-mix(in srgb, var(--meter-fill, var(--meter-color, #27f6ff)) 76%, #0b2f66));
  box-shadow:
    0 0 10px rgba(73, 200, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -8px 12px rgba(3, 20, 45, 0.2);
}

.miner-difficulty-row {
  grid-template-columns: 63px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.miner-difficulty-row > span {
  font-size: 9.5px;
}

.miner-difficulty-meter {
  position: relative;
  height: 17px;
}

.miner-difficulty-meter::before,
.miner-difficulty-meter i {
  position: absolute;
  top: 50%;
  left: 0;
  height: 5px;
  border-radius: 99px;
  content: "";
  transform: translateY(-50%);
}

.miner-difficulty-meter::before {
  right: 0;
  background: linear-gradient(90deg, rgba(71, 96, 112, 0.42), rgba(77, 111, 130, 0.56));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 8px rgba(77, 134, 168, 0.11);
}

.miner-difficulty-meter i {
  width: var(--difficulty-fill, 50%);
  background: linear-gradient(90deg, #70e85f, #b7f36d 58%, #d6ff9a);
  box-shadow:
    0 0 7px rgba(134, 236, 91, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.miner-bars-wrap {
  position: relative;
  z-index: 2;
  align-self: stretch;
  height: 162px;
  min-height: 0;
  margin: 5px -10px 0;
  padding: 0 8px 2px;
  overflow: hidden;
  border-top: 0;
  background: transparent;
}

.miner-bars-axis {
  display: none;
}

.miner-efficiency-bars {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  height: 100%;
  min-height: 0;
}

.miner-efficiency-bars i {
  position: relative;
  display: block;
  flex: 1 1 0;
  min-width: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #a8fbff, #35d8ef 48%, #126dba);
  box-shadow:
    0 0 8px rgba(39, 246, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.miner-efficiency-bars i span {
  display: none;
}

.miner-earn-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
}

.miner-earn-card {
  display: grid;
  grid-template-rows: 20px minmax(0, 1fr) 13px;
  gap: 4px;
  padding: 4px 8px 3px;
}

.miner-earn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  color: rgba(226, 235, 246, 0.84);
  font-family: Sora, Manrope, sans-serif;
}

.miner-earn-head b {
  min-width: 58px;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.44);
}

.miner-earn-ranges {
  display: flex;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  color: rgba(191, 204, 220, 0.7);
  font-size: 9.5px;
  font-weight: 900;
}

.miner-earn-ranges button {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 14px;
  padding: 0 4px;
  border: 0;
  border-radius: 5px;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.miner-earn-ranges button:focus-visible {
  outline: 0;
  box-shadow: var(--miner-focus-ring);
}

.miner-earn-ranges button.active {
  color: #eff7ff;
  background: transparent;
  text-shadow: 0 0 7px rgba(123, 196, 255, 0.12);
}

.miner-earn-bars {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--earn-count, 12), minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 0;
  padding: 20px 5px 0;
}

.miner-earn-bar {
  position: relative;
  display: block;
  height: var(--earn-height, 20%);
  min-height: 7px;
  border-radius: 6px 6px 1px 1px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 20%),
    var(--miner-stat-fill);
  box-shadow:
    0 0 10px rgba(72, 201, 255, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -10px 16px rgba(5, 43, 94, 0.22);
  opacity: 0.9;
}

.miner-earn-bar.is-zero {
  min-height: 3.5px;
  background: linear-gradient(180deg, rgba(38, 59, 77, 0.58), rgba(22, 35, 50, 0.64));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 0 0 1px rgba(73, 111, 142, 0.025);
  opacity: 0.72;
}

.miner-earn-bar.is-peak {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 22%),
    linear-gradient(180deg, #d5ffff, #82f2f8 43%, #28a8e1 100%);
  box-shadow:
    0 0 12px rgba(117, 226, 255, 0.18),
    0 10px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -10px 16px rgba(10, 68, 126, 0.18);
  opacity: 1;
}

.miner-earn-bar em {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  display: grid;
  min-width: 38px;
  padding: 4px 6px;
  border-radius: 6px;
  color: rgba(236, 245, 255, 0.88);
  background: linear-gradient(180deg, rgba(34, 47, 64, 0.96), rgba(22, 31, 44, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.2);
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
  transform: translateX(-50%);
}

.miner-earn-bar em b {
  color: #dffbff;
  font: inherit;
}

.miner-earn-months {
  display: grid;
  grid-template-columns: repeat(var(--earn-count, 12), minmax(0, 1fr));
  gap: 5px;
  transform: translateY(1px);
  color: rgba(200, 213, 228, 0.74);
  font-family: Sora, Manrope, sans-serif;
  font-size: 6.8px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.miner-console {
  display: grid;
  grid-template-rows: 30px 70px auto;
  overflow: hidden;
  border-top: 0;
  border-radius: 0 0 13px 13px;
  background:
    radial-gradient(circle at 76% 54%, rgba(41, 138, 255, 0.055), transparent 38%),
    linear-gradient(180deg, #070809, #030405);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    inset 0 -20px 34px rgba(0, 0, 0, 0.18);
}

.miner-console-head {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: rgba(208, 220, 232, 0.56);
  background:
    linear-gradient(180deg, rgba(28, 29, 30, 0.98), rgba(15, 15, 16, 0.98)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 58%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42);
  font-size: 8.7px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
}

.miner-console-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: baseline;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.miner-console-line > span {
  min-width: 0;
}

.miner-console-line > span:first-child {
  text-align: left;
}

.miner-console-line > span:nth-child(2) {
  text-align: center;
}

.miner-console-line > span:nth-child(3) {
  color: rgba(220, 232, 244, 0.72);
  text-align: right;
}

.miner-console-head b {
  display: inline;
  margin-top: 0;
  color: rgba(248, 251, 255, 0.98);
  font-family: Sora, Manrope, sans-serif;
  font-size: 8.7px;
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.08);
}

.miner-console-add {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  height: 22px;
  padding: 0;
  border: 0;
  color: rgba(226, 237, 244, 0.72);
  background: transparent;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.miner-console-add i {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: #06121f;
  background: linear-gradient(180deg, #68b8ff, #2f8cff);
  font-style: normal;
  font-size: 13px;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 0 10px rgba(47, 140, 255, 0.32);
}

.miner-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-content: stretch;
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: #111213;
}

.miner-pipeline button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid rgba(95, 121, 132, 0.3);
  border-radius: 6px;
  color: rgba(218, 228, 235, 0.5);
  background: rgba(255, 255, 255, 0.03);
  font-family: Sora, Manrope, sans-serif;
  font-size: 6px;
  font-weight: 900;
  text-align: center;
}

.miner-action-drop {
  grid-column: auto;
}

.hash-output {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-content: start;
  padding: 12px 10px 3px;
  color: rgba(225, 236, 246, 0.62);
  background:
    radial-gradient(circle at 72% 4%, rgba(41, 167, 255, 0.055), transparent 34%),
    linear-gradient(180deg, #070708, #050506);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.hash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
  line-height: 1;
}

.hash-row b {
  overflow: hidden;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.015em;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.hash-row em {
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}

.hash-row.is-current b {
  color: rgba(248, 251, 255, 0.98);
}

.hash-row.is-current em {
  color: #42a7ff;
  text-shadow:
    0 0 8px rgba(66, 167, 255, 0.24),
    0 1px 0 rgba(0, 0, 0, 0.55);
}

.hash-row.is-previous b {
  color: rgba(158, 172, 186, 0.6);
  font-size: 7.5px;
}

.hash-row.is-previous em {
  color: #78df4d;
  font-size: 7.5px;
  text-shadow:
    0 0 6px rgba(120, 223, 77, 0.2),
    0 1px 0 rgba(0, 0, 0, 0.55);
}

.hash-row.is-previous:has(b:empty) {
  visibility: hidden;
}

.miner-console .miner-status-grid {
  align-self: stretch;
  padding: 8px;
  background:
    radial-gradient(circle at 78% 8%, rgba(49, 151, 255, 0.06), transparent 48%),
    linear-gradient(180deg, #07080a, #030405);
  transform: translateY(-18px);
}

.miner-console .miner-status-grid div,
.miner-console .miner-status-grid details,
.miner-console .miner-status-grid button {
  min-height: 62px;
  border-color: rgba(96, 140, 178, 0.18);
  background:
    radial-gradient(circle at 26% 0%, rgba(255, 255, 255, 0.055), transparent 42%),
    linear-gradient(180deg, rgba(13, 17, 25, 0.98), rgba(8, 11, 17, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -14px 22px rgba(0, 0, 0, 0.16),
    0 12px 22px rgba(0, 0, 0, 0.2);
}

.miner-console .miner-status-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 72px;
}

.miner-console .miner-status-grid summary {
  padding: 9px 8px;
}

.miner-console .miner-status-grid span,
.miner-console .miner-status-grid summary span {
  font-size: 10px;
}

.miner-console .miner-status-grid b,
.miner-console .miner-status-grid summary b {
  font-size: 13px;
}

.miner-console .miner-status-grid .miner-efficiency-card {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-content: center;
  justify-items: center;
  gap: 6px 6px;
  padding: 7px 10px;
  text-align: center;
}

.miner-console .miner-status-grid .miner-efficiency-card > span {
  display: block;
  overflow: visible;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  text-overflow: clip;
}

.miner-console .miner-status-grid .miner-efficiency-card > span::after {
  content: ":";
}

.miner-console .miner-status-grid .miner-efficiency-card > b {
  display: block;
  margin: 0;
  overflow: visible;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  text-overflow: clip;
}

.miner-console .miner-status-grid .miner-efficiency-card small {
  display: block;
  grid-column: 1 / -1;
  margin-top: 0;
  overflow: hidden;
  color: rgba(146, 164, 184, 0.92);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.miner-console .miner-status-grid .miner-status-add {
  display: grid;
  grid-template-columns: 1fr;
  grid-column: 1 / -1;
  justify-self: center;
  place-items: center;
  gap: 0;
  width: 74px;
  min-height: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(180deg, #6fbdff, #2f91f8 58%, #1d72d9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -5px 9px rgba(8, 74, 164, 0.2),
    0 7px 12px rgba(0, 0, 0, 0.18),
    0 0 12px rgba(56, 151, 255, 0.16);
}

.miner-console .miner-status-grid .miner-status-add span {
  display: block;
  width: auto;
  height: auto;
  color: #ffffff;
  background: transparent;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.miner-console .miner-status-grid .miner-status-add b {
  display: none;
}

.miner-status-tab {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 8px 7px;
  border: 1px solid rgba(128, 206, 255, 0.54);
  border-radius: 14px;
  color: #ffffff;
  font-family: Sora, Manrope, sans-serif;
  font-size: 13px;
  font-weight: 900;
  background:
    radial-gradient(circle at 36% 20%, rgba(255, 255, 255, 0.34), transparent 23%),
    radial-gradient(circle at 50% 78%, rgba(17, 97, 218, 0.9), transparent 58%),
    linear-gradient(180deg, #37adff 0%, #1988e6 58%, #0a67d1 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    inset 0 -9px 16px rgba(0, 54, 141, 0.34),
    0 0 0 1px rgba(43, 143, 255, 0.18),
    0 0 15px rgba(32, 145, 255, 0.18),
    0 13px 20px rgba(0, 0, 0, 0.26);
  text-shadow: 0 2px 3px rgba(0, 43, 109, 0.5);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.miner-console .miner-status-grid .miner-upgrade-card {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-content: center;
  justify-items: center;
  gap: 6px 6px;
  padding: 7px 10px;
  text-align: center;
}

.miner-console .miner-status-grid .miner-upgrade-card > span {
  display: block;
  overflow: visible;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  text-overflow: clip;
}

.miner-console .miner-status-grid .miner-upgrade-card > b {
  display: block;
  margin: 0;
  overflow: visible;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  text-overflow: clip;
}

.miner-console .miner-status-grid .miner-upgrade-card small {
  grid-column: 1 / -1;
  color: rgba(146, 164, 184, 0.92);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.miner-console .miner-status-grid .miner-upgrade-add {
  display: grid;
  grid-template-columns: 1fr;
  grid-column: 1 / -1;
  justify-self: center;
  place-items: center;
  gap: 0;
  width: 74px;
  min-height: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(180deg, #45cf4d, #22b949 58%, #11933a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -5px 9px rgba(4, 94, 32, 0.22),
    0 7px 12px rgba(0, 0, 0, 0.18),
    0 0 12px rgba(53, 199, 69, 0.14);
}

.miner-console .miner-status-grid .miner-upgrade-add span {
  display: block;
  width: auto;
  height: auto;
  color: #ffffff;
  background: transparent;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.miner-console .miner-status-grid .miner-upgrade-add b {
  display: none;
}

.miner-console .miner-status-grid .miner-upgrade-card,
.miner-console .miner-status-grid .miner-efficiency-card {
  border-color: rgba(69, 151, 112, 0.24);
  background:
    radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(14, 18, 27, 0.98), rgba(8, 11, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    inset 0 -16px 22px rgba(0, 0, 0, 0.18),
    0 12px 22px rgba(0, 0, 0, 0.2);
}

.miner-console .miner-status-grid .miner-upgrade-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    inset 0 -16px 22px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(85, 212, 94, 0.04),
    0 12px 22px rgba(0, 0, 0, 0.2);
}

.miner-console .miner-status-grid .miner-efficiency-card {
  border-color: rgba(79, 151, 214, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    inset 0 -16px 22px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(58, 157, 255, 0.035),
    0 12px 22px rgba(0, 0, 0, 0.2);
}

.miner-console .miner-status-grid .miner-upgrade-add:active,
.miner-console .miner-status-grid .miner-status-add:active,
.miner-status-tab:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.96);
}

.miner-console .miner-status-grid .miner-upgrade-add:focus-visible,
.miner-console .miner-status-grid .miner-status-add:focus-visible,
.miner-status-tab:focus-visible,
.miner-wallet .top-icon-btn:focus-visible,
.miner-wallet .top-lang-switch summary:focus-visible,
.miner-balance-grid .achievement-card button:focus-visible {
  outline: 0;
  box-shadow: var(--miner-focus-ring);
}

.miner-console .miner-status-grid .miner-upgrade-card,
.miner-console .miner-status-grid .miner-efficiency-card {
  justify-self: center;
  width: calc(100% - 10px);
  min-height: 68px;
  grid-template-columns: max-content max-content;
  align-content: center;
  align-items: baseline;
  justify-content: center;
  justify-items: center;
  gap: 4px 5px;
  padding: 6px 8px;
  text-align: center;
}

.miner-console .miner-status-grid .miner-upgrade-card {
  transform: translateX(-4px);
}

.miner-console .miner-status-grid .miner-efficiency-card {
  transform: translateX(-14px);
}

.miner-console .miner-status-grid .miner-upgrade-card > span,
.miner-console .miner-status-grid .miner-efficiency-card > span {
  color: rgba(190, 207, 226, 0.96);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.54);
}

.miner-console .miner-status-grid .miner-upgrade-card > b,
.miner-console .miner-status-grid .miner-efficiency-card > b {
  color: #f4f8ff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
}

.miner-console .miner-status-grid .miner-upgrade-card small,
.miner-console .miner-status-grid .miner-efficiency-card small {
  grid-column: 1 / -1;
  color: rgba(165, 184, 207, 0.96);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.08;
  text-align: center;
}

.miner-console .miner-status-grid .miner-upgrade-add,
.miner-console .miner-status-grid .miner-status-add {
  grid-column: 1 / -1;
  justify-self: center;
  width: 68px;
  min-height: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 6px;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.miner-console .miner-status-grid .miner-upgrade-add span,
.miner-console .miner-status-grid .miner-status-add span {
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.38);
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .lab-field {
  height: min(100%, clamp(508px, 61svh, 516px));
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .miner-sim {
  grid-template-rows: minmax(0, 1fr) 214px;
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .miner-console {
  grid-template-rows: 30px 94px minmax(90px, auto);
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .hash-output {
  gap: 5px;
  padding: 12px 10px 6px;
  align-content: start;
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .hash-row {
  grid-template-columns: minmax(0, 1fr) minmax(66px, max-content);
  gap: 8px;
  line-height: 1.18;
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .hash-row b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9.3px;
  line-height: 1.18;
  letter-spacing: 0.012em;
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .hash-row em {
  justify-self: end;
  min-width: 66px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9.3px;
  line-height: 1.18;
  text-align: right;
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .hash-row.is-previous b,
body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .hash-row.is-previous em {
  font-size: 8.2px;
  line-height: 1.16;
}

body:has(.dashboard-screen:not([hidden])) .tab-panel[data-tab-panel="Dashboard"] .miner-console .miner-status-grid {
  transform: translateY(-10px);
}

.upgrade-modal {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 7, 13, 0.66);
  backdrop-filter: blur(14px);
}

.upgrade-modal-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(100%, 366px);
  max-height: min(82svh, 640px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(120, 223, 77, 0.32);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(24, 32, 45, 0.98), rgba(8, 13, 21, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

.upgrade-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 13px;
  color: #e8ffdc;
  background: rgba(120, 223, 77, 0.12);
  font-size: 22px;
  line-height: 1;
}

.upgrade-modal-kicker {
  color: #78df4d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.upgrade-modal-card h3 {
  margin: 0;
  padding-right: 38px;
  font-family: Sora, Manrope, sans-serif;
  font-size: 22px;
}

.upgrade-modal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.upgrade-list {
  display: grid;
  gap: 8px;
}

.upgrade-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.upgrade-item i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(104, 184, 255, 0.12);
  font-style: normal;
}

.upgrade-item b,
.upgrade-item span {
  display: block;
}

.upgrade-item b {
  color: #f4f8ff;
  font-size: 12px;
}

.upgrade-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.upgrade-item button {
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  padding: 0 9px;
  color: #fff;
  background: linear-gradient(180deg, #45c93e, #16a947);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 14px rgba(47, 190, 82, 0.24);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.miner-console .miner-status-grid .miner-status-tab {
  width: 74px;
  height: 74px;
  justify-self: center;
  align-self: center;
  transform: translateX(-8px);
  font-size: 16px;
  border-radius: 50%;
  border-color: rgba(74, 178, 255, 0.95);
  color: #ffffff;
  background: linear-gradient(180deg, #35aaff 0%, #0872d9 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 0 rgba(0, 44, 110, 0.22);
  text-shadow: 0 1px 2px rgba(0, 29, 72, 0.42);
}

@keyframes chartPulse {
  50% { filter: drop-shadow(0 0 13px rgba(120, 223, 77, 0.7)); }
}

@keyframes chartDotPulse {
  50% {
    transform: scale(1.45);
    filter: drop-shadow(0 0 13px rgba(182, 255, 42, 1));
  }
}

.lab-process-head {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 5;
}

.lab-field::before {
  display: none;
}

.lab-field::after {
  display: none;
}

.pixel-office-map {
  position: absolute;
  inset: 5px;
  z-index: 1;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(rgba(7, 8, 13, 0.08), rgba(5, 6, 10, 0.12)),
    url("/assets/pixel-agents/map.png?v=20260524-17");
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  box-shadow:
    inset 0 0 0 2px rgba(5, 9, 14, 0.7),
    inset 0 0 34px rgba(0, 0, 0, 0.42);
}

.pixel-office-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 15, 24, 0.22), transparent 18%, rgba(0, 0, 0, 0.18));
}

.pixel-office-map::after {
  display: none;
}

.pixel-paths {
  display: none;
}

.pixel-paths span {
  position: absolute;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(90deg, transparent, rgba(223, 244, 255, 0.9) 45%, #f3fbff 50%, rgba(106, 179, 255, 0.95) 55%, transparent),
    #4f9dff;
  image-rendering: pixelated;
  box-shadow:
    0 0 0 1px rgba(202, 232, 255, 0.86),
    0 0 7px rgba(93, 172, 255, 1),
    0 0 18px rgba(68, 151, 255, 0.82),
    0 0 34px rgba(68, 151, 255, 0.32);
  opacity: 0.98;
}

.path-vertical,
.path-top-left,
.path-mid-right,
.path-right-lower {
  background:
    linear-gradient(180deg, transparent, rgba(223, 244, 255, 0.9) 45%, #f3fbff 50%, rgba(106, 179, 255, 0.95) 55%, transparent),
    #4f9dff;
}

.path-vertical {
  left: 50%;
  top: 23%;
  width: 3px;
  height: 56%;
  z-index: 2;
}

.path-top-left {
  left: 14%;
  top: 18%;
  width: 3px;
  height: 33%;
  z-index: 3;
}

.path-mid-left {
  left: 6%;
  top: 34%;
  width: 66%;
  height: 3px;
  z-index: 3;
}

.path-low-left {
  left: 12%;
  top: 64%;
  width: 38%;
  height: 3px;
  z-index: 3;
}

.path-top-right {
  left: 72%;
  top: 28%;
  width: 20%;
  height: 3px;
  z-index: 3;
}

.path-mid-right {
  left: 72%;
  top: 28%;
  width: 3px;
  height: 14%;
  z-index: 3;
}

.path-low-right {
  left: 50%;
  top: 79%;
  width: 42%;
  height: 3px;
  z-index: 3;
}

.path-left-top-link {
  left: 3%;
  top: 18%;
  width: 11%;
  height: 3px;
}

.path-left-low-link {
  left: 3%;
  top: 50%;
  width: 11%;
  height: 3px;
}

.path-bottom-left {
  left: 8%;
  top: 79%;
  width: 42%;
  height: 3px;
}

.path-right-top-link {
  left: 72%;
  top: 42%;
  width: 19%;
  height: 3px;
}

.path-right-mid-link {
  left: 72%;
  top: 59%;
  width: 22%;
  height: 3px;
}

.path-right-low-link {
  display: none;
  left: 72%;
  top: 72%;
  width: 24%;
  height: 3px;
}

.path-right-lower {
  left: 72%;
  top: 59%;
  width: 3px;
  height: 20%;
}

.pixel-zone,
.pixel-prop {
  position: absolute;
  z-index: 2;
  image-rendering: pixelated;
  pointer-events: none;
}

.pixel-zone {
  display: none;
}

.zone-scan { left: 7%; top: 40%; width: 24%; height: 23%; }
.zone-train { left: 32%; top: 25%; width: 30%; height: 21%; }
.zone-hash { left: 69%; top: 42%; width: 24%; height: 22%; }
.zone-mine { left: 54%; top: 64%; width: 27%; height: 19%; }
.zone-validate { left: 20%; top: 65%; width: 28%; height: 18%; }

.prop-whiteboard,
.prop-rig-top,
.prop-rig-bottom {
  left: 50%;
  opacity: 0.9;
  transform: translateX(-50%);
  z-index: 4;
}

.prop-whiteboard {
  top: 17%;
  width: 78px;
}

.prop-rig-top {
  left: 72%;
  top: 14%;
  width: 65px;
}

.prop-rig-bottom {
  left: 86%;
  top: 43%;
  width: 76px;
}

.prop-server-right-top {
  left: 16%;
  top: 43%;
  width: 60px;
}

.prop-server-right-mid {
  right: 24%;
  top: 63%;
  width: 54px;
}

.prop-server-left-low {
  left: 7%;
  top: 43%;
  width: 44px;
}

.prop-stack-left-bottom {
  display: none;
  left: 18%;
  top: 44%;
  width: 64px;
}
.pixel-station {
  position: absolute;
  z-index: 5;
  width: 88px;
  height: 80px;
  pointer-events: none;
  image-rendering: pixelated;
}

.station-desk,
.station-pc {
  position: absolute;
  image-rendering: pixelated;
}

.station-desk {
  left: 0;
  right: 0;
  bottom: 0;
  width: 86px;
}

.station-pc {
  left: 31px;
  top: 0;
  width: 24px;
}

.station-server-img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60px;
  max-height: none;
  z-index: 1;
  image-rendering: pixelated;
  transform: translateX(-50%);
  filter: saturate(1.08) brightness(0.92) drop-shadow(0 5px 4px rgba(0, 0, 0, 0.34));
}

.station-train .station-server-img {
  width: 96px;
}

.station-hash .station-server-img,
.station-validate .station-server-img {
  width: 54px;
}

.station-scan-end .station-server-img {
  width: 62px;
}

.station-scan .station-server-img {
  width: 62px;
}

.station-mine .station-server-img {
  width: 54px;
}

.server-station span:last-child {
  display: none;
}

.pixel-station span {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 10px;
  z-index: 2;
  color: #f6fbff;
  font-family: Sora, Manrope, sans-serif;
  font-size: 7.5px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.9),
    0 0 7px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

.station-scan { right: 22%; top: 13%; }
.station-train { left: 43%; top: 41%; }
.station-validate { left: 47%; top: 16%; }
.station-hash { left: 23%; top: 12%; }
.station-mine { display: block; right: 23%; top: 72%; }
.station-scan-end { left: 11%; top: 66%; }

.lab-city-map {
  position: absolute;
  inset: 24px 8px 16px;
  z-index: 1;
  width: calc(100% - 16px);
  height: calc(100% - 40px);
  opacity: 0.96;
  pointer-events: none;
}

.city-blocks rect {
  fill: rgba(18, 29, 43, 0.58);
  stroke: rgba(116, 255, 210, 0.18);
  stroke-width: 0.8;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.34));
}

.city-roads path {
  fill: none;
  stroke: rgba(116, 126, 151, 0.64);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(104, 184, 255, 0.12));
}

.city-traces path {
  fill: none;
  stroke: rgba(114, 255, 213, 0.2);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.city-traces path::after {
  content: "";
}

.road-dashes path {
  fill: none;
  stroke: rgba(7, 13, 21, 0.8);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  animation: road-flow 5s linear infinite;
}

.map-pins rect,
.map-pins circle {
  fill: rgba(106, 255, 60, 0.92);
  stroke: rgba(10, 20, 18, 0.82);
  stroke-width: 1.1;
  filter: url(#map-glow);
}

.lab-agent-map {
  position: absolute;
  inset: 24px 8px 16px;
  z-index: 7;
  width: calc(100% - 16px);
  height: calc(100% - 40px);
  pointer-events: none;
  overflow: visible;
}

.map-agent {
  color: #ffc845;
  filter: drop-shadow(0 0 8px currentColor);
}

.map-agent-triangle {
  fill: #ffc845;
  stroke: rgba(255, 248, 172, 0.82);
  stroke-width: 1.1;
  stroke-linejoin: round;
  transform-origin: center;
}

.map-agent-route-1 { color: #ffc845; }
.map-agent-route-1 .map-agent-triangle { fill: #ffc845; stroke: #fff0a8; }
.map-agent-route-2 { color: #68d8ff; }
.map-agent-route-2 .map-agent-triangle { fill: #68d8ff; stroke: #d9f8ff; }
.map-agent-route-3 { color: #76ff6a; }
.map-agent-route-3 .map-agent-triangle { fill: #76ff6a; stroke: #dcffd5; }
.map-agent-route-4 { color: #ff7fb2; }
.map-agent-route-4 .map-agent-triangle { fill: #ff7fb2; stroke: #ffe1ee; }
.map-agent-route-5 { color: #b88cff; }
.map-agent-route-5 .map-agent-triangle { fill: #b88cff; stroke: #eadcff; }

@keyframes road-flow {
  to { stroke-dashoffset: -36; }
}

.map-block {
  display: none;
}

.block-one { left: 16%; top: 31%; width: 56px; height: 46px; }
.block-two { left: 48%; top: 28%; width: 72px; height: 34px; }
.block-three { right: 13%; top: 37%; width: 48px; height: 62px; }
.block-four { left: 13%; bottom: 28%; width: 84px; height: 42px; }
.block-five { left: 43%; bottom: 27%; width: 58px; height: 58px; }
.block-six { right: 17%; bottom: 24%; width: 70px; height: 36px; }

.lab-core {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 116px;
  height: 82px;
  border: 1px solid rgba(114, 255, 213, 0.28);
  border-radius: 20px;
  color: #ecf8ff;
  background:
    radial-gradient(circle at 50% 0%, rgba(114, 255, 213, 0.22), transparent 64%),
    rgba(7, 16, 27, 0.9);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 28px rgba(114, 255, 213, 0.14);
}

.lab-core span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.lab-core b {
  font-family: Sora, Manrope, sans-serif;
  font-size: 14px;
}

.lab-node {
  position: absolute;
  z-index: 8;
  display: grid;
  place-items: center;
  min-width: 88px;
  height: 34px;
  padding: 0 14px 0 24px;
  overflow: hidden;
  border: 1px solid rgba(114, 255, 213, 0.24);
  border-radius: 999px;
  color: #edf8ff;
  background:
    linear-gradient(180deg, rgba(15, 28, 45, 0.9), rgba(4, 11, 21, 0.92));
  box-shadow:
    0 0 20px rgba(114, 255, 213, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease,
    transform 0.28s ease;
}

.lab-node::before {
  content: "";
  position: absolute;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow:
    0 0 9px rgba(114, 255, 213, 0.95),
    0 0 22px rgba(114, 255, 213, 0.32);
}

.lab-node::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(110deg, transparent 0 32%, rgba(114, 255, 213, 0.18) 45%, transparent 58% 100%);
  opacity: 0;
  transform: translateX(-90%);
}

.lab-node b {
  position: relative;
  z-index: 1;
  padding-left: 0;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 10px rgba(104, 184, 255, 0.32);
}

.node-scan { left: 23%; top: 53%; }
.node-train { left: 43%; top: 41%; }
.node-hash { left: 79%; top: 53%; }
.node-mine { left: 65%; top: 71%; }
.node-validate { left: 31%; top: 71%; }

.lab-link {
  display: none;
}

.lab-link::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(10, 14, 21, 0.72) 0 8px, transparent 8px 18px);
  transform: translateY(-50%);
}

.link-one { width: 96px; transform: translate(-122px, -10px) rotate(-35deg); }
.link-two { width: 130px; transform: translate(-38px, -66px) rotate(23deg); animation-delay: 0.45s; }
.link-three { width: 105px; transform: translate(78px, -15px) rotate(130deg); animation-delay: 0.9s; }
.link-four { width: 116px; transform: translate(42px, 60px) rotate(180deg); animation-delay: 1.35s; }
.link-five { width: 142px; transform: translate(-122px, 60px) rotate(0deg); animation-delay: 1.8s; }
.link-six { width: 88px; transform: translate(-132px, -5px) rotate(90deg); animation-delay: 2.25s; }
.link-seven { width: 88px; transform: translate(126px, -4px) rotate(90deg); animation-delay: 2.7s; }
.link-eight { width: 136px; transform: translate(-36px, 72px) rotate(-24deg); animation-delay: 3.15s; }

.lab-agents {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.pixel-agent {
  position: absolute;
  left: 17%;
  top: 57%;
  z-index: 7;
  width: 32px;
  height: 48px;
  transform: translate(-50%, -84%);
  animation-duration: var(--agent-speed, 20s);
  animation-delay: var(--agent-delay, 0s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  will-change: left, top;
}

.pixel-agent i {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 1px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(1px);
}

.pixel-agent b {
  position: absolute;
  inset: 0;
  background-image: var(--agent-img);
  background-repeat: no-repeat;
  background-size: 224px 192px;
  background-position: 0 0;
  image-rendering: pixelated;
  animation: pixel-agent-walk 0.54s steps(4) infinite;
  filter: drop-shadow(0 7px 6px rgba(0, 0, 0, 0.4));
}

.pixel-agent em {
  position: absolute;
  left: 50%;
  top: -8px;
  display: none;
  padding: 1px 4px;
  border-radius: 5px;
  color: #07121a;
  background: rgba(114, 255, 213, 0.88);
  font-size: 6px;
  font-style: normal;
  font-weight: 900;
  transform: translateX(-50%);
}

.pixel-agent strong {
  position: absolute;
  left: 26px;
  top: -7px;
  z-index: 2;
  min-width: 54px;
  padding: 4px 7px;
  border-radius: 999px 999px 999px 4px;
  color: #092017;
  background: linear-gradient(135deg, #7affc9, #f4ff9a);
  box-shadow:
    0 0 16px rgba(114, 255, 213, 0.42),
    0 6px 12px rgba(0, 0, 0, 0.22);
  font-family: Sora, Manrope, sans-serif;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: translateY(6px) scale(0.86);
  animation: agent-thought-bubble var(--agent-speed, 20s) ease-in-out infinite;
  animation-delay: var(--agent-delay, 0s);
  white-space: nowrap;
}

.pixel-agent-plus b { filter: drop-shadow(0 7px 6px rgba(0, 0, 0, 0.4)) hue-rotate(28deg) saturate(1.12); }
.pixel-agent-pro b { filter: drop-shadow(0 7px 6px rgba(0, 0, 0, 0.4)) hue-rotate(62deg) saturate(1.16); }
.pixel-agent-ton b { filter: drop-shadow(0 7px 6px rgba(0, 0, 0, 0.4)) hue-rotate(108deg) saturate(1.18); }

.pixel-route-1 { animation-name: pixel-route-one; }
.pixel-route-2 { animation-name: pixel-route-two; }
.pixel-route-3 { animation-name: pixel-route-three; }
.pixel-route-4 { animation-name: pixel-route-four; }
.pixel-route-5 { animation-name: pixel-route-five; }

.lab-agent {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px 10px 10px 3px;
  background: linear-gradient(135deg, #fff46c, #ffc845 62%, #f3941e);
  box-shadow:
    0 0 20px rgba(255, 200, 69, 0.45),
    0 12px 22px rgba(0, 0, 0, 0.32);
  transform-origin: 50% 50%;
  animation-duration: 12s;
  animation-timing-function: cubic-bezier(0.5, 0, 0.12, 1);
  animation-iteration-count: infinite;
}

.lab-agent::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #263035 0 2px, transparent 2.5px),
    #f7fbff;
  box-shadow:
    0 0 0 3px rgba(7, 13, 20, 0.28),
    0 0 13px rgba(255, 244, 108, 0.65);
}

.lab-agent::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: inherit;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  transform: rotate(-12deg);
}

.lab-route-1 { animation-name: lab-agent-route; }
.lab-route-2 { animation-name: lab-agent-route-two; }
.lab-route-3 { animation-name: lab-agent-route-three; }
.lab-route-4 { animation-name: lab-agent-route-four; }
.lab-route-5 { animation-name: lab-agent-route-five; }

.lab-agent i {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(255, 200, 69, 0.2);
  border-radius: 14px;
  box-shadow:
    0 0 18px rgba(255, 200, 69, 0.18),
    inset 0 0 12px rgba(255, 244, 108, 0.1);
  animation: lab-pulse 1.8s ease-in-out infinite;
}

.lab-reward {
  display: none;
}

.lab-live-log {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(114, 255, 213, 0.14);
  border-radius: 14px;
  background: rgba(4, 10, 18, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.lab-live-log span {
  position: relative;
  overflow: hidden;
  padding-left: 13px;
  color: #d8e8f7;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lab-live-log span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px rgba(114, 255, 213, 0.8);
  transform: translateY(-50%);
}

.reward-lb {
  left: 55%;
  top: 22%;
  animation: lab-reward-pop 6s ease-in-out infinite;
}

.reward-cst {
  left: 23%;
  top: 58%;
  animation: lab-reward-pop 6s ease-in-out infinite 3s;
}

.process-head {
  align-self: end;
  margin-top: -4px;
}

.process-state {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  justify-items: stretch;
  width: 100%;
  min-height: 38px;
  padding: 0 2px;
}

.process-state .eyebrow {
  justify-self: start;
  border-color: transparent;
  padding-left: 0;
  color: #f3f8ff;
  background: transparent;
  font-size: 15px;
  font-weight: 800;
}

.add-agent-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #07121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(104, 184, 255, 0.18);
}

.add-agent-control {
  display: inline-grid;
  grid-template-columns: 32px auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 3px 12px 3px 4px;
  color: #06121d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(104, 184, 255, 0.18);
}

.add-agent-control span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  font-size: 24px;
  line-height: 1;
}

.add-agent-control b {
  color: #06121d;
  font-size: 11px;
  white-space: nowrap;
}

.miner-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 0;
}

.miner-lab > .miner-status-grid {
  position: relative;
  z-index: 8;
}

.miner-status-grid div {
  min-width: 0;
  padding: 8px 7px;
  border: 1px solid rgba(120, 164, 203, 0.15);
  border-radius: 14px;
  background: rgba(20, 31, 45, 0.88);
}

.miner-status-grid details {
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(120, 164, 203, 0.15);
  border-radius: 14px;
  background: rgba(20, 31, 45, 0.88);
}

.miner-status-grid summary {
  display: block;
  min-width: 0;
  padding: 8px 7px;
  cursor: pointer;
  list-style: none;
}

.miner-status-grid summary::-webkit-details-marker {
  display: none;
}

.miner-status-grid details[open] {
  grid-column: 1 / -1;
}

.miner-status-grid details[open] summary {
  border-bottom: 1px solid rgba(120, 164, 203, 0.12);
}

.miner-status-grid span,
.miner-status-grid summary span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.miner-status-grid b,
.miner-status-grid summary b {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #f3f8ff;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.miner-status-grid em {
  display: none;
  margin: 8px 7px 7px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.25;
  overflow: hidden;
  white-space: pre-line;
  text-overflow: ellipsis;
}

.miner-status-grid details[open] em {
  display: block;
}

.process-head h2 {
  max-width: 150px;
  margin-bottom: 0;
  overflow: visible;
  font-size: 15px;
  line-height: 1.05;
  white-space: normal;
}

.process-head b {
  max-width: 190px;
  overflow: hidden;
  color: var(--accent-2);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.progress-track {
  display: none;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--coin));
  transition: width 0.3s ease;
}

.claim-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 9;
  width: 62px;
  height: 62px;
  min-height: 0;
  margin: 0;
  border: 3px solid #05070b;
  border-radius: 50%;
  color: #071018;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.18) 23%, transparent 35%),
    linear-gradient(145deg, #f7fbff 0%, #a8b2bd 35%, #e6edf2 54%, #6e7782 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -8px 14px rgba(0, 0, 0, 0.28),
    0 8px 16px rgba(0, 0, 0, 0.5);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.claim-btn:disabled {
  opacity: 0.72;
  filter: grayscale(0.25);
  cursor: default;
}

.miner-reward-details .claim-btn {
  position: static;
  display: grid;
  place-items: center;
  width: calc(100% - 16px);
  height: 34px;
  margin: 8px;
  border-width: 2px;
  border-radius: 10px;
  font-size: 10px;
  z-index: auto;
}

@keyframes lab-flow {
  0%, 100% { opacity: 0.34; filter: brightness(0.9); }
  50% { opacity: 0.92; filter: brightness(1.35); }
}

@keyframes matrix-scan {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 0 76px; }
}

@keyframes node-core-pulse {
  0%, 100% {
    opacity: 0.72;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1.24);
  }
}

@keyframes node-data-sweep {
  0% { opacity: 0; transform: translateX(-90%); }
  18%, 58% { opacity: 1; }
  100% { opacity: 0; transform: translateX(90%); }
}

@keyframes pixel-agent-walk {
  from { background-position: 0 0; }
  to { background-position: -128px 0; }
}

@keyframes pixel-route-one {
  0%, 8%, 100% { left: 25%; top: 39%; }
  12% { left: 50%; top: 39%; }
  16% { left: 50%; top: 56%; }
  20%, 28% { left: 25%; top: 56%; }
  32% { left: 50%; top: 56%; }
  36% { left: 50%; top: 39%; }
  40%, 48% { left: 75%; top: 39%; }
  52% { left: 50%; top: 39%; }
  56% { left: 50%; top: 56%; }
  60%, 68% { left: 75%; top: 56%; }
  72% { left: 50%; top: 56%; }
  76% { left: 50%; top: 73%; }
  80%, 88% { left: 25%; top: 73%; }
  92% { left: 50%; top: 73%; }
  95%, 97% { left: 75%; top: 73%; }
  98.5% { left: 50%; top: 73%; }
  99.2% { left: 50%; top: 39%; }
}

@keyframes pixel-route-two {
  0%, 7%, 100% { left: 25%; top: 39%; }
  11% { left: 50%; top: 39%; }
  15% { left: 50%; top: 56%; }
  19%, 27% { left: 25%; top: 56%; }
  31% { left: 50%; top: 56%; }
  35% { left: 50%; top: 39%; }
  39%, 47% { left: 75%; top: 39%; }
  51% { left: 50%; top: 39%; }
  55% { left: 50%; top: 56%; }
  59%, 67% { left: 75%; top: 56%; }
  71% { left: 50%; top: 56%; }
  75% { left: 50%; top: 73%; }
  79%, 87% { left: 25%; top: 73%; }
  91% { left: 50%; top: 73%; }
  94%, 96% { left: 75%; top: 73%; }
  98% { left: 50%; top: 73%; }
  99.1% { left: 50%; top: 39%; }
}

@keyframes pixel-route-three {
  0%, 9%, 100% { left: 25%; top: 39%; }
  13% { left: 50%; top: 39%; }
  17% { left: 50%; top: 56%; }
  21%, 29% { left: 25%; top: 56%; }
  33% { left: 50%; top: 56%; }
  37% { left: 50%; top: 39%; }
  41%, 49% { left: 75%; top: 39%; }
  53% { left: 50%; top: 39%; }
  57% { left: 50%; top: 56%; }
  61%, 69% { left: 75%; top: 56%; }
  73% { left: 50%; top: 56%; }
  77% { left: 50%; top: 73%; }
  81%, 89% { left: 25%; top: 73%; }
  93% { left: 50%; top: 73%; }
  96% { left: 75%; top: 73%; }
  98.4% { left: 50%; top: 73%; }
  99.3% { left: 50%; top: 39%; }
}

@keyframes pixel-route-four {
  0%, 8%, 100% { left: 25%; top: 39%; }
  12% { left: 50%; top: 39%; }
  16% { left: 50%; top: 56%; }
  20%, 28% { left: 25%; top: 56%; }
  32% { left: 50%; top: 56%; }
  36% { left: 50%; top: 39%; }
  40%, 48% { left: 75%; top: 39%; }
  52% { left: 50%; top: 39%; }
  56% { left: 50%; top: 56%; }
  60%, 68% { left: 75%; top: 56%; }
  72% { left: 50%; top: 56%; }
  76% { left: 50%; top: 73%; }
  80%, 88% { left: 25%; top: 73%; }
  92% { left: 50%; top: 73%; }
  95% { left: 75%; top: 73%; }
  98.2% { left: 50%; top: 73%; }
  99.2% { left: 50%; top: 39%; }
}

@keyframes pixel-route-five {
  0%, 7%, 100% { left: 25%; top: 39%; }
  11% { left: 50%; top: 39%; }
  15% { left: 50%; top: 56%; }
  19%, 27% { left: 25%; top: 56%; }
  31% { left: 50%; top: 56%; }
  35% { left: 50%; top: 39%; }
  39%, 47% { left: 75%; top: 39%; }
  51% { left: 50%; top: 39%; }
  55% { left: 50%; top: 56%; }
  59%, 67% { left: 75%; top: 56%; }
  71% { left: 50%; top: 56%; }
  75% { left: 50%; top: 73%; }
  79%, 87% { left: 25%; top: 73%; }
  91% { left: 50%; top: 73%; }
  94%, 96% { left: 75%; top: 73%; }
  98.3% { left: 50%; top: 73%; }
  99.2% { left: 50%; top: 39%; }
}

@keyframes lab-agent-route {
  0%, 10%, 100% { transform: translate(-142px, -8px) rotate(0deg) scale(0.96); }
  16% { transform: translate(-118px, -36px) rotate(-36deg) scale(1); }
  25%, 34% { transform: translate(-44px, -78px) rotate(-8deg) scale(1.06); }
  42% { transform: translate(28px, -56px) rotate(26deg) scale(1); }
  51%, 60% { transform: translate(130px, -6px) rotate(2deg) scale(1.04); }
  68% { transform: translate(118px, 46px) rotate(91deg) scale(1); }
  76%, 85% { transform: translate(82px, 84px) rotate(178deg) scale(1.06); }
  92%, 97% { transform: translate(-94px, 86px) rotate(180deg) scale(1.02); }
}

@keyframes lab-agent-route-two {
  0%, 10%, 100% { transform: translate(130px, -6px) rotate(0deg) scale(0.98); }
  17% { transform: translate(128px, 54px) rotate(92deg) scale(1); }
  26%, 35% { transform: translate(82px, 84px) rotate(180deg) scale(1.06); }
  44% { transform: translate(2px, 84px) rotate(180deg) scale(1); }
  53%, 62% { transform: translate(-94px, 86px) rotate(180deg) scale(1.04); }
  71% { transform: translate(-144px, 48px) rotate(-90deg) scale(1); }
  80%, 88% { transform: translate(-142px, -8px) rotate(-14deg) scale(1.05); }
  94% { transform: translate(-44px, -78px) rotate(20deg) scale(1); }
}

@keyframes lab-agent-route-three {
  0%, 10%, 100% { transform: translate(-94px, 86px) rotate(0deg) scale(1); }
  18% { transform: translate(-12px, 86px) rotate(0deg) scale(1); }
  28%, 37% { transform: translate(82px, 84px) rotate(-38deg) scale(1.06); }
  46% { transform: translate(112px, 46px) rotate(-50deg) scale(1); }
  55%, 64% { transform: translate(130px, -6px) rotate(180deg) scale(1.04); }
  72% { transform: translate(44px, -30px) rotate(202deg) scale(1); }
  82%, 90% { transform: translate(-44px, -78px) rotate(206deg) scale(1.05); }
  96% { transform: translate(-142px, -8px) rotate(196deg) scale(1); }
}

@keyframes lab-agent-route-four {
  0%, 10%, 100% { transform: translate(-44px, -78px) rotate(24deg) scale(1.02); }
  18% { transform: translate(48px, -44px) rotate(24deg) scale(1); }
  28%, 37% { transform: translate(130px, -6px) rotate(92deg) scale(1.05); }
  47% { transform: translate(130px, 64px) rotate(92deg) scale(1); }
  57%, 66% { transform: translate(82px, 84px) rotate(180deg) scale(1.06); }
  76%, 85% { transform: translate(-94px, 86px) rotate(-90deg) scale(1); }
  94% { transform: translate(-142px, -8px) rotate(-22deg) scale(1.03); }
}

@keyframes lab-agent-route-five {
  0%, 10%, 100% { transform: translate(82px, 84px) rotate(180deg) scale(1.03); }
  16% { transform: translate(8px, 84px) rotate(180deg) scale(1); }
  26%, 35% { transform: translate(-94px, 86px) rotate(-90deg) scale(1.05); }
  44% { transform: translate(-142px, 42px) rotate(-90deg) scale(1); }
  54%, 63% { transform: translate(-142px, -8px) rotate(-22deg) scale(1.06); }
  73% { transform: translate(-98px, -40px) rotate(-22deg) scale(1); }
  83%, 91% { transform: translate(-44px, -78px) rotate(18deg) scale(1.04); }
  97% { transform: translate(130px, -6px) rotate(12deg) scale(0.98); }
}

@keyframes lab-pulse {
  0%, 100% { opacity: 0.32; transform: scale(0.86); }
  50% { opacity: 0.78; transform: scale(1.12); }
}

@keyframes lab-reward-pop {
  0%, 22%, 100% { opacity: 0; transform: translateY(10px) scale(0.86); }
  7%, 16% { opacity: 1; transform: translateY(-8px) scale(1); }
}

@keyframes agent-thought-bubble {
  0%, 48%, 64%, 72%, 88%, 100% {
    opacity: 0;
    transform: translateY(6px) scale(0.86);
  }
  53%, 59%, 78%, 84% {
    opacity: 1;
    transform: translateY(-8px) scale(1);
  }
}

.auto-note {
  margin: 8px 0 0;
  font-size: 11px;
  text-align: center;
}

.panel {
  min-height: 0;
  margin-top: 0;
  padding: 11px;
}

.section-head h3 { margin-bottom: 0; }
.section-head .ghost-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.activity-list {
  display: grid;
  gap: 6px;
  max-height: 100%;
  overflow: auto;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.activity-item span {
  color: var(--muted);
  font-size: 10px;
}

.agent-modal-card {
  padding-top: 28px;
}

.agent-modal-switch {
  justify-self: center;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 210px);
  padding: 3px;
  border: 1px solid rgba(74, 178, 255, 0.32);
  border-radius: 999px;
  background: rgba(4, 10, 18, 0.72);
}

.agent-modal-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: rgba(178, 196, 216, 0.9);
  background: transparent;
  font-family: Sora, Manrope, sans-serif;
  font-size: 11px;
  font-weight: 900;
}

.agent-modal-switch button.active {
  color: #06131f;
  background: linear-gradient(180deg, #6bd0ff, #168df2);
  box-shadow: 0 0 18px rgba(28, 132, 245, 0.28);
}

.agent-modal .upgrade-modal-card {
  border-color: rgba(74, 178, 255, 0.42);
}

.agent-modal .upgrade-modal-close {
  color: #dff4ff;
  background: rgba(74, 178, 255, 0.16);
}

.agent-modal .upgrade-modal-kicker {
  color: #35aaff;
}

.agent-upgrade-item {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.agent-upgrade-item.is-owned {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 7px;
  min-height: 48px;
  padding: 7px 9px;
}

.agent-upgrade-item i {
  color: #35aaff;
  font-family: Sora, Manrope, sans-serif;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.agent-upgrade-item.is-owned i {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 9px;
}

.agent-upgrade-item div {
  min-width: 0;
}

.agent-upgrade-item div b,
.upgrade-item div b {
  display: block;
}

.agent-upgrade-item div span,
.upgrade-item div span {
  display: block;
  color: rgba(178, 196, 216, 0.92);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.18;
}

.agent-upgrade-item button:disabled {
  opacity: 0.58;
}

.agent-upgrade-item.is-owned button:disabled {
  color: #dff4ff;
  opacity: 1;
}

.agent-modal .upgrade-item .agent-toggle {
  display: inline-grid;
  align-items: center;
  width: 42px;
  height: 20px;
  min-height: 0;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: rgba(55, 65, 80, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 12px rgba(0, 0, 0, 0.18);
}

.agent-modal .upgrade-item .agent-toggle span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(225, 235, 255, 0.96);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  transform: translateX(0);
  transition: transform 0.16s ease;
}

.agent-modal .upgrade-item .agent-toggle.is-on {
  background: linear-gradient(180deg, #35aaff, #0872d9);
}

.agent-modal .upgrade-item .agent-toggle.is-on span {
  transform: translateX(22px);
}

.agent-modal-empty {
  padding: 16px;
  border: 1px solid rgba(74, 178, 255, 0.22);
  border-radius: 16px;
  color: rgba(178, 196, 216, 0.92);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.agent-modal .upgrade-item button {
  background: linear-gradient(180deg, #35aaff, #0872d9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 14px rgba(28, 132, 245, 0.24);
}

.agent-modal .upgrade-item [data-agent-action="free"]:disabled {
  color: #06131f;
  background: linear-gradient(180deg, #ffffff, #dfe8f4);
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 0 14px rgba(255, 255, 255, 0.14);
}

.agent-modal .upgrade-item [data-agent-action="asrock"] {
  color: #06131f;
  background: linear-gradient(180deg, #45c93e, #16a947);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 0 16px rgba(47, 190, 82, 0.28);
}

.agent-modal .upgrade-item [data-agent-action="dgx"] {
  color: #f4f8ff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #262d36, #05070b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 14px rgba(0, 0, 0, 0.34);
}

.activity-item b { font-size: 11px; }

.task-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel), rgba(12, 20, 31, 0.9));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.task-card.is-waiting {
  border-color: rgba(255, 200, 69, 0.34);
}

.task-card.is-done {
  border-color: rgba(114, 255, 213, 0.42);
}

.task-card b {
  display: block;
  color: #f4f8ff;
  font-size: 14px;
}

.task-card span {
  display: block;
  margin-top: 5px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.task-card a,
.task-card button {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  color: #07121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
  text-decoration: none;
}

.task-card a[aria-disabled="true"],
.task-card button[aria-disabled="true"] {
  pointer-events: none;
  color: #d9e6f5;
  background: rgba(255, 255, 255, 0.12);
}

.task-modal .upgrade-modal-card {
  border-color: rgba(67, 159, 255, 0.46);
}

.task-modal .upgrade-modal-close {
  color: #eaf5ff;
  background: rgba(67, 159, 255, 0.16);
}

.task-modal .upgrade-modal-kicker {
  color: #68b8ff;
}

.task-modal-list {
  gap: 10px;
}

.task-modal .task-card {
  min-height: 58px;
  padding: 9px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.task-modal .task-card.is-done {
  border-color: rgba(67, 159, 255, 0.24);
}

.task-modal .task-card b {
  font-size: 12px;
}

.task-modal .task-card span {
  margin-top: 3px;
  color: #ffffff;
  font-size: 10px;
}

.task-modal .task-card a,
.task-modal .task-card button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(180deg, #45a6ff, #1578dc);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 14px rgba(67, 159, 255, 0.22);
  font-size: 11px;
}

.task-modal .task-card a[aria-disabled="true"],
.task-modal .task-card button[aria-disabled="true"] {
  color: #d9e6f5;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.history-modal .upgrade-modal-card {
  border-color: rgba(67, 159, 255, 0.46);
}

.history-modal .upgrade-modal-close {
  color: #eaf5ff;
  background: rgba(67, 159, 255, 0.16);
}

.history-modal .upgrade-modal-kicker {
  color: #68b8ff;
}

.history-modal-list {
  max-height: min(52svh, 430px);
  overflow: auto;
  padding-right: 2px;
}

.history-modal .activity-item {
  min-height: 58px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.history-modal .activity-item b {
  color: #f4f8ff;
  font-size: 12px;
}

.history-modal .activity-item span {
  color: rgba(178, 196, 216, 0.92);
  font-size: 10px;
  font-weight: 800;
}

.history-modal .activity-item > span:last-child {
  color: #ffffff;
  white-space: nowrap;
}

.casino-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 7px 1px 10px;
}

.ludix-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0 1px 2px;
}

.case-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0 1px 8px;
}

.casino-top {
  display: block;
}

.casino-wallet,
.active-bet-row,
.crash-stage {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel), rgba(12, 20, 31, 0.9));
}

.casino-wallet {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 132px;
  margin: 0 auto;
  overflow: visible;
  padding: 10px 11px 13px;
  background:
    radial-gradient(circle at 18% 0%, rgba(165, 185, 207, 0.16), transparent 35%),
    linear-gradient(145deg, rgba(20, 28, 40, 0.99), rgba(10, 17, 28, 0.99) 58%, rgba(14, 21, 32, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    inset 0 -14px 28px rgba(0, 0, 0, 0.2),
    0 16px 34px rgba(0, 0, 0, 0.24);
}

.casino-toolbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 56px 56px minmax(12px, 1fr) repeat(4, 44px);
  justify-content: stretch;
  column-gap: 7px;
  align-items: center;
  padding-bottom: 2px;
}

.casino-toolbar > :nth-child(3) {
  grid-column: 4;
}

.top-icon-btn,
.top-lang-switch summary {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 0;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.top-icon-user,
.top-icon-wallet {
  width: 60px;
  height: 60px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.top-icon-user {
  transform: translateX(0);
}

.top-icon-wallet {
  transform: translateX(-8px);
}

.top-icon-btn img,
.top-lang-switch summary img {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
  opacity: 0.86;
}

.top-icon-user img,
.top-icon-wallet img {
  width: 52px;
  height: 52px;
  opacity: 1;
}

.miner-wallet .top-icon-btn,
.miner-wallet .top-lang-switch summary {
  border-color: rgba(157, 188, 224, 0.13);
  color: #62c9ff;
  background:
    radial-gradient(circle at 32% 10%, rgba(255, 255, 255, 0.09), transparent 33%),
    linear-gradient(180deg, rgba(25, 31, 39, 0.88), rgba(9, 13, 19, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.085),
    inset 0 -8px 16px rgba(0, 0, 0, 0.2),
    0 10px 20px rgba(0, 0, 0, 0.22);
}

.miner-wallet .top-icon-user,
.miner-wallet .top-icon-wallet {
  border-color: transparent;
  background: transparent;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.22));
  box-shadow: none;
}

.miner-wallet .top-icon-btn img,
.miner-wallet .top-lang-switch summary img {
  opacity: 0.9;
  filter:
    saturate(1.08)
    drop-shadow(0 0 8px rgba(75, 166, 255, 0.22));
}

.miner-wallet .top-icon-user img,
.miner-wallet .top-icon-wallet img {
  opacity: 1;
  filter:
    saturate(1.08)
    drop-shadow(0 0 10px rgba(75, 166, 255, 0.18))
    drop-shadow(0 7px 10px rgba(0, 0, 0, 0.24));
}

.top-lang-switch summary::after {
  display: none;
}

.top-lang-switch .lang-menu {
  top: calc(100% + 8px);
  right: 50%;
  bottom: auto;
  left: auto;
  min-width: 92px;
  transform: translateX(50%);
}

.top-lang-switch .lang-menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 0 9px;
  font-size: 13px;
}

.casino-top span,
.active-bet-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.casino-top b,
.active-bet-row b {
  display: block;
  margin-top: 6px;
  font-family: Sora, Manrope, sans-serif;
  font-size: 20px;
  letter-spacing: 0;
}

.crash-stage {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  align-content: stretch;
  gap: 0;
  flex: 1 1 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 18, 27, 0.96), rgba(7, 11, 18, 0.96));
  text-align: center;
}

.crash-live {
  position: relative;
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.crash-live.is-crashed .crash-multiplier {
  color: #ff6f91;
  text-shadow: 0 0 26px rgba(255, 111, 145, 0.35);
}

.crash-multiplier {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #f8fbff;
  font-family: Sora, Manrope, sans-serif;
  font-size: clamp(42px, 12vw, 68px);
  font-weight: 800;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.crash-doodle {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
}

.doodle-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  pointer-events: none;
}

.doodle-platform {
  position: absolute;
  z-index: 2;
  width: 184px;
  height: 53px;
  background: url("/assets/platform%202.png?v=20260521-02") center / contain no-repeat;
  left: var(--platform-x, 50%);
  transform: translateX(-50%);
  transition: opacity 0.1s linear, transform 0.08s linear;
}

.platform-one {
  background-image: url("/assets/platform%202.png?v=20260521-02");
  bottom: var(--platform-one-bottom, 96px);
  opacity: var(--platform-one-opacity, 1);
}

.platform-two {
  background-image: url("/assets/platform%201.png?v=20260521-02");
  bottom: var(--platform-two-bottom, 250px);
  opacity: var(--platform-two-opacity, 0);
}

.platform-three {
  background-image: url("/assets/platform%201.png?v=20260521-02");
  bottom: var(--platform-three-bottom, 368px);
  opacity: var(--platform-three-opacity, 0);
}

.platform-four {
  background-image: url("/assets/platform%201.png?v=20260521-02");
  bottom: var(--platform-four-bottom, 486px);
  opacity: var(--platform-four-opacity, 0);
}

.doodle-player {
  position: absolute;
  z-index: 3;
  left: clamp(120px, var(--doodle-x, 50%), calc(100% - 120px));
  bottom: clamp(-64px, var(--doodle-y, 114px), 410px);
  width: 138px;
  height: 137px;
  background: url("/assets/doodle.png?v=20260521-02") center / contain no-repeat;
  filter: drop-shadow(0 0 18px rgba(114, 255, 213, 0.35)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
  font-style: normal;
  transform: translateX(-50%) rotate(calc((var(--doodle-hop, 0) * -2deg)));
  transition: filter 0.28s ease;
  will-change: bottom, transform;
}

.crash-live.is-running .doodle-platform {
  transition: none;
  will-change: bottom, opacity, transform;
}

.casino-field-notice {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: calc(100% - 34px);
  padding: 12px 20px;
  border: 1px solid rgba(114, 255, 213, 0.2);
  border-radius: 999px;
  color: #ecf6ff;
  background: rgba(7, 14, 24, 0.82);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 34px rgba(114, 255, 213, 0.18);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) translateY(14px) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.casino-field-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.casino-field-notice[data-type="bet"] {
  border-color: rgba(114, 255, 213, 0.3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 26px rgba(114, 255, 213, 0.18);
}

.casino-field-notice[data-type="win"] {
  color: #06120d;
  background: linear-gradient(135deg, #73ff99, #69f5dc);
  font-size: 16px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34), 0 0 38px rgba(105, 245, 220, 0.28);
}

.casino-field-notice[data-type="loss"] {
  background: rgba(45, 12, 25, 0.88);
  border-color: rgba(255, 93, 128, 0.34);
  color: #ffd7df;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 26px rgba(255, 93, 128, 0.16);
}

.crash-live.is-running .doodle-player {
  animation: none;
}

.crash-live.is-crashed .doodle-player {
  filter: drop-shadow(0 0 22px rgba(255, 111, 145, 0.45)) grayscale(0.35);
  transition:
    bottom 0.9s cubic-bezier(0.2, 0.72, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.72, 0.2, 1),
    filter 0.36s ease;
  transform: translateX(-50%) rotate(540deg) scale(0.86);
}

.crash-live.is-crashed .doodle-platform {
  transition: filter 0.36s ease, opacity 0.42s ease, bottom 0.42s ease;
  filter: grayscale(0.35) brightness(0.84);
}

.crash-action-row {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 108px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.crash-action-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle, #0a1621 0 62%, #02070d 63% 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.42);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.22s ease, filter 0.2s ease;
}

.crash-action-btn img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  filter: saturate(1.22) contrast(1.14) brightness(1.08) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.36));
}

.crash-action-btn:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.crash-action-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.72);
}

.crash-action-btn.is-pressing {
  animation: crashBetPress 0.32s ease both;
  pointer-events: none;
}

.crash-action-btn.is-pulse {
  animation: crashActionPulse 1.25s ease-in-out infinite;
}

.crash-action-btn.is-dim {
  opacity: 0.42;
  filter: grayscale(0.42) brightness(0.72);
}

.crash-action-btn.is-dim img {
  filter: saturate(0.72) contrast(0.92) brightness(0.72) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.32));
}

@keyframes crashActionPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 0.08),
      0 12px 24px rgba(0, 0, 0, 0.42);
  }
  50% {
    transform: scale(1.045);
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 0.12),
      0 14px 28px rgba(0, 0, 0, 0.46),
      0 0 24px rgba(114, 255, 213, 0.2);
  }
}

@keyframes crashBetPress {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.08);
  }
  42% {
    opacity: 1;
    transform: scale(0.86);
    filter: brightness(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(0.48);
    filter: brightness(1.12);
  }
}

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

.active-bet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 48px;
  padding: 10px 14px;
}

.crash-doodle > .active-bet-row {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 10;
  display: grid;
  grid-template-columns: 116px 1fr auto;
  align-items: center;
  min-height: 62px;
  padding-top: 12px;
  padding-bottom: 12px;
  background: linear-gradient(180deg, rgba(15, 27, 41, 0.94), rgba(8, 15, 25, 0.94));
  backdrop-filter: blur(10px);
}

.active-bet-row .stake-picker {
  flex: 0 0 116px;
}

.active-bet-row span {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
}

.crash-doodle > .active-bet-row span {
  justify-self: end;
  margin-left: 0;
  margin-right: 4px;
}

.active-bet-row b {
  margin: 0;
  font-size: 22px;
  white-space: nowrap;
}

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

.crash-doodle > .active-bet-row > button {
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.ludix-panel .casino-controls {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.05fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stake-presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 4px;
}

.stake-presets button {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 13px;
  color: #dce8f8;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.casino-controls input,
.casino-controls button,
.casino-bank button {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.1;
}

.casino-bank button {
  display: inline-flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 8px 7px;
  color: #e9f2ff;
  background:
    radial-gradient(circle at 30% 12%, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(145deg, rgba(45, 54, 66, 0.98), rgba(25, 33, 44, 0.98) 55%, rgba(15, 22, 32, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -10px 18px rgba(0, 0, 0, 0.14);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 900;
}

.casino-bank button span {
  transform: none;
}

.casino-bank button img {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
  border-radius: 5px;
}

.info-modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 7, 13, 0.62);
  backdrop-filter: blur(10px);
}

.info-modal-card {
  position: relative;
  width: min(100%, 348px);
  max-height: min(80svh, 620px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  color: #eef5ff;
  background: linear-gradient(180deg, rgba(24, 36, 52, 0.98), rgba(8, 15, 25, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.info-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 13px;
  color: #dce8f8;
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
  line-height: 1;
}

.info-modal-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.info-modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 42px 14px 0;
}

.info-modal-card h3 {
  margin: 0;
  font-family: Sora, Manrope, sans-serif;
  font-size: 20px;
}

.info-history-btn {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(104, 184, 255, 0.22);
  border-radius: 999px;
  color: #7bc8ff;
  background: rgba(104, 184, 255, 0.12);
  font-size: 11px;
  font-weight: 900;
}

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

.info-stats div,
.info-copy {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.info-stats div {
  min-height: 72px;
  padding: 11px;
}

.info-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.info-stats b {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-family: Sora, Manrope, sans-serif;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-copy {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.info-copy p {
  margin: 0;
  color: #c9d7e8;
  font-size: 13px;
  line-height: 1.45;
}

.info-copy input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0 12px;
  color: #f4f8ff;
  background: rgba(3, 8, 13, 0.58);
  font-size: 12px;
}

.wallet-full {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.info-action-btn {
  min-height: 42px;
  border: 1px solid rgba(91, 181, 255, 0.42);
  border-radius: 15px;
  color: #f4f8ff;
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(180deg, #159cff 0%, #075cbd 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 20px rgba(20, 132, 236, 0.2);
  font-weight: 900;
}

.info-action-btn[data-modal-disconnect] {
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.26), transparent 34%),
    linear-gradient(180deg, #159cff 0%, #075cbd 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -10px 18px rgba(0, 0, 0, 0.16),
    0 10px 20px rgba(20, 132, 236, 0.2);
}

.copy-referral-btn {
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(180deg, #159cff 0%, #075cbd 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -10px 18px rgba(0, 0, 0, 0.16),
    0 10px 20px rgba(20, 132, 236, 0.2);
}

.guide-copy {
  gap: 8px;
}

.guide-copy p {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.guide-copy p:last-child {
  border-bottom: 0;
}

.guide-copy b {
  color: #f3f7ff;
  font-size: 14px;
}

.guide-copy span {
  color: #c9d7e8;
}

.casino-controls input {
  width: 100%;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.stake-picker,
.ludix-stake-picker {
  position: relative;
  min-width: 0;
}

.casino-controls .stake-toggle,
.active-bet-row .stake-toggle,
.casino-controls .ludix-stake-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 30px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.stake-toggle span,
.ludix-stake-toggle span {
  display: block;
}

.stake-toggle img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.stake-toggle::after,
.ludix-stake-toggle::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(220, 232, 248, 0.78);
  transform: translateY(-50%);
}

.active-bet-row .stake-toggle {
  gap: 10px;
  justify-content: flex-start;
  min-height: 44px;
  padding: 0 22px 0 12px;
  border: 2px solid rgba(185, 205, 228, 0.38);
  border-radius: 17px;
  color: #edf6ff;
  background:
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #2f3d52, #1a283a 52%, #0d1724 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 20px rgba(8, 13, 20, 0.26);
  font-size: 15px;
  font-weight: 900;
}

.active-bet-row .stake-toggle span {
  color: #edf6ff;
  font-size: 15px;
  font-weight: 900;
}

.stake-menu,
.ludix-stake-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 22px);
  z-index: 14;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 230px;
  padding: 8px;
  border: 1px solid rgba(120, 164, 203, 0.28);
  border-radius: 16px;
  background: rgba(7, 14, 24, 0.96);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.crash-doodle > .active-bet-row .stake-menu {
  min-width: 244px;
}

.active-bet-row .stake-toggle::after {
  right: 11px;
}

.stake-menu button,
.ludix-stake-menu button {
  min-height: 34px;
  border-radius: 11px;
  color: #dce8f8;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.casino-panel .stake-menu button {
  color: #fff;
  background: linear-gradient(180deg, #159cff 0%, #075cbd 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 6px 14px rgba(20, 132, 236, 0.24);
  font-weight: 900;
}

.casino-panel .stake-menu button.is-active {
  color: #06130d;
  background: linear-gradient(180deg, #8dff9d 0%, #21d462 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 0 16px rgba(51, 215, 109, 0.4);
}

.ludix-panel .ludix-stake-toggle {
  min-height: 54px;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  color: #f4f8ff;
  background: linear-gradient(180deg, #151c27 0%, #0a1018 100%);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 15px;
}

.ludix-panel .ludix-stake-toggle img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.ludix-panel .ludix-stake-menu {
  border-color: rgba(255, 49, 79, 0.24);
  background: rgba(5, 9, 15, 0.98);
}

.ludix-panel .ludix-stake-menu button {
  min-height: 40px;
  color: #fff6f8;
  background: linear-gradient(135deg, #ff314f, #d7132f 52%, #8f071e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 16px rgba(255, 49, 79, 0.18);
  font-size: 13px;
  font-weight: 900;
}

.casino-controls button,
.casino-bank button {
  color: #07121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.crash-doodle > .active-bet-row > button[data-casino-bet-btn],
.casino-controls button[data-casino-bet-btn] {
  color: #06130d;
  background: linear-gradient(135deg, #7dff9b, #42d873);
  box-shadow: 0 12px 24px rgba(66, 216, 115, 0.16);
  text-transform: uppercase;
  font-size: 15px;
}

.casino-controls button[data-ludix-spin] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 42px;
  padding: 0 18px;
  color: #fff6f8;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 110, 129, 0.42), transparent 30%),
    linear-gradient(135deg, #d52d47 0%, #bd1730 48%, #780717 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 18px rgba(88, 4, 16, 0.22);
  font-family: Sora, Manrope, sans-serif;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ludix-panel .casino-controls button[data-ludix-spin]:disabled {
  opacity: 0.72;
}

.crash-doodle > .active-bet-row > button[data-casino-cashout],
.casino-controls button[data-casino-cashout] {
  color: #fff6f8;
  background: linear-gradient(135deg, #ff6b8a, #d93d5c);
  box-shadow: 0 12px 24px rgba(255, 107, 138, 0.16);
  text-transform: uppercase;
  font-size: 15px;
}

.casino-bank button.is-attention {
  color: #06130d;
  background: linear-gradient(135deg, #dfffe7, #7dff9b 44%, #33d76d);
  animation: deposit-attention 0.34s ease-in-out 6;
  box-shadow:
    0 0 0 6px rgba(125, 255, 155, 0.12),
    0 0 28px rgba(125, 255, 155, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.crash-doodle > .active-bet-row > button:disabled,
.casino-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.casino-bank button {
  color: #e9f2ff;
  background:
    radial-gradient(circle at 30% 12%, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(145deg, rgba(45, 54, 66, 0.98), rgba(25, 33, 44, 0.98) 55%, rgba(15, 22, 32, 0.98));
}

.case-stage {
  position: relative;
  flex: 1 1 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 12px;
  min-height: 0;
  padding: 18px 14px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 31, 45, 0.95), rgba(8, 15, 25, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 38px rgba(0, 0, 0, 0.2);
}

.case-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.case-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
  filter: brightness(0.86) contrast(0.96);
  transform: translateZ(0);
  backface-visibility: hidden;
  pointer-events: none;
}

.case-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 5;
  width: clamp(48px, 16%, 60px);
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  filter: blur(0.35px) drop-shadow(0 7px 10px rgba(0, 0, 0, 0.34));
  pointer-events: none;
  transform: translateX(-50%);
}

.case-wheel-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-self: center;
  width: min(82vw, 330px);
  max-width: 100%;
  aspect-ratio: 1;
  margin-top: 0;
  transform: translateY(18px);
}

.case-wheel-wrap::before {
  content: none;
}

.case-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  transition: transform 3.8s cubic-bezier(0.12, 0.72, 0.12, 1);
}

.case-wheel-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.case-label {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 14.4%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.case-label img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.34));
  pointer-events: none;
}

.label-nothing { left: 50%; top: 20.6%; }
.label-agent { left: 70.8%; top: 29.2%; }
.label-cst100 { left: 79.4%; top: 50%; }
.label-free { left: 70.8%; top: 70.8%; }
.label-x10 { left: 50%; top: 79.4%; }
.label-cst250 { left: 29.2%; top: 70.8%; }
.label-secret { left: 20.6%; top: 50%; }
.label-iphone { left: 29.2%; top: 29.2%; }

.case-hub {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100px;
  aspect-ratio: 1;
  padding: 12px;
  border: 2px solid rgba(202, 215, 218, 0.7);
  border-radius: 50%;
  color: #f2fbff;
  background:
    radial-gradient(circle at 50% 42%, #1a2526 0 38%, #060a0c 68%, #000 100%);
  font-family: Sora, Manrope, sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.12;
  text-align: center;
  text-wrap: balance;
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.34),
    inset 0 2px 8px rgba(255, 255, 255, 0.14),
    inset 0 -8px 16px rgba(0, 0, 0, 0.55);
}

.case-hub[data-state="spin"] {
  color: #d9f7ff;
  background: radial-gradient(circle at 50% 42%, #182b31 0 38%, #071013 68%, #000 100%);
  border-color: rgba(146, 205, 218, 0.7);
}

.case-hub[data-state="win"],
.case-hub[data-state="free"] {
  color: #ecfff9;
  background: radial-gradient(circle at 50% 42%, #13312a 0 38%, #061411 68%, #000 100%);
  border-color: rgba(114, 255, 213, 0.72);
}

.case-hub[data-state="loss"] {
  color: #f7f8fa;
  background: radial-gradient(circle at 50% 42%, #2a1b1b 0 38%, #130909 68%, #000 100%);
  border-color: rgba(185, 190, 193, 0.68);
}

.case-info-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 330px);
  margin-top: 0;
  transform: translateX(0);
}

.case-result,
.case-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(120, 164, 203, 0.24);
  border-radius: 13px;
  color: #dce8f8;
  background: rgba(15, 15, 14, 0.985);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.case-combos-btn {
  gap: 8px;
  border: 1px solid rgba(120, 164, 203, 0.24);
  color: #e8f2ff;
  background: rgba(15, 15, 14, 0.985);
}

.case-combos-btn::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b4f;
  box-shadow: 0 0 8px rgba(255, 59, 79, 0.5);
  animation: caseComboDot 1.15s ease-in-out infinite;
}

@keyframes caseComboDot {
  0%, 100% { opacity: 0.45; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1); }
}

.case-combos-modal {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(3, 8, 13, 0.72);
  backdrop-filter: blur(6px);
}

.case-combos-card {
  position: relative;
  width: min(100%, 310px);
  max-height: none;
  padding: 12px;
  border: 1px solid rgba(170, 186, 190, 0.34);
  border-radius: 18px;
  background: rgba(8, 14, 20, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.case-combos-card h3 {
  display: none;
}

.case-combos-close {
  display: block;
  width: 34px;
  height: 28px;
  margin: 8px auto 0;
  border: 1px solid rgba(170, 186, 190, 0.28);
  border-radius: 14px;
  color: #f3f8ff;
  background: rgba(255, 255, 255, 0.06);
}

.case-combo-list {
  display: grid;
  gap: 5px;
  overflow: visible;
}

.case-combo-list div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 9px;
  color: #dce8f8;
  background: rgba(255, 255, 255, 0.055);
  font-size: 11px;
}

.case-combo-list img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
}

.case-combo-list b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-combo-list span {
  color: #c8d0d4;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.case-meta {
  justify-content: center;
  gap: 8px;
  color: var(--muted);
}

.case-meta b {
  color: #54f86d;
  font-family: Sora, Manrope, sans-serif;
  font-size: 16px;
}

.case-spin-btn {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  margin-bottom: 5px;
  min-height: 48px;
  border: 1px solid rgba(48, 224, 91, 0.82);
  border-radius: 18px;
  color: #06130d;
  background:
    linear-gradient(180deg, #43e85f 0%, #16c853 50%, #007f35 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -7px 14px rgba(0, 84, 37, 0.24);
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}

.case-spin-btn::before {
  content: "";
  display: none;
}

.case-spin-btn:not(:disabled) {
  animation: none;
}

@keyframes caseButtonPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-1px) scale(1.008);
    filter: brightness(1.08);
  }
}

.case-spin-btn:disabled {
  opacity: 0.82;
  color: rgba(5, 7, 11, 0.78);
  background: linear-gradient(180deg, #dfb348 0%, #c88418 52%, #8f5208 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  text-shadow: none;
}

.case-history {
  display: none;
  gap: 0;
  max-height: 46px;
  overflow: hidden;
  border: 1px solid rgba(120, 164, 203, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: max-height 0.22s ease;
}

.case-history.is-open {
  gap: 7px;
  max-height: 168px;
  overflow-y: auto;
  padding: 0 0 7px;
}

.case-history div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid rgba(120, 164, 203, 0.14);
  border-radius: 0;
  color: #dce8f8;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.case-history div:last-child {
  border-bottom: 0;
}

.case-history b {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.ludix-stage {
  position: relative;
  flex: 1 1 0;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  min-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  padding: 18px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 31, 45, 0.95), rgba(8, 15, 25, 0.94));
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 38px rgba(0, 0, 0, 0.2);
}

.ludix-stage::before {
  content: none;
}

.ludix-stage::after {
  content: none;
}

.ludix-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transform: translateZ(0);
  backface-visibility: hidden;
  pointer-events: none;
}

.ludix-stage p {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(50% - 18px);
  height: 42px;
  padding: 6px 10px;
  border: 1px solid rgba(120, 164, 203, 0.24);
  border-radius: 13px;
  margin: 0;
  color: var(--muted);
  background: rgba(7, 14, 24, 0.76);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: clamp(10px, 2.75vw, 12px);
  font-weight: 500;
  line-height: 1.12;
  text-align: center;
}

.ludix-stage .active-bet-row {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  width: calc(50% - 18px);
  height: 42px;
  min-height: 0;
  padding: 6px 10px;
  border-radius: 13px;
  background: rgba(7, 14, 24, 0.78);
}

.ludix-stage .active-bet-row span {
  font-size: clamp(10px, 2.7vw, 12px);
  line-height: 1.1;
}

.ludix-stage .active-bet-row b {
  font-size: clamp(12px, 3.1vw, 14px);
  line-height: 1.1;
}

.ludix-machine {
  position: relative;
  z-index: 1;
  width: min(102%, 392px);
  aspect-ratio: 1;
  margin-top: -18px;
  filter: drop-shadow(0 28px 36px rgba(0, 0, 0, 0.32)) drop-shadow(0 0 32px rgba(107, 216, 255, 0.1));
}

.ludix-machine-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.ludix-stage [data-ludix-status] {
  transition: color 0.18s ease, text-shadow 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ludix-stage [data-ludix-status][data-state="spin"],
.ludix-stage [data-ludix-status][data-state="win"],
.ludix-stage [data-ludix-status][data-state="loss"] {
  font-weight: 800;
  animation: ludix-status-pulse 0.54s ease-in-out infinite alternate;
}

.ludix-stage [data-ludix-status][data-state="spin"] {
  color: #72ffd5;
  border-color: rgba(114, 255, 213, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 22px rgba(114, 255, 213, 0.16);
  text-shadow: 0 0 12px rgba(114, 255, 213, 0.72);
}

.ludix-stage [data-ludix-status][data-state="win"] {
  color: #72ffd5;
  border-color: rgba(114, 255, 213, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 24px rgba(114, 255, 213, 0.2);
  text-shadow: 0 0 13px rgba(114, 255, 213, 0.8);
}

.ludix-stage [data-ludix-status][data-state="loss"] {
  color: #ff6f91;
  border-color: rgba(255, 95, 132, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 24px rgba(255, 95, 132, 0.18);
  text-shadow: 0 0 13px rgba(255, 95, 132, 0.72);
}

.ludix-reels {
  position: absolute;
  z-index: 2;
  left: 20.7%;
  top: 34.3%;
  width: 58.6%;
  height: 28.2%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.2%;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.ludix-reels::after {
  content: none;
}

.ludix-reels span {
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #07121a;
  background: transparent;
  font-family: Sora, Manrope, sans-serif;
  font-size: clamp(15px, 5.2vw, 24px);
  font-weight: 800;
  box-shadow: none;
}

.ludix-reels img {
  display: block;
  width: 108%;
  height: 108%;
  object-fit: contain;
  filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.26));
  pointer-events: none;
}

.ludix-lb-symbol {
  display: inline-grid;
  place-items: center;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 16px;
  color: #07121a;
  background: linear-gradient(135deg, #72ffd5, #fff0a8);
  font-family: Sora, Manrope, sans-serif;
  font-size: clamp(18px, 6vw, 30px);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.24), 0 0 18px rgba(114, 255, 213, 0.22);
}

.ludix-combo-list .ludix-lb-symbol {
  width: 28px;
  font-size: 12px;
  border-radius: 9px;
  vertical-align: middle;
}

.ludix-combos {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  text-align: left;
}

.ludix-combos summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 59, 79, 0.18);
  border-radius: 16px;
  color: #dce8f8;
  background: linear-gradient(180deg, rgba(16, 24, 36, 0.96), rgba(4, 9, 16, 0.96));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}

.ludix-combos summary::-webkit-details-marker {
  display: none;
}

.ludix-combos summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b4f;
  box-shadow: 0 0 12px rgba(255, 59, 79, 0.55);
  animation: ludixComboDot 1.1s ease-in-out infinite;
}

@keyframes ludixComboDot {
  0%, 100% { opacity: 0.42; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.08); }
}

.ludix-combos[open] {
  inset: 14px 16px 14px;
  display: grid;
  grid-template-rows: auto 1fr;
  width: auto;
  overflow: hidden;
  border: 1px solid rgba(255, 59, 79, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 59, 79, 0.18), transparent 38%),
    rgba(8, 15, 25, 0.97);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 199, 67, 0.035);
  backdrop-filter: blur(14px);
}

.ludix-combos[open] summary {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  padding: 0 50px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: Sora, Manrope, sans-serif;
  font-size: 16px;
}

.ludix-combos-close {
  display: none;
}

.ludix-combos[open] .ludix-combos-close {
  position: absolute;
  left: 50%;
  bottom: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 107, 138, 0.18);
  border-radius: 13px;
  color: #ffdce4;
  background: rgba(255, 107, 138, 0.12);
  box-shadow: 0 0 18px rgba(255, 107, 138, 0.12);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  transform: translateX(-50%);
}

.ludix-combo-list {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 0;
  padding: 0 10px 38px;
}

.ludix-combo-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 3px 10px 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 13px;
  color: #dce8f8;
  background: linear-gradient(135deg, rgba(24, 28, 36, 0.86), rgba(9, 13, 20, 0.94));
  font-family: Sora, Manrope, sans-serif;
  font-size: clamp(9px, 2.35vw, 12px);
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ludix-combo-list b {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  line-height: 1.05;
}

.ludix-combo-list img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 5px;
  object-fit: contain;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(218, 226, 236, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 14px rgba(0, 0, 0, 0.22);
}

.ludix-combo-logo {
  display: grid;
  place-items: center;
  height: 32px;
  margin-top: -2px;
}

.ludix-combo-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 199, 67, 0.28));
}

.ludix-combo-list span {
  color: #f3f7ff;
  flex: 0 0 auto;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 0 10px currentColor;
}

.ludix-combo-list .combo-jack {
  background: linear-gradient(135deg, rgba(255, 210, 72, 0.2), rgba(38, 27, 12, 0.9));
}

.combo-jack span {
  color: #ffd84a;
}

.ludix-combo-list .combo-jackpot {
  background: linear-gradient(135deg, rgba(255, 72, 88, 0.22), rgba(36, 15, 19, 0.92));
}

.combo-jackpot span {
  color: #ffbe45;
}

.ludix-combo-list .combo-ton {
  background: linear-gradient(135deg, rgba(61, 132, 255, 0.22), rgba(11, 18, 32, 0.94));
}

.combo-ton span {
  color: #6ea8ff;
}

.ludix-combo-list .combo-pepe {
  background: linear-gradient(135deg, rgba(66, 210, 105, 0.18), rgba(10, 24, 18, 0.94));
}

.combo-pepe span {
  color: #5bea8a;
}

.ludix-combo-list .combo-scales {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(24, 27, 34, 0.94));
}

.combo-scales span {
  color: #f3f7ff;
}

.ludix-combo-list .combo-bull {
  background: linear-gradient(135deg, rgba(255, 210, 72, 0.18), rgba(27, 25, 18, 0.94));
}

.combo-bull span {
  color: #ffe06b;
}

.ludix-combo-list .combo-clover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(10, 13, 20, 0.94));
}

.combo-clover span {
  color: #ffffff;
}

.ludix-combo-list .combo-cst {
  background: linear-gradient(135deg, rgba(255, 72, 88, 0.2), rgba(35, 13, 18, 0.94));
}

.combo-cst span {
  color: #ff7886;
}

.ludix-machine.is-spinning .ludix-reels span {
  animation: ludix-reel 0.16s linear infinite;
}

@keyframes ludix-reel {
  0% { transform: translateY(-4px); }
  50% { transform: translateY(4px); }
  100% { transform: translateY(-4px); }
}

@keyframes ludix-status-pulse {
  from { opacity: 0.68; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1.04); }
}

@keyframes deposit-attention {
  0%, 100% { transform: translateX(0) scale(1); }
  20% { transform: translateX(-4px) scale(1.03); }
  40% { transform: translateX(4px) scale(1.03); }
  60% { transform: translateX(-3px) scale(1.02); }
  80% { transform: translateX(3px) scale(1.02); }
}


.casino-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 7, 13, 0.62);
  backdrop-filter: blur(14px);
}

.casino-modal-card {
  position: relative;
  display: grid;
  gap: 13px;
  width: min(100%, 350px);
  padding: 20px;
  border: 1px solid rgba(114, 255, 213, 0.18);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(24, 36, 52, 0.98), rgba(8, 15, 25, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.casino-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 13px;
  color: #dce8f8;
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
  line-height: 1;
}

.casino-modal-kicker {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.casino-modal-card h3 {
  margin: 0;
  padding-right: 38px;
  font-family: Sora, Manrope, sans-serif;
  font-size: 24px;
}

.casino-modal-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.casino-modal-card input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 17px;
  padding: 0 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 18px;
  font-weight: 800;
  outline: none;
}

.casino-modal-card input:focus {
  border-color: rgba(114, 255, 213, 0.48);
  box-shadow: 0 0 0 4px rgba(114, 255, 213, 0.1);
}

.casino-modal-actions {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 10px;
}

.casino-modal-actions button {
  min-height: 48px;
  border: 0;
  border-radius: 17px;
  font-weight: 800;
}

.casino-modal-actions button:first-child {
  color: #dce8f8;
  background: rgba(255, 255, 255, 0.08);
}

.casino-modal-actions button:last-child {
  color: #07121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.casino-modal-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@keyframes doodleTilt {
  from { margin-bottom: 0; }
  to { margin-bottom: 7px; }
}

.coming {
  display: grid;
  height: 100%;
  place-items: center;
  text-align: center;
  padding: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 24px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10;
  width: min(92vw, 400px);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--panel-strong);
  transform: translateX(-50%);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.36);
}

@media (max-height: 720px) {
  .welcome-screen { gap: 9px; }
  .game-orb { width: min(47vw, 176px); }
  h1 { font-size: clamp(24px, 7.6vw, 34px); }
  .agent-grid { gap: 8px; }
  .agent-card { padding: 11px; }
  .agent-card h3 { min-height: 32px; font-size: 12px; }
  .benefits { font-size: 10px; }
  .metric-card,
  .achievement-card { min-height: 50px; padding: 6px; }
  .achievement-card .achievement-icon { display: none; }
  .achievement-card strong { font-size: 11px; }
  .achievement-card span:not(.achievement-icon) { font-size: 10px; }
  .achievement-card button { min-height: 19px; margin-top: 3px; font-size: 10px; }
  .mining-core { width: min(34vw, 132px); }
  .miner-wallet { width: calc(100% - 12px); min-height: 112px; padding-top: 10px; }
  .miner-lab { min-height: 0; padding-top: 0; }
  .lab-field { height: min(100%, clamp(398px, 56svh, 448px)); min-height: 0; border-radius: 18px; }
  .miner-sim { grid-template-rows: minmax(0, 1fr) auto; gap: 0; padding: 0; }
  .miner-pipeline { gap: 6px; padding: 6px; }
  .miner-pipeline button { min-height: 38px; font-size: 6px; }
  .lab-core { width: 96px; height: 60px; border-radius: 16px; }
  .lab-core b { font-size: 11px; }
  .lab-node { min-width: 76px; height: 28px; padding: 0 10px 0 21px; }
  .lab-node b { font-size: 8px; }
  .lab-agent { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
  .lab-process-head { left: 8px; right: 8px; bottom: 8px; }
  .lab-process-head .process-state { min-height: 34px; }
  .miner-status-grid div { padding: 6px; }
  .miner-status-grid span { font-size: 8px; }
  .miner-status-grid b { font-size: 10px; }
  .miner-status-grid em { font-size: 7px; }
  .agent-online-card .process-state .eyebrow { max-width: 70px; font-size: 10px; }
  .agent-online-card .add-agent-control { min-height: 24px; }
  .agent-online-card .add-agent-control span { width: 20px; height: 20px; font-size: 16px; }
}

@media (max-width: 430px) and (max-height: 790px) {
  .cst-app {
    padding: max(10px, env(safe-area-inset-top)) 18px max(8px, env(safe-area-inset-bottom));
  }

  .cst-app::before {
    inset: 12px;
    border-radius: 26px;
  }

  .dashboard-screen {
    grid-template-rows: 52px 1fr 58px;
  }

  .cst-app[data-active-tab="Dashboard"] .dashboard-screen {
    grid-template-rows: 0 minmax(0, 1fr) 54px;
  }

  .cst-app[data-active-tab="Case"] .dashboard-screen,
  .cst-app[data-active-tab="Ludix"] .dashboard-screen,
  .cst-app[data-active-tab="Casino"] .dashboard-screen {
    grid-template-rows: 26px 1fr 58px;
  }

  .cst-app[data-active-tab="Ludix"] .dashboard-screen {
    grid-template-rows: 12px 1fr 58px;
  }

  .cst-app[data-active-tab="Casino"] .dashboard-screen {
    grid-template-rows: 1px 1fr 58px;
  }

  .dash-header {
    height: 48px;
    margin-bottom: 2px;
  }

  .lang-switch summary,
  .settings-switch summary {
    width: 52px;
    height: 40px;
    border-radius: 20px;
  }

  .casino-panel,
  .case-panel {
    gap: 8px;
    padding: 7px 0 8px;
  }

  .casino-panel {
    height: 100%;
    overflow: hidden;
    padding: 7px 0 10px;
  }

  .casino-wallet {
    min-height: 122px;
    padding: 10px 13px 11px;
  }

  .miner-wallet { width: calc(100% - 12px); min-height: 118px; padding-top: 10px; }

  .miner-lab,
  .lab-field {
    min-height: 0;
  }

  .lab-field {
    height: clamp(410px, 57svh, 456px);
  }

  .casino-toolbar {
    grid-template-columns: 52px 52px minmax(8px, 1fr) repeat(4, 42px);
    column-gap: 6px;
  }

  .top-icon-btn,
  .top-lang-switch summary {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .top-icon-user,
  .top-icon-wallet {
    width: 56px;
    height: 56px;
  }

  .top-icon-user {
    transform: translateX(0);
  }

  .top-icon-wallet {
    transform: translateX(-6px);
  }

  .top-icon-btn img,
  .top-lang-switch summary img {
    width: 24px;
    height: 24px;
  }

  .top-icon-user img,
  .top-icon-wallet img {
    width: 50px;
    height: 50px;
  }

  .casino-top b {
    font-size: 17px;
  }

  .casino-bank {
    gap: 8px;
  }

  .casino-bank button,
  .casino-controls button,
  .casino-controls input {
    min-height: 42px;
    border-radius: 15px;
    font-size: 12px;
  }

  .casino-bank button {
    gap: 2px;
    padding: 5px 7px 6px;
    font-size: 12px;
  }

  .casino-bank button img {
    width: 24px;
    height: 24px;
  }

  .crash-stage {
    gap: 0;
    padding-bottom: 0;
  }

  .ludix-stage {
    min-height: 0;
    margin-bottom: 0;
    padding: 16px 12px 12px;
  }

  .case-stage {
    min-height: 0;
    padding: 16px 12px 20px;
  }

  .case-wheel-wrap {
    width: min(78vw, 292px);
    margin-top: 0;
    transform: translateY(16px);
  }

  .case-pointer {
    top: -7px;
    width: 54px;
    height: auto;
  }

  .case-hub {
    width: 82px;
    font-size: 9px;
    padding: 10px;
  }

  .case-info-grid {
    gap: 7px;
  }

  .case-result,
  .case-meta {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .ludix-machine {
    width: min(112%, 360px);
    min-height: 0;
    padding: 0;
  }

  .ludix-reels {
    min-height: 0;
  }

  .crash-doodle {
    height: 100%;
  }

  .crash-multiplier {
    top: 10px;
    font-size: clamp(40px, 11vw, 58px);
  }

  .doodle-player {
    left: clamp(116px, var(--doodle-x, 50%), calc(100% - 116px));
    width: 126px;
    height: 125px;
  }

  .crash-action-row {
    left: 14px;
    right: 14px;
    bottom: 90px;
  }

  .crash-action-btn {
    width: 74px;
    height: 74px;
  }

  .active-bet-row {
    min-height: 48px;
    gap: 7px;
    padding: 10px 10px;
  }

  .crash-doodle > .active-bet-row {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: 104px 1fr auto;
    gap: 5px;
    min-height: 56px;
  }

  .active-bet-row .stake-picker {
    flex-basis: 104px;
  }

  .active-bet-row .stake-toggle {
    min-height: 40px;
    gap: 8px;
    padding: 0 20px 0 10px;
    font-size: 14px;
  }

  .stake-toggle img {
    width: 23px;
    height: 23px;
  }

  .active-bet-row span,
  .active-bet-row .stake-toggle span {
    font-size: 13px;
  }

  .active-bet-row b {
    font-size: 18px;
  }

  .active-bet-row span {
    font-size: 9px;
  }

  .active-bet-row b {
    font-size: 13px;
  }

  .crash-doodle > .active-bet-row > button {
    min-height: 34px;
    border-radius: 13px;
    font-size: 10px;
  }

  .casino-controls {
    gap: 8px;
  }

  .stake-presets {
    gap: 6px;
  }

  .stake-presets button {
    min-height: 30px;
    border-radius: 12px;
    font-size: 11px;
  }

  .tabs {
    min-height: 58px;
    margin-top: 0;
    padding: 6px;
    border-radius: 23px;
  }

  .tabs button {
    min-height: 44px;
    border-radius: 17px;
    gap: 6px;
    font-size: 10.5px;
  }

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

@media (max-width: 430px) {
  .cst-app[data-active-tab="Dashboard"] {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .cst-app[data-active-tab="Dashboard"] .miner-wallet,
  .cst-app[data-active-tab="Dashboard"] .process-card,
  .cst-app[data-active-tab="Dashboard"] .tabs {
    justify-self: center;
    width: 100%;
  }

  .cst-app[data-active-tab="Dashboard"] .miner-wallet {
    min-width: 0;
  }

  .cst-app[data-active-tab="Dashboard"] .lab-field {
    width: 100%;
  }
}

@media (min-width: 760px) {
  body {
    display: grid;
    place-items: center;
  }

  .cst-app {
    height: min(900px, 96svh);
    border-radius: 34px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  }

  .screen {
    height: calc(min(900px, 96svh) - max(28px, env(safe-area-inset-top)) - max(28px, env(safe-area-inset-bottom)));
  }
}
