:root {
  color-scheme: light;
  --page: #f5f8fc;
  --surface: #ffffff;
  --soft: #f8faff;
  --ink: #202c40;
  --muted: #8190a7;
  --line: #dfe8f4;
  --blue: #2e72f8;
  --blue-dark: #1e5fdc;
  --blue-soft: #edf4ff;
  --mint: #11998d;
  --mint-soft: #eafaf7;
  --red: #c33c50;
  --red-soft: #fff1f3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; letter-spacing: 0; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.6; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
.hidden { display: none !important; }

.page-shell { min-height: 100vh; padding: 0 24px; }
.page-container { width: min(1180px, 100%); margin: 0 auto; }
.public-view { margin-top: 28px; }
.site-header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand-block { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { position: relative; display: block; width: 43px; height: 31px; flex: 0 0 43px; border: 2px solid #2368eb; border-radius: 6px; background: var(--blue); box-shadow: 0 6px 16px rgba(46, 114, 248, .2); }
.brand-mark::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: rgba(255, 255, 255, .72); }
.brand-mark::after { content: ""; position: absolute; right: 6px; bottom: 5px; width: 13px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .72); }
.card-chip { position: absolute; top: 11px; left: 6px; width: 10px; height: 7px; border-radius: 2px; background: #d6e5ff; }
.card-strip { display: none; }
.brand-block strong, .brand-block span { display: block; }
.brand-block strong { font-size: 17px; line-height: 1.3; }
.brand-block div span { color: var(--muted); font-size: 11px; }
.view-switch { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.view-button { min-height: 36px; padding: 7px 15px; border: 0; border-radius: 6px; background: transparent; color: #6c7d96; font-size: 13px; font-weight: 650; }
.view-button.active { background: var(--blue); color: #fff; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 292px); gap: 34px; align-items: stretch; max-width: 1120px; margin: 28px auto 34px; padding: 32px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 18px 44px rgba(52, 73, 103, .06); }
.hero-copy { align-self: center; padding: 4px 8px; }
.eyebrow, .section-kicker { display: block; color: var(--blue); font-size: 11px; font-weight: 750; }
.hero h1 { margin-top: 7px; font-size: clamp(27px, 4vw, 38px); line-height: 1.25; font-weight: 760; }
.hero-copy > p { margin-top: 10px; color: #71819a; font-size: 14px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; color: #60718b; font-size: 12px; }
.hero-points span { display: inline-flex; align-items: center; gap: 7px; }
.hero-points span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px var(--mint-soft); }
.hero-services { min-width: 0; display: flex; }
.contact-card { display: grid; justify-items: center; align-content: center; gap: 14px; width: 100%; min-width: 0; padding: 20px 18px; border: 1px solid #d7e4f6; border-radius: 10px; background: linear-gradient(180deg, #f8fbff 0%, #fff 100%); text-align: center; }
.contact-copy strong, .contact-copy span { display: block; }
.contact-copy strong { margin-top: 3px; font-size: 16px; }
.contact-copy span { color: var(--muted); font-size: 11px; }
.contact-copy .contact-label { color: var(--blue); font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.contact-card img { display: block; width: 112px; height: 112px; object-fit: contain; background: #fff; }

.public-view.active { display: block; }
.section-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(980px, 100%); margin: 0 auto 16px; }
.section-intro h2 { margin-top: 2px; font-size: 24px; }
.section-intro > p { color: var(--muted); font-size: 12px; }
.section-intro > .stock-reminder { max-width: 370px; padding: 8px 13px; border: 1px solid #c7dafe; border-radius: 6px; background: var(--blue-soft); color: #2458b8; font-size: 12px; font-weight: 700; line-height: 1.5; }
.product-grid { display: grid; grid-template-columns: minmax(0, 980px); justify-content: center; align-items: stretch; gap: 18px; }
.product-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(285px, .82fr); column-gap: 28px; min-width: 0; padding: 28px 30px 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 44px rgba(52, 73, 103, .07); }
.product-header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.product-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.product-index { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 8px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 750; }
.product-identity h3 { font-size: 18px; line-height: 1.35; }
.product-identity p { display: inline-block; margin-top: 3px; padding: 2px 8px; border: 1px solid #c7dafe; border-radius: 4px; background: var(--blue-soft); color: #2458b8; font-size: 12px; font-weight: 700; line-height: 1.4; }
.stock-badge { flex: 0 0 auto; padding: 4px 9px; border-radius: 4px; background: var(--mint-soft); color: var(--mint); font-size: 11px; font-weight: 700; }
.stock-badge[data-tone="empty"] { background: var(--red-soft); color: var(--red); }
.panel-message { grid-column: 1 / -1; margin-bottom: 13px; padding: 9px 11px; border: 1px solid #c9e8df; border-radius: 6px; background: var(--mint-soft); color: var(--mint); font-size: 12px; }
.panel-message[data-tone="error"] { border-color: #f3ced4; background: var(--red-soft); color: var(--red); }
.field-heading { grid-column: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.field-heading label, .query-form > label, .quantity-field label { font-size: 12px; font-weight: 650; }
.field-heading a { color: var(--blue); font-size: 12px; font-weight: 650; }
.field-heading a:hover { color: var(--blue-dark); }
.text-input, .quantity-field input { display: block; width: 100%; min-width: 0; border: 1px solid #d1dced; border-radius: 8px; background: #fff; color: var(--ink); }
.product-panel > .text-input { grid-column: 1; height: 48px; padding: 11px 13px; }
.text-input { height: 48px; padding: 11px 13px; }
.text-input::placeholder { color: #a2aec0; }
.text-input:focus, .quantity-field input:focus { outline: none; border-color: #86b2ff; box-shadow: 0 0 0 3px rgba(46, 114, 248, .06); }
.claim-controls { grid-column: 1; display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: end; gap: 12px; margin-top: 13px; }
.remaining-box { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.remaining-box span { color: var(--muted); font-size: 11px; }
.remaining-box strong { color: var(--blue); font-size: 22px; line-height: 1; }
.quantity-field label { display: block; margin-bottom: 6px; }
.quantity-field input { height: 38px; padding: 7px 10px; }
.quantity-hint { grid-column: 1; min-height: 19px; margin: 7px 0 13px; color: var(--muted); font-size: 10px; }
.product-panel > .claim-button { grid-column: 1; width: 100%; min-height: 48px; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 8px 18px rgba(46, 114, 248, .16); }
.claim-button { width: 100%; min-height: 48px; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 8px 18px rgba(46, 114, 248, .16); }
.claim-button:hover:not(:disabled) { background: var(--blue-dark); }
.purchase-card { grid-column: 1; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 12px; padding: 10px 16px; border: 1px solid #c7dafe; border-radius: 8px; background: var(--blue-soft); color: var(--blue-dark); font-size: 14px; font-weight: 700; }
.purchase-card:hover { border-color: #8bb5ff; background: #e3edff; }
.purchase-card span { font-size: 18px; line-height: 1; }
.panel-result { grid-column: 2; grid-row: 3 / span 6; align-self: stretch; min-width: 0; margin-top: 0; padding: 3px 0 0 28px; border-top: 0; border-left: 1px solid var(--line); }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.result-heading span, .result-heading small { display: block; }
.result-heading span { font-size: 13px; font-weight: 700; }
.result-heading small { color: var(--muted); font-size: 10px; }
.copy-button { flex: 0 0 auto; min-height: 34px; padding: 6px 11px; border: 1px solid #cfe0ff; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 650; }
.copy-button:hover { border-color: #a9c8ff; background: #e5efff; }
.expires { margin-bottom: 10px; padding: 8px 10px; border-left: 3px solid var(--mint); border-radius: 4px; background: var(--mint-soft); color: #087a70; font-size: 11px; font-weight: 650; }
.result-content { width: 100%; min-height: 116px; max-height: 330px; margin: 0; padding: 14px; overflow: auto; border: 1px solid #dbe4f1; border-radius: 8px; background: #f7f9fc; color: #263750; font: 13px/1.75 ui-monospace, SFMono-Regular, Consolas, "Microsoft YaHei", monospace; white-space: pre-wrap; word-break: break-all; }
.result-content.empty { display: grid; place-items: center; color: #9aa8ba; font-family: inherit; text-align: center; }

.query-layout { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr); gap: 18px; }
.query-form, .query-result { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 12px 34px rgba(52, 73, 103, .05); }
.query-form h2 { margin-top: 3px; font-size: 24px; }
.query-form > p { margin: 6px 0 22px; color: var(--muted); font-size: 12px; }
.query-form > label { display: block; margin-bottom: 8px; }
.query-form .claim-button { margin-top: 14px; }
.query-result-heading { margin-bottom: 16px; }
.query-summary { margin-bottom: 10px; padding: 10px 12px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 650; }
.query-result .result-content { min-height: 238px; max-height: 480px; }
.page-footer { padding: 30px 16px 24px; color: #98a6ba; font-size: 11px; text-align: center; }

button, a, input { transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-services { max-width: 320px; }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .product-panel { display: flex; flex-direction: column; }
  .product-panel > .text-input, .field-heading, .claim-controls, .quantity-hint, .product-panel > .claim-button, .panel-message { grid-column: auto; }
  .panel-result { margin-top: 22px; padding: 20px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .query-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page-shell { padding: 0 12px; }
  .site-header { min-height: 64px; gap: 10px; }
  .brand-mark { width: 38px; height: 28px; flex-basis: 38px; }
  .brand-block strong { font-size: 13px; white-space: nowrap; }
  .brand-block div span { display: none; }
  .view-button { min-height: 34px; padding: 6px 8px; font-size: 11px; white-space: nowrap; }
  .hero { margin: 18px 0 24px; padding: 20px 18px; gap: 22px; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: 27px; }
  .hero-copy > p { font-size: 13px; }
  .hero-points { gap: 14px; }
  .hero-services { max-width: none; }
  .contact-card { grid-template-columns: 1fr 96px; justify-items: start; align-items: center; padding: 14px; text-align: left; }
  .contact-card img { width: 88px; height: 88px; }
  .contact-copy span { display: block; }
  .section-intro { align-items: flex-start; }
  .section-intro h2 { font-size: 21px; }
  .section-intro > p { max-width: 145px; text-align: right; }
  .section-intro > .stock-reminder { max-width: 175px; padding: 7px 9px; font-size: 11px; text-align: left; }
  .product-panel, .query-form, .query-result { padding: 18px 16px; }
  .claim-controls { grid-template-columns: minmax(0, 1fr) 116px; }
  .text-input, .quantity-field input { font-size: 16px; }
  .result-content { font-size: 12px; }
}

@media (max-width: 390px) {
  .contact-card { grid-template-columns: minmax(0, 1fr) 84px; }
  .contact-card img { width: 84px; height: 84px; }
  .contact-copy span { display: block; }
  .section-intro { display: block; }
  .section-intro > p { max-width: none; margin-top: 5px; text-align: left; }
}
