:root {
  --surface: #f3f4f7;
  --surface-soft: #eef0f3;
  --surface-card: #ffffff;
  --surface-muted: #d9dee5;
  --text: #202327;
  --text-soft: #6e7278;
  --primary: #0f6fa9;
  --primary-strong: #005d92;
  --primary-bright: #4ab9ff;
  --primary-pale: rgba(255, 255, 255, 0.16);
  --secondary: #b53d00;
  --secondary-dark: #972f00;
  --secondary-text: #fff4ef;
  --accent: #f7b500;
  --accent-shadow: rgba(247, 181, 0, 0.24);
  --success: #178a3f;
  --nav-muted: #afb6c1;
  --line: rgba(11, 62, 97, 0.1);
  --shadow-soft: 0 10px 24px rgba(15, 35, 52, 0.06);
  --shadow-button: 0 8px 16px rgba(181, 61, 0, 0.18);
  --radius-card: 28px;
  --radius-pill: 999px;
  --app-width: 420px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #e8ecf1;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Arial, sans-serif;
  min-height: 100vh;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

.app-shell {
  width: min(100%, var(--app-width));
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  position: relative;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7), 0 24px 60px rgba(10, 29, 45, 0.08);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 16px rgba(20, 27, 34, 0.05);
}

.topbar__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-strong);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.brand__text {
  font-size: 1.1rem;
}

.topbar__balance {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(74, 185, 255, 0.18);
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px rgba(15, 111, 169, 0.12);
  font-weight: 800;
  line-height: 1;
}

main {
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 12px 18px 34px;
  background: linear-gradient(135deg, #1278c6 0%, #3da8ef 100%);
  color: #ffffff;
}

.hero__lang-row {
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lang-switch__btn {
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.84);
  padding: 8px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.lang-switch__btn:hover {
  color: #ffffff;
}

.lang-switch__btn.is-active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 28px;
}

.hero__title {
  margin: 0;
  max-width: 260px;
  font-size: 3rem;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero__subtitle {
  margin: 18px 0 26px;
  max-width: 250px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
  line-height: 1.45;
}

.balance-card {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.balance-card__label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
}

.balance-card__amount {
  margin: 0;
  font-size: 3.5rem;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.withdraw-btn {
  align-self: center;
  flex: 0 0 auto;
  background: var(--accent);
  color: #241900;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  font-weight: 900;
  box-shadow: 0 12px 20px var(--accent-shadow);
  transition: transform var(--transition), filter var(--transition);
}

.withdraw-btn:hover,
.cta-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.hero__glow {
  position: absolute;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(0.5px);
}

.hero__glow--one {
  width: 168px;
  height: 168px;
  right: -46px;
  bottom: 12px;
  border-radius: 30px;
  transform: rotate(18deg);
}

.hero__glow--two {
  width: 92px;
  height: 92px;
  right: 34px;
  bottom: 56px;
  border-radius: 26px;
  transform: rotate(-6deg);
  opacity: 0.38;
}

.section {
  padding: 24px 16px 0;
}

.section--first {
  padding-top: 20px;
}

.section--steps {
  padding-bottom: 18px;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section__head--tight {
  margin-bottom: 20px;
}

.section__title,
.payouts__title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.section__link {
  color: var(--primary-strong);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.card-stack,
.list-stack {
  display: grid;
  gap: 18px;
}

.task-card {
  position: relative;
  background: var(--surface-card);
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.reward-chip {
  position: absolute;
  top: -10px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #241900;
  font-size: 0.94rem;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(247, 181, 0, 0.22);
}

.task-card__icon,
.list-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-strong);
  background: #edf4fa;
}

.task-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  padding: 14px;
  margin: 6px 0 16px;
}

.task-card__title,
.list-item__title,
.step-item__title {
  margin: 0;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.task-card__title {
  font-size: 2rem;
  line-height: 1.04;
}

.task-card__desc,
.list-item__desc,
.step-item__desc {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.45;
  font-size: 0.98rem;
}

.cta-btn {
  margin-top: 22px;
  width: 100%;
  min-height: 52px;
  border-radius: var(--radius-pill);
  background: var(--secondary);
  color: var(--secondary-text);
  font-weight: 900;
  box-shadow: var(--shadow-button);
  transition: transform var(--transition), filter var(--transition), background var(--transition);
}

.cta-btn:active,
.withdraw-btn:active,
.lang-switch__btn:active {
  transform: scale(0.99);
}

.list-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--surface-soft);
  border-radius: 24px;
  padding: 14px;
}

.list-item__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 16px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(12, 73, 111, 0.06);
}

.list-item__title {
  font-size: 1.12rem;
  line-height: 1.1;
}

.list-item__desc {
  font-size: 0.86rem;
  margin-top: 5px;
}

.list-item__meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.list-item__amount {
  margin: 0;
  color: var(--secondary);
  font-weight: 900;
  font-size: 1.12rem;
}

.list-item__badge,
.list-item__arrow {
  color: var(--text-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.list-item__arrow {
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.payouts {
  margin-top: 22px;
  padding: 36px 16px;
  background: #dde2e9;
}

.payouts__title {
  text-align: center;
  font-size: 1.95rem;
  margin-bottom: 22px;
}

.payouts__viewport {
  overflow: hidden;
}

.payouts__track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  animation: payout-marquee 22s linear infinite;
}

.payouts__viewport:hover .payouts__track {
  animation-play-state: paused;
}

.payout-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  background: #ffffff;
  border-radius: var(--radius-pill);
  padding: 9px 12px;
  box-shadow: 0 8px 14px rgba(16, 29, 40, 0.05);
  font-size: 0.84rem;
  font-weight: 600;
}

.payout-chip strong {
  color: var(--secondary);
  font-weight: 900;
}

.payout-chip__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f6e7ba;
  color: #b18400;
  font-size: 0.63rem;
  font-weight: 900;
  flex: 0 0 22px;
}

.stepper {
  position: relative;
  display: grid;
  gap: 24px;
}

.stepper__line {
  position: absolute;
  left: 18px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--line);
}

.step-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  align-items: start;
}

.step-item__num {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--primary-strong);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(0, 97, 144, 0.18);
}

.step-item__title {
  font-size: 1.45rem;
  line-height: 1.05;
}

.step-item__desc {
  font-size: 0.98rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  transform: translateX(-50%);
  width: min(100%, var(--app-width));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -10px 24px rgba(15, 22, 30, 0.08);
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 66px;
  border-radius: 18px;
  color: var(--nav-muted);
  transition: color var(--transition), transform var(--transition), background var(--transition);
}

.bottom-nav__item:hover {
  transform: translateY(-1px);
}

.bottom-nav__item--active {
  color: var(--secondary);
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
}

.bottom-nav__label {
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@keyframes payout-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 360px) {
  .hero__title {
    font-size: 2.55rem;
  }

  .balance-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .withdraw-btn {
    align-self: flex-start;
  }

  .task-card__title,
  .section__title,
  .payouts__title {
    font-size: 1.72rem;
  }
}

@media (min-width: 421px) {
  body {
    padding: 18px 0;
  }

  .topbar {
    border-radius: 24px 24px 0 0;
  }

  .bottom-nav {
    bottom: 18px;
    border-radius: 28px;
    width: min(100% - 18px, var(--app-width));
  }

  .app-shell {
    border-radius: 28px;
    overflow: clip;
  }

  main {
    padding-bottom: 126px;
  }
}
