:root {
  --primary: #0ea893;
  --primary-dark: #0b8c7b;
  --text-main: #1f2937;
  --text-sub: #6b7280;
  --bg: #f3f4f6;
  --card: #ffffff;
  --danger: #dc2626;
  --line: #e5e7eb;
  --error-font-size: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.has-fixed-cta {
  padding-bottom: 96px;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
}

.hero {
  padding: 24px 16px;
  color: #fff;
  background: linear-gradient(140deg, #0ea893 20%, #1cc9a5 100%);
}

.hero h1 {
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.hero p {
  margin: 0;
  opacity: 0.95;
}

.hero-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
  font-size: 14px;
}

.card {
  margin: 14px 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.muted {
  color: var(--text-sub);
  margin: 0;
  line-height: 1.5;
}

.value-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.grade-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grade-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 13px;
}

.cid-line {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-sub);
}

.btn {
  border: 0;
  border-radius: 12px;
  height: 48px;
  padding: 0 18px;
  font-size: 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.btn-primary:active {
  background: var(--primary-dark);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-main);
  background: #fff;
}

.btn-block {
  width: 100%;
}

.fixed-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  z-index: 40;
}

.fixed-cta-inner {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
}

.home-body {
  background: #e9e9e9;
}

.home-shell {
  background: #fff;
}

.home-hero-img {
  display: block;
  width: 100%;
  height: auto !important;
  max-width: 100%;
  object-fit: contain;
}

.home-content {
  padding: 12px 14px 10px;
}

.home-main-title {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
  color: #111827;
}

.home-card {
  position: relative;
  border: 2px solid #10b3a0;
  border-radius: 16px;
  background: #fff;
  padding: 16px 12px;
  margin-bottom: 14px;
}

.home-grade-card.pulse {
  animation: gradePulse 1.2s ease-in-out 2;
}

@keyframes gradePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    border-color: #10b3a0;
  }
  45% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.18);
    border-color: #ef4444;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    border-color: #10b3a0;
  }
}

.home-grade-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: 18px;
  color: #111827;
}

.home-grade-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-grade-tag {
  appearance: none;
  border: 1px solid #10b3a0;
  background: #fff;
  color: #10a092;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
}

.home-grade-tag.active {
  background: #10a092;
  color: #fff;
}

.home-middle-image {
  display: block;
  width: 100%;
  height: auto !important;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 14px;
  border: 1px solid #10b3a0;
  border-radius: 14px;
}

.home-middle-picture {
  display: block;
}

.home-cid-line {
  margin: 0 0 8px;
  font-size: 13px;
  color: #7f8895;
}

.home-body .fixed-cta .btn {
  height: 56px;
  font-size: 24px;
}

.global-toast {
  position: fixed;
  left: 50%;
  top: calc(14px + env(safe-area-inset-top));
  transform: translate(-50%, -8px);
  max-width: calc(100% - 40px);
  padding: 12px 22px;
  border-radius: 12px;
  background: #ef4444;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 80;
  white-space: nowrap;
}

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

body.claim-body {
  background: var(--bg);
}

.claim-shell {
  max-width: 480px;
  min-height: 100vh;
  background: #fff;
}

.claim-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(140deg, #0ea893 20%, #1cc9a5 100%);
}

.claim-brand {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.claim-topbar-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.claim-content {
  padding: 16px 14px 24px;
}

.back-link {
  display: inline-block;
  margin: 0 0 20px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 20px;
}

.claim-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

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

.claim-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-main);
}

.product-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #cbf4ec;
}

.tagline {
  margin: 20px 0;
  color: #2f8f7f;
  font-size: 18px;
  line-height: 1.4;
}

.tagline strong {
  color: var(--primary);
  margin-right: 8px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.required {
  color: #ef4444;
}

.input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 0 12px;
  font-size: 16px;
  color: var(--text-main);
  background: #fff;
}

.input::placeholder {
  color: #9ca3af;
}

.error-text {
  min-height: 20px;
  margin: 8px 0 4px;
  font-size: var(--error-font-size);
  color: var(--danger);
  line-height: 1.45;
}

.claim-submit-btn {
  min-width: 132px;
  height: 48px;
  border-radius: 12px;
  margin-top: 6px;
  padding: 0 20px;
  font-size: 20px;
}

.claim-submit-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 6px;
}

.claim-submit-row .claim-submit-btn {
  margin-top: 0;
}

.claim-submit-note {
  margin: 0 0 6px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.claim-cid-line {
  margin-top: 12px;
  font-size: 13px;
}

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

.modal.hidden {
  display: none;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal-panel {
  position: relative;
  width: calc(100% - 28px);
  max-width: 420px;
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}

.modal-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.modal-actions .btn {
  flex: 1;
  font-size: 16px;
}

.success-card {
  margin: 14px 14px 0;
  padding: 16px;
  text-align: center;
}

.success-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.qr-image {
  width: 240px;
  max-width: 100%;
  margin: 14px auto;
  border: 1px dashed #9ca3af;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

@media (max-width: 390px) {
  .home-main-title {
    font-size: 18px;
  }

  .home-middle-image {
    border-radius: 12px;
  }

  .claim-content {
    padding: 14px 12px 20px;
  }

  .back-link {
    margin: 0 0 16px;
    font-size: 18px;
  }

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

  .tagline {
    font-size: 16px;
    margin: 14px 0 16px;
  }

  .field-label {
    font-size: 16px;
  }

  .input {
    font-size: 15px;
    height: 46px;
  }

  .claim-submit-btn {
    font-size: 18px;
    height: 46px;
    min-width: 120px;
  }

  .claim-submit-row {
    gap: 10px;
  }

  .claim-submit-note {
    font-size: 11px;
    margin-bottom: 7px;
  }
}
