/* Etapa D: controles reais, cartas e estilos desktop preservados. */
.binder-mobile-toolbar,.binder-mobile-statistics,.inventory-mobile-core,.pack-mobile-actions,.selection-mobile-actions,.achievement-mobile-info,.result-mobile-actions{display:none}
.mobile-modal-body,.mobile-modal-actions,.mobile-modal-heading{display:contents}
@media(max-width:800px){
 body.mobile-library .shell{padding:8px}
 body.mobile-library .site-header{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;min-height:44px;margin:0 0 8px;padding:6px 8px;border:1px solid #7397b366;border-radius:9px;background:#102b45}
 body.mobile-library .brand{padding:0;transform:none;filter:none}
 body.mobile-library .logo-main{font:850 14px/1.15 system-ui,sans-serif;letter-spacing:-.4px;color:#f0f6ff;-webkit-text-stroke:0;text-shadow:none}
 body.mobile-library .logo-main br{display:none}
 body.mobile-library .logo-main span{font-size:inherit;color:inherit}
 body.mobile-library .logo-main span:before{content:' '}
 body.mobile-library :is(.logo-tagline,.record){display:none}
 body.mobile-library .header-right{flex-wrap:wrap;gap:5px;max-width:100%;min-width:0}
 body.mobile-library #wallet{font-size:12px;padding:7px;border-radius:6px;white-space:nowrap}
 body.mobile-library #home-btn{font-size:11px;padding:6px;min-height:44px;white-space:nowrap}
 body.mobile-library .shell>footer{display:none}
 body.mobile-library .screen{min-height:0}
 body.mobile-library .heading{display:block;margin:6px 0 8px}
 body.mobile-library .heading>div{display:block;text-align:left}
 body.mobile-library .heading .eyebrow{display:none}
 body.mobile-library .heading h2{font-size:22px;line-height:1.25;margin:0 0 5px}
 body.mobile-library .heading p{font-size:12px;line-height:1.5;margin:0}
 body.mobile-library :is(input,select,button,summary){touch-action:manipulation}
 .mobile-library .binder-mobile-toolbar{display:grid;gap:6px;position:sticky;top:6px;z-index:12;padding:6px;background:#142638;border:1px solid #7898ad;border-radius:8px;margin:8px 0}
 .mobile-library .binder-mobile-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(100px,1fr);gap:6px;align-items:start}
 .mobile-library #binder-mobile-tabs .binder-tabs{display:grid;flex-direction:row;grid-template-columns:1fr 1fr;width:auto;margin:0;padding:0;gap:4px;background:none;border:0}
 .mobile-library #binder-mobile-tabs button{min-height:44px;min-width:0;font-size:12px;padding:6px}
 .mobile-library #binder-mobile-filters{min-width:0}
 .mobile-library #binder-mobile-filters>summary{min-height:44px;padding:10px 6px;font-size:12px;font-weight:750;line-height:22px;border:1px solid #7898ad;border-radius:6px;cursor:pointer}
 .mobile-library #binder-mobile-filter-content{position:absolute;left:0;right:0;top:var(--binder-filter-top,56px);z-index:2;max-height:var(--binder-filter-height,40dvh);overflow:auto;overscroll-behavior:contain;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px;border:1px solid #7898ad;border-radius:8px;background:#142638;box-shadow:0 8px 18px #0009}
 .mobile-library #binder-mobile-filters:not([open])>#binder-mobile-filter-content{display:none}
 .mobile-library #binder-mobile-filter-content>label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px}
 .mobile-library #binder-mobile-filter-content>.collection-check{flex-direction:row;align-items:center;min-height:44px}
 .mobile-library #binder-mobile-filter-content :is(select,button){min-height:44px;min-width:0;padding:8px;font-size:12px}
 .mobile-library #binder-mobile-filter-content select{width:100%;background:#202c3d;color:#fff;border:1px solid #7898ad;border-radius:5px}
 .mobile-library #binder-mobile-filter-content input[type=checkbox]{width:20px;height:20px;flex-shrink:0}
 .mobile-library #binder-mobile-filter-content #sell-all{grid-column:1/-1}
 .mobile-library #binder-mobile-search .collection-search{display:grid;gap:3px;font-size:11px;color:#c8d9eb}
 .mobile-library #binder-mobile-search input{width:100%;min-width:0;min-height:44px;border:1px solid #7898ad;border-radius:6px;background:#202c3d;color:#fff;font:inherit;font-size:16px;padding:8px}
 .mobile-library #binder-mobile-pages .binder-navigation{display:grid;grid-template-columns:1fr auto 1fr;gap:6px;margin:0;padding:0;border:0}
 .mobile-library #binder-mobile-pages button{min-height:44px;min-width:0;font-size:12px;padding:6px}
 .mobile-library #binder-mobile-pages #binder-page{font-size:11px;white-space:normal;text-align:center}
 .mobile-library #binder-screen>.collection-controls{display:none}
 .mobile-library .binder-mobile-statistics{display:block;border:1px solid #7898ad;border-radius:7px;margin:8px 0;color:#d2dbe9;background:#101926}
 .mobile-library .binder-mobile-statistics>summary{padding:10px;min-height:44px;font-size:12px;line-height:24px;cursor:pointer}
 .mobile-library .binder-mobile-statistics .collection-statistics{border:0;margin:0;padding:10px;max-width:100%}
 .mobile-library .binder-favorite{min-height:44px}
 .mobile-library .binder-tools{margin:8px 0}
 .mobile-library #binder-screen :is(button,input,select):focus-visible,.mobile-library summary:focus-visible{outline:3px solid #ffe392;outline-offset:-3px}
 .mobile-library .inventory-panel{margin:0;padding:12px}
 .mobile-library .inventory-panel>.eyebrow{display:none}
 .mobile-library .inventory-panel h2{font-size:23px;margin:0 0 5px}
 .mobile-library .inventory-panel>p{font-size:12px;line-height:1.4;margin:0 0 8px}
 .mobile-library .inventory-mobile-core{display:grid;grid-template-columns:1fr 1fr;gap:6px;position:sticky;top:6px;z-index:10;background:#103450;padding:8px;border:1px solid #7898ad;border-radius:7px}
 .mobile-library .inventory-mobile-core>.pack-kind-field{grid-column:1/-1;margin:0;font-size:12px;gap:4px}
 .mobile-library .inventory-mobile-core select{min-height:44px;font-size:14px}
 .mobile-library .inventory-mobile-core #inventory-count{grid-column:1/-1;font-size:18px;font-weight:800;color:#ffe392;margin:0;line-height:1.4}
 .mobile-library .inventory-mobile-core button{min-height:44px;min-width:0;font-size:13px;padding:8px}
 .mobile-library .inventory-pack{grid-template-columns:100px minmax(0,1fr);gap:12px;padding:12px;margin-top:10px}
 .mobile-library .inventory-pack img{height:150px;max-height:none}
 .mobile-library .inventory-pack h3{font-size:18px;margin-bottom:6px}
 .mobile-library .inventory-pack p{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
 .mobile-library #pack-screen{overflow:visible;min-height:0}
 .mobile-library #pack-screen .pack-opening-layout{display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:12px;gap:10px;text-align:left}
 .mobile-library .pack-mobile-actions{display:contents}
 .mobile-library #pack-screen .pack-opening-controls{position:sticky;top:6px;z-index:10;align-self:stretch;padding:8px;background:#103450;border:1px solid #7898ad;border-radius:7px}
 .mobile-library #pack-screen #open-pack{min-height:44px;width:100%;max-width:none;font-size:15px;margin:0;padding:10px}
 .mobile-library #pack-screen :is(.pack-opening-status,.hint){font-size:12px;line-height:1.4;margin:6px 0 0;max-width:none}
 .mobile-library #pack-screen .pack-copy{padding:0;align-self:stretch}
 .mobile-library #pack-screen .pack-eyebrow{display:none}
 .mobile-library #pack-screen .pill{display:inline-block;padding:6px;font-size:10px;margin-bottom:6px}
 .mobile-library #pack-screen h2{font-size:23px;line-height:1.2;margin:0 0 8px;letter-spacing:-.5px}
 .mobile-library #pack-screen .pack-copy>p{font-size:12px;line-height:1.5;max-width:none}
 .mobile-library #pack-screen .pack-facts{display:none}
 .mobile-library #pack-screen .pack-theater{height:300px;width:100%;margin:0}
 .mobile-library #pack-screen .pack-art{width:160px;height:250px;min-height:0;margin:0 auto}
 .mobile-library #pack-screen .pack-orbit{width:220px;height:220px}
 .mobile-library #pack-screen .pack-pedestal{bottom:20px;width:240px;max-width:90%}
 .mobile-library .selection-mobile-actions{display:grid;grid-template-columns:1fr minmax(0,1.4fr);gap:6px;align-items:center;position:sticky;top:6px;z-index:10;padding:6px;border:1px solid #7898ad;border-radius:7px;background:#142638;margin-bottom:8px}
 .mobile-library #selection-mobile-actions #selected-counter{font-size:12px;padding:6px;white-space:normal;text-align:center}
 .mobile-library #selection-mobile-actions button{min-height:44px;font-size:13px;padding:8px;min-width:0}
 .mobile-library #selection-inventory{grid-column:1/-1;margin:0}
 .mobile-library #pull-summary{margin:8px 0;gap:6px}
 .mobile-library .pull-summary>div{padding:8px;font-size:12px}
 .mobile-library .achievement-mobile-info{display:block;font-size:12px;border:1px solid #7898ad;border-radius:7px;background:#142638}
 .mobile-library .achievement-mobile-info>summary{min-height:44px;padding:10px;line-height:24px;cursor:pointer}
 .mobile-library .achievement-mobile-info>p{margin:0;padding:0 12px 12px;font-size:12px;line-height:1.5}
 .mobile-library .achievement-grid{margin:10px 0;gap:10px}
 .mobile-library .achievement-card{padding:14px;gap:8px}
 .mobile-library .achievement-card button{min-height:44px}
 .mobile-library .history-item{overflow-wrap:anywhere;padding:12px}
 .mobile-library .history-item summary{min-height:44px;font-size:13px}
 .mobile-library .history-events{max-height:none;overflow:visible}
 .mobile-library .result{padding:18px 12px}
 .mobile-library #result-title{font-size:26px;overflow-wrap:anywhere}
 .mobile-library #result-description{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
 .mobile-library .result-mobile-actions{display:block;position:sticky;top:6px;z-index:10;background:#142638;border-radius:7px;padding:6px;margin:10px 0}
 .mobile-library .result-mobile-actions button{min-height:44px;font-size:13px}
 .mobile-library .mobile-actions-scroll,.mobile-library #pack-screen .pack-opening-controls.mobile-actions-scroll{position:static}
 .mobile-library .binder-filters-flow{position:static}
 .mobile-library .binder-filters-flow .binder-mobile-row{display:block}
 .mobile-library .binder-filters-flow #binder-mobile-tabs{margin-bottom:6px}
 .mobile-library .binder-filters-flow #binder-mobile-filter-content{position:static;max-height:none;overflow:visible}
 .overlay{--mobile-modal-safe-top:max(8px,env(safe-area-inset-top));--mobile-modal-safe-bottom:max(8px,env(safe-area-inset-bottom));padding:var(--mobile-modal-safe-top) max(8px,env(safe-area-inset-right)) var(--mobile-modal-safe-bottom) max(8px,env(safe-area-inset-left));z-index:30}
 .overlay>.dialog{display:flex;flex-direction:column;gap:8px;width:min(430px,100%);max-width:100%;max-height:calc(100vh - var(--mobile-modal-safe-top) - var(--mobile-modal-safe-bottom));max-height:calc(100dvh - var(--mobile-modal-safe-top) - var(--mobile-modal-safe-bottom));min-height:0;padding:12px;overflow:hidden}
 .overlay .mobile-modal-heading{display:block;flex:none}
 .overlay .mobile-modal-heading h2{font-size:20px;line-height:1.25;margin:0 0 6px}
 .overlay .mobile-modal-heading p{font-size:13px;line-height:1.5;margin:0}
 .overlay .mobile-modal-body{display:block;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:8px}
 .overlay .mobile-modal-actions{display:block;flex:none}
 .overlay #card-quantity{font-size:12px;line-height:1.4;margin:0 0 6px}
 .overlay :is(#close-card-dialog,#sell-one,#cancel-switch,.switch-option){min-height:44px;font-size:13px;margin:0;padding:10px}
 .overlay :is(#sell-one,#cancel-switch){width:100%}
 .overlay #switch-options{display:grid;gap:8px}
 .overlay #close-card-dialog{flex:none;align-self:stretch}
 .overlay :is(button,[tabindex]):focus-visible{outline:3px solid #ffe392;outline-offset:-3px}
 @media(max-height:440px) and (min-width:500px){
  .mobile-library .binder-mobile-toolbar{grid-template-columns:1fr 1fr;align-items:center}
  .mobile-library #binder-mobile-search{grid-column:2;grid-row:1}
  .mobile-library #binder-mobile-pages{grid-column:1/-1}
  .mobile-library .inventory-panel{padding:8px}
  .mobile-library .inventory-panel>p{display:none}
  .mobile-library .inventory-mobile-core{grid-template-columns:repeat(4,minmax(0,1fr))}
  .mobile-library .inventory-mobile-core>.pack-kind-field{grid-column:1/3;grid-row:1/3}
  .mobile-library .inventory-mobile-core #inventory-count{grid-column:3/5}
  .mobile-library #pack-screen .pack-opening-layout{padding:8px}
  .mobile-library .selection-mobile-actions{margin-bottom:6px}
 }
}
