/* Shared responsive corrections. Page artwork and desktop styling stay in their source files. */
html{-webkit-text-size-adjust:100%;scroll-padding-top:128px}
body{min-width:0}
body *,body *::before,body *::after{box-sizing:border-box}
body :where(img,svg,video){max-width:100%}
body :where(input,select,textarea){min-width:0;max-width:100%}
body :where(button,a,input,select,textarea,summary){touch-action:manipulation}
body .user-menu{max-width:calc(100vw - 24px);max-height:calc(100dvh - 52px);overflow:auto}
body .user-menu-head small{overflow-wrap:anywhere;min-width:0}
body .user-menu-head small i{flex-shrink:0}
body .user-toggle{min-height:38px;max-width:100%}
body .user-toggle>span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .sheet{visibility:hidden;pointer-events:none;max-height:0;z-index:9997}
body .sheet.is-open{visibility:visible;pointer-events:auto;max-height:calc(100dvh - 112px);overflow-y:auto;overscroll-behavior:contain}
body .burger{min-width:44px;min-height:44px;align-items:center;justify-content:center;cursor:pointer}
body .sheet a,body .sheet button{min-height:44px}
body .footer{display:none!important;height:auto;min-height:60px;flex-shrink:0}
@media(min-width:1101px) and (hover:hover) and (pointer:fine){body .footer{display:flex!important}}
body .footer-inner{padding-top:10px;padding-bottom:10px;gap:16px;flex-wrap:wrap}
body .footer-left,body .footer-right{min-width:0;flex-wrap:wrap}
body .footer-right a{display:inline-flex;align-items:center;min-height:44px}
body :where(.legal-content,.benefits-content,.success-content,.ref-reason,.ref-player h3,.crm-event,.crm-mini-row){overflow-wrap:anywhere}
body :where(.compare-table-wrap,#hiscore-lookup .panel,#account-page .table-wrap,.benefits-page .table-wrap){max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
body :where(.crm-main,.crm-card,.crm-mini-row>*,.ref-config-fields>*,.ref-review-form>*,.ref-metrics>*,.ref-player-identity){min-width:0}
body .crm-sidebar{overflow-y:auto}
body .crm-main fieldset{min-inline-size:0}
body .store-modal{overscroll-behavior:contain;max-height:calc(100dvh - 24px)}
body #closeModal,body #closeModalBtn{min-width:44px;min-height:44px;flex-shrink:0}
body #forgotPasswordModal{z-index:10000;padding:12px;overflow:auto;overscroll-behavior:contain}
body #forgotPasswordModal .modal-card{max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
@media(max-width:1100px){
  body .crm-main .ref-review-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  body .crm-main .ref-config-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:980px){
  body .nav-center,body .download-header{display:none}
  body .burger{display:flex;margin-left:auto}
  body .nav-left{margin-right:16px}
  body .footer-inner{justify-content:center;text-align:center}
  body .footer-left,body .footer-right{justify-content:center}
}
@media(max-width:768px),(pointer:coarse){
  /* 16px inputs prevent automatic focus zoom in mobile Safari. */
  body input:not([type=checkbox]):not([type=radio]):not([type=hidden]),body select,body textarea,
  body .crm-main input,body .crm-main select,body .crm-main textarea,
  body #account-page input,body .ref-player-page .ref-copy input,body .hiscore-page .compare-strip input{font-size:16px!important}
  body :where(button,input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){min-height:44px}
  body .hiscore-page .dt-container .dt-length select{min-height:44px;font-size:16px}
  body .hiscore-modes a,body .hiscore-page .xp-chip,body .hiscore-page .skills-grid a,
  body .crm-sidebar nav a,body .crm-filter-options button,body .crm-outline-button,
  body .ref-page summary,body .crm-add-reward>summary,body #account-page .crm-tab,
  body #store .buy-button,body .store-primary{min-height:44px}
  body .ref-page summary{padding-top:10px;padding-bottom:10px}
  body .hiscore-page .skills-grid a{font-size:12px;overflow-wrap:anywhere}
  body .hiscore-page .skills-grid img{flex-shrink:0}
  body .hiscore-page .dt-container .dt-paging .dt-paging-button{min-width:40px;min-height:44px}
  body .crm-filter-options button{font-size:12px}
}
@media(max-width:700px){
  body .crm-sidebar nav{display:flex;flex-wrap:wrap;overflow:visible;gap:4px}
  body .crm-sidebar nav a{flex:1 1 auto;justify-content:center;font-size:13px}
  body .crm-brand>span{font-size:9px;letter-spacing:1px}
  body .crm-main .ref-review-form,body .crm-main .ref-config-fields{grid-template-columns:minmax(0,1fr)}
  body .crm-toolbar label,body .crm-toolbar label:first-child{width:100%}
  body .crm-event{flex-wrap:wrap;gap:8px}
  body .crm-event time{margin-left:18px}
  body .ref-player-page .ref-stats span{font-size:11px}
  body .ref-player-page .ref-player small,body .ref-player-page .ref-metrics span{font-size:12px}
  body .ref-player-page .ref-reward-list{grid-template-columns:minmax(0,1fr)}
  body .ref-player-page .ref-reward strong{font-size:13px}
  body .ref-player-page .ref-reward small{font-size:11px}
  body .ref-progress-grid{grid-template-columns:minmax(0,1fr)}
  body .ref-player-page .ref-progress-row,body .ref-player-page .ref-progress-row>span,body .ref-player-page .ref-progress-row small{font-size:12px}
}
@media(max-width:480px){
  body .topbar-wrap,body .nav-wrap{padding-left:12px;padding-right:12px}
  body .topbar-discord{font-size:11px;gap:5px;white-space:nowrap}
  body .topbar-auth{gap:5px;min-width:0}
  body .topbar-auth a,body .topbar-auth span{font-size:12px}
  body .user-toggle>span{max-width:85px}
  body .footer-left,body .footer-right{font-size:11px;letter-spacing:.025em;gap:6px 14px}
  body .footer-inner{padding:12px;gap:6px}
  body .page-title,body .legal-title,body .success-title{font-size:clamp(28px,9vw,42px);overflow-wrap:anywhere}
  body .hiscore-page .skills-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:240px}
  body .hiscore-page .skills-grid a{font-size:12px}
  body .profile-summary{flex-wrap:wrap}
  body .hiscore-page .dt-container .dt-layout-row{flex-wrap:wrap}
  body #store .product-grid{grid-template-columns:minmax(0,1fr)}
  body #store .product-image-wrap{height:150px}
  body #store .product-card h3{font-size:20px}
  body #store .product-card p{font-size:14px;min-height:0}
  body #store .product-body{padding:16px}
  body .store-modal-product{grid-template-columns:72px minmax(0,1fr);gap:12px}
  body .store-modal-art{height:86px}
  body .store-modal-art img{max-height:68px}
  body #itemName{font-size:19px;overflow-wrap:anywhere}
  body .store-modal{padding-left:16px;padding-right:16px}
  body #forgotPasswordModal .modal-card{padding:22px 18px}
  body .ref-player-page .ref-copy{flex-wrap:wrap}
  body .ref-player-page .ref-copy input{flex:1 1 100%}
  body .ref-player-page .ref-copy button{width:100%}
  body .crm-page-heading{flex-wrap:wrap}
  body .crm-mini-head,body .crm-mini-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;padding:12px}
  body .crm-stat-grid>a{padding:16px}
  body .crm-stat-grid span,body .crm-stat-grid small{font-size:12px}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body .sheet,body .intro-action,body .product-card{transition:none}
  body .intro-particles,body .intro-hero::after{animation:none}
}

/* Compact navigation button and public links only. */
body .burger{position:relative;flex:0 0 44px;width:44px;height:44px;border:1px solid #514351;border-radius:4px;background:#1c1722;color:#e3cb8e;outline:none}
body .burger:hover{background:#29212e;border-color:#927b4a}
body .burger .menu-stroke{position:absolute;left:12px;width:18px;height:2px;background:currentColor;border-radius:1px;transition:transform .16s ease,top .16s ease}
body .burger .menu-stroke:first-child{top:16px}
body .burger .menu-stroke:last-child{top:24px}
body .burger[aria-expanded=true] .menu-stroke{top:20px}
body .burger[aria-expanded=true] .menu-stroke:first-child{transform:rotate(45deg)}
body .burger[aria-expanded=true] .menu-stroke:last-child{transform:rotate(-45deg)}
body .burger:focus-visible{outline:2px solid #ddc48b;outline-offset:3px}
body .sheet-inner{padding:8px 20px 12px}
body .sheet a{display:flex;align-items:center;min-height:50px;padding:12px 4px}
body .sheet a:last-child{border-bottom:0}
@media(prefers-reduced-motion:reduce){body .burger .menu-stroke{transition:none}}

body .topbar-auth .auth-icon{width:auto;min-width:40px;padding:0 6px;gap:6px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:3px;color:#c6bfce;flex-shrink:0}
body .topbar-auth .auth-icon svg{width:19px;height:19px}
body .topbar-auth .auth-icon:hover{color:#e3cb8e;background:#ffffff08}
body .topbar-auth .auth-icon:focus-visible{outline:2px solid #ddc48b;outline-offset:-3px}

body .topbar-auth .auth-icon span{font-size:12px;white-space:nowrap;color:inherit}
@media(max-width:480px){body .topbar-auth .auth-icon{padding:0 3px;gap:4px}body .topbar-auth .auth-icon svg{width:16px;height:16px}body .topbar-discord{max-width:calc(100% - 148px);white-space:normal;font-size:10px;line-height:1.15}}
