/* ============================================================
   买家端页面：iPhone 官网式黑白极简
   依赖 base.css（黑白色板、黑白胶囊按钮、18px 圆角、细分割线）；
   本文件只写买家页特有的排版、留白与列表样式。
   无图标、无阴影、无渐变、无装饰图片。
   ============================================================ */

/* ------------------------------------------------------------ 页面外壳 */
.buyer-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.buyer-main {
  flex: 1 1 auto;
  width: 100%;
}

/* ------------------------------------------------------------ 顶部文字 wordmark */
.site-header {
  padding-top: clamp(20px, 3vw, 30px);
}

.site-header .container {
  display: flex;
  justify-content: center;
}

.wordmark {
  display: inline-block;
  max-width: 100%;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
  text-align: center;
  overflow-wrap: anywhere;
}

.wordmark:hover {
  color: var(--muted);
}

/* ------------------------------------------------------------ 首页 hero */
.home-hero {
  padding: clamp(72px, 12vw, 150px) 0 clamp(56px, 8vw, 104px);
  text-align: center;
}

.home-hero h1 {
  font-size: clamp(40px, 7.4vw, 80px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.hero-sub {
  max-width: 660px;
  margin: 26px auto 0;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 400;
  line-height: 1.48;
  letter-spacing: -0.01em;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ 首页入口列表（居中胶囊卡片） */
.entries-section {
  padding-bottom: clamp(64px, 10vw, 128px);
}

.entries {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-item {
  display: flex;
  justify-content: center;
}

.entry-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  min-height: 88px;
  padding: 18px 56px;
  border-radius: 999px;
  background: var(--surface-soft);
  text-align: center;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.entry-link:hover {
  background: #e8e8ed;
}

.entry-link:active {
  transform: scale(0.995);
}

.entry-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.entry-title-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.entry-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.entry-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.entry-status {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #86868b;
  white-space: nowrap;
}

.entry-link.is-paused {
  background: #fafafa;
}

.entry-link.is-paused .entry-title {
  color: var(--muted);
}

.entry-link.is-paused .entry-desc {
  color: #86868b;
}

/* ------------------------------------------------------------ 加载 / 错误 / 空态 */
.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 56px 0;
  text-align: center;
}

.state-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.state-block .hint {
  max-width: 420px;
}

.state-block .btn {
  margin-top: 12px;
}

.entries .empty-state {
  padding: 64px 0;
  font-size: 17px;
  color: var(--muted);
  text-align: center;
}

.entries .loading-block {
  padding: 56px 0;
}

/* ------------------------------------------------------------ 页脚 */
.buyer-footer {
  margin-top: auto;
  padding: clamp(48px, 8vw, 88px) 0 44px;
}

.footer-inner {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.footer-note {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.footer-note + .footer-note {
  margin-top: 4px;
}

/* ------------------------------------------------------------ 领取页 */
.claim-header {
  padding-top: clamp(16px, 2.5vw, 26px);
}

.claim-header .container-narrow {
  display: flex;
  align-items: center;
  max-width: 620px;
  min-height: 44px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 6px 0 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}

.back-link:hover {
  color: var(--text);
}

.back-chevron {
  font-size: 21px;
  line-height: 1;
  margin-top: -2px;
}

.claim-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding-top: clamp(40px, 7vw, 80px);
  padding-bottom: clamp(56px, 9vw, 104px);
}

.claim-main .loading-block {
  padding: 72px 0;
}

.claim-content {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 5vw, 56px);
  min-width: 0;
}

/* 商品信息 / 权益（居中） */
.claim-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 0;
  text-align: center;
}

.status-label {
  align-self: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #86868b;
}

.claim-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-align: center;
  overflow-wrap: anywhere;
}

.claim-short {
  max-width: 520px;
  margin: 0 auto;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 400;
  line-height: 1.48;
  letter-spacing: -0.01em;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.benefit {
  width: 100%;
  max-width: 520px;
  margin: 6px auto 0;
  padding: 18px 28px;
  border: 0;
  border-radius: 32px;
  background: var(--surface-soft);
  text-align: center;
}

.benefit-label {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.benefit-text {
  margin-top: 6px;
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* 暂停提示 */
.paused-banner {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-soft);
}

/* 领取表单（居中圆角面板） */
.claim-form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 34px);
  border: 0;
  border-radius: 32px;
  background: var(--surface-soft);
  text-align: center;
}

.form-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-align: center;
  overflow-wrap: anywhere;
}

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

.claim-form .field {
  text-align: center;
}

.claim-form .label {
  text-align: center;
}

.claim-input {
  min-height: 58px;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 18px;
  text-align: center;
}

.claim-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.claim-submit {
  margin-top: 6px;
}

/* 领取成功（居中） */
.claim-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 4vw, 40px);
  min-width: 0;
  text-align: center;
}

.success-note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.success-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-align: center;
}

.success-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-align: center;
}

/* 程序化聚焦标题（读屏提示）不显示焦点框 */
.success-title:focus,
.claim-fatal-title:focus {
  outline: none;
}

.success-product {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.success-lead {
  max-width: 520px;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-soft);
  text-align: center;
  overflow-wrap: anywhere;
}

.code-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 36px) 20px;
  background: var(--surface-soft);
  border-radius: 32px;
  text-align: center;
}

.code-label {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.code-value {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(22px, 4.6vw, 36px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* 兑换步骤：01/02/03 + 细分割线 */
.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.steps-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-align: center;
}

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.steps-list li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-soft);
}

.step-num {
  flex: none;
  width: 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
}

.step-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.claim-usage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.claim-support {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.claim-claimed-at {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

/* 404 / 加载失败（居中） */
.claim-fatal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: clamp(24px, 5vw, 56px) 0;
  text-align: center;
}

.claim-fatal-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-align: center;
  overflow-wrap: anywhere;
}

.claim-fatal-message {
  max-width: 520px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.claim-fatal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 12px;
}

.claim-fatal-actions .btn {
  min-width: 168px;
}

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 734px) {
  .home-hero {
    padding-top: 76px;
    padding-bottom: 56px;
  }

  .home-hero h1 {
    font-size: 44px;
  }

  .hero-sub {
    margin-top: 20px;
    font-size: 17px;
  }

  .entry-link {
    min-height: 84px;
    padding: 16px 34px;
  }

  .entry-title {
    font-size: 19px;
  }

  .claim-main {
    padding-top: 44px;
  }

  .claim-title {
    font-size: 38px;
  }

  .claim-form-section {
    padding: 24px 20px;
  }

  .success-title {
    font-size: 42px;
  }

  .claim-fatal-actions .btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .entry-link {
    min-height: 78px;
    padding: 14px 24px;
  }

  .entry-title {
    font-size: 18px;
  }

  .entry-desc {
    font-size: 13px;
  }

  .home-hero h1 {
    font-size: 40px;
  }
}
