:root {
  color-scheme: light;
  --bg: #f8fafc;
  --card: rgba(255, 255, 255, 0.82);
  --text: #0f172a;
  --sub: #475569;
  --line: rgba(148, 163, 184, 0.2);
  --accent: #111827;
  --accent-soft: rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.hidden {
  display: none !important;
}

.page-bg {
  position: fixed;
  border-radius: 999px;
  filter: blur(84px);
  pointer-events: none;
  z-index: 0;
}

.page-bg--one {
  top: -60px;
  left: -80px;
  width: 260px;
  height: 260px;
  background: rgba(14, 165, 233, 0.22);
}

.page-bg--two {
  right: -40px;
  top: 240px;
  width: 220px;
  height: 220px;
  background: rgba(236, 72, 153, 0.18);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

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

.hero {
  padding: 36px;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  margin-top: 18px;
  font-size: 44px;
  line-height: 1.08;
}

.hero p {
  margin-top: 14px;
  max-width: 720px;
  color: var(--sub);
  line-height: 1.8;
  font-size: 16px;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.btn--dark {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.hero-panel {
  display: flex;
}

.login-state-card {
  width: 100%;
  padding: 24px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
}

.login-state-kicker {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
}

.login-state-title {
  margin-top: 12px;
  font-size: 30px;
  font-weight: 700;
}

.login-state-desc {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.login-user-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.login-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
}

.login-user-meta {
  flex: 1;
}

.login-user-name {
  font-size: 16px;
  font-weight: 700;
}

.login-user-sub {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.login-points {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.78);
}

.login-points strong {
  color: #fff;
  font-size: 22px;
}

.login-state-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section {
  margin-top: 24px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin-top: 10px;
  font-size: 28px;
}

.section-head p {
  margin-top: 8px;
  color: var(--sub);
  line-height: 1.7;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.case-card {
  padding: 22px;
}

.case-title {
  font-size: 18px;
  font-weight: 700;
}

.case-summary {
  margin-top: 10px;
  color: var(--sub);
  line-height: 1.75;
}

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

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
}

.modal-card {
  position: relative;
  width: min(440px, calc(100vw - 24px));
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 22px;
  cursor: pointer;
}

.modal-title {
  margin-top: 14px;
  font-size: 28px;
  line-height: 1.2;
}

.modal-desc {
  margin-top: 10px;
  color: var(--sub);
  line-height: 1.8;
}

.qr-shell {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.qr-box {
  width: 240px;
  height: 240px;
  padding: 10px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-pill {
  margin-top: 16px;
  min-height: 42px;
  border-radius: 16px;
  background: rgba(241, 245, 249, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-weight: 700;
  text-align: center;
  padding: 0 16px;
}

.status-pill[data-state="pending"] {
  background: rgba(219, 234, 254, 0.8);
  color: #1d4ed8;
}

.status-pill[data-state="success"] {
  background: rgba(220, 252, 231, 0.88);
  color: #15803d;
}

.status-pill[data-state="expired"] {
  background: rgba(254, 226, 226, 0.92);
  color: #dc2626;
}

.modal-steps {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.75;
}

.modal-btn {
  margin-top: 20px;
  width: 100%;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .shell {
    width: calc(100vw - 20px);
    padding-top: 20px;
  }
}
