:root {
  --bg: #0a0c11;
  --bg-deep: #0f1219;
  --surface: rgba(22, 25, 34, 0.8);
  --glass-bg: rgba(17, 19, 26, 0.42);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 22px 48px rgba(5, 9, 16, 0.5);
  --text: #eef2f7;
  --muted: #aeb7c6;
  --line: rgba(134, 148, 174, 0.34);
  --mint: #97a7c6;
  --mint-strong: #7688aa;
  --gold: #d4bc8f;
  --danger: #ef8f8f;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 26px;
  --radius-pill: 999px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 28px;
  --shadow: 0 14px 34px rgba(6, 10, 18, 0.42);
  --shadow-card: 0 18px 40px rgba(5, 9, 16, 0.48);
  --bg-base: #0a0c11;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --transition: 280ms cubic-bezier(0.22, 1, 0.36, 1);
  --container: min(1240px, 94vw);
}

* {
  box-sizing: border-box;
}

a,
button {
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease,
    filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

button:disabled,
a[aria-disabled="true"] {
  cursor: not-allowed;
}

.brand:hover .brand__title {
  opacity: 0.85;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-base);
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: transparent;
  background-image: radial-gradient(circle at 20% 14%, rgba(118, 132, 164, 0.12), transparent 44%),
    radial-gradient(circle at 80% 10%, rgba(170, 145, 106, 0.1), transparent 42%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 14% 20%, rgba(152, 166, 194, 0.06), transparent 34%),
    radial-gradient(circle at 78% 8%, rgba(178, 150, 111, 0.07), transparent 38%);
  z-index: -3;
  pointer-events: none;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 72% 26%, rgba(187, 158, 108, 0.18), transparent 46%),
    radial-gradient(circle at 26% 78%, rgba(118, 131, 166, 0.16), transparent 44%),
    linear-gradient(145deg, #090c13 0%, #111623 58%, #090c13 100%);
  transition: opacity 0.58s ease, visibility 0.58s ease;
}

.preloader::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 0.7px, transparent 0.7px);
  background-size: 3px 3px;
  opacity: 0.05;
  mix-blend-mode: soft-light;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__halo {
  position: absolute;
  width: min(560px, 74vw);
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(195, 169, 121, 0.28), rgba(117, 130, 163, 0.18), transparent 72%);
  filter: blur(10px);
  animation: preloadHalo 2.8s ease-in-out infinite;
}

.preloader__panel {
  position: relative;
  z-index: 2;
  width: min(420px, 86vw);
  border: 1px solid rgba(150, 164, 194, 0.24);
  border-radius: 24px;
  padding: 24px 20px;
  background: linear-gradient(155deg, rgba(27, 31, 42, 0.9), rgba(15, 18, 28, 0.94));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46);
  text-align: center;
}

.preloader__star {
  width: clamp(72px, 10vw, 96px);
  height: auto;
  filter: drop-shadow(0 0 12px rgba(188, 160, 109, 0.28));
  animation: preloadStar 1.8s ease-in-out infinite;
}

.preloader__brand {
  margin: 14px 0 6px;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: clamp(1rem, 2.6vw, 1.24rem);
  letter-spacing: 0.09em;
  color: #ded4c4;
}

.preloader__text {
  margin: 0;
  color: #aeb7c6;
  font-size: 0.92rem;
}

.preloader__line {
  margin: 16px auto 0;
  width: min(280px, 76vw);
  height: 4px;
  border-radius: 999px;
  background: rgba(197, 178, 146, 0.14);
  overflow: hidden;
}

.preloader__line span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c8ac7d, #d8cab0, #8f9db8);
  animation: preloadLine 1.4s ease-in-out infinite;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 78% 44% at 50% 0%, rgba(245, 196, 81, 0.1), transparent 68%),
    linear-gradient(160deg, var(--bg-base) 0%, var(--bg) 44%, var(--bg-deep) 100%);
}

.bg-stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22) 0,
    rgba(0, 0, 0, 0.22) 80px,
    rgba(0, 0, 0, 1) 200px
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22) 0,
    rgba(0, 0, 0, 0.22) 80px,
    rgba(0, 0, 0, 1) 200px
  );
}

.bg-star {
  --size: 120px;
  --x: 50%;
  --y: 50%;
  --opacity: 0.2;
  --duration: 18s;
  --delay: 0s;
  --drift-x: 16px;
  --drift-y: -18px;
  --drift-x-alt: -10px;
  --drift-y-alt: 8px;
  --drift-x-soft: 4px;
  --drift-y-soft: -3px;
  --rotate: 8deg;
  --spin: 14deg;
  --spin-soft: 6deg;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  aspect-ratio: 1;
  background: center/contain no-repeat;
  transform: translate3d(-50%, -50%, 0) rotate(var(--rotate));
  opacity: var(--opacity);
  mix-blend-mode: normal;
  animation: starDrift var(--duration) ease-in-out var(--delay) infinite;
}

.bg-star--gold {
  background-image: url("./star-logo.png");
}

.bg-star--violet {
  background-image: url("./star-logo2.png");
}

.bg-star--gold.is-bright {
  filter: drop-shadow(0 0 10px rgba(188, 158, 112, 0.14));
}

.bg-star--violet.is-bright {
  filter: drop-shadow(0 0 9px rgba(122, 138, 166, 0.16));
}

.glow {
  position: absolute;
  border-radius: var(--radius-pill);
  filter: blur(32px);
  opacity: 0.18;
  animation: float 20s ease-in-out infinite;
}

.glow--a {
  width: min(460px, 52vw);
  height: min(460px, 52vw);
  left: -140px;
  top: -130px;
  background: radial-gradient(circle, rgba(123, 135, 170, 0.26), rgba(123, 135, 170, 0));
  animation: driftA 16s ease-in-out infinite;
}

.glow--b {
  width: min(500px, 58vw);
  height: min(500px, 58vw);
  right: -180px;
  top: 90px;
  background: radial-gradient(circle, rgba(176, 149, 100, 0.18), rgba(176, 149, 100, 0));
  animation: driftB 14s ease-in-out infinite;
}

.glow--c {
  width: min(360px, 40vw);
  height: min(360px, 40vw);
  right: 18%;
  bottom: -140px;
  background: radial-gradient(circle, rgba(109, 120, 150, 0.16), rgba(109, 120, 150, 0));
  animation: driftC 18s ease-in-out infinite;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.24) 0.55px, transparent 0.55px);
  background-size: 4px 4px;
  filter: blur(1px);
  mix-blend-mode: soft-light;
  opacity: 0.022;
}

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  z-index: 62;
  pointer-events: none;
  background: rgba(212, 197, 170, 0.05);
}

.scroll-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0.58;
  background: linear-gradient(90deg, #b99d72 0%, #b9b0a2 50%, #8492ad 100%);
  box-shadow: 0 0 10px rgba(136, 148, 171, 0.24);
  transition: opacity 0.18s ease;
}

.topbar-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: 13px;
  margin-bottom: 36px;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}

.topbar {
  box-sizing: border-box;
  width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--space-3);
  row-gap: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: rgba(20, 22, 29, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  pointer-events: auto;
  transition: box-shadow var(--transition), background-color var(--transition),
    border-color var(--transition);
}

.brand {
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand__tag {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.brand__title {
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: clamp(0.88rem, 1.35vw, 1.04rem);
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: 0;
  flex-wrap: nowrap;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 14px;
  border: 1px solid rgba(139, 151, 176, 0.32);
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(28, 33, 46, 0.78) 0%, rgba(18, 22, 32, 0.78) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 14px rgba(5, 9, 16, 0.32);
  color: #e6ecf7;
  font-size: 0.86rem;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.user-chip[data-state="authed"] {
  border-color: rgba(216, 178, 105, 0.42);
}

.user-chip__name {
  font-weight: 700;
  letter-spacing: 0.01em;
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip__divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.user-chip__balance {
  color: #e7c272;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.user-chip__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin-left: 2px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #aab4c5;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.user-chip__logout:hover {
  background: rgba(239, 143, 143, 0.16);
  color: #f1a5a5;
}

.user-chip__logout:focus-visible {
  outline: 2px solid rgba(173, 186, 210, 0.72);
  outline-offset: 2px;
}

.user-chip__logout.hidden {
  display: none;
}

.layout {
  width: var(--container);
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 2.4vw, 32px);
}

.workspace__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.4vw, 28px);
}

.workspace__main {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 2.6vw, 32px);
  min-width: 0;
}

.workspace__side {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.4vw, 28px);
  min-width: 0;
}

@media (min-width: 960px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .workspace__body {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    column-gap: clamp(28px, 3.2vw, 44px);
    row-gap: clamp(26px, 2.8vw, 36px);
    align-items: start;
  }

  .workspace__main,
  .workspace__side {
    display: grid;
  }

  .workspace__side {
    position: sticky;
    top: 84px;
    align-content: start;
  }
}

.card--balance {
  display: grid;
  gap: 6px;
  background: linear-gradient(160deg, rgba(216, 178, 105, 0.16) 0%, rgba(17, 19, 26, 0.5) 65%);
  border: 1px solid rgba(216, 178, 105, 0.32);
  box-shadow: 0 22px 48px rgba(5, 9, 16, 0.5), 0 0 32px rgba(216, 178, 105, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.balance-card__label {
  margin: 0;
  color: #c8d2e3;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.balance-card__value {
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #f5e6c2;
  text-shadow: 0 0 22px rgba(216, 178, 105, 0.32);
  font-variant-numeric: tabular-nums;
}

.balance-card__hint {
  margin: 0;
  color: #97a3b8;
  font-size: 0.85rem;
}

.card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  padding: clamp(24px, 2.6vw, 32px);
}

.card--hero {
  display: grid;
  gap: var(--space-3);
}

.card--hero h1 {
  margin: 0;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: clamp(1.38rem, 2.5vw, 2.05rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
  display: grid;
  gap: var(--space-1);
}

.hero-title__brand,
.hero-title__line,
.hero-title__accent {
  display: block;
}

.hero-title__brand {
  background-image: linear-gradient(
    120deg,
    #d6c5a0 0%,
    #9ca8bf 48%,
    #ccb58c 100%
  );
  background-size: 160% 160%;
  background-position: 0% 35%;
  background-repeat: no-repeat;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px rgba(166, 176, 198, 0.18);
  animation: brandGradientFlow 16s ease-in-out infinite;
}

.hero-title__line {
  background-image: linear-gradient(120deg, #cda96b 0%, #f2e6c1 100%);
  background-repeat: no-repeat;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(201, 173, 120, 0.16);
}

.hero-title__accent {
  margin-top: 4px;
  color: #9aa8c2;
  -webkit-text-fill-color: #9aa8c2;
  text-shadow: 0 0 8px rgba(129, 142, 170, 0.12);
}

.card--hero p {
  margin: 0;
  color: var(--muted);
  max-width: 64ch;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c8d2e3;
  background: transparent;
}

.balance-box {
  display: none;
}

.support-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c8d2e3;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: transparent;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.support-pill:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: #eef2f7;
  background: rgba(255, 255, 255, 0.04);
}

.support-pill:active {
  background: rgba(255, 255, 255, 0.02);
}

.support-pill__icon {
  flex-shrink: 0;
  color: #aeb7c6;
  transition: color 0.2s ease;
}

.support-pill:hover .support-pill__icon {
  color: #d4bc8f;
}

.section-head {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(126, 140, 165, 0.18);
}

.section-head--step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.section-head__text {
  flex: 1 1 auto;
  min-width: 0;
}

.step-badge {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #f5e6c2;
  background: linear-gradient(160deg, rgba(216, 178, 105, 0.22) 0%, rgba(216, 178, 105, 0.05) 100%);
  border: 1px solid rgba(216, 178, 105, 0.42);
  box-shadow: 0 0 0 4px rgba(216, 178, 105, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  letter-spacing: 0;
  line-height: 1;
  margin-top: 2px;
}

.section-head h2 {
  margin: 0;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: #f1f4fa;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 62ch;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: var(--space-4);
}

label span {
  color: #c1cad9;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

input:not([type="radio"]),
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 46px;
  height: 46px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(14, 18, 26, 0.84);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

select {
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, #c8b58a 50%),
    linear-gradient(135deg, #c8b58a 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input:not([type="radio"]):hover,
select:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

input:not([type="radio"])::placeholder {
  color: rgba(165, 177, 198, 0.72);
}

input:not([type="radio"]):focus,
select:focus {
  outline: none;
  background: rgba(17, 21, 30, 0.92);
  border-color: rgba(228, 191, 118, 1);
  box-shadow: 0 0 0 3px rgba(216, 178, 105, 0.22), 0 0 18px rgba(216, 178, 105, 0.28);
}

label:focus-within span {
  color: #e7c897;
}

label:focus-within input:not([type="radio"]),
label:focus-within select {
  border-color: rgba(228, 191, 118, 1);
  box-shadow: 0 0 0 3px rgba(216, 178, 105, 0.22), 0 0 18px rgba(216, 178, 105, 0.28);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.actions-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

#createDepositBtn {
  flex: 1 1 auto;
  min-height: 46px;
  padding-inline: 22px;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: #1a1308;
  background: linear-gradient(135deg, #f6d98a 0%, #e0b770 48%, #b88842 100%);
  background-size: 180% 180%;
  background-position: 0% 50%;
  box-shadow: 0 14px 30px rgba(184, 136, 66, 0.42),
    0 0 0 1px rgba(246, 217, 138, 0.45),
    0 0 28px rgba(224, 183, 112, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

#createDepositBtn:hover {
  background-position: 100% 50%;
  filter: brightness(1.08) saturate(1.08);
  box-shadow: 0 18px 36px rgba(184, 136, 66, 0.55),
    0 0 0 1px rgba(246, 217, 138, 0.65),
    0 0 38px rgba(255, 215, 130, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

#createDepositBtn:active {
  filter: brightness(1.02);
  box-shadow: 0 10px 20px rgba(184, 136, 66, 0.4),
    0 0 0 1px rgba(246, 217, 138, 0.5),
    0 0 18px rgba(224, 183, 112, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.deposit-tools {
  margin-top: var(--space-3);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.brand:focus-visible,
.support-pill:focus-visible,
.btn:focus-visible,
.tab:focus-visible,
.preset:focus-visible {
  outline: 2px solid rgba(173, 186, 210, 0.72);
  outline-offset: 2px;
}

input:not([type="radio"]):focus-visible,
select:focus-visible {
  outline: none;
}

.btn--primary {
  color: #141b28;
  background: linear-gradient(135deg, #d8b67a 0%, #f1ddae 44%, #88a5d0 100%);
  background-size: 150% 150%;
  box-shadow: 0 12px 28px rgba(216, 178, 105, 0.32), 0 0 0 1px rgba(241, 221, 174, 0.35),
    0 0 24px rgba(216, 178, 105, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.btn--primary:hover {
  transform: translateY(-1px) scale(1.02);
  background-position: 80% 50%;
  filter: brightness(1.12) saturate(1.05);
  box-shadow: 0 18px 36px rgba(216, 178, 105, 0.42), 0 0 0 1px rgba(241, 221, 174, 0.55),
    0 0 36px rgba(255, 211, 120, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn--primary:active {
  transform: translateY(0) scale(0.995);
  filter: brightness(1.04);
  box-shadow: 0 8px 18px rgba(216, 178, 105, 0.3), 0 0 0 1px rgba(241, 221, 174, 0.4),
    0 0 16px rgba(216, 178, 105, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn--ghost {
  color: #dce5f5;
  border: 1px solid rgba(142, 156, 185, 0.44);
  background: rgba(19, 23, 33, 0.66);
}

.btn--bot {
  color: #fff;
  border: 1px solid rgba(110, 178, 230, 0.55);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: linear-gradient(135deg, #2aabee 0%, #229ed9 60%, #1c8bc1 100%);
  box-shadow: 0 8px 18px rgba(34, 158, 217, 0.42), 0 0 0 1px rgba(110, 178, 230, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn--bot:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 24px rgba(34, 158, 217, 0.55), 0 0 0 1px rgba(146, 198, 234, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn--bot .btn__tg-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.18));
}

.btn--wide {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
  display: flex;
  padding-block: 14px;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.buy-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.buy-action__lock-note {
  display: none;
  margin-top: 12px;
  color: #f3a26f;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
  text-align: center;
  max-width: 28rem;
}

.buy-action.is-locked {
  cursor: not-allowed;
}

.buy-action.is-locked .btn {
  background: rgba(255, 255, 255, 0.05);
  background-image: none;
  color: rgba(238, 242, 247, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  text-shadow: none;
  filter: none;
  opacity: 0.55;
  transform: none;
  pointer-events: none;
}

.buy-action.is-locked .buy-action__lock-note {
  display: block;
}

.tabs {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 5px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(11, 14, 22, 0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.tabs::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(50% - 5px);
  height: calc(100% - 10px);
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(54, 60, 78, 0.95) 0%, rgba(36, 41, 56, 0.95) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 0 1px rgba(216, 178, 105, 0.32);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
  will-change: transform;
}

.tabs[data-active-tab="premium"]::before {
  transform: translateX(100%);
}

.tab {
  position: relative;
  z-index: 1;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: rgba(180, 190, 208, 0.7);
  font: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  padding: 11px 14px;
  cursor: pointer;
  transition: color 0.24s ease;
}

.tab.is-active {
  color: #f5e6c2;
  font-weight: 700;
}

.tab:hover:not(.is-active) {
  color: rgba(226, 234, 246, 0.9);
}

.pane {
  display: none;
  margin-top: var(--space-3);
}

.pane.is-active {
  display: block;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.preset {
  position: relative;
  border: 1px solid rgba(137, 151, 177, 0.32);
  border-radius: var(--radius-lg);
  padding: 18px 12px 16px;
  background: rgba(22, 26, 38, 0.72);
  color: #e8eef9;
  font: inherit;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 92px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 14px rgba(6, 10, 18, 0.28);
  cursor: pointer;
  transition: border-color 0.24s ease, transform 0.2s ease, background-color 0.24s ease, box-shadow 0.24s ease,
    color 0.24s ease;
}

.preset:hover {
  border-color: rgba(216, 178, 105, 0.55);
  background: rgba(34, 38, 52, 0.85);
  transform: translateY(-2px) scale(1.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 24px rgba(6, 10, 18, 0.42);
}

.preset:active {
  transform: translateY(0) scale(0.99);
}

.preset__amount {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.preset__icon {
  font-size: 1.4rem;
  line-height: 1;
  color: #e7c272;
  text-shadow: 0 0 10px rgba(216, 178, 105, 0.32);
  transition: color 0.24s ease, text-shadow 0.24s ease, transform 0.24s ease;
}

.preset.is-active,
.preset[aria-checked="true"] {
  border-color: rgba(228, 191, 118, 1);
  background: linear-gradient(180deg, rgba(216, 178, 105, 0.22) 0%, rgba(216, 178, 105, 0.1) 100%);
  color: #fbf3df;
  box-shadow: 0 0 0 1px rgba(228, 191, 118, 0.7), 0 14px 28px rgba(16, 21, 31, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.preset.is-active .preset__icon,
.preset[aria-checked="true"] .preset__icon {
  color: #ffd35e;
  text-shadow: 0 0 14px rgba(255, 211, 94, 0.6);
  transform: scale(1.12);
}

.price-row {
  margin: var(--space-3) 0 var(--space-3);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  border: none;
  background: transparent;
  padding: 0;
  text-align: center;
}

.price-row span {
  color: #aab4c5;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.price-row strong {
  color: #f5e6c2;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(216, 178, 105, 0.28);
}

.plan-list {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.plan {
  border: 1px solid rgba(133, 148, 176, 0.42);
  border-radius: var(--radius-md);
  background: rgba(16, 20, 30, 0.8);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-2);
  align-items: center;
  padding: 10px 12px;
}

.plan input {
  width: auto;
  margin: 0;
  accent-color: var(--mint);
}

.plan__label {
  color: #dce4f2;
  font-weight: 700;
}

.plan__price {
  color: #d0bc95;
  font-weight: 800;
}

.inline-note {
  margin: var(--space-3) 0 0;
  color: #99a5bb;
  font-size: 0.88rem;
  min-height: 1.3em;
}

.inline-note.is-error {
  color: var(--danger);
}

.inline-note.is-success {
  color: #cdb890;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.workspace__side .history-grid {
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.history-grid h3 {
  margin: 0 0 12px;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aab4c5;
  font-weight: 600;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}

.history-item {
  border: 1px solid rgba(130, 145, 171, 0.34);
  border-radius: var(--radius-sm);
  background: rgba(15, 19, 29, 0.7);
  padding: 10px;
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  align-items: start;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.history-item:hover {
  background: rgba(24, 30, 43, 0.82);
  border-color: rgba(170, 185, 210, 0.45);
  transform: translateY(-1px);
}

.history-item__status-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: rgba(176, 188, 206, 0.7);
  box-shadow: 0 0 0 3px rgba(176, 188, 206, 0.14);
}

.history-item--success .history-item__status-dot {
  background: #41d56d;
  box-shadow: 0 0 0 3px rgba(65, 213, 109, 0.2);
}

.history-item--error .history-item__status-dot {
  background: #ff6666;
  box-shadow: 0 0 0 3px rgba(255, 102, 102, 0.18);
}

.history-item--pending .history-item__status-dot {
  background: #f2be64;
  box-shadow: 0 0 0 3px rgba(242, 190, 100, 0.2);
}

.history-item__content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.history-item__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.35;
}

.history-item__primary,
.history-item__amount {
  color: #ffffff;
  font-weight: 800;
}

.history-item__secondary,
.history-item__status {
  color: #c7d1e3;
  font-size: 0.8rem;
}

.history-item__status {
  text-transform: lowercase;
}

.history-item__meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.74rem;
  line-height: 1.25;
}

.history-item--empty {
  grid-template-columns: 1fr;
  padding: 26px 16px;
  background: rgba(15, 19, 29, 0.42);
  border: 1px dashed rgba(130, 145, 171, 0.22);
  color: #94a0b6;
}

.history-item--empty:hover {
  background: rgba(15, 19, 29, 0.42);
  border-color: rgba(130, 145, 171, 0.22);
  transform: none;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.empty-state__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(216, 178, 105, 0.55);
  background: radial-gradient(
    circle,
    rgba(216, 178, 105, 0.1) 0%,
    rgba(216, 178, 105, 0.02) 70%
  );
  border: 1px solid rgba(216, 178, 105, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 18px rgba(216, 178, 105, 0.06);
}

.empty-state__icon svg {
  opacity: 0.78;
}

.empty-state__text {
  margin: 0;
  color: #8b95a8;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.auth-overlay {
  position: absolute;
  inset: 0;
  z-index: 22;
  background: rgba(9, 11, 17, 0.9);
  backdrop-filter: none;
  border: 1px solid rgba(131, 146, 172, 0.36);
  border-radius: var(--radius-2xl);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(14px, 1.8vw, 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-box {
  width: min(540px, 100%);
  border: 1px solid rgba(136, 151, 179, 0.4);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(26, 31, 43, 0.9), rgba(15, 19, 29, 0.92));
  padding: 18px;
  box-shadow: 0 18px 42px rgba(6, 10, 17, 0.48);
  margin-top: clamp(8px, 1.5vw, 18px);
}

.auth-box__eyebrow {
  margin: 0;
  color: #b3bfd3;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.auth-box h2 {
  margin: 8px 0 8px;
  font-family: "Unbounded", "Segoe UI", sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
}

.auth-box p {
  margin: 0;
  color: #b7c2d6;
}

.telegram-login-container {
  margin-top: 16px;
  min-height: 44px;
}

.auth-note {
  margin-top: 10px;
  color: #9ba7bd;
  font-size: 0.88rem;
  min-height: 1.2em;
}

.mobile-perf .bg-star,
.mobile-perf .glow,
.mobile-perf .reveal {
  animation: none !important;
}

.mobile-perf .reveal {
  opacity: 1;
  transform: none;
}

.mobile-perf .bg-star.is-bright {
  filter: none;
}

.mobile-perf .glow {
  opacity: 0.14;
  filter: blur(18px);
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 90;
}

.toast {
  min-width: 240px;
  max-width: min(440px, 92vw);
  border: 1px solid rgba(128, 143, 171, 0.5);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: rgba(16, 20, 30, 0.94);
  color: #dce5f4;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  animation: toast-in 0.25s ease;
}

.toast--error {
  border-color: rgba(255, 122, 122, 0.56);
}

.toast--success {
  border-color: rgba(255, 210, 118, 0.7);
}

.hidden {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.workspace > .card--hero.reveal {
  animation-delay: 60ms;
}

.workspace__main > .reveal:nth-of-type(1) {
  animation-delay: 180ms;
}

.workspace__main > .reveal:nth-of-type(2) {
  animation-delay: 300ms;
}

.workspace__side > .reveal:nth-of-type(1) {
  animation-delay: 240ms;
}

.workspace__side > .reveal:nth-of-type(2) {
  animation-delay: 360ms;
}

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

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -16px, 0);
  }
}

@keyframes driftA {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-18px, 26px, 0) scale(1.08);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(22px, -18px, 0) scale(1.1);
  }
}

@keyframes driftC {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(18px, 12px, 0);
  }
}

@keyframes starDrift {
  0% {
    transform: translate(-50%, -50%) translate3d(0, 0, 0) rotate(var(--rotate));
  }

  26% {
    transform: translate(-50%, -50%) translate3d(var(--drift-x-soft), var(--drift-y-soft), 0)
      rotate(calc(var(--rotate) + var(--spin-soft)));
  }

  55% {
    transform: translate(-50%, -50%) translate3d(var(--drift-x), var(--drift-y), 0)
      rotate(calc(var(--rotate) + var(--spin)));
  }

  78% {
    transform: translate(-50%, -50%) translate3d(var(--drift-x-alt), var(--drift-y-alt), 0)
      rotate(calc(var(--rotate) - var(--spin-soft)));
  }

  100% {
    transform: translate(-50%, -50%) translate3d(0, 0, 0) rotate(var(--rotate));
  }
}

@keyframes brandGradientFlow {
  0% {
    background-position: 0% 35%;
    text-shadow: 0 0 6px rgba(147, 158, 183, 0.14);
  }

  25% {
    background-position: 68% 0%;
    text-shadow: 0 0 8px rgba(187, 164, 123, 0.14);
  }

  50% {
    background-position: 100% 58%;
    text-shadow: 0 0 10px rgba(136, 151, 178, 0.16);
  }

  75% {
    background-position: 42% 100%;
    text-shadow: 0 0 8px rgba(183, 161, 123, 0.14);
  }

  100% {
    background-position: 0% 35%;
    text-shadow: 0 0 6px rgba(147, 158, 183, 0.14);
  }
}

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

@keyframes preloadHalo {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

@keyframes preloadStar {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes preloadLine {
  0% {
    transform: translateX(-120%);
  }
  55% {
    transform: translateX(150%);
  }
  100% {
    transform: translateX(220%);
  }
}

@media (max-width: 820px) {
  .topbar-wrap {
    padding-top: 12px;
    margin-bottom: 24px;
  }

  .topbar {
    width: var(--container);
    margin: 0 auto;
    padding: 14px 24px;
    border-radius: var(--radius-xl);
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .brand {
    flex: 1 1 100%;
    justify-items: start;
    text-align: left;
    min-width: 0;
  }

  .topbar__actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
  }

  .user-chip {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }

  .user-chip__name {
    max-width: 16ch;
  }

  .form-grid,
  .history-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .layout {
    margin-bottom: 24px;
  }

  .scroll-progress {
    height: 2px;
  }

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

  .auth-box {
    padding: 16px;
  }

  .hero-chips {
    gap: 6px;
  }

  .chip {
    font-size: 0.68rem;
    padding: 4px 9px;
  }

  .support-pill__label,
  .btn--bot > span {
    display: none;
  }

  .support-pill,
  .btn--bot {
    padding: 0;
    width: 38px;
    height: 38px;
    justify-content: center;
    gap: 0;
    flex: 0 0 auto;
  }

  .topbar__actions {
    gap: 6px;
  }

  .user-chip {
    padding: 6px 6px 6px 12px;
    font-size: 0.82rem;
  }

  .user-chip__name {
    max-width: 10ch;
  }

  .tabs {
    padding: 4px;
  }

  .tabs::before {
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
  }

  .tab {
    padding: 10px 8px;
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
