:root {
  color-scheme: light only;
  --ink: #20242f;
  --muted: #646977;
  --paper: #f7f2ec;
  --card: #fffdf9;
  --line: rgba(32, 36, 47, 0.14);
  --accent: #17233d;
  --danger: #9f1d20;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(145deg, #fbf8f3 0%, var(--paper) 55%, #ebe2d8 100%);
  min-height: 100vh;
}

.checkout-header {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px clamp(18px, 4vw, 36px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand img { border-radius: 50%; }

.checkout-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 8px auto 56px;
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(320px, 1.14fr);
  gap: 28px;
  align-items: start;
}

.book-summary,
.payment-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 18px 54px rgba(72, 55, 43, 0.1);
}

.book-summary {
  padding: 24px;
  position: sticky;
  top: 20px;
}

.book-summary img {
  display: block;
  width: min(220px, 66%);
  height: auto;
  margin: 0 auto 24px;
  border-radius: 6px;
  box-shadow: 0 16px 36px rgba(38, 31, 26, 0.18);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.08;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin-bottom: 18px; }

.price { margin: 22px 0 10px; font-size: 1.55rem; font-weight: 800; }
.delivery-note, .security-note, .support-note { color: var(--muted); line-height: 1.55; }

.payment-card { padding: clamp(22px, 4vw, 36px); }

.express-checkout { margin: 18px 0 22px; visibility: hidden; }
.express-checkout[hidden] { display: none; }

.payment-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

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

.payment-divider span { white-space: nowrap; }

label,
.payment-label {
  display: block;
  margin: 18px 0 8px;
  font-size: 0.94rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #c7c9cf;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus { outline: 3px solid rgba(23, 35, 61, 0.16); border-color: var(--accent); }

.payment-element { min-height: 96px; }

button {
  width: 100%;
  min-height: 54px;
  margin-top: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover:not(:disabled) { filter: brightness(1.12); }
button:disabled { cursor: wait; opacity: 0.56; }

.error { padding: 12px 14px; border-radius: 10px; background: #fff0f0; color: var(--danger); line-height: 1.45; }
.security-note { margin: 14px 0 0; font-size: 0.8rem; text-align: center; }
.support-note { margin: 12px 0 0; font-size: 0.88rem; text-align: center; }
.support-note a { color: var(--accent); font-weight: 700; }

@media (max-width: 760px) {
  .checkout-shell { grid-template-columns: 1fr; width: min(100% - 24px, 560px); }
  .book-summary { position: static; display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; }
  .book-summary img { width: 96px; margin: 0; }
  .book-summary h1 { font-size: 1.55rem; }
  .book-summary .price { margin-top: 14px; }
  .delivery-note { grid-column: 1 / -1; }
}

.reading-disclosure {font-size:13px;line-height:1.5;color:#64666d;margin:16px 0;}
