:root {
  color-scheme: dark;
  --ink: #f5efe4;
  --muted: #b9b1a5;
  --quiet: #847c72;
  --paper: #151515;
  --panel: #202020;
  --line: rgba(245, 239, 228, 0.16);
  --gold: #d8b45f;
  --red: #e15546;
  --blue: #78a7c9;
  --green: #74b884;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #101010;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(16, 16, 16, 0) 0%, #101010 78%),
    radial-gradient(circle at 18% 12%, rgba(216, 180, 95, 0.14), transparent 28%),
    #101010;
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 72px clamp(18px, 5vw, 72px) 110px;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__image {
  background-image: url("assets/executive-begging-hero.png");
  background-size: cover;
  background-position: 62% center;
  transform: scale(1.02);
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.7) 42%, rgba(10, 10, 10, 0.08) 72%),
    linear-gradient(0deg, rgba(16, 16, 16, 0.94) 0%, rgba(16, 16, 16, 0) 45%);
}

.hero__content {
  position: relative;
  width: min(680px, 100%);
  z-index: 1;
}

.language-switch {
  position: absolute;
  top: 24px;
  right: clamp(18px, 5vw, 72px);
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(52px, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 16, 16, 0.7);
  backdrop-filter: blur(14px);
}

.language-button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.language-button.is-active {
  color: #121212;
  background: var(--gold);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3rem, 11vw, 7.7rem);
  line-height: 0.9;
  letter-spacing: 0;
}

html[lang="zh-CN"] h1 {
  max-width: 8ch;
  font-size: clamp(2.7rem, 8vw, 5.8rem);
  line-height: 1.04;
}

.lede {
  max-width: 640px;
  margin: 24px 0 0;
  color: #ded5ca;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.55;
}

.hero__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.tier-button,
.payment-tab {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(32, 32, 32, 0.72);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tier-button {
  min-height: 92px;
  padding: 16px;
  text-align: left;
  border-radius: 8px;
  backdrop-filter: blur(12px);
  min-width: 0;
}

.tier-button:hover,
.tier-button:focus-visible,
.payment-tab:hover,
.payment-tab:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(216, 180, 95, 0.66);
  outline: none;
}

.tier-button.is-selected {
  background: rgba(216, 180, 95, 0.18);
  border-color: rgba(216, 180, 95, 0.82);
}

.tier-button span {
  display: block;
  color: var(--gold);
  font-size: 1.65rem;
  font-weight: 900;
}

.tier-button strong {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
}

.dashboard {
  width: min(1180px, calc(100% - 36px));
  margin: -54px auto 0;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
  position: relative;
  z-index: 2;
}

.status-panel,
.payment-panel {
  background: rgba(32, 32, 32, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 34px);
}

.panel-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
}

.meter {
  margin-top: 30px;
}

.meter__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.meter__track {
  height: 16px;
  margin-top: 12px;
  background: #0e0e0e;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.meter__fill {
  width: 32%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
  border-radius: inherit;
  transition: width 360ms ease;
}

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

.stats-grid div {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
}

.stats-grid span {
  display: block;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#panicLevel {
  font-size: clamp(1rem, 2vw, 1.45rem);
}

.stats-grid p {
  margin: 7px 0 0;
  color: var(--quiet);
  font-size: 0.88rem;
  line-height: 1.35;
}

.status-message {
  min-height: 58px;
  margin: 22px 0 0;
  padding: 16px 18px;
  color: #f2dac2;
  line-height: 1.45;
  background: rgba(225, 85, 70, 0.1);
  border: 1px solid rgba(225, 85, 70, 0.26);
  border-radius: 8px;
}

.payment-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 26px;
}

.payment-tab {
  min-height: 44px;
  padding: 0 8px;
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.payment-tab.is-active {
  color: #121212;
  background: var(--gold);
  border-color: var(--gold);
}

.selected-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(216, 180, 95, 0.32);
  border-radius: 8px;
  background: rgba(216, 180, 95, 0.1);
  color: var(--muted);
  font-weight: 800;
}

.selected-amount strong {
  color: var(--gold);
  font-size: 1.45rem;
  line-height: 1;
}

.qr-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
}

.qr-card > div {
  min-width: 0;
}

.qr-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.qr-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.payment-status {
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 16, 16, 0.46);
  font-size: 0.9rem;
}

.payment-status[data-payment-state="dynamicReady"] {
  color: #c8f1d0;
  border-color: rgba(116, 184, 132, 0.4);
  background: rgba(116, 184, 132, 0.1);
}

.payment-status[data-payment-state="generating"] {
  color: #f0d99d;
  border-color: rgba(216, 180, 95, 0.4);
}

.payment-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 12px;
  padding: 0 16px;
  border-radius: 8px;
  color: #121212;
  background: var(--gold);
  font-weight: 900;
  text-decoration: none;
  text-align: center;
}

.payment-action[hidden] {
  display: none;
}

.qr-code {
  width: 168px;
  height: 168px;
  object-fit: contain;
  display: block;
  border: 10px solid #ece5d8;
  border-radius: 6px;
  background: #ece5d8;
  flex: 0 0 auto;
}

.disclaimer {
  margin: 16px 0 0;
  color: var(--quiet);
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .hero {
    min-height: 820px;
    align-items: end;
    padding: 44px 18px 140px;
  }

  .hero__image {
    background-position: 67% center;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(10, 10, 10, 0.96) 0%, rgba(10, 10, 10, 0.72) 45%, rgba(10, 10, 10, 0.12) 78%),
      linear-gradient(90deg, rgba(10, 10, 10, 0.68), rgba(10, 10, 10, 0.08));
  }

  h1 {
    max-width: 10ch;
  }

  .hero__actions,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .dashboard {
    width: min(100% - 28px, 560px);
    margin-top: -98px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid div {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 760px;
  }

  .lede {
    font-size: 0.98rem;
  }

  .qr-card {
    grid-template-columns: 1fr;
  }

  .qr-code {
    width: min(100%, 220px);
    height: auto;
    aspect-ratio: 1;
    justify-self: center;
  }
}
