:root {
  --bg-base: #c8d2c9;
  --bg-strong: #bcc8be;
  --ink: #132034;
  --ink-soft: #4d5c72;
  --line: rgba(19, 32, 52, 0.18);
  --surface: rgba(232, 238, 233, 0.92);
  --surface-strong: #e1eae1;
  --primary: #0b8a74;
  --primary-strong: #066b59;
  --accent: #de7f2f;
  --danger: #b42318;
  --success: #0f7a4a;
  --pending: #9a5d1e;
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --shadow-card: 0 18px 40px rgba(14, 24, 39, 0.14);
  --shadow-soft: 0 10px 24px rgba(14, 24, 39, 0.1);
  --top-space: calc(54px + env(safe-area-inset-top, 0px));
  --bottom-space: calc(92px + env(safe-area-inset-bottom, 0px));
}

html[data-theme='dark'] {
  --bg-base: #0f1623;
  --bg-strong: #0a111b;
  --ink: #edf3ff;
  --ink-soft: #aeb8cc;
  --line: rgba(155, 174, 208, 0.24);
  --surface: rgba(20, 29, 43, 0.92);
  --surface-strong: rgba(16, 24, 36, 0.96);
  --primary: #19b79e;
  --primary-strong: #12927d;
  --accent: #f1a760;
  --danger: #ff736d;
  --success: #3dd094;
  --pending: #ffbe6e;
  --shadow-card: 0 22px 44px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 14px 26px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: Manrope, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(980px 560px at -12% -14%, rgba(11, 138, 116, 0.22), transparent 52%),
    radial-gradient(820px 520px at 112% 114%, rgba(222, 127, 47, 0.18), transparent 48%),
    linear-gradient(160deg, var(--bg-base) 0%, var(--bg-strong) 100%);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(23, 32, 51, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 32, 51, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent 72%);
}

body.app-boot-active {
  overflow: hidden;
}

.app-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(110% 95% at 0% 0%, rgba(11, 138, 116, 0.18), transparent 64%),
    radial-gradient(120% 100% at 100% 100%, rgba(222, 127, 47, 0.16), transparent 68%),
    rgba(240, 246, 241, 0.86);
  backdrop-filter: blur(12px);
}

.app-boot-card {
  width: min(460px, calc(100vw - 32px));
  border-radius: 24px;
  border: 1px solid rgba(23, 32, 51, 0.16);
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-strong) 100%);
  box-shadow: var(--shadow-card);
  padding: 20px 18px;
  text-align: center;
}

.app-boot-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 999px;
  border: 4px solid rgba(11, 138, 116, 0.26);
  border-top-color: var(--primary);
  animation: app-boot-spin 0.9s linear infinite;
}

.app-boot-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.app-boot-text {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.app-boot-meta {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--primary-strong);
  font-weight: 700;
}

html[data-theme='dark'] body {
  background:
    radial-gradient(980px 560px at -12% -14%, rgba(25, 183, 158, 0.2), transparent 52%),
    radial-gradient(820px 520px at 112% 114%, rgba(241, 167, 96, 0.12), transparent 48%),
    linear-gradient(160deg, var(--bg-base) 0%, var(--bg-strong) 100%);
}

html[data-theme='dark'] body::before {
  background:
    linear-gradient(to right, rgba(164, 182, 214, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(164, 182, 214, 0.06) 1px, transparent 1px);
}

html[data-theme='dark'] .app-boot-overlay {
  background:
    radial-gradient(110% 95% at 0% 0%, rgba(25, 183, 158, 0.18), transparent 64%),
    radial-gradient(120% 100% at 100% 100%, rgba(241, 167, 96, 0.12), transparent 68%),
    rgba(7, 12, 20, 0.84);
}

html[data-theme='dark'] .app-boot-card {
  border-color: rgba(155, 174, 208, 0.22);
  background: linear-gradient(145deg, rgba(21, 31, 46, 0.96), rgba(15, 23, 36, 0.98));
}

@keyframes app-boot-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

html[data-theme='dark'] .card {
  border-color: var(--line);
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-strong) 100%);
  box-shadow: var(--shadow-card);
}

html[data-theme='dark'] .hero,
html[data-theme='dark'] .mini-header {
  border-color: rgba(25, 183, 158, 0.32);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

html[data-theme='dark'] .eyebrow,
html[data-theme='dark'] .hero-balance {
  background: rgba(25, 183, 158, 0.14);
  border-color: rgba(25, 183, 158, 0.34);
  color: #d9fff6;
}

html[data-theme='dark'] :is(
  .plan,
  .plan-highlighted,
  .vote-item,
  .review-item,
  .craft-policy-box,
  .craft-locked-item,
  .stream-feed-item,
  .stream-battle-metrics .metric-chip,
  .stream-battle-fallen-chip,
  .stream-battle-entry-item,
  .stream-battle-chat-item,
  .profile-balance-card,
  .withdraw-item,
  .payment-item,
  .app-toast,
  .doc-sheet,
  .doc-head,
  .onboarding-sheet,
  .onboarding-head
) {
  border-color: var(--line) !important;
  background: linear-gradient(145deg, rgba(23, 33, 48, 0.94), rgba(17, 25, 38, 0.96)) !important;
}

html[data-theme='dark'] .channel-card,
html[data-theme='dark'] .status-card,
html[data-theme='dark'] .vote-card,
html[data-theme='dark'] .checkout-card {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(25, 183, 158, 0.14), transparent 68%),
    linear-gradient(145deg, var(--surface) 0%, var(--surface-strong) 100%) !important;
}

html[data-theme='dark'] .stream-timer-box {
  border-color: rgba(25, 183, 158, 0.34);
  background: linear-gradient(145deg, rgba(24, 36, 54, 0.94), rgba(16, 25, 38, 0.96));
}

html[data-theme='dark'] .stream-timer-box.red-zone {
  border-color: rgba(255, 115, 109, 0.48);
  background:
    radial-gradient(130% 145% at 100% 0%, rgba(255, 115, 109, 0.24), rgba(255, 115, 109, 0) 72%),
    linear-gradient(145deg, rgba(26, 34, 48, 0.95), rgba(18, 25, 36, 0.98));
}

html[data-theme='dark'] .stream-timer-box.red-zone .stream-timer-value {
  color: #ff8f88;
}

html[data-theme='dark'] .stream-metric {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(24, 35, 52, 0.92), rgba(17, 26, 39, 0.95));
}

html[data-theme='dark'] .stream-battle-stat {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(24, 35, 52, 0.92), rgba(17, 26, 39, 0.95));
}

html[data-theme='dark'] .stream-battle-audio-toggle {
  border-color: rgba(155, 174, 208, 0.28);
  background: rgba(24, 35, 52, 0.92);
  color: var(--ink);
}

html[data-theme='dark'] .stream-battle-audio-toggle.is-muted {
  border-color: rgba(155, 174, 208, 0.22);
  background: rgba(20, 30, 45, 0.78);
  color: rgba(174, 184, 204, 0.96);
}

html[data-theme='dark'] .btn-ghost,
html[data-theme='dark'] .btn-small {
  border-color: var(--line);
  background: rgba(20, 29, 44, 0.86);
  color: var(--ink);
}

html[data-theme='dark'] .input {
  border-color: var(--line);
  background: rgba(14, 22, 35, 0.92);
  color: var(--ink);
}

html[data-theme='dark'] .input::placeholder {
  color: rgba(174, 184, 204, 0.78);
}

html[data-theme='dark'] .input:focus {
  background: rgba(14, 22, 35, 0.98);
  border-color: rgba(25, 183, 158, 0.78);
  box-shadow: 0 0 0 3px rgba(25, 183, 158, 0.2);
}

html[data-theme='dark'] .badge.paid {
  color: #7fe2b8;
  background: rgba(61, 208, 148, 0.16);
}

html[data-theme='dark'] .badge.pending {
  color: #ffd08f;
  background: rgba(241, 167, 96, 0.16);
}

html[data-theme='dark'] .badge.failed {
  color: #ff9792;
  background: rgba(255, 115, 109, 0.18);
}

body.modal-open {
  overflow: hidden;
}

body.ui-locked .container,
body.ui-locked .tabbar {
  pointer-events: none;
}

body.ui-locked .tabbar {
  opacity: 0;
  transform: translateY(calc(100% + 22px));
}

body.maintenance-active .container,
body.maintenance-active .tabbar {
  pointer-events: none;
  user-select: none;
  opacity: 0.24;
  filter: blur(2px);
}

body.outside-telegram-active .container,
body.outside-telegram-active .tabbar {
  display: none !important;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(28px);
  opacity: 0.52;
}

.orb-1 {
  top: -96px;
  right: -44px;
  width: 280px;
  height: 280px;
  background: rgba(11, 138, 116, 0.46);
}

.orb-2 {
  bottom: -98px;
  left: -88px;
  width: 300px;
  height: 300px;
  background: rgba(222, 127, 47, 0.44);
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: var(--top-space) 12px var(--bottom-space);
  display: grid;
  align-content: start;
  gap: 12px;
  transition: padding-bottom 0.22s ease;
}

body.keyboard-open .container {
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

.card {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-strong) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(12px);
  animation: card-in 0.48s cubic-bezier(0.23, 0.79, 0.35, 1) forwards;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero {
  text-align: center;
  border: 1px solid rgba(11, 138, 116, 0.24);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.mini-header {
  text-align: center;
  border: 1px solid rgba(11, 138, 116, 0.24);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  padding-top: 12px;
  padding-bottom: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(11, 138, 116, 0.12);
  border: 1px solid rgba(11, 138, 116, 0.28);
  font-family: Unbounded, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

.hero h1 {
  margin: 11px 0 7px;
  font-family: Unbounded, sans-serif;
  font-size: 29px;
  line-height: 1.16;
  letter-spacing: 0.01em;
}

.hero-balance {
  margin: 10px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(11, 138, 116, 0.12);
  border: 1px solid rgba(11, 138, 116, 0.28);
  color: var(--primary-strong);
  font-weight: 900;
  font-size: 13px;
}

.tab-panel {
  display: grid;
  gap: 12px;
}

.tab-panel#tab-chat {
  min-height: 0;
  height: calc(100dvh - var(--top-space) - var(--bottom-space));
}

.tab-panel#tab-chat > .chat-card {
  height: 100%;
  min-height: 0;
  padding-bottom: 6px;
}

body.chat-tab-active .container {
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-left: 0;
  padding-right: 0;
}

body.chat-tab-active .tab-panel#tab-chat {
  height: calc(100dvh - (12px + env(safe-area-inset-top, 0px)) - var(--bottom-space) + 15px);
}

body.chat-tab-active .tab-panel#tab-chat > .chat-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0 0 2px;
}

body.keyboard-open.chat-tab-active .container {
  padding-bottom: 0;
}

body.keyboard-open.chat-tab-active .tab-panel#tab-chat {
  height: calc(100dvh - (12px + env(safe-area-inset-top, 0px)));
}

body.keyboard-open.chat-tab-active .tab-panel#tab-chat > .chat-card {
  padding-bottom: 0;
}

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

h2 {
  margin: 0;
  font-family: Unbounded, sans-serif;
  font-size: 17px;
  line-height: 1.28;
}

.muted {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.hint {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 13px;
}

.craft-quota-box {
  margin: 0 0 11px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(11, 138, 116, 0.24);
  background: rgba(11, 138, 116, 0.08);
  display: grid;
  gap: 4px;
}

.craft-quota-box .hint,
.craft-quota-box .muted {
  margin: 0;
}

.craft-policy-box {
  margin: 2px 0 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
  display: grid;
  gap: 7px;
}

.craft-policy-text {
  margin: 0;
}

.craft-policy-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.craft-policy-toggle {
  width: fit-content;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.craft-unavailable-box {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(190, 132, 28, 0.35);
  background: rgba(190, 132, 28, 0.12);
  display: grid;
  gap: 7px;
}

.craft-unavailable-title {
  margin: 0;
  color: #7a4b1b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.craft-unavailable-text {
  margin: 0;
  color: #6d4319;
  font-size: 13px;
  line-height: 1.32;
  font-weight: 700;
}

.craft-locked-items {
  margin-top: 10px;
  border: 1px solid rgba(11, 138, 116, 0.22);
  border-radius: var(--radius-md);
  background: rgba(11, 138, 116, 0.06);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.craft-locked-items-head {
  display: grid;
  gap: 2px;
}

.craft-locked-items-title {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.craft-locked-items-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.craft-locked-items-list {
  display: grid;
  gap: 7px;
}

.craft-market-note {
  margin: 2px 0 0;
  color: #126449;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}

.craft-locked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(11, 138, 116, 0.18);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
}

.craft-locked-item-main {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.craft-locked-item-name {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.craft-locked-item-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.craft-locked-item-reward {
  margin: 0;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 390px) {
  .craft-unavailable-box {
    padding: 9px 10px;
    gap: 6px;
  }

  .craft-unavailable-text {
    font-size: 12px;
  }

  .craft-locked-item {
    padding: 7px 9px;
  }

  .craft-locked-item-name {
    font-size: 12px;
  }

  .craft-locked-item-reward {
    font-size: 11px;
  }
}

.channel-card {
  border-color: rgba(11, 138, 116, 0.28);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(11, 138, 116, 0.14), transparent 65%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(246, 255, 252, 0.95));
}

.channel-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.channel-avatars {
  display: flex;
  align-items: center;
}

.avatar-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(14, 24, 39, 0.18);
}

.avatar-dot + .avatar-dot {
  margin-left: -7px;
}

.avatar-dot.a1 {
  background: linear-gradient(130deg, #111827, #374151);
}

.avatar-dot.a2 {
  background: linear-gradient(130deg, #065f46, #0ea5a5);
}

.avatar-dot.a3 {
  background: linear-gradient(130deg, #1e3a8a, #6366f1);
}

.channel-stats {
  margin: 0;
  font-size: 17px;
  line-height: 1.34;
  font-weight: 800;
}

.status-card {
  border-color: rgba(11, 138, 116, 0.26);
  background:
    linear-gradient(145deg, rgba(11, 138, 116, 0.11), rgba(11, 138, 116, 0) 52%),
    linear-gradient(145deg, var(--surface) 0%, var(--surface-strong) 100%);
}

.status-main {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 800;
}

.status-sub {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.88);
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.plan-highlighted {
  grid-column: 1 / -1;
  border-color: rgba(222, 127, 47, 0.58);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(222, 127, 47, 0.18), rgba(222, 127, 47, 0) 72%),
    rgba(255, 255, 255, 0.92);
}

.plan-highlighted .title {
  color: #9a520f;
}

.plan:hover {
  border-color: rgba(11, 138, 116, 0.5);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.plan.active {
  border-color: rgba(11, 138, 116, 0.74);
  box-shadow:
    inset 0 0 0 1px rgba(11, 138, 116, 0.5),
    0 10px 22px rgba(11, 138, 116, 0.16);
  background: linear-gradient(168deg, rgba(11, 138, 116, 0.18), rgba(11, 138, 116, 0.04));
}

.plan.plan-highlighted.active {
  border-color: rgba(222, 127, 47, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(222, 127, 47, 0.42),
    0 10px 22px rgba(222, 127, 47, 0.2);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(222, 127, 47, 0.2), rgba(222, 127, 47, 0) 72%),
    linear-gradient(168deg, rgba(222, 127, 47, 0.18), rgba(222, 127, 47, 0.04));
}

.plan .title {
  font-size: 16px;
  font-weight: 800;
}

.plan .price {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 14px;
}

.vote-card {
  border-color: rgba(222, 127, 47, 0.26);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(222, 127, 47, 0.12), rgba(222, 127, 47, 0) 72%),
    linear-gradient(145deg, var(--surface) 0%, var(--surface-strong) 100%);
}

.vote-pool-block {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(11, 138, 116, 0.28);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(11, 138, 116, 0.16), rgba(11, 138, 116, 0) 70%),
    linear-gradient(145deg, rgba(11, 138, 116, 0.08), rgba(11, 138, 116, 0.02));
}

.vote-pool-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.vote-pool-value {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  color: #0b8a74;
}

.vote-items-list {
  display: grid;
  gap: 10px;
}

.vote-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.vote-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.vote-item-rank {
  font-size: 12px;
  font-weight: 800;
  color: #9a520f;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.vote-item-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.vote-item-meta {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vote-allocation {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #0c7a67;
}

.vote-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.vote-progress-track {
  position: relative;
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.12);
  overflow: hidden;
}

.vote-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #de7f2f 0%, #f2b75d 100%);
}

.vote-progress-percent {
  min-width: 56px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: #9a520f;
}

.vote-progress-cubes {
  margin: 0 0 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  letter-spacing: 0.04em;
  font-size: 12px;
  color: #9a520f;
}

.vote-btn {
  margin-top: 0;
}

.vote-actions-row {
  margin-top: 2px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.vote-access-row {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vote-access-hint {
  margin: 0;
  font-size: 12px;
  color: #0b8a74;
  font-weight: 700;
}

.vote-share-inline-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 999px;
  border: 1px solid rgba(11, 138, 116, 0.32);
  background: rgba(11, 138, 116, 0.1);
  color: #0b8a74;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.vote-share-inline-btn:active {
  transform: scale(0.96);
}

.vote-amount-row {
  margin: 0 0 10px;
}

.vote-amount-label {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
}

.vote-amount-controls {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.vote-amount-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vote-amount-chip {
  border: 1px solid rgba(23, 32, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.vote-amount-chip.active {
  border-color: rgba(11, 138, 116, 0.64);
  background: rgba(11, 138, 116, 0.12);
  color: #0b8a74;
}

.vote-amount-chip:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.vote-amount-input {
  margin: 0;
  width: 112px;
  min-width: 112px;
  padding: 10px 12px;
  font-size: 14px;
}

.vote-amount-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink-soft);
}

.stream-card {
  border-color: rgba(11, 138, 116, 0.28);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(11, 138, 116, 0.12), rgba(11, 138, 116, 0) 72%),
    linear-gradient(145deg, var(--surface) 0%, var(--surface-strong) 100%);
}

.stream-timer-box {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(11, 138, 116, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.stream-timer-box.red-zone {
  border-color: rgba(239, 68, 68, 0.42);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(239, 68, 68, 0.16), rgba(239, 68, 68, 0) 70%),
    rgba(255, 255, 255, 0.78);
}

.stream-timer-label {
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.stream-timer-value {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  color: #0b8a74;
}

.stream-timer-box.red-zone .stream-timer-value {
  color: #d43c3c;
}

.stream-timer-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.stream-social-line {
  margin: -6px 0 10px;
}

.stream-social-link {
  border: 1px solid rgba(11, 138, 116, 0.26);
  background: rgba(11, 138, 116, 0.08);
  color: var(--primary-strong);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.stream-social-link:active {
  transform: translateY(1px);
}

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

.stream-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.86);
}

.stream-metric span {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

.stream-metric b {
  font-size: 15px;
  color: var(--ink);
}

.stream-form {
  margin-bottom: 14px;
}

.stream-feed-home {
  margin-top: 6px;
}

.stream-anon-toggle {
  margin: 6px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.stream-feed-head {
  margin-bottom: 8px;
}

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

.stream-feed-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.stream-feed-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.stream-feed-name {
  margin: 0;
  font-weight: 800;
  font-size: 14px;
}

.stream-feed-amount {
  margin: 0;
  font-weight: 800;
  color: #0b8a74;
  font-size: 14px;
}

.stream-feed-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.stream-feed-comment {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink);
}

.stream-battle-card {
  border-color: rgba(11, 138, 116, 0.2);
  background:
    radial-gradient(140% 130% at 0% 0%, rgba(11, 138, 116, 0.1), rgba(11, 138, 116, 0) 70%),
    linear-gradient(150deg, var(--surface) 0%, var(--surface-strong) 100%);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.stream-battle-head {
  margin-bottom: 10px;
}

.stream-battle-head-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.stream-battle-head > * {
  min-width: 0;
}

.stream-battle-head-side .muted {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.stream-battle-audio-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(23, 32, 51, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.stream-battle-audio-toggle:active {
  transform: scale(0.96);
}

.stream-battle-audio-toggle.is-muted {
  color: var(--ink-soft);
  border-color: rgba(23, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.stream-battle-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.stream-battle-stat {
  border: 1px solid rgba(23, 32, 51, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.86);
}

.stream-battle-stat > span {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  margin-bottom: 3px;
}

.stream-battle-stat > b {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.stream-battle-prize > b {
  color: #0b8a74;
}

.stream-battle-metrics {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.stream-battle-metrics .metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(23, 32, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.stream-battle-metrics .metric-chip b {
  color: var(--ink);
}

.stream-battle-arena {
  position: relative;
  margin: 0 auto 12px;
  width: min(100%, 480px);
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: visible;
  background:
    radial-gradient(70% 70% at 50% 45%, rgba(11, 138, 116, 0.14), rgba(11, 138, 116, 0.02) 70%),
    rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(11, 138, 116, 0.26);
}

.stream-battle-ring {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  border: 6px solid #0f1c2f;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.55);
  pointer-events: none;
  z-index: 3;
}

.stream-battle-gate {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  --stream-gate-angle-deg: 135deg;
  --stream-gate-width-deg: 12deg;
  z-index: 4;
}

.stream-battle-gate::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 10px solid rgba(110, 255, 206, 0.98);
  filter: drop-shadow(0 0 10px rgba(11, 138, 116, 0.46));
  -webkit-mask: conic-gradient(
    from calc(var(--stream-gate-angle-deg) - var(--stream-gate-width-deg)),
    #000 0deg calc(var(--stream-gate-width-deg) * 2),
    transparent calc(var(--stream-gate-width-deg) * 2) 360deg
  );
  mask: conic-gradient(
    from calc(var(--stream-gate-angle-deg) - var(--stream-gate-width-deg)),
    #000 0deg calc(var(--stream-gate-width-deg) * 2),
    transparent calc(var(--stream-gate-width-deg) * 2) 360deg
  );
}

.stream-battle-gate.open {
  opacity: 1;
}

.stream-battle-ring.running {
  animation: stream-battle-gate-spin 8.2s linear infinite;
}

.stream-battle-gate.open.running {
  animation: stream-battle-gate-spin 8.2s linear infinite;
  transform-origin: 50% 50%;
  will-change: transform;
}

.stream-battle-particles {
  position: absolute;
  inset: calc(2% + 7px);
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%);
  -webkit-clip-path: circle(50% at 50% 50%);
  z-index: 1;
}

.stream-battle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.stream-battle-particle {
  position: absolute;
  transform: translate(-50%, -50%);
  transition: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 18px rgba(9, 20, 40, 0.26);
  background:
    radial-gradient(100% 100% at 20% 20%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 65%),
    #27446d;
  overflow: hidden;
  will-change: left, top;
}

.stream-battle-particle.current-user {
  border-color: rgba(11, 138, 116, 0.95);
  box-shadow: 0 0 0 3px rgba(11, 138, 116, 0.2), 0 8px 18px rgba(9, 20, 40, 0.26);
}

.stream-battle-particle-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #f2f7ff;
}

.stream-battle-fallen {
  margin: 0 0 10px;
}

.stream-battle-fallen-list {
  min-height: 42px;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(19, 32, 52, 0.36) rgba(19, 32, 52, 0.08);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-behavior: smooth;
}

.stream-battle-fallen-list::-webkit-scrollbar {
  height: 6px;
}

.stream-battle-fallen-list::-webkit-scrollbar-track {
  background: rgba(19, 32, 52, 0.08);
  border-radius: 999px;
}

.stream-battle-fallen-list::-webkit-scrollbar-thumb {
  background: rgba(19, 32, 52, 0.36);
  border-radius: 999px;
}

.stream-battle-fallen-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(23, 32, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  padding: 3px 8px 3px 4px;
  flex: 0 0 auto;
  max-width: 172px;
}

.stream-battle-fallen-chip.enter {
  animation: stream-battle-fallen-drop 0.3s ease-out;
}

.stream-battle-fallen-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  border: 1px solid rgba(11, 138, 116, 0.44);
  background:
    radial-gradient(100% 100% at 20% 20%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 68%),
    #2b4f7c;
  background-size: cover;
  background-position: center;
  color: #f2f7ff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stream-battle-fallen-name {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.stream-battle-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 6px;
}

.stream-battle-entries {
  margin-top: 8px;
}

.stream-battle-entries-list {
  min-height: 48px;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(19, 32, 52, 0.36) rgba(19, 32, 52, 0.08);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-behavior: smooth;
}

.stream-battle-entries-list::-webkit-scrollbar {
  height: 6px;
}

.stream-battle-entries-list::-webkit-scrollbar-track {
  background: rgba(19, 32, 52, 0.08);
  border-radius: 999px;
}

.stream-battle-entries-list::-webkit-scrollbar-thumb {
  background: rgba(19, 32, 52, 0.36);
  border-radius: 999px;
}

.stream-battle-entry-item {
  border: 1px solid rgba(23, 32, 51, 0.15);
  border-radius: 14px;
  padding: 4px 10px 4px 4px;
  background: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  max-width: min(82vw, 290px);
}

.stream-battle-entry-item.enter {
  animation: stream-battle-fallen-drop 0.3s ease-out;
}

.stream-battle-entry-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  border: 1px solid rgba(11, 138, 116, 0.44);
  background:
    radial-gradient(100% 100% at 20% 20%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 68%),
    #2b4f7c;
  background-size: cover;
  background-position: center;
  color: #f2f7ff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stream-battle-entry-content {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.stream-battle-entry-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-battle-entry-meta {
  margin: 0;
  font-size: 11px;
  color: var(--ink-soft);
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-battle-chat {
  margin-top: 10px;
}

.stream-battle-chat-list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 7px;
  margin-bottom: 9px;
}

.stream-battle-chat-item {
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  padding: 8px 10px;
}

.stream-battle-chat-meta {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stream-battle-chat-text {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

.stream-battle-chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.stream-battle-chat-compose .input {
  margin-bottom: 0;
}

@media (max-width: 430px) {
  .stream-battle-head {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 6px;
  }

  .stream-battle-head-side {
    width: 100%;
    justify-content: space-between;
  }

  .stream-battle-head-side .muted {
    text-align: left;
    font-size: 13px;
    line-height: 1.35;
  }

  .stream-battle-metrics .metric-chip {
    max-width: 100%;
  }

  .vote-amount-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .vote-amount-input {
    width: 100%;
    min-width: 0;
  }

  .vote-actions-row {
    grid-template-columns: 1fr;
  }

  .stream-battle-top {
    grid-template-columns: 1fr;
  }

  .stream-battle-controls {
    grid-template-columns: 1fr;
  }

  .stream-battle-chat-compose {
    grid-template-columns: 1fr;
  }
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 7px;
  color: var(--ink-soft);
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  margin-bottom: 11px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input::placeholder {
  color: rgba(91, 102, 124, 0.82);
}

.input:focus {
  border-color: rgba(11, 138, 116, 0.75);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 138, 116, 0.14);
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

.file-input {
  padding: 9px 12px;
}

.btn {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 0;
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

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

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn + .btn {
  margin-top: 8px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(130deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 11px 23px rgba(6, 107, 89, 0.3);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn-primary.stream-battle-join-attention {
  color: #1c1820;
  background: linear-gradient(130deg, #ffd55e 0%, #f5a524 54%, #e57a14 100%);
  box-shadow: 0 12px 24px rgba(229, 122, 20, 0.34);
  animation: stream-battle-reentry-cta-pulse 1.1s ease-in-out infinite;
}

.btn-primary.stream-battle-join-attention:hover:not(:disabled) {
  filter: brightness(1.02);
}

html[data-theme='dark'] .btn-primary.stream-battle-join-attention {
  color: #201703;
  background: linear-gradient(130deg, #ffd866 0%, #f3b336 58%, #ea8d1f 100%);
  box-shadow: 0 14px 28px rgba(243, 179, 54, 0.36);
}

@keyframes stream-battle-reentry-cta-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(222, 127, 47, 0.48);
  box-shadow: 0 10px 18px rgba(222, 127, 47, 0.14);
}

.btn-small {
  width: auto;
  padding: 9px 13px;
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.success {
  margin: 10px 0 0;
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

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

.legal-inline {
  display: grid;
  justify-items: center;
  justify-content: center;
  gap: 4px;
  margin: 2px 0 0;
}

.legal-inline-link {
  border: 0;
  background: transparent;
  padding: 0 4px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-align: center;
  line-height: 1.25;
}

.legal-inline-link:active {
  opacity: 0.8;
}

.checkout-card {
  border-color: rgba(11, 138, 116, 0.32);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(11, 138, 116, 0.12), transparent 68%),
    linear-gradient(145deg, var(--surface) 0%, var(--surface-strong) 100%);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.checkout-card.checkout-collapsing {
  opacity: 0;
  transform: translateY(-8px);
}

.checkout-summary {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.checkout-note {
  margin: 0 0 12px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid rgba(11, 138, 116, 0.3);
  background: rgba(11, 138, 116, 0.12);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
}

.checkout-methods {
  display: grid;
  gap: 8px;
}

.checkout-methods .btn + .btn {
  margin-top: 0;
}

.checkout-sbp {
  box-shadow: 0 14px 24px rgba(6, 107, 89, 0.34);
}

.reviews-list {
  display: grid;
  gap: 10px;
  margin-bottom: 11px;
}

.review-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px;
  background: rgba(255, 255, 255, 0.92);
}

.review-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.review-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 51, 0.16);
  object-fit: cover;
  background: rgba(23, 32, 51, 0.08);
}

.review-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 51, 0.16);
  background: rgba(23, 32, 51, 0.08);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
}

.review-author {
  font-size: 14px;
  font-weight: 800;
}

.review-meta {
  font-size: 12px;
  color: var(--ink-soft);
}

.review-rating {
  font-size: 13px;
  font-weight: 900;
  color: #d97706;
  letter-spacing: 0.04em;
}

.review-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.review-media {
  margin-top: 8px;
}

.review-media img,
.review-media video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #000;
}

.review-media audio {
  width: 100%;
}

.scroll-reviews-btn {
  position: fixed;
  right: 14px;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  z-index: 24;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(130deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 10px 22px rgba(6, 107, 89, 0.35);
  cursor: pointer;
}

.scroll-reviews-btn:active {
  transform: translateY(1px);
}

.scroll-leaderboard-btn {
  position: fixed;
  right: 14px;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  z-index: 24;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(130deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 10px 22px rgba(6, 107, 89, 0.35);
  cursor: pointer;
}

.scroll-leaderboard-btn:active {
  transform: translateY(1px);
}

.leaderboard-list {
  display: grid;
  gap: 10px;
}

.leaderboard-mode-toggle {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.leaderboard-mode-btn {
  border: 1px solid rgba(23, 32, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  min-height: 40px;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.leaderboard-mode-btn.active {
  border-color: rgba(11, 138, 116, 0.54);
  background: rgba(11, 138, 116, 0.12);
  color: var(--primary-strong);
}

.leaderboard-mode-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.leaderboard-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.leaderboard-item.current {
  border-color: rgba(11, 138, 116, 0.48);
  box-shadow: 0 8px 18px rgba(6, 107, 89, 0.18);
  background: linear-gradient(145deg, rgba(235, 252, 247, 0.95), rgba(255, 255, 255, 0.92));
}

.leaderboard-rank {
  min-width: 42px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
}

.leaderboard-avatar-wrap {
  width: 34px;
  height: 34px;
}

.leaderboard-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 51, 0.16);
  object-fit: cover;
  background: rgba(23, 32, 51, 0.08);
}

.leaderboard-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 51, 0.16);
  background: rgba(23, 32, 51, 0.08);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
}

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

.leaderboard-name {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-meta {
  font-size: 12px;
  color: var(--ink-soft);
}

.leaderboard-score {
  font-size: 15px;
  font-weight: 900;
  color: var(--primary-strong);
}

.leaderboard-my-place {
  margin-top: 12px;
  border: 1px solid rgba(11, 138, 116, 0.4);
  border-radius: var(--radius-md);
  background: rgba(11, 138, 116, 0.08);
  padding: 12px;
}

.leaderboard-my-place-title {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 800;
}

.leaderboard-my-place-main {
  margin-top: 2px;
  font-size: 24px;
  font-weight: 900;
  color: var(--primary-strong);
}

.leaderboard-my-place-meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-soft);
}

.chat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.chat-messages-list {
  flex: 1;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-counter-row {
  padding: 0;
  display: flex;
  justify-content: flex-start;
}

.chat-counter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  border: 1px solid rgba(11, 138, 116, 0.35);
  background: rgba(11, 138, 116, 0.12);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
}

.chat-row-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-row-wrap.mine {
  justify-content: flex-end;
}

.chat-row-wrap.other {
  justify-content: flex-start;
}

.chat-row-highlight .chat-bubble {
  box-shadow: 0 0 0 2px rgba(96, 227, 187, 0.42);
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(23, 32, 51, 0.2);
  object-fit: cover;
  flex: 0 0 34px;
}

.chat-bubble {
  width: fit-content;
  max-width: min(98%, 580px);
  border-radius: 14px;
  border: 1px solid rgba(23, 32, 51, 0.14);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.96);
}

.chat-bubble.mine {
  background: linear-gradient(145deg, rgba(222, 252, 243, 0.94), rgba(246, 255, 252, 0.96));
  border-color: rgba(11, 138, 116, 0.34);
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.chat-item-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-strong);
  overflow-wrap: anywhere;
}

.chat-item-time {
  margin-left: auto;
  font-size: 10px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.chat-reply-btn {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(23, 32, 51, 0.2);
  background: rgba(23, 32, 51, 0.06);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-reply-quote {
  margin-top: 4px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(11, 138, 116, 0.28);
  border-radius: 10px;
  background: rgba(11, 138, 116, 0.09);
  padding: 5px 7px;
  cursor: pointer;
}

.chat-reply-quote .q-name {
  font-size: 10px;
  color: var(--primary-strong);
  font-weight: 800;
}

.chat-reply-quote .q-text {
  margin-top: 1px;
  font-size: 11px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-text {
  margin: 2px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  color: var(--ink);
}

.chat-media-box {
  margin-top: 7px;
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.9);
}

.chat-media-photo-btn,
.chat-media-video-btn {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.chat-media-video-btn {
  position: relative;
}

.chat-media-box img,
.chat-media-box video {
  max-width: 100%;
  max-height: 270px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
}

.chat-video-preview {
  max-height: 270px;
  width: auto;
  max-width: 100%;
}

.chat-media-open-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
}

.chat-audio-label {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 800;
  color: var(--primary-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-audio-player {
  width: 100%;
}

.chat-inline-card {
  border: 1px solid rgba(11, 138, 116, 0.26);
  border-radius: 10px;
  background: rgba(11, 138, 116, 0.08);
  padding: 6px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.chat-inline-meta {
  min-width: 0;
}

.chat-inline-line-1 {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  color: var(--primary-strong);
}

.chat-inline-line-2 {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-inline-close {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(23, 32, 51, 0.2);
  background: rgba(23, 32, 51, 0.06);
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.chat-compose {
  border-top: 1px solid var(--line);
  padding: 6px 2px calc(2px + env(safe-area-inset-bottom, 0px));
  display: block;
  background: transparent;
  margin-top: 0;
}

body.keyboard-open.chat-tab-active .chat-compose {
  padding-bottom: 2px;
}

.chat-compose-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.chat-input {
  min-height: 40px;
  max-height: 140px;
  resize: none;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  padding: 9px 12px;
  line-height: 1.34;
  margin: 0;
}

.chat-input::placeholder {
  color: rgba(91, 102, 124, 0.75);
}

.chat-icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 51, 0.2);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease, background 0.14s ease;
}

.chat-icon-btn:active {
  transform: scale(0.96);
}

.chat-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chat-send-btn {
  background: linear-gradient(145deg, #0b8a74, #0a7563);
  border-color: rgba(6, 107, 89, 0.64);
  color: #fff;
}

.chat-send-btn.is-sending {
  opacity: 0.72;
}

.chat-media-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.chat-media-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 18, 0.96);
}

.chat-media-viewer-sheet {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-media-viewer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: auto;
}

.chat-media-viewer-image,
.chat-media-viewer-video {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.chat-media-viewer-footer {
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.chat-media-zoom-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.chat-media-close-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.payments-list {
  display: grid;
  gap: 10px;
}

.payment-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.payment-item .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-weight: 800;
}

.payment-item .meta {
  color: var(--ink-soft);
  font-size: 13px;
}

.withdrawals-list {
  display: grid;
  gap: 10px;
}

.withdraw-history-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
  display: grid;
  gap: 6px;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.withdraw-history-item:hover {
  border-color: rgba(11, 138, 116, 0.48);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.withdraw-history-item:active {
  transform: translateY(0);
}

.withdraw-history-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.withdraw-history-amount {
  font-size: 16px;
  font-weight: 900;
}

.withdraw-history-target {
  color: var(--ink);
  font-size: 13px;
}

.withdraw-history-meta {
  color: var(--ink-soft);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge.paid {
  color: #085f3c;
  background: rgba(15, 122, 74, 0.15);
}

.badge.pending {
  color: #7a4b1b;
  background: rgba(154, 93, 30, 0.16);
}

.badge.failed {
  color: #851d15;
  background: rgba(180, 35, 24, 0.16);
}

.badge.canceled {
  color: #425171;
  background: rgba(66, 81, 113, 0.14);
}

.profile-identity {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
}

.profile-avatar-wrap {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  border: 2px solid rgba(11, 138, 116, 0.34);
  overflow: hidden;
  background: rgba(11, 138, 116, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-fallback {
  font-family: Unbounded, sans-serif;
  font-size: 26px;
  color: var(--primary-strong);
}

.profile-title {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.profile-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.profile-balance-card {
  margin-top: 12px;
  border: 1px solid rgba(11, 138, 116, 0.24);
  border-radius: var(--radius-md);
  background: rgba(11, 138, 116, 0.08);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-balance-label {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 700;
}

.profile-balance-value {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary-strong);
}

.profile-actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 8px;
}

.profile-actions-row .btn + .btn {
  margin-top: 0;
}

.profile-theme-card {
  margin-top: 12px;
}

.profile-theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.profile-theme-btn {
  min-width: 94px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.profile-theme-btn:active {
  transform: translateY(1px);
}

.profile-theme-btn.active {
  color: #fff;
  background: linear-gradient(130deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 8px 16px rgba(6, 107, 89, 0.28);
}

html[data-theme='dark'] .profile-theme-switch {
  background: rgba(15, 23, 35, 0.88);
}

.section-head-sm {
  margin-top: 14px;
  margin-bottom: 10px;
}

.duel-setup {
  display: grid;
  gap: 8px;
}

.duel-arena {
  display: grid;
  gap: 10px;
}

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

.duel-hp-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.duel-hp-title {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  margin-bottom: 4px;
}

.duel-hp-item strong {
  font-size: 18px;
}

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

.duel-target-btn {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  min-height: 42px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}

.duel-target-btn:hover:not(:disabled) {
  border-color: rgba(11, 138, 116, 0.5);
  box-shadow: var(--shadow-soft);
}

.duel-log-item {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.tabbar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(var(--tab-count, 4), minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(23, 32, 51, 0.14);
  box-shadow: 0 16px 30px rgba(14, 24, 39, 0.2);
  backdrop-filter: blur(12px);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

html[data-theme='dark'] .tabbar {
  background: linear-gradient(145deg, rgba(22, 32, 48, 0.9), rgba(16, 24, 36, 0.96));
  border-color: rgba(155, 174, 208, 0.26);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.46);
}

html[data-theme='dark'] .tab-btn:not(.active):hover {
  color: var(--ink);
  background: rgba(164, 182, 214, 0.14);
}

body.keyboard-open .tabbar {
  opacity: 0;
  transform: translateY(calc(100% + 22px));
  pointer-events: none;
}

.tabbar.tabbar-compact {
  grid-template-columns: repeat(var(--tab-count, 4), minmax(0, 1fr));
}

.tab-btn {
  border: 0;
  border-radius: 12px;
  min-height: 42px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(130deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 8px 16px rgba(6, 107, 89, 0.24);
}

.tab-btn:not(.active):hover {
  color: var(--ink);
  background: rgba(23, 32, 51, 0.06);
}

.hidden {
  display: none !important;
}

.maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(110% 90% at 0% 0%, rgba(11, 138, 116, 0.22), transparent 62%),
    radial-gradient(120% 100% at 100% 100%, rgba(222, 127, 47, 0.2), transparent 68%),
    rgba(9, 14, 24, 0.88);
  backdrop-filter: blur(12px);
}

.maintenance-overlay.mode-soon {
  padding: 0;
  background: #020202;
  backdrop-filter: none;
}

.maintenance-card {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 22px 18px;
  background: linear-gradient(155deg, rgba(20, 30, 48, 0.96), rgba(13, 21, 36, 0.96));
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.maintenance-eyebrow {
  display: inline-flex;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(11, 138, 116, 0.22);
  color: #d8fff4;
  font-family: Unbounded, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.maintenance-card h2 {
  margin: 14px 0 10px;
  color: #f4f7ff;
  font-size: 24px;
  line-height: 1.25;
}

.maintenance-text {
  margin: 0;
  color: rgba(226, 234, 247, 0.9);
  font-size: 15px;
  line-height: 1.45;
}

.maintenance-btn {
  width: 100%;
  margin-top: 16px;
}

.maintenance-soon {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: calc(28px + env(safe-area-inset-top, 0px)) 18px calc(28px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: #fff;
}

.maintenance-gears {
  position: relative;
  width: 150px;
  height: 110px;
}

.maintenance-gear {
  position: absolute;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.25),
    inset 0 0 0 7px rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.36) 0 24%, transparent 26% 100%);
}

.maintenance-gear::before,
.maintenance-gear::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.35);
}

.maintenance-gear-lg {
  width: 72px;
  height: 72px;
  left: 8px;
  top: 18px;
  animation: maintenance-gear-spin 4.8s linear infinite;
}

.maintenance-gear-md {
  width: 56px;
  height: 56px;
  right: 14px;
  top: 10px;
  animation: maintenance-gear-spin-rev 4s linear infinite;
}

.maintenance-gear-sm {
  width: 40px;
  height: 40px;
  right: 32px;
  bottom: 8px;
  animation: maintenance-gear-spin 3.3s linear infinite;
}

.maintenance-soon-title {
  margin: 0;
  font-family: Unbounded, sans-serif;
  font-size: clamp(44px, 10vw, 80px);
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.25);
}

.maintenance-soon-text {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(14px, 3.8vw, 18px);
  line-height: 1.45;
}

.maintenance-soon-hint {
  margin: 2px 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.64);
  font-size: clamp(12px, 3.2vw, 14px);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.maintenance-soon-track {
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.maintenance-overlay.mode-soon .maintenance-btn {
  width: min(320px, 90vw);
}

.maintenance-overlay #maintenanceAudio {
  display: none;
}

@keyframes stream-battle-gate-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes stream-battle-fallen-drop {
  0% {
    transform: translateY(-16px);
    opacity: 0.25;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes maintenance-gear-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes maintenance-gear-spin-rev {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.outside-telegram-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(110% 90% at 0% 0%, rgba(11, 138, 116, 0.22), transparent 62%),
    radial-gradient(120% 100% at 100% 100%, rgba(222, 127, 47, 0.2), transparent 68%),
    rgba(9, 14, 24, 0.94);
  backdrop-filter: blur(12px);
}

.outside-telegram-card {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 22px 18px;
  background: linear-gradient(155deg, rgba(20, 30, 48, 0.96), rgba(13, 21, 36, 0.96));
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.outside-telegram-eyebrow {
  display: inline-flex;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(11, 138, 116, 0.22);
  color: #d8fff4;
  font-family: Unbounded, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.outside-telegram-card h2 {
  margin: 14px 0 10px;
  color: #f4f7ff;
  font-size: 24px;
  line-height: 1.25;
}

.outside-telegram-text {
  margin: 0;
  color: rgba(226, 234, 247, 0.9);
  font-size: 15px;
  line-height: 1.45;
}

.outside-telegram-btn {
  width: 100%;
  margin-top: 16px;
}

.app-toast-container {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 125;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.app-toast {
  pointer-events: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
  padding: 10px 12px;
  display: grid;
  gap: 7px;
  animation: app-toast-in 0.22s ease;
}

.app-toast.success {
  border-color: rgba(15, 122, 74, 0.35);
  background: rgba(232, 249, 240, 0.96);
}

.app-toast.error {
  border-color: rgba(180, 35, 24, 0.35);
  background: rgba(255, 236, 233, 0.96);
}

.app-toast.info {
  border-color: rgba(11, 138, 116, 0.32);
  background: rgba(235, 250, 246, 0.96);
}

.app-toast-title {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
}

.app-toast-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.36;
  color: var(--ink-soft);
}

.app-toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.app-toast-btn {
  width: auto;
  min-height: 28px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doc-modal {
  --doc-top-offset: calc(60px + env(safe-area-inset-top, 0px));
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--doc-top-offset) 12px 12px;
}

.doc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.55);
}

.doc-sheet {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 24px));
  height: min(calc(100dvh - var(--doc-top-offset) - 12px), 820px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.doc-head h3 {
  margin: 0;
  font-size: 17px;
  font-family: Unbounded, sans-serif;
}

.doc-content {
  overflow: auto;
  padding: 14px 16px 22px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.review-sheet {
  width: min(760px, calc(100vw - 24px));
}

.withdraw-details-sheet {
  width: min(560px, calc(100vw - 24px));
  height: auto;
  max-height: min(calc(100dvh - var(--doc-top-offset) - 12px), 720px);
  align-self: flex-end;
  margin-top: 0;
  margin-bottom: 0;
}

.withdraw-details-content {
  white-space: normal;
}

.onboarding-sheet {
  width: min(520px, calc(100vw - 24px));
  height: auto;
  max-height: 85vh;
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 24px 46px rgba(14, 24, 39, 0.3);
}

.onboarding-modal {
  --doc-top-offset: 0px;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  z-index: 140;
}

.onboarding-modal .doc-backdrop {
  background: rgba(16, 24, 40, 0.56);
}

.onboarding-modal .onboarding-sheet {
  width: min(520px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100dvh - 28px);
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  grid-template-rows: none;
  overflow: hidden;
  box-shadow: 0 24px 46px rgba(14, 24, 39, 0.3);
}

.onboarding-head {
  border-bottom: 0;
  justify-content: center;
  padding: 18px 18px 8px;
  position: relative;
  top: 0;
  background: #fff;
}

.onboarding-head h3 {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 18px;
}

.onboarding-close-btn {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.08);
  color: rgba(23, 32, 51, 0.4);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.onboarding-content {
  white-space: normal;
  display: grid;
  gap: 11px;
  overflow-y: auto;
  padding: 6px 18px 18px;
}

.onboarding-intro {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.35;
}

.onboarding-steps {
  display: grid;
  gap: 9px;
}

.onboarding-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.88);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.onboarding-step-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(11, 138, 116, 0.3);
  background: rgba(11, 138, 116, 0.11);
  color: var(--primary-strong);
  font-family: Unbounded, sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.onboarding-step-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.onboarding-step-index {
  margin: 0;
  font-size: 11px;
  color: var(--primary-strong);
  font-weight: 900;
  text-transform: uppercase;
}

.onboarding-step-title {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  font-weight: 900;
}

.onboarding-step-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.36;
  color: var(--ink-soft);
}

.onboarding-done-btn {
  margin-top: 3px;
}

.withdraw-details-card {
  display: grid;
  gap: 10px;
}

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

.withdraw-details-amount {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}

.withdraw-details-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.withdraw-details-key {
  color: var(--ink-soft);
  font-size: 13px;
}

.withdraw-details-value {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

html[data-theme='dark'] .withdraw-details-amount {
  color: #eef4ff;
}

html[data-theme='dark'] .withdraw-details-row {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(24, 35, 52, 0.92), rgba(17, 26, 39, 0.96));
}

html[data-theme='dark'] .withdraw-details-key {
  color: rgba(174, 184, 204, 0.94);
}

html[data-theme='dark'] .withdraw-details-value {
  color: #eef4ff;
}

.badge.approved {
  color: #085f3c;
  background: rgba(15, 122, 74, 0.15);
}

html[data-theme='dark'] .badge.approved {
  color: #7fe2b8;
  background: rgba(61, 208, 148, 0.16);
}

.review-content {
  white-space: normal;
}

.review-stars {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.star-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(23, 32, 51, 0.3);
  width: 42px;
  height: 38px;
  border-radius: 10px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.14s ease, color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.star-btn.active {
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.5);
  background: rgba(245, 158, 11, 0.12);
}

.star-btn:hover {
  transform: translateY(-1px);
}

.review-note {
  margin: 8px 0 0;
}

@media (min-width: 980px) {
  .container {
    width: min(980px, 100%);
    margin: 0 auto;
    padding-left: 14px;
    padding-right: 14px;
  }

  .tabbar {
    left: 50%;
    right: auto;
    width: min(980px, calc(100% - 20px));
    transform: translateX(-50%);
  }
}

@media (max-width: 860px) {
  .plans {
    grid-template-columns: 1fr;
  }

  .legal-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    padding-top: var(--top-space);
    padding-left: 10px;
    padding-right: 10px;
    gap: 10px;
  }

  .card {
    border-radius: 18px;
    padding: 14px;
  }

  .hero h1 {
    font-size: 23px;
  }

  .channel-stats {
    font-size: 15px;
  }

  .review-head {
    grid-template-columns: auto 1fr;
  }

  .review-rating {
    grid-column: 2;
    justify-self: start;
  }

  .star-btn {
    width: 38px;
    height: 34px;
    font-size: 22px;
  }

  .tabbar {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding: 7px;
    gap: 7px;
  }

  .tab-btn {
    min-height: 40px;
    font-size: 11px;
  }

  .leaderboard-mode-toggle {
    grid-template-columns: 1fr;
  }

  .chat-messages-list {
    min-height: 0;
    max-height: none;
  }

  .chat-card {
    min-height: 0;
    height: 100%;
  }

  .chat-bubble {
    max-width: 94%;
  }

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

  .scroll-reviews-btn {
    width: 44px;
    height: 44px;
    right: 10px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    font-size: 24px;
  }

  .scroll-leaderboard-btn {
    width: 44px;
    height: 44px;
    right: 10px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    font-size: 24px;
  }

  .doc-modal {
    --doc-top-offset: calc(60px + env(safe-area-inset-top, 0px));
    padding: var(--doc-top-offset) 8px 8px;
  }

  .doc-sheet {
    width: 100%;
    height: calc(100dvh - var(--doc-top-offset) - 8px);
    border-radius: 14px;
  }

  .withdraw-details-sheet {
    height: auto;
    max-height: min(calc(100dvh - var(--doc-top-offset) - 24px), 640px);
    align-self: flex-end;
    margin-top: 0;
    margin-bottom: 0;
  }

  .onboarding-sheet {
    max-height: calc(100dvh - 24px);
    border-radius: 30px;
  }

  .onboarding-modal {
    padding: 10px 8px;
  }

  .onboarding-head {
    padding: 16px 14px 6px;
  }

  .onboarding-content {
    padding: 4px 14px 14px;
  }

  .onboarding-close-btn {
    right: 10px;
    top: 8px;
    width: 38px;
    height: 38px;
    font-size: 28px;
  }

  .doc-head {
    padding: 12px;
  }

  .doc-content {
    padding: 12px 12px 18px;
  }

  .app-toast-container {
    left: 8px;
    right: 8px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    gap: 7px;
  }

  .onboarding-intro {
    font-size: 13px;
  }

  .onboarding-step {
    padding: 10px;
    gap: 9px;
  }

  .onboarding-step-badge {
    width: 25px;
    height: 25px;
    font-size: 11px;
  }

  .onboarding-step-title {
    font-size: 14px;
  }

  .onboarding-step-text {
    font-size: 12px;
  }
}

@media (max-width: 390px) {
  body.mobile-compact .container {
    gap: 8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  body.mobile-compact .card {
    padding: 12px;
    border-radius: 16px;
  }

  body.mobile-compact .section-head {
    margin-bottom: 9px;
  }

  body.mobile-compact .muted {
    font-size: 12px;
  }

  body.mobile-compact .hint,
  body.mobile-compact .field-label,
  body.mobile-compact .withdraw-history-meta {
    font-size: 11px;
  }

  body.mobile-compact .input {
    padding: 11px 12px;
    margin-bottom: 8px;
  }

  body.mobile-compact .btn {
    padding: 11px 12px;
    font-size: 14px;
  }
}
