.account-body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(255, 59, 59, 0.22), transparent 55%),
    radial-gradient(700px 420px at -10% 20%, rgba(255, 255, 255, 0.06), transparent 50%),
    linear-gradient(165deg, #12121a 0%, #07070b 48%, #040406 100%);
  overflow-x: hidden;
}

.aurora {
  position: fixed;
  inset: auto;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.aurora.a {
  top: -12vw;
  right: -8vw;
  background: rgba(255, 59, 59, 0.35);
  animation: drift 18s ease-in-out infinite;
}

.aurora.b {
  bottom: -18vw;
  left: -10vw;
  background: rgba(255, 255, 255, 0.08);
  animation: drift 22s ease-in-out infinite reverse;
}

.auth-screen,
.boot-screen,
.shell,
.tabbar,
.toast {
  position: relative;
  z-index: 1;
}

.auth-screen,
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px 48px;
}

.auth-card,
.boot-card {
  width: min(440px, 100%);
  animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  min-width: 0;
}

.brand-row img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(255, 59, 59, 0.35));
}

.brand-row strong {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.04em;
}

.brand-row span,
.page-head p,
.muted {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.glass,
.panel,
.card,
.plan,
.chips button,
.row-item,
.key-box,
.side,
.tabbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 18px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px) saturate(1.45);
}

.panel,
.card {
  border-radius: 28px;
  padding: 20px 18px 18px;
}

.card {
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.12s; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
}

.tabs button,
.side button,
.tabbar button,
.btn-primary,
.btn-ghost,
.btn-quiet,
.plan,
.chips button {
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tabs button.active {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font: inherit;
  font-size: 16px;
}

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

input:focus,
textarea:focus {
  outline: 2px solid rgba(255, 90, 90, 0.55);
  border-color: transparent;
}

.form-actions,
.stack { display: grid; gap: 10px; margin-top: 16px; }
.btn-block { width: 100%; }

.btn-primary,
.btn-ghost,
.btn-quiet {
  min-height: 48px;
  border-radius: 16px;
  border: 0;
  font-weight: 750;
}

.btn-primary {
  color: white;
  background: linear-gradient(180deg, rgba(255, 110, 110, 0.95), rgba(255, 45, 45, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 28px rgba(255, 59, 59, 0.35);
}

.btn-primary:hover,
.btn-ghost:hover,
.plan:hover,
.chips button:hover,
.side button:hover { transform: translateY(-1px); }

.btn-primary:active,
.btn-ghost:active,
.plan:active { transform: translateY(0) scale(0.99); }

.btn-primary:disabled,
.btn-ghost:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-ghost {
  color: white;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-quiet {
  background: transparent;
  color: var(--muted);
  min-height: 36px;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  color: var(--muted2);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.divider::before,
.divider::after { content: ""; height: 1px; background: rgba(255, 255, 255, 0.12); }

.tg-slot {
  min-height: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tg-slot iframe { display: block !important; }

.tg-hint { margin-top: 8px; font-size: 12px; text-align: center; }

.alert {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 59, 59, 0.14);
  color: #ffd0d0;
}

.alert.ok { background: rgba(52, 211, 153, 0.14); color: #d8ffef; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.side {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  margin: 12px;
  padding: 18px 14px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side nav { display: grid; gap: 4px; min-width: 0; }

.side button,
.tabbar button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 680;
  text-align: left;
  box-shadow: none;
}

.side button.active,
.tabbar button.active {
  color: white;
  background: rgba(255, 59, 59, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.side .logout { margin-top: auto; color: var(--muted2); }

.main {
  min-width: 0;
  padding: 28px 22px 40px;
}

.main-inner { width: min(960px, 100%); margin: 0 auto; min-width: 0; }

.page-head { margin-bottom: 18px; min-width: 0; }

.page-head h1,
.plan h3,
.days {
  font-family: var(--display);
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.page-head h1 { font-size: clamp(32px, 5vw, 46px); line-height: 0.95; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 14px;
}

.hero-plan { position: relative; overflow: hidden; }

.hero-plan::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 80, 80, 0.45), transparent 68%);
  animation: pulse 6s ease-in-out infinite;
}

.kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.days {
  margin: 8px 0 0;
  font-size: clamp(56px, 8vw, 84px);
  line-height: 0.88;
}

.days small { font-size: 0.28em; color: var(--muted); margin-left: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.16);
  color: #bfffe6;
  font-size: 12px;
  font-weight: 750;
}

.pill.warn { background: rgba(251, 191, 36, 0.16); color: #ffe7ad; }
.pill.bad { background: rgba(255, 59, 59, 0.16); color: #ffc7c7; }

.stat { font-family: var(--display); font-size: 36px; letter-spacing: -0.04em; margin-top: 8px; }

.key-box,
.copy-row { display: flex; gap: 8px; align-items: center; min-width: 0; }

.key-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.35);
}

.key-box code,
.mono {
  font-family: var(--mono);
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.key-box code { flex: 1; }

.qr-wrap {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.qr-wrap svg { width: min(180px, 70vw); height: auto; }

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

.plan {
  text-align: left;
  border-radius: 22px;
  color: white;
  padding: 16px;
}

.plan.selected,
.chips button.selected {
  border-color: rgba(255, 90, 90, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 0 1px rgba(255, 59, 59, 0.45);
}

.plan h3 { font-size: 28px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.chips button {
  min-height: 64px;
  min-width: 0;
  flex: 1 1 108px;
  padding: 8px 12px;
  border-radius: 18px;
  color: white;
}

.chips b { display: block; font-size: 16px; }
.chips span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.paybar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.paybar > * { flex: 1 1 180px; }

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

.row-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  min-width: 0;
}

.row-item > * { min-width: 0; }

.guides details { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 12px 0; }
.guides summary { cursor: pointer; font-weight: 750; }
.guides p { margin-top: 8px; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }

.chat { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.bubble {
  max-width: min(100%, 520px);
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  overflow-wrap: anywhere;
}
.bubble.user { margin-left: auto; background: rgba(255, 59, 59, 0.2); }

.tabbar { display: none; }

.empty { padding: 28px 8px; text-align: center; color: var(--muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(440px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 16px;
  animation: fade 0.25s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-4%, 6%, 0) scale(1.08); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

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

@media (max-width: 860px) {
  .shell { display: block; }
  .side { display: none; }
  .main { padding: 18px 14px 112px; }
  .grid-2, .plans { grid-template-columns: minmax(0, 1fr); }
  .key-box { flex-direction: column; align-items: stretch; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 20;
    padding: 6px;
    border-radius: 22px;
  }
  .tabbar button {
    flex-direction: column;
    gap: 2px;
    min-height: 52px;
    padding: 4px 2px;
    font-size: 11px;
    justify-content: center;
    text-align: center;
  }
  .toast { bottom: 92px; }
}
