
:root {
  --dn-bg: #050807;
  --dn-bg2: #0a100d;
  --dn-surface: #0f1814;
  --dn-card: #0c1411;
  --dn-border: rgba(0, 255, 170, 0.14);
  --dn-text: #dfffea;
  --dn-muted: #5a8f78;
  --dn-accent: #00ff9d;
  --dn-accent-dim: #00aa6e;
  --dn-danger: #ff6b6b;
  --dn-glow: rgba(0, 255, 157, 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --section-radius: 14px;
  --font-mono: "JetBrains Mono", "Share Tech Mono", ui-monospace, monospace;
  --font-ui: var(--font-mono);

  --bg: var(--tg-theme-bg-color, var(--dn-bg));
  --text: var(--tg-theme-text-color, var(--dn-text));
  --hint: var(--tg-theme-hint-color, var(--dn-muted));
  --link: var(--tg-theme-link-color, var(--dn-accent));
  --btn: var(--tg-theme-button-color, var(--dn-accent-dim));
  --btn-text: var(--tg-theme-button-text-color, #031208);
  --secondary: var(--tg-theme-secondary-bg-color, var(--dn-surface));
  --header: var(--tg-theme-header-bg-color, var(--dn-bg2));
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background-color: var(--dn-bg);
  color-scheme: dark;
}

body.darknet {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-ui);
  background: var(--dn-bg);
  background-color: var(--dn-bg);
  color: var(--dn-text);
  line-height: 1.5;
  font-size: 14px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  color-scheme: dark;
}

html,
body.darknet {
  scrollbar-width: none; 
  -ms-overflow-style: none; 
}

html::-webkit-scrollbar,
body.darknet::-webkit-scrollbar {
  display: none; 
  width: 0;
  height: 0;
}

body.darknet::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 40, 25, 0.35) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 24px,
      rgba(0, 255, 140, 0.03) 24px,
      rgba(0, 255, 140, 0.03) 25px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 24px,
      rgba(0, 255, 140, 0.025) 24px,
      rgba(0, 255, 140, 0.025) 25px
    );
  opacity: 0.9;
}

body.darknet::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.15;
  animation: scanDrift 12s linear infinite;
}

@keyframes scanDrift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(24px);
  }
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  background-color: var(--dn-bg);
  flex: 1;
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dn-bg);
  transition: opacity 0.55s var(--ease-out), visibility 0.55s;
}

.boot-loader--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-loader__noise {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.boot-loader__content {
  text-align: center;
  padding: 24px;
  max-width: 320px;
}

.boot-loader__logo {
  font-family: "Share Tech Mono", var(--font-mono);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--dn-accent);
  text-shadow: 0 0 24px var(--dn-glow);
  margin-bottom: 20px;
}

.boot-loader__blink {
  animation: blink 0.9s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.boot-loader__track {
  height: 3px;
  background: rgba(0, 255, 157, 0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.boot-loader__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--dn-accent-dim), var(--dn-accent));
  border-radius: 2px;
  animation: bootFill 1.1s var(--ease-smooth) forwards;
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.5);
}

@keyframes bootFill {
  to {
    width: 100%;
  }
}

.boot-loader__msg {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dn-muted);
  margin: 0;
  animation: msgPulse 1.5s ease-in-out infinite;
}

@keyframes msgPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.topbar {
  flex-shrink: 0;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: linear-gradient(180deg, rgba(10, 16, 13, 0.97) 0%, var(--dn-bg) 100%);
  border-bottom: 1px solid var(--dn-border);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--dn-border);
  border-radius: 8px;
  background: rgba(0, 255, 157, 0.06);
  color: var(--dn-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s;
}

.topbar-toggle:hover {
  background: rgba(0, 255, 157, 0.1);
}

.topbar-toggle__svg {
  transition: transform 0.35s var(--ease-out);
}

.topbar.topbar--collapsed .topbar-toggle__svg {
  transform: rotate(180deg);
}

.topbar__collapsible {
  overflow: hidden;
  max-height: 560px;
  transition: max-height 0.4s var(--ease-out);
}

.topbar.topbar--collapsed .topbar__collapsible {
  max-height: 0;
}

.topbar.topbar--collapsed .brand {
  margin-bottom: 0;
}

.brand-left {
  min-width: 0;
}

.brand-title {
  font-family: "Share Tech Mono", var(--font-mono);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  margin: 0;
  color: var(--dn-text);
  text-shadow: 0 0 20px var(--dn-glow);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--dn-muted);
  margin: 4px 0 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-bell {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--dn-border);
  border-radius: 8px;
  background: rgba(0, 255, 157, 0.06);
  color: var(--dn-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s, border-color 0.25s;
}

.header-bell:hover {
  background: rgba(0, 255, 157, 0.11);
}

.header-bell__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #c42b2b;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 10px rgba(255, 80, 80, 0.5);
}

.header-bell--nudge {
  animation: bell-nudge 0.55s ease-in-out infinite;
  transform-origin: 50% 0;
}

@keyframes bell-nudge {
  0%,
  100% {
    transform: rotate(0deg);
  }
  15% {
    transform: rotate(14deg);
  }
  30% {
    transform: rotate(-12deg);
  }
  45% {
    transform: rotate(10deg);
  }
  60% {
    transform: rotate(-8deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

.tg-pill {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--dn-border);
  color: var(--dn-accent);
  background: rgba(0, 255, 157, 0.06);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.promo-island-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 10px;
  touch-action: pan-y;
  position: relative;
  z-index: 6;
}

.promo-island-wrap[hidden],
.promo-island-wrap.promo-island-wrap--off {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
  gap: 0 !important;
}

.promo-island-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}

.promo-island {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  max-width: 360px;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  background: rgba(12, 18, 15, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.promo-island:hover {
  border-color: rgba(0, 255, 157, 0.22);
  box-shadow:
    0 6px 28px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(0, 255, 140, 0.08);
}

.promo-island[aria-expanded="true"] .promo-island__chev {
  transform: rotate(180deg);
}

.promo-island__glyph {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--dn-accent-dim), var(--dn-accent));
  box-shadow: 0 0 14px var(--dn-glow);
}

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

.promo-island__app {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dn-muted);
}

.promo-island__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dn-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-island__chev {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--dn-muted);
  transition: transform 0.3s var(--ease-out);
}

.promo-island__drop {
  width: 100%;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(10, 14, 12, 0.95);
  border: 1px solid var(--dn-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.promo-island__drop-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dn-text);
}

.promo-island__drop-body {
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--dn-muted);
}

.promo-island__promo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.promo-island__promo-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dn-muted);
  width: 100%;
}

.promo-island__promo-code {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed var(--dn-border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dn-accent);
}

.promo-island__x {
  flex-shrink: 0;
  width: 40px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--dn-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 8;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
}

.promo-island__x:hover {
  color: var(--dn-text);
  background: rgba(255, 80, 80, 0.12);
  border-color: rgba(255, 100, 100, 0.35);
}

.inbox-item--live {
  border-color: rgba(0, 255, 157, 0.35);
  box-shadow: 0 0 20px rgba(0, 255, 140, 0.06);
}

.inbox-promo-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inbox-promo-copy code {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed var(--dn-border);
  font-size: 0.82rem;
  color: var(--dn-accent);
}

.wallet-big {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 8px 0 4px;
  color: var(--dn-accent);
  text-shadow: 0 0 20px var(--dn-glow);
}


.balance-rgb {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  font-variant-numeric: tabular-nums;
}

.balance-rgb--plain {
  color: inherit;
  text-shadow: inherit;
  font-weight: inherit;
}

.balance-rgb-digit {
  display: inline-block;
  font-weight: inherit;
  letter-spacing: inherit;
  animation: balanceRgbGlow 2.6s ease-in-out infinite;
}

.balance-rgb-digit--0 {
  color: hsl(358, 95%, 68%);
  text-shadow: 0 0 14px hsla(358, 100%, 55%, 0.55);
  animation-delay: 0s;
}

.balance-rgb-digit--1 {
  color: hsl(32, 95%, 62%);
  text-shadow: 0 0 14px hsla(32, 100%, 52%, 0.5);
  animation-delay: 0.1s;
}

.balance-rgb-digit--2 {
  color: hsl(72, 90%, 58%);
  text-shadow: 0 0 14px hsla(72, 100%, 45%, 0.5);
  animation-delay: 0.2s;
}

.balance-rgb-digit--3 {
  color: hsl(112, 88%, 58%);
  text-shadow: 0 0 14px hsla(112, 100%, 42%, 0.52);
  animation-delay: 0.3s;
}

.balance-rgb-digit--4 {
  color: hsl(152, 88%, 58%);
  text-shadow: 0 0 14px hsla(152, 100%, 42%, 0.48);
  animation-delay: 0.4s;
}

.balance-rgb-digit--5 {
  color: hsl(188, 92%, 62%);
  text-shadow: 0 0 14px hsla(188, 100%, 48%, 0.48);
  animation-delay: 0.05s;
}

.balance-rgb-digit--6 {
  color: hsl(228, 92%, 70%);
  text-shadow: 0 0 14px hsla(228, 100%, 58%, 0.5);
  animation-delay: 0.15s;
}

.balance-rgb-digit--7 {
  color: hsl(268, 88%, 72%);
  text-shadow: 0 0 14px hsla(268, 100%, 58%, 0.52);
  animation-delay: 0.25s;
}

.balance-rgb-digit--8 {
  color: hsl(308, 90%, 68%);
  text-shadow: 0 0 14px hsla(308, 100%, 55%, 0.5);
  animation-delay: 0.35s;
}

.balance-rgb-digit--9 {
  color: hsl(328, 92%, 68%);
  text-shadow: 0 0 14px hsla(328, 100%, 55%, 0.52);
  animation-delay: 0.45s;
}

@keyframes balanceRgbGlow {
  0%,
  100% {
    filter: brightness(1) saturate(1);
  }

  50% {
    filter: brightness(1.22) saturate(1.35);
  }
}

.wallet-big .balance-rgb-sep,
.wallet-big .balance-rgb--plain {
  color: rgba(0, 255, 157, 0.48);
  text-shadow: 0 0 8px rgba(0, 255, 157, 0.22);
  font-weight: 600;
}

.auth-balance-value .balance-rgb-sep {
  color: rgba(0, 255, 157, 0.52);
  text-shadow: 0 0 6px rgba(0, 255, 157, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .balance-rgb-digit {
    animation: none !important;
  }
}

.wallet-id-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

@media (max-width: 360px) {
  .wallet-id-row {
    grid-template-columns: 1fr;
  }

  button.secondary.wallet-id-copy {
    width: 100%;
    min-height: 44px;
  }
}

button.secondary.wallet-id-copy {
  margin-top: 0;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
  padding-left: 14px;
  padding-right: 14px;
}

.wallet-id-code {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--dn-bg);
  border: 1px dashed var(--dn-border);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.08em;
  color: var(--dn-text);
  min-width: 0;
  word-break: break-all;
}

.wallet-hint {
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 10px 0 0;
  color: var(--dn-muted);
}

.wallet-pay-intro {
  margin: 14px 0 8px;
  font-size: 0.82rem;
}

.wallet-pay-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wallet-pay-tab {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--dn-border);
  background: var(--dn-bg);
  color: var(--dn-muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color 0.2s var(--ease-out), color 0.2s, background 0.2s;
}

.wallet-pay-tab__icon {
  font-size: 0.95rem;
  opacity: 0.85;
}

.wallet-pay-tab:hover {
  color: var(--dn-text);
  border-color: var(--dn-accent-dim);
}

.wallet-pay-tab--active {
  color: var(--dn-accent);
  border-color: var(--dn-accent-dim);
  background: rgba(0, 255, 157, 0.06);
  box-shadow: 0 0 0 1px var(--dn-glow);
}

.wallet-pay-tab--locked,
.wallet-pay-tab:disabled {
  opacity: 0.42;
  color: var(--dn-muted);
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  cursor: not-allowed;
  box-shadow: none;
}

.wallet-pay-tab--locked:hover,
.wallet-pay-tab:disabled:hover {
  color: var(--dn-muted);
  border-color: rgba(255, 255, 255, 0.06);
}

.wallet-pay-tab__lock {
  flex-shrink: 0;
  margin-left: 3px;
  opacity: 0.75;
}

.wallet-pay-pane {
  padding-top: 2px;
}

.wallet-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.wallet-pane-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dn-text);
}

.wallet-rate-info {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--dn-border);
  background: var(--dn-surface);
  color: var(--dn-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.wallet-rate-info:hover {
  color: var(--dn-accent);
  border-color: var(--dn-accent-dim);
}

.wallet-soon-msg {
  margin: 12px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wallet-topup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
}

.agg-methods {
  margin-top: 10px;
  margin-bottom: 4px;
}

.wallet-topup-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--dn-border);
  background: var(--dn-bg);
  color: var(--dn-text);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.wallet-topup-input:focus {
  outline: none;
  border-color: var(--dn-accent-dim);
  box-shadow: 0 0 0 2px var(--dn-glow);
}

.wallet-topup-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding-left: 16px;
  padding-right: 16px;
  white-space: nowrap;
}

@media (max-width: 360px) {
  .wallet-topup-row {
    flex-direction: column;
  }

  .wallet-topup-btn {
    width: 100%;
  }
}

.auth-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--section-radius);
  background: var(--dn-card);
  border: 1px solid var(--dn-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  transition: border-color 0.35s, box-shadow 0.35s;
}

.auth-card--balance-loading .auth-balance-value {
  opacity: 0.4;
}

.auth-card--guest {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  gap: 12px;
}

.auth-avatar {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--dn-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dn-bg);
  background: linear-gradient(135deg, var(--dn-accent-dim), var(--dn-accent));
  border: 1px solid var(--dn-border);
  box-shadow: 0 0 16px var(--dn-glow);
}

.auth-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

.auth-info {
  flex: 1;
  min-width: 0;
}

.auth-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.auth-name {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.auth-balance-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: -2px;
}

.auth-balance-refresh {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--dn-border);
  border-radius: 8px;
  background: rgba(0, 255, 157, 0.06);
  color: var(--dn-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.35s var(--ease-out);
}

.auth-balance-refresh:hover {
  background: rgba(0, 255, 157, 0.11);
}

.auth-balance-refresh:active {
  transform: rotate(180deg);
}

.auth-balance-refresh-svg {
  display: block;
}

.auth-balance-value {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--dn-accent);
  text-shadow: 0 0 12px var(--dn-glow);
  max-width: 120px;
  text-align: right;
  white-space: nowrap;
  transition: opacity 0.3s;
}

.auth-username {
  font-size: 0.82rem;
  color: var(--dn-muted);
  margin-top: 4px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dn-accent);
}

.auth-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.auth-logout-btn {
  margin: 0;
  padding: 4px 12px;
  font-size: 0.72rem;
  min-height: 28px;
  border-radius: 8px;
  line-height: 1.2;
}

.pwd-field {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-top: 4px;
}

.pwd-field input {
  flex: 1;
  padding-right: 44px;
}

.pwd-field__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--dn-border);
  border-radius: 8px;
  background: rgba(0, 255, 157, 0.06);
  color: var(--dn-accent);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  touch-action: manipulation;
}

.pwd-field__toggle:hover {
  background: rgba(0, 255, 157, 0.12);
}

.auth-id-matrix {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 255, 157, 0.2);
  box-shadow:
    inset 0 0 24px rgba(0, 255, 140, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  position: relative;
  overflow: hidden;
}

.auth-id-matrix::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 157, 0.03) 2px,
    rgba(0, 255, 157, 0.03) 3px
  );
  pointer-events: none;
  opacity: 0.7;
}

.auth-id-matrix__prefix {
  font-family: "Share Tech Mono", var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(0, 255, 157, 0.75);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.auth-id-matrix__glyphs {
  font-family: "Share Tech Mono", var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #7fffce;
  text-shadow:
    0 0 8px rgba(0, 255, 157, 0.65),
    0 0 20px rgba(0, 255, 140, 0.25);
  flex: 1;
  min-width: 0;
  word-break: break-all;
  line-height: 1.35;
  position: relative;
  z-index: 1;
}

.auth-id-matrix--pending .auth-id-matrix__glyphs {
  letter-spacing: 0.35em;
  opacity: 0.45;
  animation: matrixPulse 1.4s ease-in-out infinite;
}

.auth-matrix-rune {
  display: inline-block;
  animation: matrixRune 3.2s ease-in-out infinite;
}

.auth-id-matrix__copy {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 157, 0.35);
  background: rgba(0, 255, 157, 0.08);
  color: var(--dn-accent);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  position: relative;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s;
}

.auth-id-matrix__copy:hover {
  background: rgba(0, 255, 157, 0.15);
}

@keyframes matrixPulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.65;
  }
}

@keyframes matrixRune {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.82;
    filter: brightness(1.15);
  }
}

.inbox-panel {
  position: fixed;
  inset: 0;
  z-index: 9100;
  pointer-events: none;
}

.inbox-panel:not([hidden]) {
  pointer-events: auto;
}

.inbox-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
}

.inbox-panel:not([hidden]) .inbox-panel__backdrop {
  opacity: 1;
}

.inbox-panel__sheet {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 380px);
  height: 100%;
  max-height: 100%;
  background: var(--dn-bg2);
  border-left: 1px solid var(--dn-border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
}

.inbox-panel:not([hidden]) .inbox-panel__sheet {
  transform: translateX(0);
}

.inbox-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 14px 12px;
  border-bottom: 1px solid var(--dn-border);
}

.inbox-panel__h {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  flex: 1;
  min-width: 0;
}

.inbox-panel__head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.inbox-panel__sort {
  width: 28px;
  height: 28px;
  border: 1px solid var(--dn-border);
  border-radius: 8px;
  background: transparent;
  color: var(--dn-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inbox-panel__sort:hover {
  color: var(--dn-accent);
  border-color: var(--dn-accent);
}

.inbox-panel__x {
  width: 36px;
  height: 28px;
  border: 1px solid var(--dn-border);
  border-radius: 8px;
  background: transparent;
  color: var(--dn-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.inbox-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--dn-border);
}

.inbox-tab {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: transparent;
  color: var(--dn-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.inbox-tab.active {
  color: var(--dn-accent);
  border-bottom-color: var(--dn-accent);
}

.inbox-pane {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.inbox-pane::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.inbox-item {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid var(--dn-border);
  background: var(--dn-card);
  font-size: 0.8rem;
  line-height: 1.45;
}

.inbox-item__label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dn-muted);
  margin-bottom: 6px;
}

.inbox-news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.inbox-news-meta .inbox-item__label {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.inbox-news-date {
  font-size: 0.68rem;
  white-space: nowrap;
}

.inbox-news-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53935;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(229, 57, 53, 0.25);
}

.inbox-news-unread-dot--off {
  visibility: hidden;
  pointer-events: none;
}

.admin-news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.admin-news-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--dn-border);
  font-size: 0.75rem;
}

.auth-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dn-accent);
  box-shadow: 0 0 8px var(--dn-accent);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.scroll-area {
  flex: 1;
  min-height: 0;
  padding: 12px 14px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background-color: var(--dn-bg);
  background-image: linear-gradient(
    180deg,
    rgba(12, 20, 16, 0.98) 0%,
    var(--dn-bg) 28%,
    #070a09 100%
  );
  border-top: 1px solid var(--dn-border);
  box-shadow: inset 0 1px 0 rgba(0, 255, 157, 0.05);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-area::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body.darknet .scroll-area {
  background-color: #050807 !important;
}

.panel {
  display: none;
  opacity: 0;
  transform: translateY(10px) scale(0.99);
  filter: blur(4px);
}

.panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  animation: panelReveal 0.5s var(--ease-out) forwards;
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.section {
  margin-bottom: 18px;
}

.section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--dn-muted);
  margin: 0 0 10px 4px;
}

.card {
  background: var(--dn-card);
  border-radius: var(--section-radius);
  padding: 16px;
  border: 1px solid var(--dn-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.35s var(--ease-smooth), box-shadow 0.35s;
}

.card:hover {
  border-color: rgba(0, 255, 157, 0.22);
}

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

.stat {
  padding: 12px;
  border-radius: 10px;
  background: var(--dn-bg);
  border: 1px solid rgba(0, 255, 157, 0.08);
  transition: border-color 0.3s;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--dn-muted);
  margin-bottom: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-value {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dn-text);
}

.muted {
  color: var(--dn-muted);
  font-size: 0.86rem;
}

.row {
  margin: 10px 0;
}

label {
  display: block;
  font-size: 0.78rem;
  color: var(--dn-muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

button.primary {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #00cc7a 0%, var(--dn-accent-dim) 100%);
  color: #021208;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 255, 140, 0.2);
  transition: transform 0.25s var(--ease-out), box-shadow 0.35s, opacity 0.2s;
}

button.primary:hover {
  box-shadow: 0 0 28px rgba(0, 255, 140, 0.35);
}

button.primary:active {
  transform: scale(0.985);
  opacity: 0.95;
}

button.primary:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 0 12px rgba(0, 255, 140, 0.08);
}

button.secondary {
  width: 100%;
  margin-top: 0px;
  padding: 12px 16px;
  border-radius: 10px;
  background: transparent;
  color: var(--dn-text);
  cursor: pointer;
  border: 1px solid var(--dn-border);
  font-weight: 500;
  font-size: 0.86rem;
  font-family: var(--font-mono);
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

button.secondary:hover {
  background: rgba(0, 255, 157, 0.06);
  border-color: rgba(0, 255, 157, 0.28);
}

button.secondary:active {
  transform: scale(0.99);
}

button.secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

button.link-tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #00cc7a, var(--dn-accent-dim));
  color: #021208;
  font-weight: 700;
  text-decoration: none;
  border: none;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: box-shadow 0.35s, transform 0.2s;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--dn-border);
  background: var(--dn-bg);
  color: var(--dn-text);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(0, 255, 157, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 255, 157, 0.12);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
}

.checkbox-row input {
  width: auto;
  accent-color: var(--dn-accent);
}

.error {
  color: var(--dn-danger);
  margin-top: 10px;
  font-size: 0.84rem;
  text-shadow: 0 0 12px rgba(255, 80, 80, 0.3);
}

.success {
  color: var(--dn-accent);
  margin-top: 10px;
  white-space: pre-wrap;
  font-size: 0.86rem;
}

.app-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 9200;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(10, 16, 13, 0.92);
  border: 1px solid rgba(0, 255, 157, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  color: var(--dn-text);
  font-size: 0.86rem;
  line-height: 1.35;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-smooth), transform 0.22s var(--ease-smooth);
}

.app-toast:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}

code.key-block {
  display: block;
  padding: 12px;
  border-radius: 10px;
  background: var(--dn-bg);
  word-break: break-all;
  font-size: 0.78rem;
  margin-top: 8px;
  border: 1px solid var(--dn-border);
  color: var(--dn-accent);
  font-family: var(--font-mono);
}

.key-with-copy .secondary {
  margin-top: 10px;
}

.shop-activated-head {
  font-weight: 600;
  margin: 0;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 8px 4px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(5, 8, 7, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--dn-border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.nav-item {
  flex: 1;
  min-width: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--dn-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.35s var(--ease-smooth), transform 0.3s;
  line-height: 1.2;
  text-align: center;
}

.nav-label {
  font-size: 0.52rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 0.35s var(--ease-out);
}

.nav-item.active {
  color: var(--dn-accent);
  text-shadow: 0 0 10px rgba(0, 255, 157, 0.35);
}

.nav-item.active .nav-label {
  transform: translateY(-1px);
}

.hr-soft {
  border: none;
  height: 1px;
  margin: 16px 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 157, 0.2),
    transparent
  );
}

.license-box {
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--dn-muted);
}

.wallet-rate-modal__text {
  margin: 0 0 14px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.wallet-rate-modal__actions {
  margin-top: 4px;
  justify-content: stretch;
}

.wallet-rate-modal__actions .primary {
  flex: 1 1 100%;
  min-width: 0;
}

.key-qr-modal__image {
  display: block;
  width: min(280px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  margin: 4px auto 14px;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #fff;
}

.login-gate {
  z-index: 9600;
}

.login-gate__panel {
  max-height: min(92vh, 720px);
}

.login-auth-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}

.login-auth-tab {
  flex: 1;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--dn-muted, rgba(255, 255, 255, 0.65));
  cursor: pointer;
}

.login-auth-tab.active {
  border-color: rgba(0, 255, 136, 0.45);
  color: var(--dn-accent, #00ff88);
  background: rgba(0, 255, 136, 0.08);
}

.login-auth-pane label {
  display: block;
  font-size: 0.75rem;
  color: var(--dn-muted, rgba(255, 255, 255, 0.6));
  margin-bottom: 4px;
}

.login-auth-pane input[type="email"],
.login-auth-pane input[type="password"],
.login-auth-pane input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.login-email-modes {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.login-email-modes .secondary {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.78rem;
}

.login-email-modes .secondary.active {
  border-color: rgba(0, 255, 136, 0.45);
  color: var(--dn-accent, #00ff88);
}

.app-shell--locked {
  pointer-events: none;
  user-select: none;
  filter: blur(2px);
}

#login-pane-email[data-email-mode="register"] #login-use-code-row {
  display: none !important;
}

.login-email-actions {
  flex-direction: column;
  gap: 8px;
}

.login-email-actions .primary,
.login-email-actions .secondary {
  width: 100%;
}

.tg-login-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tg-login-methods .primary,
.tg-login-methods .secondary {
  width: 100%;
}

.tg-login-methods__or {
  text-align: center;
  margin: 2px 0;
  font-size: 0.78rem;
}

.pwd-strength {
  margin-top: 8px;
}

.pwd-strength__track {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pwd-strength__bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.35s var(--ease-smooth), background 0.35s ease;
  background: rgba(255, 80, 80, 0.85);
}

.pwd-strength__bar--weak {
  width: 25%;
  background: #ff5c5c;
}

.pwd-strength__bar--fair {
  width: 50%;
  background: #ffb020;
}

.pwd-strength__bar--good {
  width: 75%;
  background: #6ee7b7;
}

.pwd-strength__bar--strong {
  width: 100%;
  background: linear-gradient(90deg, #00ff88, #00c8ff);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.45);
}

.pwd-strength__label {
  margin: 6px 0 0;
  font-size: 0.72rem;
  min-height: 1.1em;
}

.event-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.event-play-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.tg-pill--clickable {
  cursor: pointer;
  user-select: none;
}

.auth-card--profile-loading .auth-balance-value {
  opacity: 0.45;
}

.license-gate {
  position: fixed;
  inset: 0;
  z-index: 9400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.license-gate[hidden] {
  display: none !important;
}

.license-gate.wallet-rate-modal {
  z-index: 9500;
  transition: opacity 0.34s var(--ease-out), visibility 0.34s linear;
}

.license-gate.wallet-rate-modal:not(.wallet-rate-modal--open) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.license-gate.wallet-rate-modal.wallet-rate-modal--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.license-gate.wallet-rate-modal .wallet-rate-modal__panel {
  max-height: none;
  transition: transform 0.4s var(--ease-smooth), opacity 0.34s var(--ease-out);
  transform: translateY(22px) scale(0.92);
  opacity: 0;
}

.license-gate.wallet-rate-modal.wallet-rate-modal--open .wallet-rate-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  transition-delay: 0.04s;
}

@media (prefers-reduced-motion: reduce) {
  .license-gate.wallet-rate-modal,
  .license-gate.wallet-rate-modal .wallet-rate-modal__panel {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .license-gate.wallet-rate-modal:not(.wallet-rate-modal--open) .wallet-rate-modal__panel {
    transform: none;
  }

  .license-gate.wallet-rate-modal.wallet-rate-modal--open .wallet-rate-modal__panel {
    transform: none;
  }
}

.license-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
}

.license-gate__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--dn-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  padding: 18px 18px 16px;
}

.license-gate__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.license-gate__lead {
  margin: 0 0 12px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.license-gate__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

.license-doc {
  padding: 12px 14px;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--dn-muted);
}

.license-doc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: lic;
}

.license-doc__item {
  margin: 0 0 1em;
  padding: 0;
}

.license-doc__item:last-child {
  margin-bottom: 0;
}

.license-doc__num {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin-right: 0.2em;
}

.license-doc__body {
  display: inline;
}

.license-doc__sublist {
  margin: 0.55em 0 0;
  padding: 0 0 0 1.2em;
  list-style: disc;
}

.license-doc__sublist li {
  margin: 0.32em 0;
}

.license-doc__plain {
  margin: 0;
  white-space: pre-wrap;
}

.license-gate__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.license-gate__actions .primary,
.license-gate__actions .secondary {
  flex: 1;
  min-width: 120px;
}

.license-gate__actions--doc #btn-license-doc-close:not([hidden]) {
  flex: 1 1 100%;
  margin-top: 4px;
}

.dice-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 16px 0;
  font-size: 2rem;
}

.shop-promo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.shop-promo-row input {
  flex: 1;
  min-width: 100px;
}

.dice-tickets-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 12px;
}

.dice-tickets-bar__stat {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--dn-bg);
  border: 1px solid rgba(0, 255, 157, 0.08);
  transition: border-color 0.3s;
}

.dice-tickets-bar__caption {
  display: block;
  font-size: 0.65rem;
  color: var(--dn-muted);
  margin-bottom: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.dice-tickets-bar__value {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  color: var(--dn-text);
  line-height: 1.2;
}

.dice-info-btn {
  flex-shrink: 0;
  width: 48px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--dn-border);
  background: transparent;
  color: var(--dn-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  transition: background 0.3s, border-color 0.3s, transform 0.2s, color 0.2s;
}

.dice-info-btn__glyph {
  font-style: italic;
  opacity: 0.95;
}

.dice-info-btn:hover {
  background: rgba(0, 255, 157, 0.06);
  border-color: rgba(0, 255, 157, 0.28);
  color: var(--dn-text);
}

.dice-info-btn:active {
  transform: scale(0.98);
}

.ops-progress {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ops-progress__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00cc7a, #36ffa0);
  transition: width 0.45s ease;
  box-shadow: 0 0 14px rgba(0, 255, 140, 0.35);
}

.ops-progress--glow {
  box-shadow: inset 0 0 0 1px rgba(0, 255, 157, 0.14);
  background: linear-gradient(180deg, rgba(0, 255, 157, 0.12), rgba(255, 255, 255, 0.06));
}

.ops-progress__bar--anim {
  position: relative;
  background: linear-gradient(90deg, #00cc7a, #36ffa0, #8affd1, #36ffa0, #00cc7a);
  background-size: 220% 100%;
  animation: opsShimmer 2.2s linear infinite;
}

.ops-progress__bar--anim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18) 0,
    rgba(255, 255, 255, 0.18) 8px,
    rgba(255, 255, 255, 0.04) 8px,
    rgba(255, 255, 255, 0.04) 16px
  );
  opacity: 0.35;
  mix-blend-mode: overlay;
  animation: opsStripes 1.6s linear infinite;
}

@keyframes opsShimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 220% 50%;
  }
}

@keyframes opsStripes {
  0% {
    transform: translateX(-24px);
  }
  100% {
    transform: translateX(24px);
  }
}

#btn-download-apk {
  width: 100%;
  text-align: center;
  font-weight: 700;
  border: 1px solid rgba(0, 255, 157, 0.35);
  background: linear-gradient(180deg, rgba(0, 255, 157, 0.18), rgba(0, 255, 157, 0.08));
}

.ref-info-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
}

.ref-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: nowrap;
}

.ref-copy-btn {
  width: auto !important;
  margin-top: 0 !important;
  padding: 10px 12px !important;
  font-size: 0.8rem !important;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.dice-info-modal__scroll {
  padding: 10px 12px;
  max-height: min(52vh, 380px);
}

.dice-info-modal__h {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dn-text);
}

.dice-info-modal__h:not(:first-child) {
  margin-top: 14px;
}

.dice-arena {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 5vw, 36px);
  margin: 20px 0 22px;
  perspective: 900px;
  perspective-origin: 50% 40%;
  --dice-lunge: min(40px, 11vw);
  --dice-pip: #1c1510;
  --dice-face: #f3ead8;
  --dice-face-shade: #d8cbb5;
  --dice-rim: #6b5344;
}

.dice-tickets-bar + .dice-arena {
  margin-top: 14px;
}

.dice-arena.dice-arena--matrix {
  position: relative;
  isolation: isolate;
  --dice-pip: #00ff41;
  --dice-face: #030806;
  --dice-face-shade: #010402;
  --dice-rim: rgba(0, 255, 65, 0.55);
  padding: 20px 16px 24px;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 65, 0.28);
  background: linear-gradient(180deg, rgba(0, 36, 14, 0.94) 0%, rgba(0, 6, 3, 0.99) 100%);
  box-shadow:
    0 0 48px rgba(0, 255, 65, 0.1),
    inset 0 0 72px rgba(0, 255, 65, 0.04);
  overflow: hidden;
}

.dice-arena.dice-arena--matrix::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 255, 65, 0.04) 3px,
    rgba(0, 255, 65, 0.04) 5px
  );
  pointer-events: none;
  z-index: 0;
  animation: matrix-dice-scan 3.5s linear infinite;
}

@keyframes matrix-dice-scan {
  0% {
    opacity: 0.4;
    transform: translateY(0);
  }
  100% {
    opacity: 0.55;
    transform: translateY(10px);
  }
}

.dice-arena.dice-arena--matrix .dice-pedestal {
  position: relative;
  z-index: 1;
}

.dice-arena.dice-arena--matrix .dice-pedestal__label {
  font-family: "Share Tech Mono", ui-monospace, monospace;
  color: #3f6;
  text-shadow: 0 0 14px rgba(0, 255, 65, 0.5);
  letter-spacing: 0.16em;
}

.dice-arena.dice-arena--matrix .dice-cube {
  filter: drop-shadow(0 0 14px rgba(0, 255, 65, 0.35));
}

.dice-arena.dice-arena--matrix .dice-cube__inner {
  background: linear-gradient(145deg, #071a0c 0%, #020804 45%, #010302 100%);
  border: 2px solid rgba(0, 255, 65, 0.5);
  box-shadow:
    0 0 0 1px rgba(0, 255, 65, 0.15),
    0 0 22px rgba(0, 255, 65, 0.18),
    inset 0 0 28px rgba(0, 255, 65, 0.07),
    inset 0 1px 0 rgba(0, 255, 80, 0.12);
}

.dice-arena.dice-arena--matrix .dice-pip {
  background: #00ff41;
  box-shadow:
    0 0 8px rgba(0, 255, 65, 0.95),
    0 0 18px rgba(0, 255, 65, 0.4);
}

.dice-arena.dice-arena--matrix .dice-cube--waiting {
  filter: grayscale(0.15) brightness(0.75);
  opacity: 0.5;
}

.dice-arena.dice-arena--matrix .dice-cube--waiting .dice-cube__inner {
  border-color: rgba(0, 255, 65, 0.22);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.dice-arena.dice-arena--matrix .dice-cube--rolling .dice-cube__inner {
  border-color: #00ff66;
  box-shadow:
    0 0 32px rgba(0, 255, 65, 0.55),
    0 12px 28px rgba(0, 0, 0, 0.55),
    inset 0 0 20px rgba(0, 255, 65, 0.12);
}

.dice-pedestal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dice-pedestal__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dn-muted);
}

.dice-pedestal__cube-slot {
  position: relative;
  z-index: 0;
  transform-origin: 50% 60%;
}

.dice-pedestal__cube-slot--attacker {
  z-index: 4;
}

.dice-cube {
  width: clamp(72px, 22vw, 104px);
  height: clamp(72px, 22vw, 104px);
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease-out);
  transform: rotateX(-14deg) rotateY(18deg);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55));
}

.dice-cube__inner {
  width: 100%;
  height: 100%;
  border-radius: 18%;
  background: linear-gradient(145deg, #fff9ef 0%, var(--dice-face) 35%, var(--dice-face-shade) 100%);
  border: 2px solid var(--dice-rim);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 -2px 4px rgba(0, 0, 0, 0.12) inset,
    0 12px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 55%;
  position: relative;
  overflow: visible;
}

.dice-face {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 62%;
  height: 62%;
  gap: 12%;
  padding: 2%;
  box-sizing: border-box;
}

.dice-pip {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--dice-pip);
  opacity: 0;
  transform: scale(0.85);
  box-shadow: 0 1px 1px rgba(255, 255, 255, 0.35) inset;
}

.dice-cube[data-value="1"] .dice-pip:nth-child(5),
.dice-cube[data-value="2"] .dice-pip:nth-child(1),
.dice-cube[data-value="2"] .dice-pip:nth-child(9),
.dice-cube[data-value="3"] .dice-pip:nth-child(1),
.dice-cube[data-value="3"] .dice-pip:nth-child(5),
.dice-cube[data-value="3"] .dice-pip:nth-child(9),
.dice-cube[data-value="4"] .dice-pip:nth-child(1),
.dice-cube[data-value="4"] .dice-pip:nth-child(3),
.dice-cube[data-value="4"] .dice-pip:nth-child(7),
.dice-cube[data-value="4"] .dice-pip:nth-child(9),
.dice-cube[data-value="5"] .dice-pip:nth-child(1),
.dice-cube[data-value="5"] .dice-pip:nth-child(3),
.dice-cube[data-value="5"] .dice-pip:nth-child(5),
.dice-cube[data-value="5"] .dice-pip:nth-child(7),
.dice-cube[data-value="5"] .dice-pip:nth-child(9),
.dice-cube[data-value="6"] .dice-pip:nth-child(1),
.dice-cube[data-value="6"] .dice-pip:nth-child(3),
.dice-cube[data-value="6"] .dice-pip:nth-child(4),
.dice-cube[data-value="6"] .dice-pip:nth-child(6),
.dice-cube[data-value="6"] .dice-pip:nth-child(7),
.dice-cube[data-value="6"] .dice-pip:nth-child(9) {
  opacity: 1;
}

.dice-cube--waiting {
  opacity: 0.42;
  filter: grayscale(0.25) brightness(0.94);
  transform: rotateX(-8deg) rotateY(10deg) scale(0.96);
  transition:
    opacity 0.35s var(--ease-out),
    filter 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}

.dice-cube--waiting .dice-cube__inner {
  border-color: rgba(107, 83, 68, 0.45);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.dice-pedestal__cube-slot--lunge-right {
  animation: dice-slot-lunge-right 0.58s var(--ease-out) 1;
}

.dice-pedestal__cube-slot--lunge-left {
  animation: dice-slot-lunge-left 0.58s var(--ease-out) 1;
}

.dice-pedestal__cube-slot--hit-from-left {
  animation: dice-slot-hit-from-left 0.58s var(--ease-out) 1;
}

.dice-pedestal__cube-slot--hit-from-right {
  animation: dice-slot-hit-from-right 0.58s var(--ease-out) 1;
}

@keyframes dice-slot-lunge-right {
  0%,
  100% {
    transform: translateX(0);
  }
  42% {
    transform: translateX(var(--dice-lunge));
  }
}

@keyframes dice-slot-lunge-left {
  0%,
  100% {
    transform: translateX(0);
  }
  42% {
    transform: translateX(calc(-1 * var(--dice-lunge)));
  }
}

@keyframes dice-slot-hit-from-left {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  28% {
    transform: translateX(calc(var(--dice-lunge) * 0.72)) rotate(11deg);
  }
  48% {
    transform: translateX(-4px) rotate(-3deg);
  }
}

@keyframes dice-slot-hit-from-right {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  28% {
    transform: translateX(calc(-1 * var(--dice-lunge) * 0.72)) rotate(-11deg);
  }
  48% {
    transform: translateX(4px) rotate(3deg);
  }
}

.dice-cube--rolling .dice-cube__inner {
  animation: dice-roll-wobble 0.11s ease-in-out infinite;
  border-color: #8b6914;
  box-shadow:
    0 0 20px rgba(255, 200, 80, 0.25),
    0 12px 28px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.dice-cube--rolling {
  animation: dice-float 0.45s ease-in-out infinite;
}

.dice-cube--pop .dice-cube__inner {
  animation: dice-land-pop 0.55s var(--ease-out) 1;
}

@keyframes dice-roll-wobble {
  0% {
    transform: rotate3d(1, 1, 0, 0deg) translateY(0);
  }
  33% {
    transform: rotate3d(1, 0.6, 0.2, 118deg) translateY(-6px);
  }
  66% {
    transform: rotate3d(0.4, 1, 0.3, -96deg) translateY(2px);
  }
  100% {
    transform: rotate3d(0.9, 0.9, 0.1, 72deg) translateY(0);
  }
}

@keyframes dice-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes dice-land-pop {
  0% {
    transform: scale(1.12) rotate3d(0.2, 1, 0, 12deg);
  }
  60% {
    transform: scale(0.96) rotate3d(0, 0, 0, 0deg);
  }
  100% {
    transform: scale(1) rotate3d(0, 0, 0, 0deg);
  }
}

.btn-admin-edit {
  font-size: 0.65rem !important;
  padding: 4px 8px !important;
  white-space: nowrap;
}


@supports (view-transition-name: none) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.4s;
    animation-timing-function: var(--ease-out);
  }
}

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

body.is-admin .nav-item--admin {
  display: flex;
}

#panel-admin[hidden] {
  display: none !important;
}

.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-terminal code {
  font-size: 0.72rem;
  color: var(--dn-accent);
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-table-wrap {
  font-size: 0.72rem;
  line-height: 1.4;
  max-height: 240px;
  overflow: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--dn-border);
  vertical-align: top;
}

.admin-table th {
  color: var(--dn-muted);
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-table tr:hover td {
  background: rgba(0, 255, 157, 0.04);
}

.admin-msg-preview {
  max-width: 160px;
  word-break: break-word;
}

.admin-reply-panel {
  margin-top: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--dn-border);
}

.admin-reply-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 88px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--dn-fg);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--dn-border);
  border-radius: 8px;
  resize: vertical;
}

@media (prefers-reduced-motion: reduce) {
  body.darknet::after {
    animation: none;
  }

  .boot-loader__fill {
    animation: none;
    width: 100%;
  }

  .panel.active {
    animation: none;
  }

  .dice-cube--rolling,
  .dice-cube--rolling .dice-cube__inner,
  .dice-cube--pop .dice-cube__inner {
    animation: none !important;
  }

  .dice-pedestal__cube-slot--lunge-right,
  .dice-pedestal__cube-slot--lunge-left,
  .dice-pedestal__cube-slot--hit-from-left,
  .dice-pedestal__cube-slot--hit-from-right {
    animation: none !important;
  }

  .dice-arena.dice-arena--matrix::before {
    animation: none !important;
  }

  .auth-matrix-rune {
    animation: none !important;
  }

  .auth-id-matrix--pending .auth-id-matrix__glyphs {
    animation: none !important;
  }

  .header-bell--nudge {
    animation: none !important;
  }

  button.primary,
  button.secondary {
    transition: none;
  }
}

.legal-docs-card .legal-docs-lead {
  margin: 0 0 14px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.legal-docs-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.legal-docs-links a {
  color: rgba(130, 255, 175, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-docs-links a:hover,
.legal-docs-links a:focus-visible {
  color: #b8ffd0;
  outline: none;
}

.license-gate__pdfs {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 65, 0.2);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.8rem;
  line-height: 1.5;
}

.license-gate__pdfs-title {
  margin: 0 0 8px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

.license-gate__pdfs-row {
  margin: 0 0 4px;
}

.license-gate__pdfs-row:last-child {
  margin-bottom: 0;
}

.license-gate__pdfs a {
  color: rgba(130, 255, 175, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.license-gate__pdfs a:hover,
.license-gate__pdfs a:focus-visible {
  color: #b8ffd0;
  outline: none;
}

.legal-docs-summary-btn {
  width: 100%;
  margin-bottom: 10px;
}

.legal-docs-footnote {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
}

.snake-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  isolation: isolate;
}

.snake-overlay[hidden] {
  display: none !important;
}

.snake-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.snake-panel {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  max-height: min(92vh, 640px);
  overflow: auto;
  padding: 18px 16px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 65, 0.25);
  background: linear-gradient(180deg, rgba(0, 28, 12, 0.97) 0%, rgba(0, 6, 3, 0.99) 100%);
  box-shadow: 0 0 40px rgba(0, 255, 65, 0.12);
}

.snake-panel--mini {
  width: min(300px, 100%);
  padding: 12px 12px 14px;
  border-radius: 14px;
}

.snake-panel__chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  position: relative;
  padding-right: 76px;
}

.snake-panel__dots {
  position: relative;
  width: 44px;
  height: 10px;
  flex-shrink: 0;
}

.snake-panel__dots::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
}

.snake-panel__titlebar {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(200, 255, 210, 0.9);
  flex: 1;
  min-width: 0;
}

.snake-panel__chrome-actions {
  position: absolute;
  top: -2px;
  right: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: end;
  gap: 6px;
  min-width: 76px;
}


.snake-panel__chrome-actions .inbox-panel__x,
.snake-panel__chrome-actions .inbox-panel__sort {
  margin: 0;
}

.snake-mini-window {
  width: 240px;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 8px;
  border-radius: 10px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 255, 65, 0.22);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4) inset,
    0 6px 24px rgba(0, 0, 0, 0.35);
}

.snake-canvas {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 65, 0.18);
  background: #020805;
  touch-action: none;
}

.snake-dpad {
  display: grid;
  grid-template-columns: 52px 52px 52px;
  grid-template-rows: 48px 48px 48px;
  gap: 6px;
  justify-content: center;
  margin: 0 auto 12px;
  grid-template-areas:
    ". up ."
    "left play right"
    ". down .";
}

.snake-dpad__up {
  grid-area: up;
}

.snake-dpad__left {
  grid-area: left;
}

.snake-dpad__center {
  grid-area: play;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 48px;
}

.snake-dpad__right {
  grid-area: right;
}

.snake-dpad__down {
  grid-area: down;
}

.snake-btn-play {
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: inherit;
}

.snake-btn-play:active:not(:disabled) {
  transform: scale(0.98);
}

.snake-btn-play--off {
  visibility: hidden;
  pointer-events: none;
}

.snake-btn-play__icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent rgba(0, 255, 65, 0.92);
}

.snake-dpad .snake-dir {
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.snake-dpad .snake-dir:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.snake-status {
  min-height: 2.5em;
  margin: 0 0 12px;
  font-size: 0.82rem;
  text-align: center;
}

.snake-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.snake-actions .primary,
.snake-actions .secondary {
  flex: 1;
  min-width: 120px;
}

.snake-win-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.snake-win-layer[hidden] {
  display: none !important;
}

.snake-win-card {
  width: min(300px, 100%);
  padding: 22px 20px 18px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(0, 255, 65, 0.35);
  background: linear-gradient(165deg, rgba(0, 40, 18, 0.98) 0%, rgba(0, 8, 4, 0.99) 100%);
  box-shadow:
    0 0 48px rgba(0, 255, 65, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.55);
}

.snake-win-card__title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(200, 255, 215, 0.98);
  letter-spacing: 0.02em;
}

.snake-win-card__msg {
  margin: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  white-space: pre-line;
}

.snake-win-card__btn {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

.mines-overlay {
  position: fixed;
  inset: 0;
  z-index: 9562;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.mines-overlay[hidden] {
  display: none !important;
}

.mines-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mines-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 65, 0.22);
  background: linear-gradient(165deg, rgba(0, 40, 18, 0.98) 0%, rgba(0, 8, 4, 0.99) 100%);
  box-shadow:
    0 0 60px rgba(0, 255, 65, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.mines-panel--mini {
  width: min(520px, 100%);
}

.mines-panel__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(0, 255, 65, 0.12), rgba(255, 255, 255, 0.02));
}

.mines-panel__dots {
  width: 34px;
  height: 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.mines-panel__dots::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 2px 0 0 4px;
  border-radius: 999px;
  background: rgba(0, 255, 65, 0.38);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.32);
}

.mines-panel__titlebar {
  flex: 1 1 auto;
  text-align: center;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: rgba(200, 255, 215, 0.98);
}

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

.mines-panel__chrome-actions .inbox-panel__x,
.mines-panel__chrome-actions .inbox-panel__sort {
  width: 34px;
  height: 34px;
  padding: 0;
}

.mines-mini-window {
  padding: 12px;
}

.mines-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mines-flag-toggle {
  width: 44px;
  min-width: 44px;
  height: 38px;
  padding: 0;
  font-size: 1rem;
}

.mines-flag-toggle[aria-pressed="true"] {
  border-color: rgba(255, 225, 0, 0.35);
  background: rgba(255, 225, 0, 0.08);
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  user-select: none;
}

.mines-cell {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 255, 235, 0.95);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.16s ease, border-color 0.16s ease;
}

.mines-cell:active {
  transform: scale(0.98);
}

.mines-cell--open {
  background: rgba(0, 255, 65, 0.06);
  border-color: rgba(0, 255, 65, 0.22);
}

.mines-cell--mine {
  background: rgba(229, 57, 53, 0.14);
  border-color: rgba(229, 57, 53, 0.35);
}

.mines-cell--flag {
  background: rgba(255, 225, 0, 0.08);
  border-color: rgba(255, 225, 0, 0.22);
}

.mines-win-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mines-win-layer[hidden] {
  display: none !important;
}

.mines-win-card {
  width: min(360px, 100%);
  padding: 18px 16px 14px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(0, 255, 65, 0.28);
  background: linear-gradient(165deg, rgba(0, 40, 18, 0.98) 0%, rgba(0, 8, 4, 0.99) 100%);
  box-shadow:
    0 0 48px rgba(0, 255, 65, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.55);
}

.mines-win-card__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: rgba(200, 255, 215, 0.98);
}

.mines-win-card__msg {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  white-space: pre-line;
}

.mines-win-card__btn {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

.dice-bonus-overlay {
  position: fixed;
  inset: 0;
  z-index: 9560;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.dice-bonus-overlay[hidden] {
  display: none !important;
}

.dice-bonus-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dice-bonus-overlay__sheet {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  padding: 20px 18px 18px;
  border-radius: 16px;
  background: var(--dn-card);
  border: 1px solid rgba(0, 255, 65, 0.22);
  box-shadow:
    0 0 60px rgba(0, 255, 65, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.65);
}

.dice-bonus-overlay__title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--dn-muted);
  text-align: center;
}

.dice-bonus-overlay__dice-wrap {
  margin: 8px auto 4px;
  max-width: 280px;
  transform: scale(0.88);
  transform-origin: center top;
}

.dice-bonus-overlay__days-caption {
  margin: 4px 0 2px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dn-muted);
  text-align: center;
  font-weight: 600;
}

.dice-bonus-overlay__num {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 12vw, 3.1rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1.05;
  color: var(--dn-accent);
  text-shadow: 0 0 28px rgba(0, 255, 157, 0.35);
  min-height: 1.15em;
}

.dice-bonus-overlay__num--final {
  animation: diceBonusNumLand 0.55s var(--ease-smooth) both;
}

@keyframes diceBonusNumLand {
  0% {
    transform: scale(0.92);
    filter: blur(2px);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
    filter: none;
  }
}

.dice-bonus-overlay__exp {
  margin: 0 0 14px;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.4;
}

.dice-bonus-overlay__sheet .primary {
  width: 100%;
  margin-top: 4px;
}

#btn-dice-reveal-bonus {
  margin-top: 12px;
}

#btn-casino-roll {
  margin-top: 4px;
}
