.subpage {
  max-width: 1170px;
  min-height: min(68vh, 640px);
  margin-inline: auto;
  padding: clamp(38px, 6vw, 76px) 0 clamp(64px, 8vw, 112px);
}

.subpage-heading {
  max-width: 630px;
  margin-bottom: 32px;
}

.subpage-heading h1 {
  margin: 20px 0 10px;
  font-size: clamp(2.25rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.055em;
}

.subpage-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.back-link,
.subpage .text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}

.back-link:hover,
.subpage .text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.back-link .icon,
.subpage .text-link .icon {
  width: 16px;
  height: 16px;
}

.lookup-layout,
.help-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, 1fr);
  align-items: start;
  gap: 18px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
  gap: 18px;
  align-items: start;
}

.product-detail .product-guide {
  overflow: hidden;
  padding: 0;
}

.product-guide .product-art {
  height: clamp(142px, 24vw, 236px);
  border-radius: 0;
}

.product-guide .product-art.has-image { height: clamp(175px, 35vw, 400px); }
.product-guide .product-art.has-image img { object-fit: contain; }

.product-guide-copy { padding: clamp(21px, 3vw, 32px); }

.product-guide-copy p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.75;
}

.product-detail-copy { display: grid; gap: 11px; margin-bottom: 16px; }
.product-detail-copy p { margin: 0; }
.product-detail-block { border-left: 2px solid #bacba7; padding: 4px 0 4px 14px; }
.product-detail-block h3, .product-detail-block h5 { margin: 0 0 4px; font-size: .95rem; }
.order-redemption .product-detail-copy { margin-bottom: 0; }

.merchant-footer { padding: 0 0 22px; text-align: right; }
.merchant-footer:empty { display: none; }
.merchant-footer a { display: inline-flex; align-items: center; padding: 8px 12px; font-size: .875rem; font-weight: 650; border: 1px solid var(--line); border-radius: 8px; }
.merchant-footer a:hover { background: #eff3e8; }
.merchant-footer #admin-link + .merchant-entry { display: none; }

.product-detail .purchase-panel {
  display: grid;
  gap: 16px;
  background: #eff3e8;
  border-color: #e5eadc;
}

.purchase-price {
  font-family: var(--money);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.055em;
}

.purchase-price small { margin-inline-end: 5px; font-size: .55em; }
.purchase-panel dl { margin: 0; border-block: 1px solid var(--line); }
.purchase-panel dl div { display: flex; justify-content: space-between; gap: 12px; padding-block: 11px; }
.purchase-panel dl div + div { border-top: 1px solid var(--line); }
.purchase-panel dt { color: var(--muted); }
.purchase-panel dd { margin: 0; text-align: end; font-weight: 650; }
.purchase-panel .text-link { justify-self: start; }

.multiline {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lookup-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.lookup-field-help,
.lookup-empty {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.55;
}

.lookup-alternative summary {
  color: var(--ink);
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
}

.lookup-alternative > .field,
.lookup-alternative > .lookup-form { margin-top: 12px; }
.lookup-legacy { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }

.phone-order-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.phone-order-item {
  display: flex;
  width: 100%;
  align-items: start;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faf4;
  text-align: start;
}
.phone-order-item:hover { border-color: #8da373; }
.phone-order-item span { min-width: 0; overflow-wrap: anywhere; }
.phone-order-item span:last-child { flex-shrink: 0; text-align: end; }
.phone-order-item strong,
.phone-order-item small { display: block; }
.phone-order-item small { margin-top: 4px; color: var(--muted); font-size: .8rem; }

.credential-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.order-action { margin-top: 10px; }
.order-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.checkout-support-link {
  align-self: start;
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.order-redemption {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf5;
}

.order-redemption h4,
.support-policy h3 { margin: 0 0 6px; font-size: .94rem; }
.order-redemption p { margin: 0; color: var(--muted); line-height: 1.65; }

.payment-retry { margin-top: 14px; }
.payment-retry summary { color: var(--muted); font-size: .875rem; cursor: pointer; }
.payment-retry .resume-payment { margin-top: 10px; }

#after-sales { scroll-margin-top: 20px; }
.support-details { margin-bottom: 14px; }
.support-contact { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.support-contact p { margin: 0; color: var(--ink); font-weight: 650; }
.support-contact .copy-button { flex-shrink: 0; }
.support-policy { margin-top: 12px; }

@media (max-width: 700px) {
  .product-detail-layout { grid-template-columns: 1fr; }
}

.subpage .panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface, #fff);
  padding: clamp(21px, 3vw, 32px);
}

.subpage .panel h2 {
  margin: 0 0 16px;
  font-size: 1.22rem;
  letter-spacing: -.035em;
}

.lookup-layout .lookup-aside,
.help-layout .lookup-aside {
  background: #eff3e8;
  border-color: #e5eadc;
}

.lookup-aside ol {
  margin: 0 0 20px;
  padding-inline-start: 1.25em;
}

.lookup-aside li,
.lookup-aside p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.65;
}

.lookup-aside li::marker {
  color: var(--ink);
  font-weight: 700;
}

.lookup-form,
.checkout-form {
  display: grid;
  gap: 16px;
}

.lookup-form .field,
.checkout-form .field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
}

.lookup-form .field input,
.checkout-form .field input {
  width: 100%;
  min-width: 0;
  min-height: 47px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdf9;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
}

.lookup-form .field input::placeholder,
.checkout-form .field input::placeholder {
  color: #737b70;
  font-weight: 400;
}

.lookup-form .field input:focus,
.checkout-form .field input:focus {
  outline: 2px solid #526e32;
  outline-offset: 1px;
}

.lookup-form .button,
.checkout-form .button {
  min-height: 46px;
  justify-content: center;
}

.lookup-form .button {
  justify-self: start;
  min-width: 145px;
}

.form-error {
  margin: 0;
  color: #a03033;
  font-size: .875rem;
  line-height: 1.55;
}

.form-error:empty,
.lookup-result:empty {
  display: none;
}

.lookup-result {
  margin-top: 24px;
}

.payment-instructions { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f4f7ee; overflow-wrap: anywhere; }
.payment-instructions strong { font-size: .9rem; }
.payment-instructions p { white-space: pre-wrap; color: var(--ink); font-size: .875rem; line-height: 1.65; margin-top: 7px; }
.payment-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: #34511f; text-decoration: underline; text-underline-offset: 3px; }
.payment-link .icon { width: 14px; height: 14px; }
.payment-instructions small { display: block; margin-top: 9px; color: var(--muted); line-height: 1.5; }
.lookup-result > .payment-instructions, .lookup-result > .checkout-warning { margin-top: 12px; }

.lookup-aside > .benefit-icon { margin-bottom: 14px; }
.back-link .icon { transform: rotate(180deg); }
.resume-payment { margin-top: 14px; }

.result-record {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf4;
  overflow-wrap: anywhere;
}

.result-record h3,
.result-record p {
  margin-block: 0;
}

.result-stamp {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e5f2cf;
  color: #34511f;
  font-size: .75rem;
  line-height: 1.25;
  font-weight: 700;
}

.faq-row {
  border-bottom: 1px solid var(--line);
}

.faq-row:last-child {
  border-bottom: 0;
}

.faq-row summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 17px 0;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
}

.faq-row summary::-webkit-details-marker {
  display: none;
}

.faq-row summary:hover {
  color: #486128;
}

.faq-row summary .icon {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--muted);
  transition: transform 160ms ease;
}

.faq-row[open] summary .icon {
  transform: rotate(180deg);
}

.faq-row p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.checkout {
  position: fixed;
  width: min(510px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--surface, #fff);
  color: var(--ink);
  box-shadow: 0 28px 85px #15211136;
  overscroll-behavior: contain;
}

.checkout::backdrop {
  background: #1920198a;
  backdrop-filter: blur(5px);
}

.checkout #checkout-content {
  position: relative;
}

.checkout .close-button {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface, #fff);
  color: var(--ink);
  cursor: pointer;
}

.checkout .close-button:hover {
  background: #edf3e2;
}

.checkout .close-button .icon {
  width: 16px;
  height: 16px;
}

.checkout-head {
  padding: 24px 60px 19px 25px;
  border-bottom: 1px solid var(--line);
}

.checkout-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.22;
  letter-spacing: -.035em;
}

.checkout-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
}

.checkout-body {
  display: grid;
  gap: 18px;
  padding: 22px 25px 25px;
}

.checkout-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f5f7f0;
}

.checkout-product span { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; }
.checkout-head .result-stamp { margin-bottom: 9px; }

.checkout-product p,
.checkout-product h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.checkout-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 11px;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.6;
}

.checkout-meta strong {
  color: var(--ink);
}

.checkout-warning {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #eff3e7;
  color: #535d49;
  font-size: .8125rem;
  line-height: 1.55;
}

.credentials {
  display: grid;
  gap: 0;
  padding: 2px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbf5;
}

.credential {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 10px;
  min-width: 0;
  padding: 9px 0;
  font-size: .875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.credential + .credential {
  border-top: 1px solid var(--line);
}

.order-summary :is(dd, dt) {
  margin: 0;
}

.credential > span,
.card-code > span {
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 650;
}

.credential > code,
.card-code > code {
  min-width: 0;
  color: var(--ink);
  font-size: .925rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  user-select: all;
}

.credential > code {
  justify-self: end;
}

.order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.order-summary :is(dd, strong) {
  color: var(--ink);
  font-weight: 650;
}

.card-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid #d4e8ba;
  border-radius: 10px;
  background: #f0f8e4;
  color: #2d451d;
  font-size: .95rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.card-code > span,
.card-code > code {
  grid-column: 1;
}

.card-code .copy-button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.result-record + .card-code {
  margin-top: 12px;
}

.copy-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface, #fff);
  color: var(--ink);
  cursor: pointer;
}

.copy-button .icon {
  width: 16px;
  height: 16px;
}

.copy-button:hover,
.copy-button[aria-label^="已复制"] {
  background: #e7f2d5;
  border-color: #c7d8b0;
}

.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkout-actions .button {
  min-height: 45px;
  flex: 1 1 135px;
  justify-content: center;
}

.notice {
  position: fixed;
  z-index: 8;
  right: 23px;
  bottom: 23px;
  max-width: min(390px, calc(100% - 32px));
  padding: 12px 16px;
  border: 1px solid #414c35;
  border-radius: 12px;
  background: #202b1d;
  color: #f6faef;
  box-shadow: 0 12px 32px #1b261c2e;
  font-size: .875rem;
  line-height: 1.5;
}

.notice:empty {
  display: none;
}

.back-link:focus-visible,
.subpage .text-link:focus-visible,
.faq-row summary:focus-visible,
.copy-button:focus-visible,
.checkout .close-button:focus-visible {
  outline: 2px solid #526e32;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .lookup-layout,
  .help-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .subpage-heading {
    margin-bottom: 24px;
  }

  .lookup-form .button {
    width: 100%;
  }

  .notice {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 420px) {
  .checkout-head,
  .checkout-body {
    padding-inline-start: 17px;
  }

  .checkout-body {
    padding-inline-end: 17px;
  }

  .order-summary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }

  .credential {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .credential > span,
  .credential > code {
    grid-column: 1;
    justify-self: start;
  }

  .credential .copy-button {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .copy-button {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-row summary .icon {
    transition: none;
  }
}
