/* DXDCS Mini App — theme v5
   Visual language from dxdcs front (Inter + TikTok Sans, #21262b
   surfaces, #ff3636 accent, 12px radius, borderless cards) adapted
   to the existing Telegram Mini App canvas (#0d0d0d). */

:root {
  --bg: #0d0d0d;
  --bg-primary: #0d0d0d;
  --bg-secondary: #21262b;
  --bg-elevated: #21262b;
  --card: #21262b;
  --card-hover: #2d3239;
  --border: #1f2228;
  --border-subtle: #1f2228;
  --text: #ffffff;
  --text-primary: #ffffff;
  --text-muted: #a1a7b5;
  --text-dim: #7d8494;
  --text-secondary: #a1a7b5;
  --accent: #ff3636;
  --accent-hover: #ff4d4d;
  --accent-dim: rgba(255, 54, 54, 0.16);
  --success: #22c55e;
  --warning: #f6b949;
  --gold: #f4ca80;
  --silver: #c9ced8;
  --bronze: #cd7f4a;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 12px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;
  --shadow: none;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "TikTok Sans", "Inter", system-ui, sans-serif;
  --ls-tight: -0.2px;
}

html,
body,
#app {
  background: #0d0d0d;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: var(--ls-tight);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  background: #0d0d0d;
}

#app {
  overflow-x: hidden;
}

/* ========== Primitives ========== */

#app .card {
  background: var(--bg-secondary);
  border: 0;
  border-radius: var(--radius-xl);
  padding: 16px;
}

#app .btn {
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: var(--ls-tight);
  padding: 12px 16px;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}

#app .btn:active {
  transform: scale(0.97);
}

#app .btn:disabled {
  opacity: 0.45;
}

#app .btn-primary {
  background: var(--accent);
  color: #fff;
}

#app .btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

#app .btn-ghost {
  background: var(--bg-secondary);
  color: var(--text);
  border: 0;
}

#app .btn-ghost:hover:not(:disabled) {
  background: var(--card-hover);
}

#app .pill {
  background: var(--bg-secondary);
  border: 0;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: var(--ls-tight);
}

#app .section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: var(--ls-tight);
  margin: 0 0 12px;
}

#app .text-muted {
  color: var(--text-muted);
}

#app .skeleton,
.dxd-skel {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 37%, var(--card) 63%);
  background-size: 400% 100%;
  border-radius: var(--radius-xl);
  animation: dxd-skel-shimmer 1.6s ease-in-out infinite;
}

@keyframes dxd-skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

#app input,
#app textarea,
#app select,
#app .input {
  background: #0d0d0d;
  border: 0;
  border-radius: var(--radius-xl);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: var(--ls-tight);
  min-height: 44px;
}

#app input::placeholder,
#app textarea::placeholder,
#app .input::placeholder {
  color: #7d8494;
  opacity: 1;
}

#app input:focus,
#app textarea:focus,
#app .input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-dim);
}

#app .close-btn {
  background: var(--bg-secondary);
  border: 0;
  border-radius: 10px;
  color: var(--text-muted);
}

#app .close-btn:hover {
  color: var(--text);
  background: var(--card-hover);
}

/* ========== Chrome: topbar ========== */

#app .topbar {
  background:
    linear-gradient(180deg, rgba(33, 38, 43, 0.22) 0%, rgba(13, 13, 13, 0.94) 100%);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 7px 10px;
  gap: 6px;
  min-height: 56px;
  align-items: center;
}

#app .topbar .spacer {
  flex: 1 1 12px;
  min-width: 8px;
  height: auto;
  align-self: stretch;
  margin: 0 4px;
  background: none;
}

#app .topbar .spacer::before,
#app .topbar .spacer::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

#app .topbar .icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  border: 0;
  color: var(--text-muted);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  flex-shrink: 0;
}

#app .topbar .icon-btn:hover,
#app .topbar .icon-btn:active {
  color: var(--text);
  background: var(--card-hover);
}

#app .topbar .icon-btn.active {
  color: #fff;
  background: var(--accent);
}

#app .topbar .online-pill {
  height: 42px;
  min-width: 42px;
  padding: 0 11px;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#app .topbar .online-pill:hover {
  background: var(--card-hover);
}

#app .topbar .online-count {
  margin-left: 0;
  line-height: 1;
  color: #fff;
}

#app .topbar .online-dot {
  width: 7px;
  height: 7px;
  margin: 0;
}

#app .topbar .balance.pill,
#app .topbar .balance {
  height: 42px;
  min-height: 42px;
  padding: 0 12px 0 8px;
  gap: 5px;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  letter-spacing: var(--ls-tight);
  font-feature-settings: "tnum" 1;
  display: inline-flex;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  pointer-events: none !important;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  cursor: default;
}

#app .topbar .balance.pill *,
#app .topbar .balance * {
  pointer-events: none !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

#app .topbar .balance .crystal-icon,
#app .topbar .balance .dxd-crystal-img {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
  object-position: center 46%;
  display: block;
  flex-shrink: 0;
  margin: 0 0 1px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

/* ========== Chrome: bottom nav ========== */

#app .bottom-nav {
  background: #0d0d0d;
  border-top: 1px solid var(--border-subtle);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  gap: 2px;
}

#app .bottom-nav .tab {
  position: relative;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--ls-tight);
  padding: 8px 2px 7px;
  gap: 4px;
}

#app .bottom-nav .tab.active {
  color: #fff;
  background: var(--bg-secondary);
}

#app .bottom-nav .tab.active::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}

#app .bottom-nav .tab:active {
  transform: scale(0.96);
}

/* Custom PNG glyphs (black-on-transparent → currentColor mask) */
.dxd-glyph {
  display: block;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  overflow: hidden;
  background-color: currentColor;
  -webkit-mask-image: var(--dxd-mask);
  mask-image: var(--dxd-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-clip: content-box;
  mask-clip: content-box;
}

.dxd-glyph[data-icon="home"] {
  --dxd-mask: url("/assets/icon-home.png?v=frontsys3");
}
.dxd-glyph[data-icon="cases"] {
  --dxd-mask: url("/assets/icon-cases.png?v=frontsys3");
}
.dxd-glyph[data-icon="tasks"] {
  --dxd-mask: url("/assets/icon-tasks.png?v=frontsys3");
}
.dxd-glyph[data-icon="rating"] {
  --dxd-mask: url("/assets/icon-rating.png?v=frontsys3");
}
.dxd-glyph[data-icon="profile"] {
  --dxd-mask: url("/assets/icon-profile.png?v=frontsys3");
}
.dxd-glyph[data-icon="servers"] {
  --dxd-mask: url("/assets/icon-servers.png?v=frontsys3");
}
.dxd-glyph[data-icon="vouchers"] {
  --dxd-mask: url("/assets/icon-vouchers.png?v=frontsys8");
}
.dxd-glyph[data-icon="support"] {
  --dxd-mask: url("/assets/icon-support.png?v=frontsys3");
}
.dxd-glyph[data-icon="withdraw"] {
  --dxd-mask: url("/assets/icon-withdraw.png?v=frontsys6");
}
.dxd-glyph[data-icon="gift"] {
  --dxd-mask: url("/assets/icon-gift.png?v=frontsys16");
}

#app .bottom-nav .tab > svg {
  display: none !important;
}

#app .bottom-nav .tab .dxd-glyph {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  color: #a1a7b5;
}

#app .bottom-nav .tab.active .dxd-glyph {
  color: #ff3636;
}

#app .topbar .icon-btn > svg {
  display: none !important;
}

#app .topbar .icon-btn .dxd-glyph {
  width: 20px;
  height: 20px;
  color: #a1a7b5;
  padding: 0;
  -webkit-mask-clip: border-box;
  mask-clip: border-box;
  transform: translateZ(0);
}

#app .topbar .icon-btn:hover .dxd-glyph,
#app .topbar .icon-btn:active .dxd-glyph {
  color: #ffffff;
}

#app .topbar .icon-btn.active .dxd-glyph {
  color: #ffffff;
}

#app .home .link-icon > svg {
  display: none !important;
}

#app .home .link-icon .dxd-glyph {
  width: 22px;
  height: 22px;
  color: var(--tint, #a1a7b5);
}

#app .vouchers .intro .icon > svg,
#app .support .center .icon > svg {
  display: none !important;
}

#app .vouchers .intro .icon .dxd-glyph,
#app .support .center .icon .dxd-glyph {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

#app .content {
  padding: 16px 16px 24px;
}

/* ========== Boot splash ========== */

.splash:has(.splash-bar),
.splash:has(.splash-logo) {
  opacity: 0 !important;
  pointer-events: none !important;
}

#app .splash {
  background: #0d0d0d;
  gap: 16px;
}

#app .splash .text-muted {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

#app .splash .btn-ghost {
  min-width: 160px;
}

#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 54, 54, 0.14), transparent 46%),
    #0d0d0d;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  contain: layout paint;
}

#boot-splash.boot-splash--out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#boot-splash .boot-icon {
  width: 128px;
  height: 128px;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(255, 54, 54, 0.48));
  will-change: transform, filter, opacity;
  animation:
    boot-icon-in 0.95s cubic-bezier(0.22, 1, 0.36, 1) both,
    boot-icon-pulse 2.2s ease-in-out 0.95s infinite;
}

#boot-splash .boot-wordmark {
  position: relative;
  width: min(68vw, 230px);
  height: 48px;
  will-change: transform, opacity;
  animation: boot-word-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

#boot-splash .dxd-logo {
  font-family: "Unbounded", var(--font-display), sans-serif;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#boot-splash .dxd-logo text {
  text-transform: uppercase;
  font-size: 232px;
  font-weight: 900;
  letter-spacing: 0.02em;
  stroke-width: 2;
  stroke: #ff3636;
  fill: #0d0d0d;
  font-family: "Unbounded", sans-serif;
  animation: dxd-stroke 4s linear infinite alternate;
}

#boot-splash .dxd-logo__accent {
  fill: #ffffff;
  stroke: #ffffff;
  animation: dxd-stroke-accent 4s linear infinite alternate;
}

#boot-splash .boot-bar {
  width: 112px;
  height: 3px;
  margin-top: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #21262b 25%, #2d3239 37%, #21262b 63%);
  background-size: 400% 100%;
  opacity: 0;
  animation:
    boot-bar-in 0.5s ease 0.35s both,
    splash-bar-pulse 1.35s ease-in-out 0.35s infinite;
}

@keyframes boot-icon-in {
  0% { opacity: 0; transform: scale(0.55) rotate(-10deg); filter: drop-shadow(0 0 0 rgba(255, 54, 54, 0)); }
  60% { opacity: 1; transform: scale(1.05) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: drop-shadow(0 0 26px rgba(255, 54, 54, 0.48)); }
}

@keyframes boot-icon-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(255, 54, 54, 0.36)); }
  50% { transform: scale(1.035); filter: drop-shadow(0 0 30px rgba(255, 54, 54, 0.56)); }
}

@keyframes boot-word-in {
  0% { opacity: 0; transform: translateY(10px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes boot-bar-in {
  from { opacity: 0; transform: scaleX(0.65); }
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes splash-bar-pulse {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@keyframes dxd-stroke {
  0% {
    fill: #0d0d0d;
    stroke: #ffffff;
    stroke-dashoffset: 25%;
    stroke-dasharray: 0 50%;
    stroke-width: 2;
  }
  30% {
    fill: #0d0d0d;
    stroke: #ffffff;
  }
  80% {
    fill: #0d0d0d;
    stroke: #ff3636;
    stroke-width: 3;
  }
  100% {
    fill: #ff3636;
    stroke: #0d0d0d;
    stroke-dashoffset: -25%;
    stroke-dasharray: 50% 0;
    stroke-width: 0;
  }
}

@keyframes dxd-stroke-accent {
  0% {
    fill: #0d0d0d;
    stroke: #ffffff;
    stroke-dashoffset: 25%;
    stroke-dasharray: 0 50%;
    stroke-width: 2;
  }
  30% {
    fill: #0d0d0d;
    stroke: #ffffff;
  }
  80% {
    fill: #0d0d0d;
    stroke: #ffffff;
    stroke-width: 3;
  }
  100% {
    fill: #ffffff;
    stroke: #0d0d0d;
    stroke-dashoffset: -25%;
    stroke-dasharray: 50% 0;
    stroke-width: 0;
  }
}

/* ========== Home ========== */

#app .home {
  gap: 16px;
}

/* Depth behind the top user-info block, echoed in the merged action card
   below it - the same "glow behind the top block, fading into the content"
   idea used for the Profile head's Steam background, adapted here with a
   static accent glow tinted into each card's own background (Home has no
   avatar wallpaper to sample from) instead of a page-level overlay, so it
   can't interfere with fixed-position overlays like the loot burst effect. */
#app .home .hero {
  background:
    radial-gradient(140% 110% at 28% -20%, rgba(255, 54, 54, 0.2), transparent 62%),
    var(--bg-secondary);
  border: 0;
  border-radius: var(--radius-xl);
  padding: 16px;
}

#app .home .hero .nick {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: var(--ls-tight);
}

#app .home .hero .greet {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

#app .home .hero .avatar {
  border: 0;
  box-shadow: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

#app .home .hero .avatar-img {
  border-radius: 12px;
}

#app .home .balance-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: var(--ls-tight);
  font-feature-settings: "tnum" 1;
}

#app .home .balance-label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

#app .home .withdraw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--card-hover);
  border: 0;
  border-radius: var(--radius-xl);
  color: var(--text);
  font-weight: 700;
  padding: 10px 14px;
}

#app .home .withdraw-btn:hover {
  background: #323942;
}

#app .home .withdraw-btn > svg {
  display: none !important;
}

#app .home .withdraw-btn .dxd-glyph {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

#app .home .withdraw-btn:disabled .dxd-glyph,
#app .home .withdraw-btn[aria-disabled="true"] .dxd-glyph {
  color: #7d8494;
}

#app .btn-primary .dxd-glyph[data-icon="withdraw"],
#app .withdraw-btn.btn-primary .dxd-glyph,
#app button[style*="accent"] .dxd-glyph[data-icon="withdraw"] {
  color: #ffffff;
}

#app .home .action.card {
  border: 0;
  box-shadow: none;
}

#app .home .action.ready {
  box-shadow: none;
}

/* Merge the "Лутать" + "Подарок" CooldownAction cards into a single unified
   block - same negative-margin + split-radius technique already used for
   Profile's head/row-card pair, reused here for consistency. Readiness is
   still communicated per-half via the pulsing icon + glowing red button, so
   no outline/ring is needed at the card level anymore. */
#app .home .action.card:has(+ .action.card) {
  background:
    radial-gradient(160% 130% at 30% -60%, rgba(255, 54, 54, 0.14), transparent 68%),
    var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding-bottom: 14px;
}

#app .home .action.card + .action.card {
  margin-top: -16px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

#app .home .action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card-hover);
  color: var(--accent);
}

/* "Подарок" tile: masked flat glyph (replacing the old illustrated gift
   icon) tinted gold instead of the crystal's red, so the two merged-card
   halves stay visually distinct at a glance. */
#app .home .action-icon.is-gift {
  color: var(--gold);
}

#app .home .action-icon .dxd-glyph {
  width: 24px;
  height: 24px;
}

#app .home .action-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

#app .home .action-desc {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

#app .home .btn-timer {
  background: var(--card-hover);
  border: 0;
  color: var(--text-muted);
}

#app .home .progress-track {
  background: #0d0d0d;
  height: 4px;
}

#app .home .quick-links {
  gap: 8px;
}

#app .home .link-card {
  background: var(--bg-secondary);
  border: 0;
  border-radius: var(--radius-xl);
  color: var(--text-muted);
  padding: 16px 8px 14px;
}

#app .home .link-card:hover {
  background: var(--card-hover);
  color: var(--text);
}

#app .home .link-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card-hover);
  overflow: hidden;
  border: 0;
}

#app .home .link-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--ls-tight);
}

#app .action-icon svg image {
  filter: drop-shadow(0 2px 4px rgba(255, 54, 54, 0.35));
}

#app .action.card .action-icon {
  overflow: visible;
}

#app .action-icon svg image[href*="crystal"] {
  filter: drop-shadow(0 2px 5px rgba(224, 195, 90, 0.45));
}

/* ========== Servers ========== */

#app .servers {
  gap: 16px;
}

#app .servers .summary-item .value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  font-feature-settings: "tnum" 1;
}

#app .servers .summary-item .label {
  color: var(--text-muted);
  font-size: 12px;
}

#app .servers .cat {
  background: var(--bg-secondary);
  border: 0;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 12px;
}

#app .servers .cat.active {
  background: var(--accent);
  color: #fff;
}

#app .servers .server {
  border: 0;
  border-radius: var(--radius-xl);
}

#app .servers .server:hover {
  outline: 1px solid rgba(255, 54, 54, 0.45);
}

#app .servers .status,
#app .servers .map-tag {
  background: rgba(13, 13, 13, 0.72);
  border-radius: var(--radius-full);
}

#app .servers .modal {
  background: var(--bg);
  border-radius: 16px 16px 0 0;
}

#app .servers .connect-card,
#app .servers .player {
  background: var(--bg-secondary);
  border: 0;
  border-radius: var(--radius-xl);
}

#app .servers .copy-btn {
  border-radius: 10px;
  background: var(--accent);
}

#app .server-pick-row {
  background: var(--bg-secondary);
  border: 0;
  border-radius: var(--radius-xl);
  padding: 12px 16px;
}

#app .server-pick-row:hover:not(:disabled) {
  background: var(--card-hover);
}

/* ========== Rating ========== */

#app .rating {
  gap: 16px;
}

#app .rating .my-rank {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background:
    radial-gradient(90% 140% at 0% 50%, rgba(255, 54, 54, 0.14), transparent 58%),
    #21262b;
  color: var(--text);
}

#app .rating .my-rank > svg {
  display: none !important;
}

#app .rating .dxd-my-rank-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 54, 54, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

#app .rating .dxd-my-rank-icon .dxd-glyph {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

#app .rating .my-rank .value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: var(--ls-tight);
  font-feature-settings: "tnum" 1;
}

#app .rating .my-rank .label {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Skeleton placeholder for "Ваше место" while /api/rating is pending — prevents
   the card from popping in above the list and pushing it down once data arrives. */
#app .rating .my-rank.dxd-my-rank-skel {
  display: flex;
  align-items: center;
}

#app .rating .my-rank.dxd-my-rank-skel .dxd-skel {
  border-radius: 12px;
}

#app .rating .list {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

#app .rating .list > .row {
  background: var(--bg-secondary);
  border-radius: 0;
  padding: 12px 16px;
}

#app .rating .list > .row:first-child {
  border-radius: 12px 12px 0 0;
}

#app .rating .list > .row:last-child {
  border-radius: 0 0 12px 12px;
}

#app .rating .list > .row:only-child {
  border-radius: var(--radius-xl);
}

#app .rating .list > .row:hover {
  background: var(--card-hover);
}

#app .rating .list > .row:not(:last-child)::after {
  display: block;
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: #1f2228;
  pointer-events: none;
}

#app .rating .rank {
  background: var(--card-hover);
  border-radius: 10px;
  color: var(--text-muted);
}

#app .rating .nickname-text {
  font-weight: 500;
  letter-spacing: var(--ls-tight);
}

#app .rating .avatar-img {
  border-radius: 8px;
}

/* Top-3 medal highlighting — rank badge tokens are shared with the Home
   tab's "Ваше место" rank chip (see #app .home .rank.pill.dxd-tier-N below
   and home-icons.js patchHeroRank/patchRatingRowTiers), so both surfaces
   read as one consistent gold/silver/bronze system instead of duplicated
   color rules. */
#app .rating .rank.r1,
#app .home .rank.pill.dxd-tier-1 {
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 55%, #fff), var(--gold));
  color: #241a02;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent),
    0 0 10px color-mix(in srgb, var(--gold) 45%, transparent);
}

#app .rating .rank.r2,
#app .home .rank.pill.dxd-tier-2 {
  background: linear-gradient(135deg, color-mix(in srgb, var(--silver) 50%, #fff), var(--silver));
  color: #1a1c20;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--silver) 50%, transparent),
    0 0 9px color-mix(in srgb, var(--silver) 38%, transparent);
}

#app .rating .rank.r3,
#app .home .rank.pill.dxd-tier-3 {
  background: linear-gradient(135deg, color-mix(in srgb, var(--bronze) 50%, #fff), var(--bronze));
  color: #221004;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--bronze) 52%, transparent),
    0 0 9px color-mix(in srgb, var(--bronze) 42%, transparent);
}

/* Row-level tint + left accent bar per medal tier. Kept to background/
   box-shadow only so the existing first/last-child radius rules and the
   ::after divider lines above stay intact. dxd-tier-N is toggled onto the
   row by home-icons.js patchRatingRowTiers() from the rank badge's own
   r1/r2/r3 class (Vue already emits `rank rN` per-row; only the parent
   .row needed a JS-added mirror since CSS can't select an ancestor from
   a child class without :has()). */
#app .rating .list > .row.dxd-tier-1 {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--gold) 16%, transparent), transparent 72%),
    var(--bg-secondary);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--gold) 80%, transparent);
}

#app .rating .list > .row.dxd-tier-1:hover {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--gold) 22%, transparent), transparent 72%),
    var(--card-hover);
}

#app .rating .list > .row.dxd-tier-2 {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--silver) 13%, transparent), transparent 72%),
    var(--bg-secondary);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--silver) 75%, transparent);
}

#app .rating .list > .row.dxd-tier-2:hover {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--silver) 19%, transparent), transparent 72%),
    var(--card-hover);
}

#app .rating .list > .row.dxd-tier-3 {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bronze) 14%, transparent), transparent 72%),
    var(--bg-secondary);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--bronze) 78%, transparent);
}

#app .rating .list > .row.dxd-tier-3:hover {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bronze) 20%, transparent), transparent 72%),
    var(--card-hover);
}

#app .rating .list > .row.dxd-tier-1 .nickname-text {
  color: color-mix(in srgb, var(--gold) 85%, var(--text));
}

#app .rating .list > .row.dxd-tier-2 .nickname-text {
  color: color-mix(in srgb, var(--silver) 80%, var(--text));
}

#app .rating .list > .row.dxd-tier-3 .nickname-text {
  color: color-mix(in srgb, var(--bronze) 75%, var(--text));
}

/* Home's rank chip reuses the same trophy→rating glyph as the Rating tab's
   "Ваше место" tile (see patchHeroRank in home-icons.js); size it to match
   the pill's text and let tier classes above recolor the whole chip. */
#app .home .rank.pill {
  gap: 6px;
}

#app .home .rank.pill > svg {
  display: none !important;
}

#app .home .rank.pill .dxd-glyph {
  width: 14px;
  height: 14px;
  color: currentColor;
}

/* Rating "user detail" sheet is rendered via <Teleport to="body">, so it
   lives OUTSIDE #app in the DOM — every #app-scoped .ud-* rule that used
   to live here silently never matched anything. Kept unscoped on purpose. */

.ud-sheet {
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.ud-head {
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
}

.ud-avatar-wrap.verified {
  background: linear-gradient(135deg, #3ea6ff, #6fd0ff);
}

.ud-nick {
  font-family: var(--font-display);
  font-weight: 700;
}

/* Single unified info card: one rounded container, rows divided by a
   hairline instead of each row being its own bordered box/button. */
.ud-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  padding: 2px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.ud-body > .ud-row,
.ud-body > a.ud-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 12px 0 !important;
  gap: 12px !important;
  position: relative !important;
  transition: none !important;
}

.ud-body > .ud-row:last-child,
.ud-body > a.ud-row:last-child {
  border-bottom: 0 !important;
}

/* Links used to get a permanent "button" look from the native hover state
   (mobile taps stick :hover) — flatten it back into a plain row, affordance
   comes from the accent-colored value + chevron only. */
.ud-row-link,
.ud-row-link:hover,
.ud-row-link:active,
.ud-row-link:focus {
  border: 0 !important;
  background: transparent !important;
}

.ud-body .ud-row-icon {
  display: flex !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  flex: 0 0 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50%;
  background: var(--card-hover);
  color: var(--text-dim);
  justify-content: center;
  align-items: center;
  position: static !important;
  visibility: visible !important;
}

.ud-body .ud-row-icon.ok {
  color: var(--success);
}

.ud-body .ud-row-icon svg {
  width: 15px;
  height: 15px;
}

/* The badge image already carries its own "verified" color signal (blue
   seal), so its chip keeps the same neutral background as every other
   row instead of double-signalling with a tinted circle behind it. */
.ud-body .ud-row-icon .dxd-verified-badge {
  width: 20px;
  height: 20px;
  display: block;
}

/* Regression fix: the verification row's badge rendered at a barely-legible
   size in the rating player modal. The badge <img> gets its size from an
   inline style (profile-verified.js badgeImgEl()), which normally beats a
   plain class rule - so the "20px" rule above never actually applied here.
   !important is required to win over that inline style. The chip also gets
   a blue-tinted glow (echoing the verified avatar glow elsewhere) instead of
   the neutral grey used by other rows, so verification reads at a glance. */
.ud-body .ud-row-icon.ok {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  flex: 0 0 38px !important;
  background: radial-gradient(
    circle at 35% 32%,
    rgba(96, 181, 255, 0.55),
    rgba(62, 166, 255, 0.16) 72%
  );
  box-shadow:
    0 0 0 1px rgba(96, 181, 255, 0.45),
    0 0 14px rgba(62, 166, 255, 0.45);
}

.ud-body .ud-row-icon.ok .dxd-verified-badge {
  width: 30px !important;
  height: 30px !important;
}

/* Verified badge next to the player's nickname in the modal header - also
   too small by default (inherits the generic 14px sizing used everywhere
   else); bump it up specifically here so name + status are both legible
   the instant the sheet opens. */
.ud-head .ud-nick .dxd-verified-badge {
  width: 19px !important;
  height: 19px !important;
}

.ud-body .ud-row-text {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  gap: 12px !important;
  position: static !important;
  box-sizing: border-box !important;
}

.ud-body .ud-row-label {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--text-muted);
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: var(--ls-tight);
  text-transform: none !important;
  flex: 0 1 auto !important;
  min-width: 0;
}

.ud-body .ud-row-value {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 0 0 auto !important;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-align: right !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  overflow: visible !important;
  max-width: none !important;
}

.ud-row-value.link {
  color: var(--accent);
}

.ud-row-value.ok,
.ud-row-value[data-dxd-v="ok"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  color: #fff;
}

.ud-row-value.no,
.ud-row-value[data-dxd-v="no"] {
  color: var(--text-muted);
  font-weight: 500;
}

.ud-row-value svg,
.ud-row-value .dxd-ud-check {
  width: 13px !important;
  height: 13px !important;
  max-width: 13px !important;
  max-height: 13px !important;
  flex-shrink: 0 !important;
  fill: none;
  stroke: var(--success);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ud-row-chev {
  color: var(--text-dim);
  flex-shrink: 0;
}

.ud-skel {
  border-radius: 8px;
  margin: 8px 0;
}

/* Verified badge (blue seal + check) — replaces the built-in .verified-badge
   svg everywhere via profile-verified.js; unscoped since the rating sheet
   renders outside #app. */
svg.verified-badge {
  display: none !important;
}

img.dxd-verified-badge {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  object-fit: contain;
}

/* ========== Cases ========== */

#app .cases {
  gap: 16px;
}

#app .cases .case-hero {
  background: var(--bg-secondary);
  border: 0;
}

#app .cases .case-hero-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
}

#app .cases .case-hero-sub {
  color: var(--text-muted);
}

#app .cases .value-chip {
  background: var(--card-hover);
  border: 0;
  border-radius: var(--radius-full);
}

#app .cases .seg {
  background: var(--bg-secondary);
  border: 0;
  border-radius: var(--radius-xl);
  padding: 2px;
  gap: 2px;
}

#app .cases .seg-btn {
  border-radius: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

#app .cases .seg-btn.active {
  background: #0d0d0d;
  color: #fff;
}

#app .cases .list {
  gap: 2px;
  padding: 0;
}

#app .cases .list > .row {
  background: var(--bg-secondary);
  border-radius: 2px;
  padding: 12px 16px;
}

#app .cases .list > .row:first-child {
  border-radius: 12px 12px 2px 2px;
}

#app .cases .list > .row:last-child {
  border-radius: 2px 2px 12px 12px;
}

#app .cases .list > .row:only-child {
  border-radius: var(--radius-xl);
}

#app .cases .list > .row:hover {
  background: var(--card-hover);
}

#app .cases .open-option {
  background: var(--bg-secondary);
}

#app .cases .option-icon {
  border-radius: 10px;
}

#app .cases .opened-card {
  background: var(--bg-secondary);
  border: 0;
}

#app .reel-item {
  background: var(--bg-secondary);
  border: 0;
  border-radius: 10px;
}

/* ========== Compact server picker ==========
   Shared <ServerPickList> component (server-pick-list/-row/dot/name/chev)
   used in-context in both Cases ("Открыть за игру") and Tasks ("Тайна двух
   часов" + VIP claim) to pick a server. It used to render as a tall stack of
   full-width rows - one per server - which ate a lot of vertical space for
   what's a single, low-stakes choice. Restyled into a horizontal scrolling
   row of compact pills; all pick/onClick wiring is untouched, only layout. */
#app .server-pick-list {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 8px !important;
  margin: 0 -16px;
  padding: 2px 16px 8px;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #66717a #171c20;
}

#app .server-pick-list::-webkit-scrollbar {
  display: block;
  height: 8px;
}

#app .server-pick-list::-webkit-scrollbar-track {
  background: #171c20;
  border-radius: 8px;
}

#app .server-pick-list::-webkit-scrollbar-thumb {
  background: #66717a;
  border-radius: 8px;
}

#app .server-pick-list::-webkit-scrollbar-thumb:hover { background: #929ca4; }
#app .server-pick-row:focus-visible { outline: 2px solid #ff3636; outline-offset: -2px; }

#app .server-pick-row {
  flex: 0 0 auto !important;
  width: auto !important;
  scroll-snap-align: start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 9px 14px 9px 12px;
  gap: 8px;
  font-size: 13px;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

#app .server-pick-row:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--card-hover);
}

#app .server-pick-row:active:not(:disabled) {
  transform: scale(0.97);
}

#app .server-pick-row .name {
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}

#app .server-pick-row .chev {
  /* The chevron-right icon component sets an inline `style="display:block"`
     (its default), which beats this rule without !important - the chevron
     stayed visible, adding ~24px of dead width to every pill. With only
     ~358px of viewport per row that was enough to make just ~2 of the 15
     pills fit on screen with no visible sliver of a 3rd to hint the row
     scrolls, so it read as "only 2 servers" even though all 15 were in the
     DOM and touch-swipe worked - the row just looked like a finished,
     2-item list. */
  display: none !important;
}

#app .server-pick-row .dot {
  width: 6px;
  height: 6px;
}

#app .reel-result {
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl);
}

#app .reel-result-value {
  font-family: var(--font-display);
}

/* ========== Tasks ========== */

#app .tasks {
  gap: 14px;
}

/* "Всего заданий" summary card - reuses the same icon-chip + value/label
   pattern as Rating's "Ваше место" card (dxd-tasks-icon, patched in
   home-icons.js) for visual consistency across tabs. */
#app .tasks .done-count {
  position: relative;
  gap: 14px;
}

#app .tasks .done-count > svg {
  display: none !important;
}

#app .tasks .dxd-tasks-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 54, 54, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#app .tasks .dxd-tasks-icon .dxd-glyph {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

#app .tasks .done-count .value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: var(--ls-tight);
  font-feature-settings: "tnum" 1;
}

#app .tasks .done-count .label {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-muted);
}

#app .tasks .task.card {
  border: 0;
}

#app .tasks .task-head {
  margin-bottom: 10px !important;
}

#app .tasks .task-head .section-title {
  font-size: 15.5px;
  gap: 10px;
}

#app .tasks .task-head .section-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

#app .tasks .task p {
  color: var(--text-muted);
  line-height: 1.5;
}

#app .tasks .vote-row {
  background: var(--card-hover);
  border-radius: var(--radius-sm);
}

#app .tasks .vote-row-link {
  font-weight: 700;
}

#app .tasks .vote-summary {
  color: var(--text-muted);
}

#app .tasks .progress {
  background: #0d0d0d;
  border-radius: var(--radius-full);
}

#app .tasks .progress-fill {
  border-radius: inherit;
}

#app .tasks .badge {
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* ========== Vouchers ========== */

#app .vouchers {
  gap: 16px;
}

#app .vouchers .intro .icon,
#app .support .center .icon,
#app .withdraw-icon {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#app .withdraw-icon > svg {
  display: none !important;
}

#app .withdraw-icon .dxd-glyph {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

#app .vouchers .intro p,
#app .support .center p {
  color: var(--text-muted);
}

#app .vouchers .field-label {
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: var(--ls-tight);
  font-size: 14px;
  font-weight: 500;
}

#app .vouchers .input-wrap {
  background: #0d0d0d;
  border-radius: 12px;
  min-height: 44px;
  align-items: center;
}

#app .vouchers .input-icon {
  color: #7d8494;
  left: 14px;
  z-index: 1;
}

#app .vouchers .input-wrap > svg.input-icon,
#app .vouchers svg.input-icon {
  display: none !important;
}

#app .vouchers .input-wrap > .dxd-glyph.input-icon,
#app .vouchers .input-icon.dxd-glyph {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #7d8494;
  pointer-events: none;
  z-index: 1;
}

#app .vouchers .input {
  height: 44px;
  min-height: 44px;
  padding: 12px 16px 12px 40px;
  background: #0d0d0d;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
}

#app .vouchers .input::placeholder {
  color: #7d8494;
  opacity: 1;
}

#app .vouchers .input:focus {
  box-shadow: none;
}

#app .vouchers .input-wrap:focus-within {
  box-shadow: 0 0 0 2px var(--accent-dim);
}

#app .vouchers .btn-primary,
#app .vouchers .btn-primary:disabled {
  background: #ff3636;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

#app .vouchers .btn-primary svg,
#app .vouchers .btn-primary:disabled svg {
  color: #ffffff;
  stroke: currentColor;
}

#app .vouchers .btn-primary:disabled {
  opacity: 0.72;
}

#app .vouchers .btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

/* ========== Profile ========== */

#app .profile {
  gap: 16px;
}

#app .profile > .card.head:has(+ .card.row-card) {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding-top: 20px;
  padding-bottom: 22px;
}

#app .profile > .card.head:has(+ .card.row-card):not(.head--verified):not(.head--steam-bg) {
  background: var(--bg-secondary);
}

#app .profile > .card.head + .card.row-card {
  margin-top: -16px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding-top: 4px;
  background: var(--bg-secondary);
  position: relative;
  z-index: 1;
}

#app .profile .head .nick {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
}

#app .profile .head .tid {
  color: var(--text-muted);
}

#app .profile .avatar {
  border-radius: 12px;
}

#app .profile .row-card {
  border: 0;
}

#app .profile .gold {
  align-items: center;
  gap: 6px;
}

#app .profile .gold .crystal-icon,
#app .profile .gold .dxd-crystal-img {
  width: 16px !important;
  height: 16px !important;
  object-fit: contain;
  object-position: center 46%;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

#app .rating .balance .crystal-icon,
.ud-row-value .crystal-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

#app .profile .steam-btn,
#app .gate .steam-btn {
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-xl);
  color: #fff;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  padding: 12px 16px;
}

#app .profile .steam-btn:hover:not(:disabled),
#app .gate .steam-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

#app .profile .verified-note {
  display: none !important;
}

#app .profile > .card:not(.head):not(.row-card):not(.dxd-history) > .section-title,
#app .profile > .card:not(.head):not(.row-card):not(.dxd-history) > p.small,
#app .profile > .card:not(.head):not(.row-card):not(.dxd-history) > .text-muted.small {
  display: none !important;
}

#app .profile > .card:not(.head):not(.row-card):not(.dxd-history):not(:has(.steam-btn)):not(:has(.form)):not(:has(.waiting-block)) {
  display: none !important;
}

#app .profile .steamid-value[data-dxd-copy] {
  cursor: pointer;
  gap: 8px;
  padding: 2px 0 2px 2px;
  border-radius: 6px;
}

#app .profile .steamid-value[data-dxd-copy]:active {
  opacity: 0.78;
}

#app .profile .dxd-copy-sid {
  width: 22px;
  height: 22px;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #7d8494;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

#app .profile .dxd-copy-sid svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#app .profile .card.row-card > .row.dxd-steam-status,
#app .profile .dxd-steam-status {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: 12px !important;
  flex: 0 0 auto !important;
  padding-top: 2px;
}

#app .profile .card.row-card > .row.dxd-steam-status > .dxd-steam-status-label,
#app .profile .dxd-steam-status-label {
  flex: 0 1 auto !important;
  min-width: 0;
}

#app .profile .card.row-card > .row.dxd-steam-status > .dxd-steam-status-val,
#app .profile .dxd-steam-status-val {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  flex: 0 0 auto !important;
  text-align: right !important;
  font-size: 13.5px;
  line-height: 1.25;
  font-weight: 600;
  color: #fff;
}

#app .profile .dxd-steam-status-val.ok {
  color: #fff;
}

#app .profile .dxd-steam-status-val.ok svg {
  color: #64ce82;
}

#app .profile .dxd-steam-status-val.no {
  color: var(--text-muted);
  font-weight: 500;
}

#app .profile .dxd-steam-status-val svg {
  width: 13px !important;
  height: 13px !important;
  max-width: 13px !important;
  max-height: 13px !important;
  flex-shrink: 0 !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#app .profile .input {
  height: 44px;
  min-height: 44px;
  padding: 12px 16px;
  background: #0d0d0d;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
}

#app .profile .input::placeholder {
  color: #7d8494;
  opacity: 1;
}

#app .dxd-history-row {
  background: var(--bg-secondary);
  border: 0;
  border-radius: var(--radius-xl);
}

#app .dxd-history .section-title {
  font-size: 20px;
}

/* ========== Support ========== */

#app .support {
  gap: 16px;
}

#app .support .faq-card {
  border: 0;
}

#app .support .faq-item {
  border-top-color: var(--border-subtle);
}

#app .support .faq-question {
  font-weight: 500;
  letter-spacing: var(--ls-tight);
}

#app .support .faq-item.open .faq-question {
  color: var(--accent);
}

#app .support .faq-answer {
  color: var(--text-muted);
}

/* ========== Gates: steam / maintenance / blocked ========== */

#app .gate {
  background: #0d0d0d;
}

#app .gate h1,
#app .gate .logo {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
}

#app .gate .logo span {
  color: var(--accent);
}

#app .gate p {
  color: var(--text-muted);
}

#app .gate .status-chip {
  background: var(--bg-secondary);
  border: 0;
}

#app .gate .input {
  height: 44px;
  min-height: 44px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 0;
  border-radius: 12px;
  color: #ffffff;
}

#app .gate .input::placeholder {
  color: #7d8494;
  opacity: 1;
}

#app .gate .divider:before,
#app .gate .divider:after {
  background: var(--border-subtle);
}

/* ========== Online modal + withdraw ========== */

#app .online-modal,
#app .withdraw-modal {
  background: var(--bg-secondary);
  border: 0;
  border-radius: 16px 16px 0 0;
}

#app .withdraw-modal {
  border-radius: var(--radius-2xl);
}

#app .online-head {
  border-bottom: 1px solid var(--border-subtle);
}

#app .online-title {
  font-family: var(--font-display);
  font-weight: 700;
}

#app .group-label {
  color: var(--accent);
  letter-spacing: var(--ls-tight);
}

#app .user-row:hover {
  background: var(--card-hover);
  border-radius: 10px;
}

#app .result.card,
#app .result.ok,
#app .result.err,
#app .error:not(.ud-error) {
  display: none !important;
}

/* ========== Popup toasts ========== */

.dxd-toasts {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(10px + env(safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  z-index: 12000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  pointer-events: none;
}

.dxd-toast {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #21262b;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
  overflow: hidden;
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.dxd-toast.is-on {
  opacity: 1;
  transform: translateY(0);
}

.dxd-toast.is-off {
  opacity: 0;
  transform: translateY(-6px);
}

.dxd-toast__bar {
  width: 4px;
  flex-shrink: 0;
  background: #a1a7b5;
}

.dxd-toast--error .dxd-toast__bar {
  background: #e63946;
}

.dxd-toast--success .dxd-toast__bar {
  background: #22c55e;
}

.dxd-toast--info .dxd-toast__bar {
  background: #a1a7b5;
}

.dxd-toast__msg {
  flex: 1;
  padding: 12px 14px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: var(--ls-tight);
}

.dxd-copy-toast {
  display: none !important;
}

#app .profile .card.row-card > .row,
#app .profile .row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: 12px !important;
}

/* ========== Motion + overflow ========== */

@media (prefers-reduced-motion: reduce) {
  #boot-splash .boot-icon,
  #boot-splash .boot-wordmark,
  #boot-splash .boot-bar,
  #boot-splash .dxd-logo text,
  #boot-splash .dxd-logo__accent {
    animation: none;
  }

  .dxd-toast {
    transition: none;
    transform: none;
  }

  #app .skeleton,
  .dxd-skel {
    animation: none;
  }
}

#app .app-shell,
#app .content,
#app .servers .cats,
#app .modal,
#app .ud-sheet,
#app .online-modal {
  max-width: 100%;
}
