
:root {
  color-scheme: light;
  --page-bg: #f7f6f3;
  --page-tint: #fff9f1;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-warm: #fffaf3;
  --surface-muted: #f1f0ed;
  --text: #1d1d1f;
  --text-secondary: #68686d;
  --text-tertiary: #85858b;
  --accent: #d84a35;
  --accent-hover: #bd3d2c;
  --accent-soft: #fff0e9;
  --wechat: #247b54;
  --wechat-soft: #edf8f1;
  --border: rgba(29, 29, 31, 0.1);
  --border-strong: rgba(29, 29, 31, 0.16);
  --focus: rgba(0, 113, 227, 0.82);
  --shadow-card: 0 14px 38px rgba(43, 32, 22, 0.07), 0 2px 8px rgba(43, 32, 22, 0.04);
  --shadow-control: 0 1px 2px rgba(43, 32, 22, 0.08);
  --radius-large: 24px;
  --radius-medium: 18px;
  --radius-control: 12px;
}

[data-theme=dark] {
  color-scheme: dark;
  --page-bg: #111214;
  --page-tint: #191613;
  --surface: rgba(29, 29, 31, 0.94);
  --surface-solid: #1d1d1f;
  --surface-warm: #25211e;
  --surface-muted: #292a2d;
  --text: #f5f5f7;
  --text-secondary: #b4b4ba;
  --text-tertiary: #96969d;
  --accent: #f27761;
  --accent-hover: #ff8a74;
  --accent-soft: #38231f;
  --wechat: #6fc99a;
  --wechat-soft: #1c3026;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.17);
  --focus: rgba(102, 178, 255, 0.9);
  --shadow-card: 0 16px 42px rgba(0, 0, 0, 0.24), 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-control: 0 1px 2px rgba(0, 0, 0, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--page-tint) 0, var(--page-bg) 280px);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.site-shell {
  width: min(100%, 960px);
  min-width: 0;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.site-header {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.brand {
  min-width: 0;
  color: var(--text);
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.theme-toggle {
  display: inline-flex;
  width: auto;
  min-width: 76px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-control);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.theme-icon {
  display: block;
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 2px transparent;
  pointer-events: none;
}

[data-theme=dark] .theme-icon {
  border-color: transparent;
  background: currentColor;
  box-shadow: -5px 3px 0 0 var(--surface-solid);
}

.section {
  min-width: 0;
  margin-top: 24px;
}

.section-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(18px, 3.8vw, 22px);
  font-weight: 720;
  letter-spacing: -0.018em;
  line-height: 1.3;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.benefit-card {
  display: flex;
  min-width: 0;
  min-height: 132px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: linear-gradient(145deg, var(--surface-solid), var(--surface-warm));
  box-shadow: 0 8px 24px rgba(62, 43, 26, 0.045);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.benefit-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 21px;
  line-height: 1;
  position: relative;
}

.benefit-icon::before {
  content: "";
  width: 22px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
  background: transparent;
}

.benefit-icon::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: currentColor;
}

.benefit-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 680;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.primary-link,
.query-submit,
.coupon-claim,
.query-reset {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  font-weight: 680;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.primary-link {
  width: 100%;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-control);
}

.primary-link:hover,
.query-submit:hover,
.coupon-claim:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.query-wrap {
  width: min(100%, 680px);
  min-width: 0;
  margin-inline: auto;
}

.query-card {
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: linear-gradient(150deg, var(--surface), var(--surface-warm));
  box-shadow: var(--shadow-card);
}

.query-form {
  display: grid;
  min-width: 0;
  gap: 11px;
}

.share-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 96px;
  max-height: 240px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface-solid);
  box-shadow: inset 0 1px 2px rgba(29, 29, 31, 0.035);
  color: var(--text);
  line-height: 1.5;
}

.share-input::placeholder {
  color: var(--text-tertiary);
  opacity: 1;
}

.share-input:focus {
  border-color: var(--focus);
}

.query-submit {
  width: 100%;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-control);
}

.query-submit:disabled {
  cursor: wait;
  opacity: 0.56;
}

.query-status {
  min-height: 24px;
  margin: 10px 1px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.query-status:empty {
  min-height: 0;
  margin-top: 0;
}

.coupon-result {
  min-width: 0;
  margin-top: 14px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  border-radius: var(--radius-medium);
  background: linear-gradient(145deg, var(--surface-solid), var(--accent-soft));
}

.coupon-shop {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.coupon-actions {
  display: flex;
  min-width: 0;
  gap: 10px;
  margin-top: 2px;
}

.coupon-info {
  min-width: 0;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.coupon-value {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.coupon-symbol {
  font-size: 22px;
  font-weight: 700;
}

.coupon-amount {
  max-width: 100%;
  font-size: clamp(38px, 10vw, 52px);
  font-weight: 760;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.coupon-minimum {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 560;
}

.coupon-description {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.coupon-claim {
  width: auto;
  min-width: 0;
  flex: 1 1 0;
  margin-top: 0;
  padding: 11px 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.query-reset {
  width: 100%;
  margin-top: 9px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
}

.query-reset:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--text);
}

.wechat-card {
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--wechat) 18%, var(--border));
  border-radius: var(--radius-medium);
  background: linear-gradient(145deg, var(--surface-solid), var(--wechat-soft));
  box-shadow: 0 8px 24px rgba(21, 79, 52, 0.05);
}

.wechat-eyebrow {
  margin: 0 0 5px;
  color: var(--wechat);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.wechat-name {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.015em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] {
  display: none !important;
}

@media (hover: hover) {
  .benefit-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: 0 11px 28px rgba(62, 43, 26, 0.07);
  }
}

.primary-link:active,
.query-submit:active,
.coupon-claim:active,
.query-reset:active {
  transform: translateY(1px);
}

@media (min-width: 720px) {
  .site-shell {
    padding: 28px 28px 64px;
  }

  .site-header {
    margin-bottom: 28px;
  }

  .section {
    margin-top: 32px;
  }

  .benefit-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .benefit-card {
    min-height: 142px;
    padding: 18px;
  }

  .query-card {
    padding: 22px;
  }

  .wechat-card {
    padding: 22px;
  }
}

@media (max-width: 359px) {
  .site-shell {
    padding-inline: 12px;
  }

  .benefit-grid {
    gap: 8px;
  }

  .benefit-card {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
