/* Final common spacing and responsive form pass. */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0;overflow-wrap:break-word}
button,input,select,textarea{max-width:100%;font-family:inherit}
button,a,input,select,textarea{touch-action:manipulation}
input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea{font-size:16px;line-height:1.5}
input[type=checkbox],input[type=radio]{flex-shrink:0}
button:disabled{cursor:wait;opacity:.65}
[hidden]{display:none!important}
#account-status:empty,.form-status:empty{display:none}
/* Library: one clear entry state, compact fields, consistent card edges. */
html[data-page=library] .wrap{width:100%;padding-inline:clamp(16px,3vw,28px)}
html[data-page=library] main>section{min-width:0}
html[data-page=library] .tile{min-height:0;padding:clamp(20px,3vw,30px)}
html[data-page=library] .tile h2{line-height:1.25;font-size:clamp(24px,2.6vw,30px);margin:0 0 14px}
html[data-page=library] .tile p{line-height:1.65}
.auth-panel{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(24px,4vw,48px);align-items:start;margin-top:24px}
.auth-intro{max-width:360px}.auth-intro .ey{margin-bottom:12px}
.auth-intro p{margin-bottom:0!important;font-size:14px}
.auth-content{width:100%;max-width:480px;justify-self:end;min-width:0}
#login{display:grid;gap:18px}.auth-field{display:grid;gap:8px;min-width:0}
.auth-field label{font-size:13px;font-weight:600;line-height:1.4}
.auth-field input{width:100%;min-width:0;min-height:48px;padding:12px 14px;margin:0;border:1px solid var(--line);border-radius:4px;background:var(--bg);color:var(--ink)}
.auth-field input::placeholder{color:var(--muted);opacity:1}
#code{max-width:240px;letter-spacing:.12em;font-variant-numeric:tabular-nums}
.auth-buttons{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.auth-buttons .button{min-height:46px;line-height:1.4;margin:0}
.text-button{border:0;background:transparent;color:var(--ink);text-decoration:underline;text-underline-offset:3px;padding:10px 0;min-height:44px;font-size:13px;cursor:pointer}
.auth-privacy{max-width:43ch;margin:0!important;font-size:12px;line-height:1.6!important}
.auth-session{display:grid;justify-items:start;gap:10px}.auth-session p{margin:0!important}#account-email{font-weight:600;overflow-wrap:anywhere}
#account-status:not(:empty){font-size:13px;line-height:1.6;margin:16px 0 0;padding:12px 14px;background:var(--soft);border:1px solid var(--line);border-radius:4px;color:var(--ink)}
html[data-page=library] .desk{gap:20px;margin-block:20px}
html[data-page=library] .coming{margin-top:16px;gap:18px}
html[data-page=library] .coming .mini{flex:0 0 65px}
html[data-page=library] .book{flex:0 0 120px;min-height:178px;gap:12px}
html[data-page=library] .shelf{min-height:190px;gap:20px}
html[data-page=library] .modes{gap:10px}
html[data-page=library] .modes button{line-height:1.4}
/* Shop: align the purchase cards and keep rows flexible at narrow widths. */
.cartitem>div:first-child{min-width:0;overflow-wrap:anywhere}.cartitem .itemright{gap:8px}
.cart-box,.extra-panel,.product,.contact-column,.account-tile{min-width:0}
.cart-box>.note,.contact-column>.muted{line-height:1.6}
.contact-column form{display:grid;gap:0}.contact-column textarea{min-height:136px}
.contact-column .form-status{margin-bottom:0}
#support-project form{max-width:680px;margin-top:24px}
#support-project .formgrid{align-items:start}
#support-project .note{display:block;line-height:1.65}
.footer{overflow-wrap:anywhere}.footer p:last-child{line-height:2}
#bundleDialog{width:calc(100% - 32px);max-width:560px;max-height:85dvh;overflow:auto;border-radius:8px}
#bundleOptions{margin-block:16px}#bundleOptions label{min-height:44px}
/* Legal pages keep the same theme and readable measure. */
body:has(>section#offer){max-width:850px;margin:clamp(24px,4vw,44px) auto;padding-inline:clamp(18px,4vw,28px)}
body:has(>section#offer) h1{font-size:clamp(30px,4vw,42px);line-height:1.2}
body:has(>section#offer) h2{font-size:clamp(24px,3vw,30px);line-height:1.3}
body:has(>section#offer) section{margin-block:30px}
@media(max-width:800px){.auth-panel{grid-template-columns:minmax(0,1fr);gap:22px}.auth-intro{max-width:580px}.auth-content{max-width:540px;justify-self:start}html[data-page=library] .top .wrap{gap:10px}.hero h1{font-size:clamp(36px,5.2vw,60px)}}
@media(max-width:700px){.cart-layout,.account-grid{grid-template-columns:minmax(0,1fr)}.product-grid{gap:16px}.demo-tabs button{min-height:70px}.demo-tabs{gap:8px}.auth-panel{margin-top:20px}html[data-page=library] .desk{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){.topnav{gap:3px}.logo{font-size:21px}.hero{padding-top:32px;padding-bottom:32px}.hero-foot .btn{flex:1 1 160px}.cartitem{align-items:flex-start;flex-wrap:wrap}.cartitem .itemright{margin-left:auto}.couponrow{flex-wrap:wrap}.couponrow .field{flex:1 1 160px}.contact-entry-actions .btn{flex:1 1 200px}.demo-tabs button{font-size:12px;min-height:64px;padding:10px 4px}.year-stats{grid-template-columns:minmax(0,1fr)}.bundle-note strong{white-space:normal}.auth-buttons .button{flex:1 1 180px}.auth-content{max-width:none}html[data-page=library] .library-actions{display:grid;grid-template-columns:minmax(0,1fr)}html[data-page=library] .library-actions .button{text-align:center}html[data-page=library] .book{flex-basis:105px;width:105px;min-height:160px}html[data-page=library] .shelf{padding:18px 14px;gap:14px}html[data-page=library] .room{padding:18px}.coming{align-items:start}.schedule{column-gap:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
