/* Page components only; native controls are owned by shared/design.ts. */
.topup-page { background: linear-gradient(180deg, #f1f9ff 0, #fff 620px); color: var(--ink); min-height: 100svh; display: flex; flex-direction: column; }
.topup-page > .site-header, .topup-page > .site-footer { flex-shrink: 0; }
.topup-page > .site-footer { margin-top: auto; }
.topup-page [hidden] { display: none !important; }
.topup-main { width: min(1100px, calc(100% - 64px)); margin: 0 auto; padding: 76px 0 100px; }
.topup-heading { text-align: center; margin-bottom: 44px; }
.topup-eyebrow { margin: 0 0 12px; font-size: 12px; color: var(--quiet, #527386); letter-spacing: .055em; }
.topup-heading h1 { font-size: clamp(30px, 3.1vw, 44px); line-height: 1.35; letter-spacing: -.05em; font-weight: 600; margin: 0 0 18px; }
.topup-heading > p:last-child { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0; }
.topup-account { position: relative; isolation: isolate; overflow: hidden; min-height: 360px; display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: 36px 40px; border: 1px solid #dceaf3; border-radius: 24px; background: linear-gradient(110deg, #fff, #eff8ff); }
.topup-account > div:not(.topup-account-art) { position: relative; z-index: 1; }
.topup-account::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(0deg, #f4faffeb, #f4faff5c 48%, #ffffff14); }
.topup-account-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; --terra-center-x: .53; --terra-center-y: 102; }
.topup-account-art[data-fable-sky] { background: #dcecf6 url('./art/fable/day-sky.webp') center 40% / cover; }
.topup-account-art[data-family="haiku"] { background: #e7f3fa url('./art/models/haiku-bird.svg') 56% 40% / auto 240px no-repeat; }
.topup-account .subscription-fable-looks { display: none; }
.topup-account h2 { margin: 0 0 10px; font-size: 23px; font-weight: 600; }
.topup-account #topup-cycle { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0; }
.topup-balance { display: grid; justify-items: end; gap: 7px; color: var(--muted); font-size: 12px; }
.topup-balance strong { font-size: 46px; font-weight: 450; line-height: 1.1; color: var(--ink); letter-spacing: -.035em; }
.topup-balance small { font-size: 11px; }
.topup-arrival { color: #2f6b8a; font-size: 12px; padding: 5px 11px; border-radius: 999px; background: #e1f3ff; }
.topup-account.is-recharged { animation: topup-card-arrive 1.2s ease-out; }
.is-recharged .topup-arrival { animation: topup-balance-arrive .65s cubic-bezier(.2,.7,.2,1); }
.topup-receipt { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px; margin-top: 14px; }
.topup-capacity { border-inline-start: 1px solid #dce9f3; padding-inline-start: 30px; font-size: 12px; }
.topup-capacity p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.topup-capacity strong { font-size: 28px; font-weight: 500; letter-spacing: -.035em; }
.topup-capacity p > span { color: var(--muted); margin: 0 4px; }
.topup-capacity small { display: block; font-size: 11px; line-height: 1.8; color: var(--muted); margin-top: 7px; }
@keyframes topup-balance-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes topup-card-arrive { 25% { box-shadow: 0 0 0 5px #c7e9ff, 0 12px 40px #a9d5ef50; } to { box-shadow: 0 0 0 0 transparent; } }
.topup-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 80px; }
.topup-section-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; margin: 0 0 20px; }
.topup-section-head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.topup-section-head > span { color: var(--muted); font-size: 11px; }
.topup-offers { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.topup-offers legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topup-option { position: relative; display: flex; flex-direction: column; align-items: start; gap: 14px; min-width: 0; padding: 20px 18px; border: 1px solid #dce7ef; border-radius: 20px; background: #fff; cursor: pointer; transition: background .18s, border-color .18s, box-shadow .18s; }
.topup-option:hover { border-color: #a7d2ef; }
.topup-option:has(input:checked) { background: #eff8ff; border-color: #a5d4f5; box-shadow: 0 0 0 1px #a5d4f5; }
.topup-option:has(input:focus-visible) { outline: 2px solid #82bfeb; outline-offset: 4px; }
.topup-option > input { position: absolute; top: 20px; inset-inline-end: 16px; margin: 0; }
.topup-option-name { font-size: 12px; color: var(--muted); padding-inline-end: 20px; }
.topup-option-credits { margin-top: 12px; font-size: clamp(27px, 2.6vw, 35px); line-height: 1.2; font-weight: 450; letter-spacing: -.045em; }
.topup-option-unit { margin-top: -10px; color: var(--muted); font-size: 11px; }
.topup-option-price { border-top: 1px solid #dae9f3; padding-top: 17px; width: 100%; font-size: 18px; }
.topup-selection-note { margin: 17px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.topup-checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; align-items: start; background: #f5faff; border: 1px solid #dfedf6; border-radius: 24px; padding: 32px; }
.topup-checkout:not(:has(.topup-capacity:not([hidden]))) { grid-template-columns: minmax(0, 1fr) minmax(240px, .6fr); }
.topup-checkout-payment { border-inline-start: 1px solid #dce9f3; padding-inline-start: 30px; }
.topup-checkout h2 { font-size: 19px; line-height: 1.5; font-weight: 600; margin: 0 0 24px; }
.topup-order-lines { display: grid; gap: 15px; margin: 0; font-size: 12px; }
.topup-order-lines > div { display: flex; justify-content: space-between; gap: 16px; }
.topup-order-lines dt { color: var(--muted); }
.topup-order-lines dd { margin: 0; }
.topup-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 24px; font-size: 13px; }
.topup-total strong { font-size: 30px; font-weight: 450; letter-spacing: -.035em; }
.topup-checkout-payment > button { width: 100%; min-height: 44px; }
.topup-payment-note { font-size: 11px; color: var(--muted); line-height: 1.8; margin: 13px 0 0; }
.topup-error { color: #9b3838; font-size: 12px; line-height: 1.8; }
.topup-notice { color: #836527; font-size: 12px; }
.topup-state { margin-top: 26px; padding: 28px 32px; border: 1px solid #dceaf3; border-radius: 20px; background: #fff; }
.topup-state h2 { margin: 0 0 12px; font-size: 19px; }
.topup-state p { font-size: 13px; color: var(--muted); line-height: 1.8; }
.topup-state-actions { display: flex; gap: 14px; align-items: center; margin-top: 20px; }
.topup-rules { border-top: 1px solid #e1ebf2; margin-top: 112px; padding-top: 48px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; }
.topup-rules h2 { margin: 0 0 20px; font-size: 26px; font-weight: 600; line-height: 1.5; letter-spacing: -.035em; }
.topup-rules a { font-size: 12px; }
.topup-rules ol { margin: 0; padding: 0; display: grid; gap: 25px; list-style: none; }
.topup-rules li { display: flex; gap: 20px; }
.topup-rules li > span { padding-top: 2px; color: #75a7c5; font-size: 12px; font-variant-numeric: tabular-nums; }
.topup-rules h3 { font-size: 14px; font-weight: 600; margin: 0 0 7px; }
.topup-rules li p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
@media (max-width: 900px) {
  .topup-layout { margin-top: 64px; }
  .topup-checkout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .topup-checkout-payment { grid-column: 1 / -1; border-inline-start: 0; border-top: 1px solid #dce9f3; padding: 24px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 30px; align-items: start; }
  .topup-checkout-payment > button, .topup-payment-note { grid-column: 2; }
  .topup-checkout-payment > button { grid-row: 1 / 3; align-self: center; }
  .topup-total { margin-bottom: 0; }
  .topup-notice, .topup-error { grid-column: 1; }
  .topup-checkout:not(:has(.topup-capacity:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
  .topup-rules { gap: 30px; margin-top: 88px; }
}
@media (max-width: 560px) {
  .topup-main { width: calc(100% - 32px); padding-top: 44px; }
  .topup-heading { margin-bottom: 30px; }
  .topup-heading h1 { font-size: 28px; }
  .topup-account { min-height: 380px; padding: 24px; flex-direction: column; align-items: start; }
  .topup-balance { align-self: end; }
  .topup-balance strong { font-size: 40px; }
  .topup-account::after { background: linear-gradient(0deg, #f4faffeb, #f4faff1a 48%, #f4faffb3); }
  .topup-layout { margin-top: 56px; }
  .topup-offers { gap: 8px; }
  .topup-option { padding: 18px 11px; }
  .topup-option > input { inset-inline-end: 10px; }
  .topup-option-name { font-size: 11px; padding-inline-end: 17px; }
  .topup-option-credits { font-size: 25px; }
  .topup-checkout { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 24px; }
  .topup-capacity { border-inline-start: 0; border-top: 1px solid #dce9f3; padding: 24px 0 0; }
  .topup-checkout-payment { display: block; }
  .topup-total { margin-bottom: 20px; }
  .topup-rules { grid-template-columns: 1fr; margin-top: 72px; padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) { .topup-option { transition: none; } .topup-account.is-recharged, .is-recharged .topup-arrival { animation: none; } }
