:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #5f6368;
  --line: #d9dee3;
  --paper: #ffffff;
  --soft: #f5f7f9;
  --green: #13795b;
  --green-dark: #0f5c45;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --linepay: #06c755;
  --ecpay: #1f8f64;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--soft);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero,
.checkout,
.result,
.handoff {
  display: grid;
  gap: 28px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 56px);
}

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

.checkout {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.eyebrow,
.tag {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero p,
.summary p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
}

.price {
  color: var(--ink) !important;
  font-size: 2rem !important;
  font-weight: 800;
}

.primary-link,
.secondary-link,
.pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  border: 0;
  color: white;
  background: var(--blue);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-link:hover,
.secondary-link:hover,
.pay:hover {
  background: var(--blue-dark);
}

.product-list {
  margin-top: 24px;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.product-card p {
  color: var(--muted);
}

.payment-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pay {
  width: 100%;
}

.pay.ecpay {
  background: var(--ecpay);
}

.pay.linepay {
  background: var(--linepay);
  color: #072b17;
}

.facts {
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.ok,
.warn {
  margin: 4px 0 0;
  font-size: 0.92rem;
}

.ok {
  color: var(--green-dark);
}

.warn {
  color: #8a5a00;
}

pre {
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
}

@media (max-width: 760px) {
  .site-header {
    padding: 0 16px;
  }

  main {
    width: min(100% - 24px, 1120px);
    padding-top: 28px;
  }

  .hero,
  .checkout,
  .product-card {
    grid-template-columns: 1fr;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }
}
