.checkout-form, .confirmed-library {
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: #fffefa;
  color: var(--ink);
}
.checkout-layout { grid-template-areas: "form receipt" "actions receipt"; grid-template-rows: max-content 1fr; row-gap: 0; }
.checkout-layout .order-main { grid-area: form; }
.checkout-layout .order-summary { grid-area: receipt; }
.checkout-form { padding: 0 clamp(21px, 3vw, 40px); border-radius: 18px 18px 0 0; border-bottom: 0; }
.checkout-section { padding: clamp(24px, 2.4vw, 34px) 0; }
.checkout-section + .checkout-section, .checkout-actions { border-top: 1px solid var(--rule); }
.checkout-section h2, .confirmed-library h2, .confirmed-receipt h2 {
  margin: 0;
  font: 750 clamp(1.45rem, 2.3vw, 1.95rem)/1.12 var(--display);
  letter-spacing: -.045em;
}
.checkout-section h2 { margin-bottom: 1.25rem; }
.checkout-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.checkout-option {
  display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: clamp(20px, 2.3vw, 32px);
  border: 1px solid var(--rule); border-radius: 16px; background: #fffefa;
}
.reader-option { background: #eee6f6; border-color: #d8c9e5; }
.option-symbol { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 23px; border-radius: 13px; background: #ffe7a1; color: #503b13; }
.option-symbol svg { width: 24px; height: 24px; }
.reader-option .option-symbol { color: #4d2f62; background: #dacae9; }
.checkout-option h2 { margin: 0; font: 750 clamp(1.45rem, 2.2vw, 1.95rem)/1.1 var(--display); letter-spacing: -.045em; }
.checkout-option p { margin: .65rem 0 1.45rem; line-height: 1.5; color: #5b525e; overflow-wrap: anywhere; }
.checkout-option .order-primary { width: 100%; margin-top: auto; }
.checkout-option .option-logout { margin: -1.1rem 0 1rem; }
.reader-actions { display: flex; align-items: stretch; gap: 7px; width: 100%; margin-top: auto; }
.reader-actions .order-primary { flex: 1 0 auto; width: auto; margin: 0; padding-inline: .65rem; }
.reader-register { flex: 1 1 auto; display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: .5rem .6rem; border: 1px solid #9f89b0; background: #faf6ff; border-radius: 8px; color: #493258; font: 700 .9rem/1.25 var(--body); text-decoration: none; text-align: center; }
.reader-register:hover { background: #e3d7ee; border-color: #7f6492; }
.checkout-login { border-radius: 18px; border-bottom: 1px solid var(--rule); }
.login-password-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; margin-top: 1rem; }
.login-password-row .order-link { font-size: .86rem; }
.checkout-inline-action { padding: .25rem 0; border: 0; background: transparent; color: #523367; text-decoration: underline; text-underline-offset: .2em; font-size: .88rem; font-weight: 650; }
.demo-fill { margin-top: .6rem; }
.checkout-login-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 1.25rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.checkout-login-actions svg { width: 16px; height: 16px; }
.checkout-login-actions .order-primary { min-width: 6.5rem; }
.checkout-register h2 { margin-bottom: .55rem; }
.register-intro { margin: 0 0 1.25rem; color: #635a65; font-size: .94rem; }
.checkout-register .checkout-input-wrap + label, .checkout-register .register-login { margin-top: 1rem; }
.checkout-input-wrap #register-name, .checkout-input-wrap #reset-code { padding-left: .85rem; }
.register-actions { flex-wrap: wrap; }
.checkout-account { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; }
.account-check { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e9e0f5; color: #523367; }
.account-check svg { width: 19px; height: 19px; }
.checkout-account > div { min-width: 0; flex: 1 1 100px; }
.checkout-account > div > * { display: block; overflow-wrap: anywhere; }
.checkout-account > div > span { font-size: .88rem; color: #625b66; }
.reader-recovery { margin: 1.1rem 0 0; padding: .7rem .9rem; border: 1px solid #d9cce4; border-radius: 8px; background: #f6f1fa; }
.reader-recovery summary { cursor: pointer; font-size: .9rem; font-weight: 650; color: #523367; }
.reader-recovery summary:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.reader-recovery p { margin: .55rem 0 0; color: #65586d; font-size: .87rem; }
.recovery-code-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem .85rem; margin-top: .55rem; }
.recovery-code-row code { min-width: 0; user-select: all; overflow-wrap: anywhere; font-size: .93rem; }
.recovery-success { margin: 0 0 1rem; border-left: 3px solid #527059; padding: .65rem .8rem; background: #edf5e9; color: #304d37; font-size: .94rem; }
.checkout-label { display: block; margin-bottom: .4rem; font-size: .92rem; font-weight: 650; }
.checkout-input-wrap { position: relative; }
.checkout-input-wrap > svg {
  position: absolute; top: 50%; left: 15px; transform: translateY(-50%); width: 20px; height: 20px;
  color: #756776; pointer-events: none;
}
.checkout-input-wrap input {
  width: 100%; min-height: 50px; border: 1px solid #a69aa8; border-radius: 8px; background: #fff;
  font: 400 1rem/1.4 var(--body); padding: .72rem .85rem .72rem 2.95rem;
}
.checkout-input-wrap input::placeholder { color: #746e79; }
.checkout-input-wrap input:focus { outline: 2px solid #7856a1; outline-offset: 1px; }
.checkout-input-wrap input:user-invalid, .checkout-input-wrap input[aria-invalid="true"] { border-color: #a13735; }
.checkout-error { margin: .35rem 0 0; color: #9a3430; font-size: .86rem; font-weight: 650; }
.checkout-hint { margin: .58rem 0 0; color: #675f69; font-size: .87rem; line-height: 1.5; }
.checkout-actions {
  grid-area: actions;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(18px, 2vw, 26px) clamp(21px, 3vw, 40px);
  border: 1px solid var(--rule); border-radius: 0 0 18px 18px; background: #fffefa;
}
.checkout-actions .order-link, .confirmed-link { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.checkout-actions .order-link svg { width: 16px; height: 16px; }
.checkout-actions .order-primary { white-space: normal; }

.confirmed-library { overflow: hidden; }
.confirmed-banner {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 150px;
  padding: 22px clamp(20px, 2.8vw, 37px); background: #e9def7;
}
.confirmed-banner > div { max-width: 65%; }
.confirmed-banner::before {
  content: ""; position: absolute; z-index: -1; right: 2%; bottom: -74px; width: 178px; height: 178px;
  border-radius: 50%; background: #d9c3ed;
}
.confirmed-banner img { position: absolute; right: 3%; bottom: -47px; width: auto; height: 169px; transform: rotate(5deg); }
.confirmed-status { display: flex; align-items: center; gap: .42rem; color: #4c3366; margin: 0 0 .52rem; font-size: .84rem; font-weight: 700; }
.confirmed-status svg { width: 19px; height: 19px; flex-shrink: 0; }
.confirmed-banner h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); }
.confirmed-books { list-style: none; margin: 0; padding: 0 clamp(16px, 2.4vw, 30px); }
.confirmed-book { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: clamp(11px, 1.3vw, 19px); padding: 17px 0; }
.confirmed-book + .confirmed-book { border-top: 1px solid var(--rule); }
.confirmed-cover-well { width: 58px; height: 70px; display: grid; place-items: center; background: var(--book-tint); border-radius: 6px; }
.confirmed-cover { display: block; width: 34px; aspect-ratio: .71; transform: rotate(-4deg); box-shadow: 2px 3px 4px #33263e36; }
.confirmed-book h3 { margin: 0; font: 700 1.06rem/1.18 var(--display); letter-spacing: -.025em; }
.confirmed-book p { margin: .28rem 0 0; color: #665d69; font-size: .82rem; }
.confirmed-book > strong { font-size: .93rem; font-variant-numeric: tabular-nums; }
.confirmed-receipt {
  position: relative; align-self: start; border: 1px solid #dbceb0; border-top: 5px solid #efbf4d; border-radius: 12px;
  padding: clamp(22px, 2.35vw, 33px); background: #fff5d8;
}
.confirmed-facts { margin: 1.35rem 0; display: grid; gap: .76rem; }
.confirmed-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .91rem; }
.confirmed-facts dt { color: #665b4b; flex: none; }
.confirmed-facts dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.confirmed-pricing { padding-top: 1rem; border-top: 1px solid #e1d4b3; font-variant-numeric: tabular-nums; }
.confirmed-coupon dt, .confirmed-coupon dd { color: var(--purple); }
.confirmed-coupon dt { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.confirmed-coupon dd { flex: none; }
.confirmed-total { display: flex; align-items: baseline; gap: .7rem; justify-content: space-between; border-top: 1px dashed #b5a77f; padding-top: 1rem; font-weight: 700; }
.confirmed-total strong { font: 750 1.75rem/1 var(--display); letter-spacing: -.045em; }
.confirmed-receipt .checkout-hint { color: #655c4e; }
.confirmed-link { width: 100%; margin-top: 1.2rem; }
@media (max-width: 740px) {
  .checkout-layout { grid-template-areas: "form" "receipt" "actions"; grid-template-rows: auto; row-gap: 24px; }
  .checkout-form { border-radius: 15px; border-bottom: 1px solid var(--rule); }
  .checkout-actions { padding: 4px 0 0; border: 0; background: transparent; }
}
@media (max-width: 480px) {
  .checkout-options { gap: 12px; }
  .checkout-option { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px 12px; padding: 16px; }
  .option-symbol { margin: 0; width: 38px; height: 38px; }
  .checkout-option p, .checkout-option .order-primary, .checkout-option .option-logout { grid-column: 1 / -1; margin: 0; }
  .checkout-option .option-logout { justify-self: start; }
  .reader-actions { grid-column: 1 / -1; }
  .register-actions .order-primary { width: 100%; }
  .checkout-login-actions { flex-wrap: wrap-reverse; }
  .checkout-form { padding-inline: 18px; }
  .checkout-actions { flex-direction: column-reverse; }
  .checkout-actions .order-primary { width: 100%; }
  .confirmed-banner { min-height: 118px; }
  .confirmed-banner img { height: 130px; bottom: -33px; right: 0; }
  .confirmed-banner::before { width: 130px; height: 130px; bottom: -48px; }
  .confirmed-facts > div { gap: .6rem; }
}
