/* Phone layouts shared by public pages and collection tools. */
.vault-menu-toggle{display:none}
@media(max-width:640px){
 html{-webkit-text-size-adjust:100%;scroll-padding-top:150px}
 body{min-width:0}
 main,section,form,fieldset{min-width:0}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important;max-width:100%}
 textarea{resize:vertical}
 button,a,input,select,textarea{touch-action:manipulation}
 button,[role=button],a.button{min-height:44px}
 input[type=checkbox],input[type=radio]{min-width:20px;min-height:20px;flex-shrink:0}
 p,h1,h2,h3,dd{overflow-wrap:anywhere}
 header:has(.collection-header-inner){max-height:85dvh;overflow-y:auto;overscroll-behavior:contain}
 header .collection-header-inner{column-gap:8px;row-gap:10px;padding-inline:12px}
 .collection-header-inner>div:first-child{gap:8px}
 .collection-header-inner>div:first-child img{width:40px;height:44px}
 .collection-header-inner>div:first-child h1{font-size:16px}
 .collection-header-inner>div:first-child p{font-size:10px}
 .collection-header-inner>.justify-self-end{gap:6px}
 .collection-header-inner>.justify-self-end a,.collection-header-inner>.justify-self-end button{width:44px;min-height:44px;justify-content:center}
 .collection-header-inner>.justify-self-end span{display:none}
 .vault-mobile-nav-ready>.vault-menu-toggle{display:flex;grid-column:1/-1;align-items:center;justify-content:center;border:1px solid #6f5892;background:#202036;color:#f1f5f9;border-radius:10px;font-size:14px;font-weight:600;width:100%}
 .vault-mobile-nav-ready:not(.vault-menu-open)>[aria-label="Vault navigation"],.vault-mobile-nav-ready:not(.vault-menu-open)>.vault-mobile-actions{display:none}
 .vault-mobile-nav-ready>[aria-label="Vault navigation"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
 header [aria-label="Vault navigation"] a,header [aria-label="Vault navigation"] button{min-width:0;min-height:44px;font-size:13px;justify-content:center;overflow-wrap:anywhere}
 header #accountName{max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .vault-mobile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 .vault-mobile-actions button{justify-content:center;font-size:13px;padding:10px 8px}
 .vault-mobile-actions button:last-child{grid-column:1/-1}
 main h1.text-4xl{font-size:29px;line-height:1.2}
 .book-toolbar>label,.book-toolbar>div{width:100%;min-width:0}
 .book-toolbar input{min-width:0}
 .book-choice{gap:10px}.book-choice button{padding:18px 10px}
 .journal-heading,.book-dialog-heading,.excel-import-heading{gap:10px}
 .journal-heading>div,.book-dialog-heading>div,.excel-import-heading>div{min-width:0}
 .journal-heading>button,.book-dialog-heading>button,.excel-import-heading>button{flex-shrink:0}
 .fixed.inset-0.z-50{padding:10px;padding-bottom:max(10px,env(safe-area-inset-bottom))}
 .fixed.inset-0.z-50>.glass-panel{max-height:calc(100dvh - 20px);max-width:100%}
 #statsModal>.glass-panel,#backupModal>.glass-panel{overflow-y:auto}
 #gameFormModal form,#scannerModal .overflow-y-auto,#steamModal .overflow-y-auto{min-height:0;overscroll-behavior:contain;padding:16px}
 dialog{max-width:calc(100vw - 20px);overscroll-behavior:contain}
 .achievement-title-row{flex-wrap:wrap;gap:12px}
 .achievement-title-row #openMedalShowcase{min-height:44px}
 .checklist-item{min-height:44px}
 .game-row-top{flex-wrap:wrap}.game-row-body{padding:16px}
 .game-row-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
 .site-header{gap:12px}.header-logo{max-width:48vw;height:auto}
 .wrap{width:calc(100% - 32px)}
 .hero h1{font-size:clamp(32px,9vw,42px)}
 .support-links{min-width:0}.support-links>a{gap:12px;min-height:44px}
 .site-footer{gap:20px}.site-footer img{max-width:100%}
 .nav-signin{min-height:44px;display:inline-flex;align-items:center;white-space:nowrap}
 .feature-strip>.wrap{font-size:10px;line-height:1.6;text-align:center}
}
@media(prefers-reduced-motion:reduce){
 .pulse-glow,.glow-green,.glow-blue{animation:none!important}
 .glass-card{transition:none!important}.glass-card:hover{transform:none}
}

/* Installed web app and iPhone screen edges. */
@media (display-mode:standalone){
 html{background:#0b0f19}
 body{min-height:100dvh}
 body>header{padding-top:calc(12px + env(safe-area-inset-top,0px))}
 .site-footer,body>footer{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:640px){
 body{padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
 header:has(.collection-header-inner){max-height:calc(100dvh - env(safe-area-inset-bottom,0px) - 16px)}
 .vault-menu-toggle:focus-visible{outline:2px solid #c4a0f2;outline-offset:3px}
 .vault-mobile-nav-ready [aria-current=page]{border-color:#a855f7;background:#7c3aed24}
 .vault-dashboard-grid{gap:14px;margin-top:22px}
 .vault-dashboard-card{padding:20px;border-radius:20px}
 .vault-dashboard-card h2{font-size:27px;line-height:1.2}
 .vault-card-icon{margin-bottom:14px;width:46px;height:46px}
 .vault-metrics{gap:16px;margin:20px 0}
 .vault-metrics dd{font-size:25px}
 .vault-open{min-height:48px}
 .dashboard-heading-row{align-items:flex-start;gap:16px}
 .dashboard-heading-row h1{margin-top:8px}
 .dragon-upgrade{max-width:100%;white-space:normal;text-align:center;justify-content:center}
 .account-table-scroll{overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .account-danger summary{min-height:44px;display:flex;align-items:center}
 .account-danger input{width:100%;box-sizing:border-box}
 .fixed.inset-0.z-50{padding-top:max(10px,env(safe-area-inset-top,0px));padding-bottom:max(12px,env(safe-area-inset-bottom,0px))}
 .fixed.inset-0.z-50>.glass-panel{max-height:calc(100dvh - max(10px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)))}
 dialog{max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}
 .hero h1{letter-spacing:-.035em}
}
