.mobile-menu-toggle,.mobile-bottom-nav,.clubhouse-mobile-link{display:none}
#mobile-menu{padding:0;width:min(460px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);background:#18191b;color:var(--text);border:1px solid #b48b4d70;border-radius:14px;overflow:auto;overscroll-behavior:contain}
#mobile-menu::backdrop{background:#000b;backdrop-filter:blur(5px)}
.mobile-menu-header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;background:#25171b;border-bottom:1px solid #d4b17635;z-index:1}
.mobile-menu-header h2{font:600 18px/1.3 'Segoe UI',Arial,sans-serif;margin:0;color:#ecd191}
#mobile-menu-close{width:44px;height:44px;padding:0;border:1px solid #ffffff25;border-radius:8px;background:#ffffff08;font-size:28px;color:#fff}
#mobile-menu-links{padding:8px 14px 20px}
.mobile-menu-section{font-size:11px;letter-spacing:1.5px;text-transform:uppercase;color:#d4b176;margin:14px 10px 8px}
#mobile-menu nav{gap:4px}
#mobile-menu nav a{min-height:50px;font-size:14px;padding:10px 12px;color:#ddd}
#mobile-menu nav a.active{color:#f0d192;background:#d4b17612;border-color:#d4b17655}
#mobile-menu .nav-icon{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px}
#mobile-menu .nav-icon img{display:block;width:28px;height:28px;object-fit:contain;filter:none}
#mobile-menu .nav-icon svg{width:24px;height:24px}
body:has(#mobile-menu[open]){overflow:hidden}
@media(max-width:800px){
 html{scroll-padding-top:84px;scroll-padding-bottom:90px;-webkit-text-size-adjust:100%}
 .sidebar{display:none}
 .app-shell{margin:0;padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
 .topbar{position:sticky;top:0;z-index:20;min-height:64px;height:calc(64px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right,0px)) 0 max(12px,env(safe-area-inset-left,0px));background:#141416f5;border-bottom:1px solid #ffffff14;gap:8px}
 .breadcrumb{display:none}
 .mobile-brand{display:block;flex:0 0 auto}
 .mobile-brand>img{width:64px;max-width:100%;height:auto}
 .top-actions{margin-left:auto;display:flex;align-items:center;gap:6px;min-width:0}
 .top-actions .gallery-mobile-link,.top-actions .clubhouse-mobile-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 10px;border:1px solid #bd913d55;border-radius:7px;font:600 12px/1.2 'Segoe UI',Arial,sans-serif;color:#ecd191;white-space:nowrap}
 .top-actions a.active{border-color:#d4b176;background:#d4b17617;color:#ffe3ad}
 .mobile-menu-toggle{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;padding:0;color:#ecd191;background:transparent;border:1px solid #bd913d55;border-radius:7px}
 .mobile-menu-toggle svg{width:23px;height:23px}
 .mobile-bottom-nav{position:fixed;inset:auto 0 0;z-index:25;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;height:calc(68px + env(safe-area-inset-bottom,0px));padding:4px max(4px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(4px,env(safe-area-inset-left,0px));border-top:1px solid #d4b17635;background:#171719f7;backdrop-filter:blur(12px)}
 .mobile-bottom-nav>a,.mobile-bottom-nav>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:56px;padding:4px 2px;margin:0;border:1px solid transparent;border-radius:8px;background:transparent;color:#b9b8b7;font:500 10px/1.2 'Segoe UI',Arial,sans-serif;text-align:center;touch-action:manipulation}
 .mobile-bottom-nav img,.mobile-bottom-nav svg{display:block;width:25px;height:25px;object-fit:contain;filter:none}
 .mobile-bottom-nav .active{color:#f0d192;background:#d4b17612;border-color:#d4b17635}
 main{min-width:0;padding:22px max(16px,env(safe-area-inset-right,0px)) 24px max(16px,env(safe-area-inset-left,0px))}
 main>*,.hero-heading>div,.item-body,.card-bottom>div,.player-form,.studio-canvas,.studio-board{min-width:0}
 input,select,textarea,.search-row .search-input-wrap input,.search-row select,.filters select,.advanced-filters select,.inline-item-name{font-size:16px}
 input,select,textarea{scroll-margin-top:90px;scroll-margin-bottom:100px}
 input,select,.button,.chip{min-height:44px}
 .search-row{display:flex;flex-wrap:wrap;gap:8px}
 .search-row .search-input-wrap{flex:1 1 calc(100% - 86px);min-width:0}
 .search-input-wrap input{min-height:48px;padding-left:34px;padding-right:10px}
 .search-input-wrap kbd{display:none}
 .search-row>.button{flex:0 0 76px;min-height:48px;padding:10px 8px;font-size:13px}
 .search-row>select{flex:1 1 calc(100% - 56px);max-width:none;width:auto;min-height:44px;font-size:14px}
 .toggle-compact{flex:0 0 44px;min-height:44px}
 .filters{display:flex;flex-wrap:wrap;gap:5px}
 .filters .chip{font-size:12px;padding:9px 11px;white-space:nowrap}
 .filters select{font-size:14px;margin:3px 0 0;max-width:100%}
 .result-count{flex:1 1 100%;font-size:11px;line-height:1.6;margin:6px 0}
 .advanced-filters summary{font-size:13px;min-height:44px;display:flex;align-items:center}
 .advanced-filters label{font-size:12px;flex:1 1 130px;min-width:0}
 .advanced-filters .check-label{font-size:13px;min-height:44px;flex:0 1 auto}
 .advanced-filters input[type=checkbox]{width:20px;height:20px;min-height:20px}
 .page-heading h1{font-size:30px;overflow-wrap:anywhere}
 .page-heading p,.section-head p{font-size:13px;line-height:1.6}
 .section-head{gap:12px;flex-wrap:wrap}
 .item-grid,.loading-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
 .item-title{font-size:13px;line-height:1.45;min-height:44px;overflow-wrap:anywhere}
 .item-meta{font-size:9px;overflow-wrap:anywhere}
 .card-price{font-size:12px;overflow-wrap:anywhere}
 .card-bottom{gap:5px;align-items:flex-end}
 .card-bottom small{font-size:8px;line-height:1.5}
 .item-card .add-board,.save-item{width:44px;height:44px;min-width:44px;min-height:44px;flex-shrink:0}
 .item-art{height:165px}
 .item-art img{max-width:85%;max-height:85%;object-fit:contain}
 .auction-prices>div{display:block}
 .auction-prices dd{margin-top:4px;text-align:left;font-size:13px;overflow-wrap:anywhere}
 .auction-prices dt,.auction-meta{font-size:11px}
 .auction-prices .current-bid dd{font-size:15px}
 .player-form{max-width:100%;display:flex;flex-wrap:wrap;gap:10px}
 .player-form input{min-width:0;min-height:48px;flex:1 1 220px}
 .player-form .button{min-height:48px;font-size:14px}
 .player-results-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
 .player-result-card strong{font-size:13px;overflow-wrap:anywhere}
 .player-result-card small{font-size:11px}
 .family-member-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
 .family-member{padding:14px 10px;gap:12px;min-width:0}
 .member-avatar{height:170px}
 .member-avatar>img{height:160px;max-width:100%;object-fit:contain}
 .member-name{font-size:13px;line-height:1.5;min-height:44px;gap:5px}
 .member-crown{width:18px;min-width:18px}
 .clubhouse{padding:28px 20px}
 .clubhouse>img{width:280px;max-width:85%;height:auto}
 .clubhouse h1{font-size:38px}
 .clubhouse .section-kicker{font-size:10px;letter-spacing:2px}
 .studio-download{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
 .studio-download .template-purpose{flex:1 1 auto}
 .template-purpose .purpose-button{min-height:44px;flex:1;font-size:14px;padding:9px 12px}
 .studio-download .download-picture{flex:1 1 190px;min-height:48px;font-size:14px;margin:0}
 .studio-board{padding:20px 12px;max-width:100%;width:100%}
 .board-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .board-item{padding:10px 7px}
 .board-item img{height:125px}
 .board-item .inline-item-name{font-size:16px;padding:8px 3px}
 .board-item input[data-board-price]{font-size:26px;font-weight:800;min-height:56px;padding:10px 3px}
 .board-header .inline-board-edit:first-of-type{font-size:24px}
 .board-header .inline-board-edit{font-size:16px}
 .board-item:focus-within .remove{opacity:1;pointer-events:auto;transform:none}
 .board-item .remove{min-height:44px;min-width:0}
 .currency-field{min-width:0}
 .currency-field input{max-width:100%;font-size:28px}
 .currency-hint{line-height:1.6}
 dialog:not(#mobile-menu):not(#gallery-viewer){width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:48px 18px 22px;overscroll-behavior:contain}
 .dialog-close{width:44px;height:44px;right:9px;top:7px}
 .detail-top{grid-template-columns:1fr}
 .detail-name{font-size:26px;overflow-wrap:anywhere}
 .detail-prices strong{font-size:20px;overflow-wrap:anywhere}
 .detail-actions{display:flex;flex-wrap:wrap;gap:10px}
 .detail-actions .button{min-height:44px;flex:1 1 130px}
 .table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .table-wrap table{min-width:550px}
 .table-wrap th,.table-wrap td{font-size:12px;padding:12px 10px}
 .game-events-window{width:430px;max-width:100%}
 .game-event-control select{height:36px;min-height:36px;font-size:16px}
 .game-refresh{width:36px;height:36px;min-height:36px}
 .game-event-control label{font-size:12px}
 .game-event-table td{height:30px;font-size:13px}
 .game-event-table th{height:30px;font-size:12px}
 .game-event-bottom label{min-height:36px;display:flex;align-items:center;gap:6px}
 .game-event-bottom input{width:18px;height:18px;min-height:18px}
 footer{padding:20px 16px;font-size:11px;overflow-wrap:anywhere}
 .policy-links{display:flex;flex-wrap:wrap;gap:6px 12px}
 .policy-links a{display:inline-flex;align-items:center;min-height:44px;font-size:12px}
 #toast{left:50%;bottom:calc(84px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 24px);width:max-content;font-size:13px}
}
@media(max-width:520px){
 main{padding:18px 12px 24px}
 .family-member-grid,.player-results-grid,.item-grid,.loading-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .family-member{padding:12px 8px}
 .member-avatar{height:170px}
 .member-avatar>img{height:160px}
 .member-name{font-size:12px}
 .item-body{padding:12px 9px}
 .item-art{height:155px}
 .item-title{font-size:12px;min-height:48px}
 .item-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}
 .home-grid{grid-template-columns:1fr}
 .outfit-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .outfit-grid span{font-size:10px}
 .item-listing-grid{grid-template-columns:1fr}
 .pager{gap:8px;flex-wrap:wrap;font-size:12px}
 .pager .button{min-height:44px;font-size:12px;padding:10px}
 .pager input{min-height:44px;font-size:16px}
 .currency-fields{grid-template-columns:1fr}
 .top-actions .gallery-mobile-link,.top-actions .clubhouse-mobile-link{padding:0 8px;font-size:11px}
}
@media(max-width:359px){
 .mobile-brand>img{width:49px}
 .topbar{padding-left:9px;padding-right:9px;gap:4px}
 .top-actions{gap:4px}
 .top-actions .clubhouse-mobile-link,.top-actions .gallery-mobile-link{padding:0 6px;font-size:11px}
 .member-avatar{height:150px}
 .member-avatar>img{height:140px}
 .member-name{font-size:11px}
 .card-price{font-size:11px}
 .card-bottom{flex-wrap:wrap}
 .card-bottom .add-board{margin-left:auto}
 .board-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.mobile-bottom-nav,.board-item .remove{transition:none}}
