body {
  min-height: 100vh;
  background: #f4f5f7;
  font-size: 16px;
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 6vw;
  border-bottom: 1px solid #e2e4e8;
  background: #fff;
}

.checkout-header .logo {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.order-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.order-link:hover { background: #f1f2f4; }

.checkout-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(260px, 360px);
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 24px 80px;
}

.checkout-card,
.checkout-notice,
.order-card,
.admin-card {
  border: 1px solid #e2e4e8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(25, 27, 32, .06);
}

.checkout-card { padding: clamp(24px, 4vw, 48px); }
.checkout-notice { align-self: start; padding: 28px; }
.step-label { margin: 0 0 8px; color: #e6531d; font-weight: 800; }
.checkout-card h1 { margin-bottom: 28px; font-size: clamp(1.7rem, 3vw, 2.5rem); }

.checkout-product {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 14px;
  background: #f6f7f9;
}

.checkout-product img {
  width: 112px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
}

.checkout-product.no-image {
  grid-template-columns: minmax(0, 1fr) auto;
}

.checkout-product h2 { margin: 0 0 8px; font-size: 1rem; line-height: 1.45; }
.checkout-product p { margin: 0; color: #656b74; }
.checkout-product strong { font-size: 1.25rem; white-space: nowrap; }

.checkout-form { display: grid; gap: 18px; margin-top: 26px; }
.checkout-form > label { display: grid; gap: 8px; font-weight: 700; }
.checkout-form input[type="text"],
.checkout-form input[type="tel"],
.checkout-form input[type="email"],
.checkout-form input:not([type]),
.checkout-form textarea,
.admin-login input,
.order-lookup input {
  width: 100%;
  border: 1px solid #c9cdd4;
  border-radius: 10px;
  background: #fff;
  padding: 13px 14px;
  color: #17191f;
  font: inherit;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.admin-login input:focus,
.order-lookup input:focus {
  outline: 3px solid rgba(255, 107, 53, .2);
  border-color: #ff6b35;
}

fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-weight: 800; }
.payment-choice {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d9dce1;
  border-radius: 12px;
  cursor: pointer;
}
.payment-choice:has(input:checked) { border-color: #17191f; background: #f8f8f9; }
.payment-choice span { display: grid; gap: 2px; }
.payment-choice small { color: #6b7078; font-size: .875rem; font-weight: 400; }
.checkout-form[hidden], #paymentOptions[hidden], .payment-choice[hidden], .payment-hint[hidden] { display: none !important; }
.payment-hint { margin: 0; color: #656b74; font-size: .875rem; line-height: 1.6; }
.agreement { grid-template-columns: auto 1fr; align-items: start; color: #5f646c; font-size: .9rem; line-height: 1.65; }
.agreement input { margin-top: 5px; }

.primary-button,
.secondary-button,
.danger-button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
}
.primary-button { background: #17191f; color: #fff; }
.primary-button:hover { background: #2a2d35; }
.primary-button:disabled { cursor: not-allowed; background: #a9adb5; }
.secondary-button { background: #edf0f4; color: #17191f; }
.danger-button { background: #fff0ee; color: #9f2418; }
.form-message { min-height: 24px; margin: 0; color: #a33321; }
.form-message.success { color: #22643a; }
.checkout-notice h2 { margin-top: 0; }
.checkout-notice ol { display: grid; gap: 14px; padding-left: 22px; line-height: 1.6; }
.checkout-notice p { color: #666c75; line-height: 1.6; }

@media (max-width: 820px) {
  .checkout-shell { grid-template-columns: 1fr; padding: 20px 14px 50px; }
  .checkout-notice { order: -1; }
  .checkout-product { grid-template-columns: 82px 1fr; }
  .checkout-product img { width: 82px; height: 82px; }
  .checkout-product > strong { grid-column: 2; }
}
.wechat-authorize { padding: 18px; border-radius: 12px; background: #f0f8f2; }
.wechat-authorize a { display: inline-block; margin-left: 8px; color: #087d36; font-weight: 800; }
.checkout-contents { margin: 20px 0; padding: 18px; background: #f5f7f4; border-radius: 12px; }
.checkout-contents summary { cursor: pointer; font-weight: 700; }
.checkout-contents ol { max-height: 320px; overflow-y: auto; padding-left: 24px; line-height: 1.8; overflow-wrap: anywhere; }
