/* =========================================================================
   Ad Earn - design system
   Primary: sky blue · Surface: pure white · Text: dark navy
   Mobile first, max 520px app column, safe-area aware.
   ========================================================================= */

:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;

  --navy-900: #0b1f3a;
  --navy-700: #1e3a5f;
  --slate-600: #55637a;
  --slate-400: #94a3b8;
  --slate-200: #e4ecf5;
  --line: #e9f0f8;

  --white: #ffffff;
  --surface: #ffffff;
  --bg: #ffffff;

  --success: #0ea371;
  --success-soft: #e6f8f1;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info-soft: #e0f2fe;

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 11px;

  --shadow-xs: 0 1px 2px rgba(11, 31, 58, 0.04);
  --shadow-sm: 0 4px 14px rgba(11, 31, 58, 0.05);
  --shadow-md: 0 12px 30px rgba(11, 31, 58, 0.07);
  --shadow-brand: 0 14px 30px rgba(2, 132, 199, 0.24);

  --tabbar-h: 72px;
  --gutter: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--navy-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--sky-600);
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------- layout */

.app {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
}

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}

.content {
  flex: 1;
  padding: 4px var(--gutter) 26px;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: view-in 0.34s var(--ease) both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------- splash */

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 32px;
  text-align: center;
}

.splash__logo {
  width: 74px;
  height: 74px;
  animation: float 3.4s ease-in-out infinite;
}

.splash__logo svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 24px rgba(2, 132, 199, 0.32));
}

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

.splash__title {
  margin-top: 18px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.splash__subtitle {
  margin-top: 6px;
  color: var(--slate-600);
  font-size: 14px;
}

.spinner {
  width: 26px;
  height: 26px;
  margin-top: 26px;
  border: 3px solid var(--sky-100);
  border-top-color: var(--sky-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ----------------------------------------------------------------- gate */

.gate__card {
  width: 100%;
  max-width: 360px;
  padding: 30px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  animation: view-in 0.4s var(--ease) both;
}

.gate__icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--info-soft);
  color: var(--sky-600);
}

.gate__icon svg {
  width: 30px;
  height: 30px;
}

.gate__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.gate__text {
  margin: 10px 0 22px;
  color: var(--slate-600);
  font-size: 14.5px;
}

.gate__link {
  color: var(--sky-600);
  font-weight: 600;
}

/* -------------------------------------------------------------- dev bar */

.dev-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--gutter);
  background: var(--warning-soft);
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dev-banner__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse 1.8s ease-in-out infinite;
}

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

/* -------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter) 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(233, 240, 248, 0.9);
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.topbar__text {
  min-width: 0;
}

.topbar__eyebrow {
  font-size: 12px;
  color: var(--slate-600);
  letter-spacing: 0.01em;
}

.topbar__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-brand);
  overflow: hidden;
}

.avatar--sm {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 14px;
}

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

.avatar--lg {
  width: 78px;
  height: 78px;
  border-radius: 26px;
  font-size: 27px;
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 8px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky-500), var(--sky-600));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-brand);
}

.coin-pill svg {
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 42%, #0369a1 100%);
  color: #fff;
  box-shadow: var(--shadow-brand);
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  z-index: -1;
}

.hero::before {
  content: "";
  position: absolute;
  left: -40px;
  bottom: -90px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
}

.hero__label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.86;
}

.hero__amount {
  margin-top: 6px;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.hero__sub {
  margin-top: 4px;
  font-size: 13.5px;
  opacity: 0.9;
}

.hero__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 12.5px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.hero__chip svg {
  width: 14px;
  height: 14px;
}

.hero--refer {
  background: linear-gradient(135deg, #34d399 0%, #0ea5e9 55%, #0369a1 100%);
}

.hero--refer .hero__amount {
  font-size: 34px;
}

/* --------------------------------------------------------------- cards */

.card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card--flush {
  padding: 6px 16px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.section__title {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.link-btn {
  border: 0;
  background: none;
  padding: 4px;
  color: var(--sky-600);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:active {
  opacity: 0.6;
}

/* --------------------------------------------------------------- stats */

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

.stat {
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.stat__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--info-soft);
  color: var(--sky-600);
}

.stat__icon svg {
  width: 18px;
  height: 18px;
}

.stat__icon--green {
  background: var(--success-soft);
  color: var(--success);
}

.stat__icon--amber {
  background: var(--warning-soft);
  color: var(--warning);
}

.stat__icon--violet {
  background: #ede9fe;
  color: #7c3aed;
}

.stat__value {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.stat__label {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--slate-600);
}

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--sky-500);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), opacity 0.16s linear;
  box-shadow: var(--shadow-brand);
  text-align: center;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:active {
  transform: scale(0.975);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.2);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--block {
  width: 100%;
}

.btn--ghost {
  background: transparent;
  color: var(--sky-600);
  border: 1px solid var(--sky-200);
  box-shadow: none;
}

.btn--soft {
  background: var(--sky-50);
  color: var(--sky-700);
  border: 1px solid var(--sky-100);
  box-shadow: none;
}

.btn--dark {
  background: var(--navy-900);
  box-shadow: 0 12px 24px rgba(11, 31, 58, 0.2);
}

.btn--sm {
  padding: 9px 14px;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
}

.btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* --------------------------------------------------------- earn card */

.earn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
  border: 1px solid var(--sky-100);
  box-shadow: var(--shadow-md);
}

.earn--premium {
  gap: 12px;
  padding: 18px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(186, 230, 253, 0.55) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #ffffff 0%, #f7fcff 100%);
}

.earn__hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.earn__play-art {
  width: 74px;
  height: 74px;
  flex: none;
  display: block;
}

.earn__copy {
  min-width: 0;
  flex: 1;
}

.earn__title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.earn__sub {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--slate-600);
}

.earn__reward {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7d6 0%, #fde68a 55%, #fbbf24 100%);
  color: #92400e;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.earn__cta {
  margin-top: 4px;
  gap: 10px;
  min-height: 52px;
  font-size: 15.5px;
}

.earn__cta-icon {
  width: 28px;
  height: 28px;
  flex: none;
  filter: drop-shadow(0 2px 4px rgba(3, 105, 161, 0.18));
}

.earn__cta[disabled],
.earn__cta[aria-disabled="true"] {
  background: linear-gradient(135deg, #dbe7f0 0%, #c9d8e6 100%);
  color: #5b7288;
  border: 1px solid #d7e3ee;
  opacity: 1;
}

.earn__cta[disabled] .earn__cta-icon,
.earn__cta[aria-disabled="true"] .earn__cta-icon {
  filter: grayscale(0.35) saturate(0.7) opacity(0.85);
}

.earn__hint {
  margin-top: 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--slate-600);
}

/* ---------------------------------------------- banner ad placement */

.ad-banner-slot {
  width: 100%;
  margin-top: 4px;
}

.ad-banner-slot:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.ad-banner-slot:not(.hidden) > * {
  max-width: 100%;
}

/* -------------------------------------------------------------- lists */

.list {
  display: flex;
  flex-direction: column;
}

.list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.list__item:last-child {
  border-bottom: 0;
}

.list__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--info-soft);
  color: var(--sky-600);
}

.list__icon svg {
  width: 19px;
  height: 19px;
}

.list__icon--green {
  background: var(--success-soft);
  color: var(--success);
}

.list__icon--amber {
  background: var(--warning-soft);
  color: var(--warning);
}

.list__icon--red {
  background: var(--danger-soft);
  color: var(--danger);
}

.list__body {
  flex: 1;
  min-width: 0;
}

.list__title {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--slate-600);
}

.empty {
  padding: 26px 10px;
  text-align: center;
  color: var(--slate-600);
  font-size: 13.5px;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: var(--sky-50);
  color: var(--sky-400);
}

.empty__icon svg {
  width: 22px;
  height: 22px;
}

/* ------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge--pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge--approved {
  background: var(--info-soft);
  color: var(--sky-700);
}

.badge--rejected {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--paid,
.badge--rewarded {
  background: var(--success-soft);
  color: var(--success);
}

.badge--verified {
  background: #ede9fe;
  color: #7c3aed;
}

/* ---------------------------------------------------------------- copy */

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--sky-50);
}

.copy-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 13.5px;
  color: var(--navy-700);
  font-weight: 600;
}

.copy-row__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--sky-500);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.copy-row__btn svg {
  width: 15px;
  height: 15px;
}

.copy-row__btn:active {
  transform: scale(0.96);
}

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.action-row .btn {
  flex: 1;
}

/* --------------------------------------------------------------- forms */

.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field__label {
  font-size: 13px;
  font-weight: 650;
  color: var(--navy-700);
}

.field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.field__prefix {
  position: absolute;
  left: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-600);
  pointer-events: none;
}

.input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: #fbfdff;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-900);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input--prefixed {
  padding-left: 32px;
}

.input::placeholder {
  color: var(--slate-400);
  font-weight: 500;
}

.input:focus {
  border-color: var(--sky-400);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.field__error {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
}

.field__hint {
  font-size: 12px;
  color: var(--slate-600);
}

/* Minimum + payout note shown directly under the withdrawal amount field */
.amount-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfdff;
}

.amount-note__text {
  font-size: 13.5px;
  font-weight: 700;
  color: #0b1f3a;
  line-height: 1.45;
}

.amount-note__hint {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-600);
  line-height: 1.45;
}

/* -------------------------------------------------------------- banner */

.banner {
  display: flex;
  gap: 11px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}

.banner svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.banner--info {
  background: var(--info-soft);
  color: var(--sky-700);
}

.banner--warn {
  background: var(--warning-soft);
  color: #92400e;
}

.banner--danger {
  background: var(--danger-soft);
  color: #991b1b;
}

.banner strong {
  font-weight: 700;
}

/* -------------------------------------------------------------- tabbar */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  background: none;
  color: var(--slate-400);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s var(--ease);
  position: relative;
}

.tab__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 30px;
  border-radius: 999px;
  transition: background 0.24s var(--ease), transform 0.24s var(--ease);
}

.tab__icon svg {
  width: 21px;
  height: 21px;
}

.tab.is-active {
  color: var(--sky-600);
}

.tab.is-active .tab__icon {
  background: var(--info-soft);
  transform: translateY(-1px);
}

.tab:active .tab__icon {
  transform: scale(0.92);
}

/* --------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 60;
  transform: translate(-50%, 20px);
  max-width: min(88vw, 420px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--navy-900);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
  box-shadow: 0 14px 30px rgba(11, 31, 58, 0.28);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--error {
  background: var(--danger);
}

.toast--success {
  background: var(--success);
}

/* --------------------------------------------------------------- modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 58, 0.44);
  backdrop-filter: blur(3px);
  animation: fade-in 0.2s ease both;
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 24px 22px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(11, 31, 58, 0.3);
  animation: modal-in 0.28s var(--ease) both;
  text-align: center;
}

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

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: var(--info-soft);
  color: var(--sky-600);
}

.modal__icon svg {
  width: 28px;
  height: 28px;
}

.modal__icon--success {
  background: var(--success-soft);
  color: var(--success);
}

.modal__icon--warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.modal__title {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.modal__text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.55;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 20px;
}

/* ------------------------------------------------------------ skeleton */

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--sky-50);
  border-radius: var(--radius-sm);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton--line {
  height: 12px;
}

.skeleton--card {
  height: 82px;
  border-radius: var(--radius-md);
}

/* -------------------------------------------------------------- profile */

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 18px 22px;
  background: linear-gradient(180deg, #f7fcff 0%, #ffffff 100%);
  border: 1px solid var(--sky-100);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.profile-card__name {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.profile-card__username {
  color: var(--sky-600);
  font-size: 13.5px;
  font-weight: 600;
}

.profile-card__id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sky-50);
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 600;
}

.profile-card__id svg {
  width: 13px;
  height: 13px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row__label {
  font-size: 13.5px;
  color: var(--slate-600);
}

.info-row__value {
  font-size: 13.5px;
  font-weight: 650;
  text-align: right;
  word-break: break-word;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  cursor: pointer;
}

.link-row:last-child {
  border-bottom: 0;
}

.link-row:active {
  opacity: 0.6;
}

.link-row__chevron {
  width: 16px;
  height: 16px;
  color: var(--slate-400);
}

/* ------------------------------------------------------------ how it */

.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--info-soft);
  color: var(--sky-700);
  font-size: 12.5px;
  font-weight: 800;
}

.step__title {
  font-size: 14px;
  font-weight: 700;
}

.step__text {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--slate-600);
}

/* ----------------------------------------------------------- responsive */

@media (min-width: 640px) {
  body {
    background: #eef4fb;
  }

  .app {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100dvh;
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line), 0 24px 70px rgba(11, 31, 58, 0.1);
  }

  .tabbar {
    left: 50%;
    transform: translateX(-50%);
    max-width: 520px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
