:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #fff;
  --surface-soft: #f0f5f1;
  --ink: #121a16;
  --muted: #63706a;
  --line: #dce4de;
  --brand: #006aff;
  --brand-dark: #0053cc;
  --success: #0f7b46;
  --danger: #b42318;
  --shadow: 0 22px 60px rgba(18, 26, 22, .13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  padding: max(10px, env(safe-area-inset-top)) 10px max(18px, env(safe-area-inset-bottom));
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -12%, rgba(0, 106, 255, .12), transparent 16rem),
    linear-gradient(180deg, #fbfcfa 0%, var(--bg) 58%, #edf3ef 100%);
  font-family: "Avenir Next", Avenir, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(100%, 430px);
  margin: 0 auto;
}

.product-shell,
.checkout-shell {
  padding-bottom: 104px;
}

.product-card,
.checkout-card,
.complete-card {
  overflow: hidden;
  border: 1px solid rgba(18, 26, 22, .08);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.store-chip {
  position: absolute;
  z-index: 1;
  margin: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(18, 26, 22, .08);
}

.product-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / .9;
  object-fit: cover;
  background: var(--surface-soft);
}

.product-content,
.checkout-card,
.complete-card {
  padding: 22px 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--success);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 8.4vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -.055em;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  letter-spacing: -.03em;
}

.price {
  margin: 12px 0 0;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -.04em;
}

.description {
  white-space: pre-line;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.68;
}

.info-panel,
.policy-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}

.info-panel {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
}

.info-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--brand);
  background: #fff;
}

.info-icon svg {
  width: 23px;
  height: 23px;
}

.info-panel h2,
.policy-panel h2 {
  margin: 0 0 6px;
  font-size: .98rem;
  letter-spacing: -.02em;
}

.info-panel p,
.policy-panel p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.58;
}

.info-panel strong,
.policy-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 1.04rem;
  letter-spacing: -.02em;
}

.policy-panel {
  border-color: rgba(180, 35, 24, .2);
  background: rgba(180, 35, 24, .055);
}

.quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-weight: 850;
}

.stepper {
  display: grid;
  grid-template-columns: 48px 58px 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.stepper button,
.stepper input {
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  font-weight: 900;
}

.summary-list {
  margin: 18px 0 0;
}

.summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  color: var(--muted);
  font-weight: 750;
}

.summary-list div + div {
  border-top: 1px solid var(--line);
}

.summary-list dt,
.summary-list dd {
  margin: 0;
}

.summary-list dd {
  color: var(--ink);
  font-weight: 900;
}

.summary-list .total {
  color: var(--ink);
  font-size: 1.15rem;
}

.primary-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  min-height: 56px;
  padding: 17px 18px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 16px 28px rgba(0, 106, 255, .24);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -.02em;
  text-decoration: none;
  cursor: pointer;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: .48;
  box-shadow: none;
}

.primary-button:active:not(:disabled) {
  transform: translateY(1px) scale(.99);
  background: var(--brand-dark);
}

.back-link {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 850;
  text-decoration: none;
}

.checkout-header p:last-child,
.secure-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.6;
}

.panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-soft);
}

.mini-product {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}

.mini-product img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
}

.mini-product span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 650;
  line-height: 1.4;
}

.wallets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.paypay-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin: 14px 0 10px;
  border-radius: 16px;
  color: #fff;
  background: #ff0033;
  font-size: 1rem;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 14px 24px rgba(255, 0, 51, .18);
}

.paypay-open-button {
  margin-top: 14px;
  background: #ff0033;
}

.paypay-note {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 14px;
  color: #7a1b2a;
  background: rgba(255, 0, 51, .07);
  font-size: .84rem;
  font-weight: 800;
  line-height: 1.55;
}

.paypay-guide .description {
  text-align: left;
}

.paypay-receipt-note {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(18, 26, 22, .055);
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.55;
  text-align: left;
}

.paypay-back-link {
  justify-content: center;
  margin: 18px 0 0;
}

.wallet-button {
  position: relative;
  min-height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #111;
  border-radius: 20px;
  background: #fff;
  color: #171717;
}

.wallet-button[aria-disabled="true"] {
  opacity: .52;
}

.wallet-button-google {
  background: #f0f0f0;
}

.wallet-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: clamp(1.28rem, 7vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -.06em;
}

.apple-mark {
  width: 22px;
  height: 22px;
  display: inline-block;
  overflow: hidden;
  border-radius: 45% 45% 50% 50%;
  color: #171717;
  background: currentColor;
  font-size: 0;
  transform: translateY(1px);
}

.google-mark {
  font-weight: 950;
  color: #4285f4;
}

.wallet-slot.wallet-ready {
  position: absolute;
  inset: 0;
  min-height: 56px;
  opacity: .01;
  z-index: 2;
}

.wallet-button:not(.wallet-available) .wallet-slot {
  pointer-events: none;
}

.payment-lead,
.wallet-status {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.55;
}

.wallet-status {
  margin: 12px 0 0;
}

.wallet-debug {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(18, 26, 22, .055);
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.45;
}

.wallet-debug p {
  margin: 0;
}

.wallet-debug p + p {
  margin-top: 6px;
}

.card-heading {
  margin: 0 0 10px;
  font-size: .92rem;
  letter-spacing: -.02em;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.card-container {
  min-height: 90px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.55;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.billing-fields {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.billing-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

.billing-fields input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
}

.error-box {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(180, 35, 24, .24);
  border-radius: 16px;
  color: var(--danger);
  background: rgba(180, 35, 24, .08);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.55;
}

.success-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 8px auto 22px;
  border-radius: 24px;
  color: #fff;
  background: var(--success);
  box-shadow: 0 12px 28px rgba(15, 123, 70, .25);
}

.success-mark svg {
  width: 40px;
  height: 40px;
  stroke-width: 3.4;
}

.complete-card {
  text-align: center;
}

.call-button {
  color: #fff;
}

.receipt-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--brand);
  font-size: .92rem;
  font-weight: 850;
}

.mobile-action-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: minmax(96px, .78fr) 1.22fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px max(12px, env(safe-area-inset-bottom));
  border: 1px solid rgba(18, 26, 22, .08);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 -14px 42px rgba(18, 26, 22, .13);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.mobile-action-bar span {
  display: block;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 850;
}

.mobile-action-bar strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: -.04em;
}

.checkout-action-bar {
  grid-template-columns: minmax(106px, .82fr) 1.18fr;
}

@media (min-width: 431px) {
  body {
    padding-top: 18px;
    background:
      linear-gradient(90deg, rgba(18, 26, 22, .06), transparent 18%, transparent 82%, rgba(18, 26, 22, .06)),
      radial-gradient(circle at 50% -12%, rgba(0, 106, 255, .12), transparent 16rem),
      linear-gradient(180deg, #fbfcfa 0%, var(--bg) 58%, #edf3ef 100%);
  }
}
