:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #edf5ff;
  --text: #17212b;
  --muted: #6a7b8f;
  --line: #dfe7f0;
  --accent: #2aabee;
  --accent-strong: #168acd;
  --danger: #e55b64;
  --warning: #d99a21;
  --shadow: 0 10px 28px rgba(30, 75, 115, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.design-preview {
  --bg: #f3f7fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-soft: rgba(229, 244, 255, 0.82);
  --text: #111a24;
  --muted: #697a8d;
  --line: rgba(123, 153, 184, 0.2);
  --accent: #2aabee;
  --accent-strong: #137fbf;
  --shadow: 0 18px 48px rgba(38, 77, 113, 0.14);
  background:
    radial-gradient(circle at 50% -8%, rgba(42, 171, 238, 0.18), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(53, 199, 164, 0.1), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, #eef4fa 100%);
  font-variant-numeric: tabular-nums;
}

body.design-preview::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 26, 36, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 26, 36, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 62%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
.copy-field:focus-within {
  outline: 3px solid rgba(42, 171, 238, 0.22);
  outline-offset: 3px;
}

body.design-preview button:focus-visible,
body.design-preview input:focus-visible,
body.design-preview .copy-field:focus-within {
  outline: 3px solid rgba(42, 171, 238, 0.24);
  outline-offset: 4px;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(env(safe-area-inset-bottom) + 90px);
}

body.design-preview .app-shell {
  padding-inline: 18px;
}

.auth-screen {
  display: grid;
  min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 36px);
  align-content: center;
  gap: 18px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--accent-strong);
  font-weight: 800;
}

.auth-brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.auth-logo {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #35c7a4 0%, #2aabee 100%);
  color: #fff;
}

.auth-card {
  text-align: center;
}

.auth-card h1 {
  margin-bottom: 12px;
  font-size: 26px;
}

.auth-card .text-input,
.auth-card .primary-button,
.auth-card .secondary-button {
  margin-top: 10px;
}

.auth-version {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.auth-code-row {
  margin-top: 12px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.title-block {
  flex: 1;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

body.design-preview h1 {
  font-size: 30px;
  line-height: 1.05;
  text-wrap: balance;
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
  letter-spacing: 0;
}

body.design-preview h2 {
  font-size: 21px;
  line-height: 1.12;
  text-wrap: balance;
}

h3 {
  margin: 20px 0 10px;
  font-size: 15px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

body.design-preview .icon-button,
body.design-preview .avatar {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 30px rgba(38, 77, 113, 0.12);
}

.avatar-button {
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #35c7a4 0%, #2aabee 100%);
  background-position: center;
  background-size: cover;
  color: #fff;
  font-weight: 800;
  overflow: hidden;
}

.avatar.big {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.avatar.has-photo {
  color: transparent;
}

.account-menu {
  position: absolute;
  z-index: 5;
  top: calc(env(safe-area-inset-top) + 74px);
  right: 16px;
  left: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 44px rgba(34, 67, 98, 0.18);
  backdrop-filter: blur(18px);
}

.account-menu button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 0 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
}

.account-menu .account-summary {
  justify-content: flex-start;
  gap: 12px;
  min-height: 72px;
  border-top: 0;
}

.logout-link {
  color: var(--danger) !important;
}

.screen {
  display: none;
  animation: appear 160ms ease-out;
}

body.design-preview .screen {
  animation: appear 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.card,
.balance-panel {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

body.design-preview .card,
body.design-preview .balance-panel {
  margin-bottom: 16px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(42, 171, 238, 0.04),
    var(--shadow);
  backdrop-filter: blur(18px);
}

.card {
  padding: 16px;
}

body.design-preview .card {
  padding: 18px;
}

.balance-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #e8f6ff 100%);
}

body.design-preview .balance-panel {
  position: relative;
  overflow: hidden;
  min-height: 152px;
  border-color: rgba(42, 171, 238, 0.18);
  padding: 24px 22px 28px;
  background:
    radial-gradient(circle at 96% 8%, rgba(42, 171, 238, 0.3), transparent 34%),
    radial-gradient(circle at 78% 82%, rgba(53, 199, 164, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(226, 246, 255, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 22px 52px rgba(38, 77, 113, 0.17);
}

body.design-preview .balance-panel::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: 18px;
  width: calc((100% - 44px) * var(--subscription-progress, 1));
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #35c7a4 0%, #2aabee 100%);
  opacity: 0.95;
  transition: width 220ms ease, background 220ms ease;
}

body.design-preview .balance-panel::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  height: 5px;
  border-radius: 999px;
  background: rgba(123, 153, 184, 0.16);
}

body.design-preview .balance-panel.is-warning::after {
  background: linear-gradient(90deg, #f5c44d 0%, #d99a21 100%);
}

body.design-preview .balance-panel.is-danger::after {
  background: linear-gradient(90deg, #ff8a8a 0%, #e55b64 100%);
}

body.design-preview .balance-panel.is-expired::after {
  background: linear-gradient(90deg, #b89cff 0%, #7e57c2 100%);
}

.balance-panel.is-ok {
  border-color: #d9edf9;
  background: linear-gradient(135deg, #ffffff 0%, #e8f6ff 100%);
}

.balance-panel.is-warning {
  border-color: #f3dca9;
  background: linear-gradient(135deg, #ffffff 0%, #fff5dc 100%);
}

.balance-panel.is-danger {
  border-color: #f0c4c8;
  background: linear-gradient(135deg, #ffffff 0%, #fff0f1 100%);
}

.balance-panel.is-expired {
  border-color: #d8caf3;
  background: linear-gradient(135deg, #ffffff 0%, #f4f0ff 100%);
}

.balance-panel.is-warning strong {
  color: var(--warning);
}

.balance-panel.is-danger strong {
  color: var(--danger);
}

.balance-panel.is-expired strong {
  color: #7e57c2;
}

.balance-panel strong {
  display: block;
  margin: 3px 0;
  font-size: 38px;
  line-height: 1;
}

body.design-preview .balance-panel strong {
  position: relative;
  z-index: 1;
  margin: 8px 0 8px;
  font-size: 48px;
  letter-spacing: 0;
}

body.design-preview [data-daily-cost] {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--accent-strong);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(42, 171, 238, 0.12);
}

body.design-preview .balance-panel strong,
body.design-preview [data-balance],
body.design-preview [data-daily-cost],
body.design-preview [data-device-rate],
body.design-preview [data-balance-note],
body.design-preview .amount-grid button {
  font-variant-numeric: tabular-nums;
}

.subscription-status {
  display: none;
}

body.design-preview .balance-card {
  border-color: rgba(123, 153, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(250, 253, 255, 0.78));
}

body.design-preview .balance-card .section-head {
  align-items: flex-start;
}

body.design-preview .balance-card [data-balance] {
  margin: 0 0 2px;
  font-size: 28px;
  line-height: 1;
}

body.design-preview .balance-card > .muted {
  display: inline-flex;
  margin-bottom: 10px;
}

body.design-preview .balance-card .note {
  position: relative;
  margin: 8px 0 0;
  border-radius: 14px;
  padding: 11px 12px 11px 38px;
  background: rgba(244, 248, 252, 0.82);
  color: #54677b;
  box-shadow: inset 0 0 0 1px rgba(123, 153, 184, 0.12);
}

body.design-preview .balance-card .note::before {
  position: absolute;
  top: 50%;
  left: 12px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 6px;
  transform: translateY(-50%);
  background: rgba(42, 171, 238, 0.1);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

body.design-preview .balance-card [data-balance-note]::before {
  content: "₽";
}

body.design-preview .balance-card [data-device-rate]::before {
  content: "/";
}

body.design-preview .subscription-status {
  display: none;
}

.muted,
small {
  color: var(--muted);
}

small {
  display: block;
  font-size: 12px;
}

.primary-button,
.secondary-button,
.small-button,
.danger-button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 700;
}

body.design-preview .primary-button,
body.design-preview .secondary-button,
body.design-preview .small-button,
body.design-preview .danger-button {
  border-radius: 15px;
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    color 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

body.design-preview .primary-button {
  box-shadow: 0 12px 24px rgba(42, 171, 238, 0.24);
}

body.design-preview .primary-button:hover {
  background: #32b6f4;
  box-shadow: 0 14px 28px rgba(42, 171, 238, 0.28);
}

.primary-button:active {
  background: var(--accent-strong);
}

.secondary-button,
.small-button {
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.danger-button {
  margin-top: 10px;
  background: #fff0f1;
  color: var(--danger);
}

.full {
  width: 100%;
}

.section-head,
.device-row,
.list button,
.copy-field,
.store-grid {
  display: flex;
  align-items: center;
}

.section-head {
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin-bottom: 0;
}

.device-section-head {
  padding-bottom: 14px;
}

body.design-preview .device-section-head {
  padding-bottom: 10px;
}

body.design-preview [data-device-list] {
  position: relative;
  margin-top: 10px;
  padding-top: 2px;
}

body.design-preview [data-device-list]::before {
  content: "";
  position: absolute;
  top: 0;
  right: 2px;
  left: 54px;
  height: 1px;
  background: var(--line);
}

.device-counter {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.device-counter strong {
  text-align: center;
}

.device-counter button {
  min-width: 0;
  padding: 0;
  font-size: 20px;
}

.device-row,
.list button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.list button {
  border-top: 1px solid var(--line);
}

.device-row {
  position: relative;
  gap: 12px;
  padding: 14px 0 14px;
}

body.design-preview .device-row {
  min-height: 62px;
  border-radius: 16px;
  padding: 10px 10px;
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.design-preview .device-row:hover {
  background: rgba(244, 248, 252, 0.72);
}

body.design-preview .device-row:active {
  transform: scale(0.985);
}

.device-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 50px;
  height: 1px;
  background: var(--line);
}

.device-row:first-child::before {
  left: 0;
}

body.design-preview .device-row:first-child::before {
  display: none;
}

.device-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-soft);
}

body.design-preview .device-icon,
body.design-preview .payment-icon {
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.design-preview .device-icon {
  width: 42px;
  height: 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(229, 244, 255, 0.86));
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 8px 18px rgba(42, 171, 238, 0.08);
}

.device-row span:nth-child(2) {
  flex: 1;
}

body.design-preview .device-row strong {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
  line-height: 1.18;
}

body.design-preview .device-row small {
  font-size: 12px;
}

body.design-preview .devices-card {
  padding-bottom: 14px;
}

body.design-preview .devices-card [data-device-list] {
  margin-top: 14px;
}

body.design-preview .devices-card .section-head {
  padding-bottom: 4px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 12px 8px;
  text-align: center;
}

.empty-state strong {
  font-size: 17px;
}

.empty-state span:not(.empty-icon) {
  max-width: 260px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.empty-state .secondary-button {
  margin-top: 4px;
}

body.design-preview .empty-state {
  margin-top: 4px;
  border-radius: 18px;
  padding: 18px 14px;
  background: rgba(244, 248, 252, 0.64);
  box-shadow: inset 0 0 0 1px rgba(42, 171, 238, 0.1);
}

body.design-preview .empty-icon {
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(229, 244, 255, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 8px 18px rgba(42, 171, 238, 0.08);
}

.chevron {
  color: var(--muted);
  font-size: 24px;
}

.referral-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.social-card h2 {
  margin-bottom: 12px;
}

.social-grid,
.support-grid,
.profile-actions {
  display: grid;
  gap: 10px;
}

.social-grid {
  grid-template-columns: repeat(3, 1fr);
}

.social-grid button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.transfer-promo-card {
  display: grid;
  gap: 14px;
}

.transfer-promo-card h2 {
  margin-bottom: 6px;
}

.transfer-promo-card .note {
  margin-bottom: 0;
}

body.design-preview .social-grid button {
  min-height: 48px;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.profile-card {
  background: linear-gradient(135deg, #ffffff 0%, #eaf7ff 100%);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-head h2,
.profile-head p {
  margin-bottom: 2px;
}

.profile-head p {
  color: var(--muted);
}

.profile-meta {
  margin: 0 0 16px;
}

.profile-meta div,
.verified-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.profile-meta dt,
.verified-row span {
  color: var(--muted);
}

.profile-meta dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

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

.profile-actions .danger-button {
  margin-top: 0;
}

.note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

body.design-preview .note {
  line-height: 1.48;
  text-wrap: pretty;
}

.note.center {
  text-align: center;
}

.referral-card p,
.hero-card p,
details p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline p {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 12px 0 2px;
}

.timeline p:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hero-card {
  text-align: center;
}

.hero-icon {
  margin-bottom: 8px;
  font-size: 42px;
}

.hero-badge {
  display: inline-grid;
  min-width: 54px;
  min-height: 38px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 14px;
  padding: 0 13px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.list {
  overflow: hidden;
  margin: 0 -16px 16px;
}

.list button {
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
}

.list button.is-selected {
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.list.compact {
  margin-bottom: 16px;
}

.section-subtitle {
  margin-top: 18px;
}

.app-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 16px;
}

.app-options button {
  min-height: 72px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.app-options button.is-selected {
  border-color: var(--accent);
  background: rgba(42, 171, 238, 0.12);
  color: var(--accent-strong);
}

.app-options small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.copy-field {
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: var(--bg);
}

.copy-field input,
.text-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.copy-field button {
  border: 0;
  border-radius: 9px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--accent-strong);
  font-weight: 700;
}

.text-input {
  min-height: 46px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--bg);
}

.date-input-wrap {
  position: relative;
  margin-bottom: 14px;
}

.date-input-wrap .text-input {
  margin-bottom: 0;
}

.date-placeholder {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa8b6;
  pointer-events: none;
}

.date-input-wrap.has-value .date-placeholder,
.date-input-wrap:focus-within .date-placeholder {
  display: none;
}

.date-input-wrap input[type="date"] {
  color: transparent;
}

.date-input-wrap.has-value input[type="date"],
.date-input-wrap:focus-within input[type="date"] {
  color: var(--text);
}

body.design-preview .text-input,
body.design-preview .copy-field,
body.design-preview .payment-list {
  background: rgba(244, 248, 252, 0.76);
}

body.design-preview .amount-grid button {
  background: rgba(244, 248, 252, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    color 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

body.design-preview .amount-grid button.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(42, 171, 238, 0.22);
}

body.design-preview .amount-grid button:not(.is-selected):hover {
  border-color: rgba(42, 171, 238, 0.34);
  background: rgba(234, 247, 255, 0.9);
  color: var(--accent-strong);
}

.store-grid,
.amount-grid {
  display: grid;
  gap: 10px;
}

.store-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.amount-grid {
  grid-template-columns: repeat(3, 1fr);
}

.amount-grid button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
}

.amount-grid .is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.amount-grid button:active,
.payment-list button:active,
.social-grid button:active,
.secondary-button:active,
.small-button:active {
  transform: translateY(1px);
}

body.design-preview .primary-button:active,
body.design-preview .amount-grid button:active,
body.design-preview .payment-list button:active,
body.design-preview .social-grid button:active,
body.design-preview .secondary-button:active,
body.design-preview .small-button:active {
  transform: scale(0.975);
}

body.design-preview .amount-grid button.is-selected:active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(42, 171, 238, 0.22);
}

body.design-preview .payment-list button,
body.design-preview .social-grid button,
body.design-preview .tabbar button {
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    color 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.payment-list {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.payment-list button {
  display: flex;
  width: 100%;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.payment-list button:first-child {
  border-top: 0;
}

.payment-list .is-selected {
  background: var(--surface-soft);
}

.payment-list button > span:nth-child(2) {
  flex: 1;
}

.payment-icon {
  display: grid;
  position: relative;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(42, 171, 238, 0.08),
    0 6px 16px rgba(42, 171, 238, 0.08);
}

.payment-icon img {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.promo-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

body.design-preview .promo-box {
  margin-top: 20px;
  padding-top: 18px;
}

body.design-preview .promo-box h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.promo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

body.design-preview .promo-row {
  gap: 8px;
}

.promo-row .text-input {
  margin-bottom: 0;
  text-transform: uppercase;
}

body.design-preview .promo-row .text-input {
  min-height: 48px;
  border-radius: 14px;
  background: rgba(244, 248, 252, 0.86);
}

.promo-row .secondary-button {
  min-height: 46px;
  white-space: nowrap;
}

.textarea-input {
  min-height: 104px;
  resize: vertical;
  line-height: 1.45;
}

.file-input {
  padding: 13px 14px;
}

.file-input::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-weight: 800;
  padding: 10px 12px;
}

body.design-preview .promo-row .secondary-button {
  min-height: 48px;
  border-radius: 14px;
}

[data-promo-note] {
  color: var(--muted);
}

body.design-preview [data-promo-note] {
  min-height: 36px;
  margin-top: 12px;
  border-radius: 14px;
  padding: 9px 12px;
  background: rgba(244, 248, 252, 0.7);
  color: var(--muted);
  text-align: center;
}

body.design-preview [data-promo-note].is-loading {
  color: var(--accent-strong);
}

[data-promo-note].is-success {
  color: #18a957 !important;
  font-weight: 700;
}

[data-transfer-note].is-success {
  color: #18a957 !important;
  font-weight: 700;
}

.transfer-status {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(42, 171, 238, 0.18);
  background: rgba(42, 171, 238, 0.08);
  color: var(--text);
}

.transfer-status strong {
  font-size: 15px;
}

.transfer-status span,
.transfer-status small {
  color: var(--muted);
  line-height: 1.35;
}

.transfer-status.is-pending {
  border-color: rgba(216, 157, 27, 0.24);
  background: rgba(216, 157, 27, 0.1);
}

.transfer-status.is-approved {
  border-color: rgba(24, 169, 87, 0.22);
  background: rgba(24, 169, 87, 0.1);
}

.transfer-status.is-approved strong {
  color: #18a957;
}

.transfer-status.is-rejected {
  border-color: rgba(229, 91, 100, 0.22);
  background: rgba(229, 91, 100, 0.1);
}

.transfer-status.is-rejected strong {
  color: var(--danger);
}

body.design-preview [data-promo-note].is-success {
  background: rgba(24, 169, 87, 0.1);
  box-shadow: inset 0 0 0 1px rgba(24, 169, 87, 0.16);
}

[data-promo-note].is-error {
  color: var(--danger) !important;
}

[data-transfer-note].is-error {
  color: var(--danger) !important;
}

body.design-preview [data-promo-note].is-error {
  background: rgba(229, 91, 100, 0.1);
  box-shadow: inset 0 0 0 1px rgba(229, 91, 100, 0.16);
}

.radio-dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.is-selected .radio-dot {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 42%, transparent 47%);
}

.timeline p {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

body.design-preview .timeline p {
  border-top-color: rgba(123, 153, 184, 0.18);
}

body.design-preview .history-state {
  border-top: 0;
  border-radius: 16px;
  padding: 14px;
  background: rgba(244, 248, 252, 0.72);
}

body.design-preview .history-state.is-empty {
  box-shadow: inset 0 0 0 1px rgba(42, 171, 238, 0.12);
}

body.design-preview .history-state.is-error {
  box-shadow: inset 0 0 0 1px rgba(229, 91, 100, 0.16);
}

.history-skeleton {
  display: grid;
  gap: 10px;
}

.history-skeleton span {
  display: block;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(244, 248, 252, 0.92), rgba(229, 244, 255, 0.82), rgba(244, 248, 252, 0.92));
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

.timeline span {
  color: var(--muted);
  font-size: 13px;
}

details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

summary {
  font-weight: 700;
}

.support-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 10px 10px calc(env(safe-area-inset-bottom) + 10px);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

body.design-preview .tabbar {
  right: 8px;
  bottom: 8px;
  left: 8px;
  width: min(calc(100% - 16px), 414px);
  border: 1px solid rgba(123, 153, 184, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 46px rgba(38, 77, 113, 0.16);
}

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

.tabbar .is-active {
  background: var(--surface-soft);
  color: var(--accent-strong);
}

body.design-preview .tabbar .is-active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 18px rgba(42, 171, 238, 0.08);
}

body.design-preview .tabbar button:active {
  transform: scale(0.96);
}

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

@keyframes skeleton-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

/* Taste preview v2: visible only for Telegram ID 924078337 via body.design-preview. */
body.design-preview .app-shell {
  padding-top: calc(env(safe-area-inset-top) + 20px);
}

body.design-preview .topbar {
  position: relative;
  margin-bottom: 22px;
}

body.design-preview .topbar h1 {
  letter-spacing: 0;
}

body.design-preview .card,
body.design-preview .balance-panel {
  border-color: rgba(255, 255, 255, 0.74);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(250, 253, 255, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 16px 34px rgba(41, 73, 105, 0.09);
}

body.design-preview .balance-panel {
  min-height: 168px;
  padding: 26px 24px 32px;
  background:
    radial-gradient(circle at 88% 18%, rgba(42, 171, 238, 0.34), transparent 31%),
    radial-gradient(circle at 74% 82%, rgba(34, 197, 150, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(229, 247, 255, 0.9));
}

body.design-preview .balance-panel::before {
  left: 24px;
  right: 24px;
  bottom: 20px;
  background: rgba(104, 137, 166, 0.14);
}

body.design-preview .balance-panel::after {
  left: 24px;
  bottom: 20px;
  width: calc((100% - 48px) * var(--subscription-progress, 1));
  height: 6px;
  box-shadow: 0 5px 12px rgba(42, 171, 238, 0.18);
}

body.design-preview .balance-panel .muted {
  font-size: 15px;
  font-weight: 700;
}

body.design-preview .balance-panel strong {
  margin: 9px 0 7px;
  font-size: 52px;
}

body.design-preview [data-daily-cost] {
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: #5e7185;
  font-size: 14px;
}

body.design-preview .balance-card,
body.design-preview .devices-card,
body.design-preview .social-card {
  padding: 20px;
}

body.design-preview .balance-card .small-button,
body.design-preview .devices-card .small-button {
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(237, 248, 255, 0.96), rgba(223, 242, 255, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(42, 171, 238, 0.08);
}

body.design-preview .balance-card .note {
  padding-left: 14px;
}

body.design-preview .balance-card .note::before {
  display: none;
}

body.design-preview .device-row::before {
  left: 64px;
  right: 2px;
}

body.design-preview .device-icon {
  width: 44px;
  height: 44px;
  font-size: 21px;
  text-transform: none;
}

body.design-preview .social-grid button {
  min-height: 52px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(237, 248, 255, 0.96), rgba(224, 243, 255, 0.82));
}

body.design-preview .amount-grid button {
  min-height: 52px;
  border-radius: 18px;
}

body.design-preview .amount-grid button.is-selected,
body.design-preview .primary-button {
  background: linear-gradient(180deg, #34b8f3 0%, #239fde 100%);
}

body.design-preview .payment-list {
  border-radius: 22px;
}

body.design-preview .payment-list button {
  min-height: 76px;
  padding: 14px;
}

body.design-preview .tabbar {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 36px rgba(41, 73, 105, 0.14);
}

body.design-preview .tabbar .is-active {
  background:
    linear-gradient(180deg, rgba(237, 248, 255, 0.96), rgba(222, 243, 255, 0.86));
}

.install-hero p {
  max-width: 420px;
  margin-inline: auto;
}

.install-card {
  display: grid;
  gap: 14px;
}

.install-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}

.install-step h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.install-step .note {
  margin: 0;
}

.step-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(42, 171, 238, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
}

.app-step {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(120, 140, 160, 0.16);
}

.app-step h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.app-choice-grid {
  display: grid;
  gap: 12px;
  margin: 14px 0 20px;
}

.app-choice {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(120, 140, 160, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  text-align: left;
  box-shadow: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.app-choice-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.app-choice strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.app-choice small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.app-choice-check {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid rgba(120, 140, 160, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.app-choice.is-selected {
  border-color: rgba(42, 171, 238, 0.55);
  background: rgba(42, 171, 238, 0.1);
  box-shadow: 0 10px 24px rgba(42, 171, 238, 0.08);
}

.app-choice.is-selected .app-choice-check {
  border-color: var(--accent);
  background: radial-gradient(circle at center, var(--accent) 0 38%, rgba(255, 255, 255, 0.86) 42%);
}

.install-step-connect {
  padding-top: 8px;
  border-top: 1px solid rgba(120, 140, 160, 0.16);
}

.store-links {
  display: grid;
  gap: 8px;
}

.store-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(42, 171, 238, 0.12);
  border-radius: 14px;
  background: rgba(247, 251, 255, 0.72);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.store-link span:last-child {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.store-link:active {
  transform: scale(0.985);
}

.manual-key-card {
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(120, 140, 160, 0.16);
  padding-top: 14px;
}

.manual-key-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.25;
}

.manual-key-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.copy-key-button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(42, 171, 238, 0.1);
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
}

.copy-key-button:active {
  transform: scale(0.985);
}
