/* Radio-card and Field grouping inspired by shadcn's Base UI examples.
   Native controls, keyboard order and checkout behavior are unchanged. */
.purchase-layout, .specification-pane { display: contents; }

@media (min-width: 960px) {
  #purchase { padding: 32px; }
  #purchase .purchase-layout {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 40px;
    align-items: stretch;
  }
  #purchase .specification-pane { display: block; min-width: 0; }
  #purchase .section-heading { margin-bottom: 24px; }
  #purchase .section-heading h2,
  #purchase .setup-heading h2 { font-size: 20px; line-height: 1.4; }
  #purchase .section-heading > span { font-size: 12px; white-space: nowrap; }
  #purchase .option-list { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: 12px; }
  #purchase .option {
    min-height: 140px;
    padding: 20px;
    border-radius: 14px;
  }
  #purchase .selection-outline { border-radius: 14px; }
  #purchase .option-price { font-size: 28px; line-height: 1.2; letter-spacing: -.035em; }
  #purchase .option-price .yen { font-size: 14px; }
  #purchase .option-copy strong { font-size: 15px; line-height: 1.6; }
  #purchase .option-copy small { font-size: 12px; line-height: 1.65; }
  #purchase .option-radio { width: 20px; height: 20px; }
  #purchase .checkout-prep {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 40px;
    border: 0;
    border-left: 1px solid var(--line);
  }
  #purchase .setup-heading { min-height: 0; }
  #purchase .setup-heading p { font-size: 13px; line-height: 1.65; margin-top: 8px; }
  #purchase .lookup-grid { gap: 20px; margin-top: 24px; }
  #purchase .lookup-grid .field { min-height: 0; }
  #purchase .lookup-grid .field label,
  #purchase .delivery-field label,
  #purchase .invite-field legend { font-size: 14px; line-height: 1.5; }
  #purchase .lookup-grid .input-wrap { height: 44px; }
  #purchase .lookup-grid .input-wrap input,
  #purchase .lookup-grid .input-wrap input::placeholder { font-size: 14px; }
  #purchase .lookup-grid .password-toggle { font-size: 12px; min-height: 40px; }
  #purchase .product-input-slot { min-height: 144px; padding-top: 24px; }
  #purchase .checkout-summary {
    align-self: stretch;
    width: 100%;
    min-height: 0;
    padding: 20px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
  }
  #purchase .summary-selection {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
  }
  #purchase .checkout-summary .selected-product { height: auto; min-height: 80px; }
  #purchase .checkout-summary .selected-product strong { font-size: 14px; line-height: 1.6; }
  #purchase .checkout-summary .selected-product small { font-size: 12px; line-height: 1.6; }
  #purchase .checkout-summary .quantity-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: auto;
    margin: 0;
  }
  #purchase .payment-methods { margin-top: 20px; }
  #purchase .payment-methods legend { font-size: 13px; margin-bottom: 12px; }
  #purchase .payment-method { flex-direction: row; min-height: 64px; padding: 12px 8px; gap: 8px; }
  #purchase .payment-method > span { font-size: 12px; line-height: 1.5; }
  #purchase .payment-method > img,
  #purchase .payment-method > svg:not(.channel-check) { width: 22px; height: 22px; flex: none; }
  #purchase .purchase-consent { margin-top: 20px; padding-top: 16px; }
  #purchase .checkout-action { margin-top: 12px; }
  #purchase .checkout-action .primary-button { min-width: 152px; font-size: 14px; }
}

@media (min-width: 960px) and (max-width: 1199px) {
  #purchase { padding: 24px; }
  #purchase .purchase-layout { gap: 24px; }
  #purchase .checkout-prep { padding-left: 24px; }
  #purchase .option { padding: 18px; }
  #purchase .lookup-grid { gap: 16px; }
  #purchase .lookup-grid .input-wrap { padding-inline: 10px; gap: 6px; }
  #purchase .lookup-grid .input-wrap input::placeholder { font-size: 12px; }
  #purchase .summary-selection { gap: 16px; }
}
