/* THRONESHARD client shell
 * 1. Common interaction components
 * 2. Desktop document layouts
 * 3. Smartphone landscape application layouts
 */

/* Common */
.hall-play{width:100%;font:inherit;text-align:left;cursor:pointer}
.play-modes-overlay{position:fixed;z-index:9300;inset:0;display:grid;place-items:center;padding:20px;background:rgba(4,3,3,.78);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.play-modes-overlay[hidden]{display:none}.play-modes-panel{position:relative;width:min(680px,100%);padding:30px;border:1px solid rgba(236,201,125,.34);border-radius:22px;background:radial-gradient(circle at 50% 0,rgba(144,91,42,.2),transparent 42%),linear-gradient(155deg,#2b1a13,#100a08);box-shadow:0 32px 100px #000;color:#ead8b4}
.play-modes-panel>span{display:block;color:#bc9550;font:900 .58rem Arial,sans-serif;letter-spacing:.2em}.play-modes-panel h2{margin:6px 0 22px;color:#f2dfb4;font:500 2rem Georgia,serif}.play-modes-close{position:absolute;top:12px;right:12px;width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.05);color:#d7c5a1;font-size:1.45rem;cursor:pointer}
.play-mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.play-mode-grid a{min-height:118px;display:grid;grid-template-columns:52px 1fr auto;align-items:center;gap:12px;padding:18px;border:1px solid rgba(230,194,116,.2);border-radius:15px;background:rgba(255,255,255,.025);color:#e8d5ad;text-decoration:none;transition:.18s ease}.play-mode-grid a:hover,.play-mode-grid a:focus-visible{border-color:rgba(237,199,113,.58);background:rgba(151,91,39,.14);transform:translateY(-2px);outline:0}.play-mode-grid b{width:48px;height:48px;display:grid;place-items:center;border-radius:13px;background:#1b100b;color:#e4b85c;font-size:1.3rem}.play-mode-grid span{display:grid;gap:5px}.play-mode-grid strong{font:500 1.2rem Georgia,serif}.play-mode-grid small{color:#9f9078;font-size:.72rem}.play-mode-grid i{font-style:normal;font-size:1.8rem;color:#caa55c}
.options-destinations{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:16px 0 0;padding-top:14px;border-top:1px solid rgba(238,205,132,.12)}.options-destinations>a,.options-destinations>button{min-height:42px;display:flex;align-items:center;justify-content:center;padding:8px 10px;border:1px solid rgba(238,205,132,.15);border-radius:9px;background:rgba(255,255,255,.025);color:#d8c39b;text-decoration:none;font:700 .7rem Arial,sans-serif;cursor:pointer}.options-destinations .friends-action{display:grid}.options-destinations .friends-action small{color:#817562;font-size:.58rem}
.booster-carousel-controls,.collection-mobile-tools{display:none}
.ts-global-rotate-gate{display:none;position:fixed;z-index:20000;inset:0;place-items:center;align-content:center;gap:12px;padding:28px;text-align:center;background:radial-gradient(circle at 50% 35%,rgba(132,73,42,.28),transparent 36%),#0b0706;color:#ead7ad}.ts-global-rotate-gate strong{font:500 1.8rem Georgia,serif}.ts-global-rotate-gate small{color:#9e8e75}.ts-global-rotate-phone{width:54px;height:88px;display:grid;place-items:center;border:2px solid #c69d57;border-radius:10px;animation:tsRotatePhone 1.8s ease-in-out infinite}.ts-global-rotate-phone i{width:5px;height:5px;border-radius:50%;background:#d9b86f}@keyframes tsRotatePhone{40%,70%{transform:rotate(90deg)}100%{transform:rotate(90deg)}}

/* Desktop: the document owns vertical scrolling. */
@media (min-height:621px),(pointer:fine){
  .has-game-navigation .menu-scene{height:auto;min-height:calc(100dvh - var(--game-nav-size));overflow:visible}
  .has-game-navigation .menu-layout{height:auto;min-height:calc(100dvh - var(--game-nav-size));overflow:visible}
  .has-game-navigation .menu-panel{max-height:none;overflow:visible}
  .has-game-navigation .live-shell,.has-game-navigation .launch-shell{overflow:visible}
  .shop-page .live-shell{width:min(1440px,calc(100% - clamp(32px,6vw,112px)))}
  .shop-page #booster-products{grid-template-columns:repeat(auto-fit,minmax(500px,1fr))}
}

/* Smartphone landscape: a dedicated fixed application surface. */
@media (orientation:landscape) and (max-height:620px) and (pointer:coarse){
  html{width:100%;height:100%;overscroll-behavior:none}
  body.game-menu-page,body.live-page,body.deck-builder-page,body.launch-deck-page,body.auth-page{width:100dvw!important;height:100dvh!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;overscroll-behavior:none;touch-action:manipulation}
  .game-navigation{display:none!important}
  .has-game-navigation{padding:0!important}
  .has-game-navigation .live-topbar,.has-game-navigation .deck-topbar,.has-game-navigation .launch-topbar{display:flex!important}

  /* Shared contextual topbar */
  .live-topbar,.deck-topbar,.launch-topbar{position:relative!important;z-index:80;width:100%!important;height:46px!important;min-height:46px!important;margin:0!important;padding:max(5px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 5px max(12px,env(safe-area-inset-left))!important;border-bottom:1px solid rgba(227,185,95,.18)!important;background:rgba(10,7,6,.94)!important;backdrop-filter:blur(12px)}
  .live-topbar,.launch-topbar{display:flex!important;align-items:center;justify-content:space-between;gap:10px}.deck-topbar{display:grid!important;grid-template-columns:1fr auto 1fr!important;align-items:center}
  .live-topbar>img,.deck-topbar>img,.launch-topbar>img{display:block!important;width:132px!important;height:30px!important;object-fit:contain}
  .live-back,.deck-back,.launch-topbar>a{min-height:36px;display:flex;align-items:center;color:#d8c49b;font-size:.66rem!important}.live-nav{gap:8px}.live-nav>a{display:none}.live-wallet{min-height:34px;padding:4px 8px;font-size:.64rem}.live-wallet img,.deck-player .ts-currency img{width:22px;height:22px}.deck-player small{display:none}.deck-player strong{font-size:.68rem}.deck-player .ts-currency{font-size:.6rem}.launch-topbar>div small{font-size:.45rem}.launch-topbar>div strong{font-size:.68rem}

  /* Grand Hall */
  .menu-entry-gate{display:none!important}.menu-entry-locked .menu-scene{visibility:visible!important;pointer-events:auto!important}.has-game-navigation .menu-scene,.menu-scene{height:100dvh!important;min-height:0!important;padding:0!important;overflow:hidden!important}.menu-scene .game-navigation{display:none!important}
  .has-game-navigation .menu-layout,.menu-layout{width:100%!important;height:100dvh!important;min-height:0!important;margin:0!important;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;display:grid!important;grid-template-columns:minmax(175px,31vw) minmax(0,1fr)!important;gap:clamp(10px,2vw,24px)!important;align-items:center!important;overflow:hidden!important}
  .menu-brand{display:grid!important;align-content:center!important;gap:6px!important;min-width:0}.menu-brand .menu-logo{width:min(260px,100%)!important;max-height:76px!important}.menu-brand>span{margin:0!important;font-size:.48rem!important}.menu-brand h2{margin:3px 0!important;font-size:clamp(1rem,3.2vw,1.65rem)!important;line-height:1!important}.menu-brand>p,.menu-brand .menu-trust{display:none!important}
  .has-game-navigation .menu-panel,.menu-panel{width:100%!important;max-width:none!important;height:auto!important;max-height:calc(100dvh - 16px)!important;margin:0!important;padding:10px 12px!important;border-radius:14px!important;overflow:hidden!important}.menu-player{min-height:46px!important;margin-bottom:6px!important;padding:5px 8px!important}.menu-player-avatar,.menu-player>img{width:34px!important;height:34px!important}.menu-player>div>small:first-child{display:none}.menu-player>div>strong{font-size:.75rem!important}.menu-player-meta{font-size:.55rem!important}.menu-player-online{font-size:.47rem!important}.menu-onboarding{margin-bottom:5px!important;padding:5px 8px!important}.menu-onboarding strong{font-size:.7rem!important}.menu-onboarding small{display:none!important}.menu-kicker{display:none!important}.menu-panel>h1{margin:1px 0 6px!important;font-size:1rem!important}
  .hall-actions{gap:6px!important}.hall-duel{min-height:62px!important;padding:7px 11px!important;border-radius:10px!important;grid-template-columns:38px 1fr auto!important}.hall-duel-icon{width:36px!important;height:36px!important}.hall-duel strong{font-size:1.2rem!important;letter-spacing:.1em}.hall-duel em{font-size:.55rem!important}.hall-core-actions{grid-template-columns:repeat(3,1fr)!important;gap:6px!important}.hall-core-action{min-height:54px!important;padding:7px 8px!important;gap:6px!important}.hall-core-action>b{font-size:.9rem!important}.hall-core-action strong{font-size:.7rem!important}.hall-core-action small{font-size:.48rem!important}.hall-secondary-actions{display:block!important}.hall-secondary-actions>*:not(.hall-options){display:none!important}.hall-options{width:100%;min-height:38px;display:flex!important;align-items:center;justify-content:space-between;padding:6px 10px!important}.hall-options span{font-size:.68rem}.hall-options small{font-size:.5rem;color:#837864}.menu-footer{margin-top:6px!important;padding-top:5px!important;font-size:.46rem!important}.menu-footer-actions{display:none!important}
  .play-modes-overlay,.options-overlay,.friends-overlay{padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important}.play-modes-panel{width:min(660px,88vw);padding:18px 22px}.play-modes-panel h2{margin:3px 0 12px;font-size:1.45rem}.play-mode-grid a{min-height:90px;padding:12px}.play-mode-grid b{width:42px;height:42px}.options-panel{width:min(680px,92vw)!important;max-height:calc(100dvh - 16px)!important;padding:15px 20px!important;overflow:auto}.options-panel h2{margin:0 0 8px!important;font-size:1.25rem!important}.option-row{min-height:34px!important;padding:4px 0!important}.options-destinations{grid-template-columns:repeat(5,1fr);margin-top:8px;padding-top:8px}.options-destinations>a,.options-destinations>button{min-height:40px;padding:4px;font-size:.55rem}.options-actions{margin-top:8px!important}

  /* Boutique carousel */
  .shop-page .live-shell{width:100%!important;height:calc(100dvh - 46px)!important;margin:0!important;padding:7px max(12px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;display:grid;grid-template-rows:auto auto minmax(0,1fr);overflow:hidden!important}.shop-page .live-hero{margin:0!important;align-items:center}.shop-page .live-hero h1{font-size:1.45rem!important}.shop-page .live-hero p,.shop-page .booster-shop-promise,.shop-page .booster-shop-heading>p{display:none!important}.shop-page .booster-shop-heading{margin:0!important}.shop-page .booster-shop-heading h2{margin:0!important;font-size:.82rem!important}.shop-page .booster-shop-heading .live-kicker{font-size:.43rem!important;margin:0!important}.booster-carousel-controls{display:flex;position:absolute;z-index:5;right:max(14px,env(safe-area-inset-right));top:53px;align-items:center;gap:8px}.booster-carousel-controls button{width:38px;height:34px;border:1px solid rgba(235,198,115,.3);border-radius:9px;background:#21140e;color:#ecd394;font-size:1.2rem}.booster-carousel-controls span{min-width:42px;text-align:center;color:#bca57a;font-size:.6rem;font-weight:800}
  .shop-page #booster-products{height:100%;min-height:0;display:flex!important;gap:10px;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}.shop-page #booster-products::-webkit-scrollbar{display:none}.shop-page .booster-product{min-width:100%;height:100%;min-height:0!important;scroll-snap-align:center;display:grid!important;grid-template-columns:minmax(120px,27%) minmax(0,1fr)!important;gap:10px!important;padding:9px 12px!important;border-radius:13px!important}.shop-page .booster-product-art{min-height:0!important;height:100%!important}.shop-page .booster-product-art img{width:auto!important;max-width:100%!important;max-height:calc(100dvh - 128px)!important}.shop-page .booster-product-copy{min-width:0;align-self:center}.shop-page .booster-product-copy>.live-kicker{margin:0!important;font-size:.46rem!important}.shop-page .booster-product h2{margin:2px 0!important;font-size:1.1rem!important}.shop-page .booster-product-copy>p{display:none}.shop-page .booster-meta{margin:5px 0!important;gap:5px}.shop-page .live-pill{padding:4px 6px;font-size:.55rem}.shop-page .booster-open-status{margin:5px 0!important;padding:5px 7px!important}.shop-page .booster-open-status strong{font-size:.6rem!important}.shop-page .booster-open-status small{display:none}.shop-page .booster-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:6px!important}.shop-page .live-btn{min-height:38px!important;padding:0 8px!important;font-size:.58rem!important}.shop-page .abyssal-teaser,.shop-page .cosmetics-shop,.shop-page .live-shell>.live-card:last-child{display:none!important}.shop-page .live-message{position:fixed;z-index:90;left:50%;top:52px;transform:translateX(-50%);margin:0;max-width:70vw;padding:7px 10px;font-size:.62rem}

  /* Collection: only the card grid scrolls; tools become drawers. */
  .deck-builder-page .deck-shell{position:relative;width:100%!important;height:calc(100dvh - 46px)!important;min-height:0!important;margin:0!important;padding:44px max(8px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;display:block!important;overflow:hidden!important}.collection-mobile-tools{position:absolute;z-index:30;inset:5px max(8px,env(safe-area-inset-right)) auto max(8px,env(safe-area-inset-left));height:34px;display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}.collection-mobile-tools button{border:1px solid rgba(231,195,118,.22);border-radius:8px;background:#20130e;color:#d7c29a;font-size:.58rem;font-weight:800}.collection-mobile-tools b{color:#efd078}.deck-workspace{height:100%!important;padding:7px!important;border-radius:11px!important;overflow:hidden!important;display:grid;grid-template-rows:auto minmax(0,1fr)}.deck-editor-head{min-height:40px!important;margin:0 0 5px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important}.deck-title-fields{display:grid!important;grid-template-columns:minmax(130px,1fr) minmax(120px,.8fr)!important;gap:5px!important}.deck-title-fields label span{display:none}.deck-title-fields input,.deck-title-fields select{height:34px!important;min-height:34px!important;padding:0 8px!important;font-size:.58rem!important}.deck-editor-actions{display:flex!important;gap:5px!important}.deck-counter{height:34px!important}.deck-btn{height:34px!important;min-height:34px!important;padding:0 8px!important;font-size:.54rem!important}.deck-content-grid{height:100%;min-height:0;display:block!important}.deck-library-panel{height:100%;min-height:0;padding:5px!important;border-radius:9px!important;overflow:hidden!important}.deck-library-toolbar{position:fixed;z-index:120;left:max(12px,env(safe-area-inset-left));top:54px;width:min(330px,64vw);max-height:calc(100dvh - 66px);display:none!important;grid-template-columns:1fr!important;padding:12px;border:1px solid rgba(233,199,123,.3);border-radius:12px;background:#1b100c;box-shadow:0 25px 70px #000}.collection-panel-filters .deck-library-toolbar{display:grid!important}.deck-card-grid{height:100%!important;max-height:none!important;grid-template-columns:repeat(auto-fill,minmax(92px,1fr))!important;gap:6px!important;padding-right:2px;overflow-y:auto!important;overscroll-behavior:contain}.deck-card-tile{min-width:0}.deck-card-info{padding:4px!important}.deck-card-info strong{font-size:.55rem!important}.deck-card-info span{font-size:.43rem!important}.deck-card-add{min-height:29px!important;font-size:.48rem!important}
  .deck-sidebar,.deck-current-panel{position:fixed!important;z-index:120;top:54px;bottom:8px;width:min(340px,68vw);height:auto!important;min-height:0!important;margin:0!important;padding:12px!important;overflow-y:auto!important;border-radius:12px!important;box-shadow:0 25px 70px #000;transition:transform .18s ease}.deck-sidebar{left:max(8px,env(safe-area-inset-left));transform:translateX(calc(-100% - 24px))}.deck-current-panel{right:max(8px,env(safe-area-inset-right));transform:translateX(calc(100% + 24px))}.collection-panel-decks .deck-sidebar,.collection-panel-current .deck-current-panel{transform:translateX(0)}.collection-panel-backdrop{position:fixed;z-index:110;inset:46px 0 0;border:0;background:rgba(3,2,2,.72)}.deck-sidebar .deck-list{display:grid!important;overflow:visible!important}.deck-sidebar .deck-list-item{min-width:0!important}.deck-rules{display:none!important}.deck-current-panel .deck-composition{max-height:none!important}.deck-loading{z-index:200!important}

  /* Deck selection: deck cards are immediately selectable without page scroll. */
  .launch-deck-page .launch-shell{width:100%!important;height:calc(100dvh - 46px)!important;min-height:0!important;margin:0!important;padding:7px max(10px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));grid-template-rows:auto minmax(0,1fr);gap:6px 10px;overflow:hidden!important}.launch-heading{grid-column:1/-1;max-width:none!important;margin:0!important;text-align:left!important}.launch-heading>span{display:none}.launch-heading h1{display:inline;margin:0 8px 0 0!important;font-size:1.15rem!important}.launch-heading p{display:inline;font-size:.55rem!important}.launch-alert{grid-column:1/-1;margin:0!important;padding:5px 8px!important;font-size:.56rem}.launch-section{min-height:0;margin:0!important;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}.launch-section-title{min-height:30px;margin:0 0 4px!important;display:flex!important;flex-direction:row!important;align-items:center!important}.launch-section-title span{font-size:.4rem!important}.launch-section-title h2{margin:1px 0!important;font-size:.72rem!important}.launch-section-title>a,.launch-section-title>small{font-size:.48rem!important}.launch-grid{min-height:0;display:flex!important;gap:7px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory;scrollbar-width:none}.launch-deck-card{min-width:min(310px,90%);height:100%;min-height:0!important;padding:9px!important;grid-template-columns:38px 1fr!important;gap:5px 8px!important;border-radius:10px!important;scroll-snap-align:start}.launch-crown{width:38px!important;height:38px!important;padding:5px!important}.launch-deck-copy>span{font-size:.42rem!important}.launch-deck-copy h3{margin:2px 0!important;font-size:.78rem!important}.launch-deck-copy p,.launch-deck-copy small{font-size:.48rem!important}.launch-deck-card button,.launch-fix{height:34px!important;font-size:.54rem!important}.launch-universal-choice{margin:0 0 4px!important;grid-template-columns:auto 1fr;align-items:center}.launch-universal-choice span{font-size:.45rem}.launch-universal-choice select{min-height:30px!important;padding:3px 6px!important;font-size:.55rem}.launch-empty{min-height:0!important;height:100%;font-size:.55rem}

  /* Profile and quests: contextual content viewport, never document scroll. */
  body.live-page:not(.shop-page) .live-shell{width:100%!important;height:calc(100dvh - 46px)!important;margin:0!important;padding:8px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;overflow-y:auto!important;overscroll-behavior:contain}.live-page:not(.shop-page) .live-hero{margin-bottom:8px}.live-page:not(.shop-page) .live-hero h1{font-size:1.45rem}.live-page:not(.shop-page) .live-hero p{display:none}.live-page:not(.shop-page) .live-card{padding:12px;border-radius:13px}.profile-grid{grid-template-columns:minmax(190px,.7fr) 1fr!important;gap:8px!important}.profile-avatar{width:64px!important;height:64px!important;margin-bottom:5px!important}.profile-level{font-size:1.5rem!important}.stat-tile{padding:8px!important}.quest-list{gap:6px!important}.quest{padding:8px 10px!important}.quest h3{font-size:.75rem}.quest p{font-size:.55rem}

  /* Authentication is a compact game screen. */
  .auth-shell{width:100%!important;height:100dvh!important;min-height:0!important;margin:0!important;padding:max(18px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))!important;display:grid!important;grid-template-columns:minmax(190px,34%) minmax(0,1fr)!important;gap:clamp(12px,3vw,34px)!important;align-items:center!important;overflow:hidden}.auth-back{top:max(5px,env(safe-area-inset-top))!important;left:max(8px,env(safe-area-inset-left))!important;font-size:.52rem!important}.auth-brand{text-align:left!important}.auth-brand>img{width:min(260px,100%)!important;max-height:70px!important;object-position:left!important}.auth-brand>span{margin-top:7px!important;font-size:.45rem!important}.auth-brand h1{margin-top:5px!important;font-size:clamp(1.45rem,4.2vw,2.35rem)!important}.auth-brand>p{margin-top:8px!important;font-size:.65rem!important;line-height:1.35!important}.auth-trust{display:none!important}.auth-card{max-height:calc(100dvh - 24px);padding:10px 14px!important;border-radius:14px!important;overflow-y:auto;overscroll-behavior:contain}.auth-tabs{padding:3px!important}.auth-tabs button{min-height:34px!important;font-size:.55rem!important}.auth-message{margin-top:6px!important;padding:5px 8px!important;font-size:.58rem!important}.auth-form{gap:6px!important;margin-top:7px!important}.auth-form-heading span{font-size:.42rem!important}.auth-form-heading h2{margin:2px 0!important;font-size:.9rem!important}.auth-form label{gap:3px!important}.auth-form label>span{font-size:.5rem!important}.auth-form input[type=text],.auth-form input[type=email],.auth-form input[type=password]{height:34px!important;padding:0 8px!important;font-size:.64rem!important}.auth-submit{height:36px!important;margin:0!important;font-size:.56rem!important}.auth-divider{margin:6px 0!important}.auth-prism{min-height:40px!important;padding:5px 9px!important;grid-template-columns:30px 1fr!important}.auth-prism-mark{width:25px!important;height:25px!important;grid-row:1/3}.auth-prism strong{font-size:.62rem!important}.auth-prism small{font-size:.5rem!important}.auth-footnote{display:none!important}.auth-fields-two{gap:6px!important}.auth-check span{font-size:.45rem!important;line-height:1.2!important}
}

@media (orientation:portrait) and (pointer:coarse){
  .ts-global-rotate-gate{display:grid!important}
}

@media (prefers-reduced-motion:reduce){
  .play-mode-grid a,.deck-sidebar,.deck-current-panel{transition:none}
}

/* =====================================================================
   THRONESHARD 0.2.28-rc.3 — paysage mobile : chrome minimale et drawers
   ===================================================================== */
@media (orientation:landscape) and (max-height:620px) and (pointer:coarse){
  :root{--ts-context-bar:38px}

  /* Les écrans secondaires gardent uniquement le retour et le contexte joueur. */
  .live-topbar,.deck-topbar,.launch-topbar{height:var(--ts-context-bar)!important;min-height:var(--ts-context-bar)!important;padding:max(3px,env(safe-area-inset-top)) max(9px,env(safe-area-inset-right)) 3px max(9px,env(safe-area-inset-left))!important}
  .live-topbar>img,.deck-topbar>img,.launch-topbar>img{display:none!important}
  .live-topbar,.deck-topbar,.launch-topbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
  .live-back,.deck-back,.launch-topbar>a{flex:0 0 auto!important;width:31px!important;height:31px!important;min-height:31px!important;padding:0!important;display:grid!important;place-items:center!important;border:1px solid rgba(231,195,118,.2)!important;border-radius:50%!important;background:rgba(34,21,15,.82)!important;font-size:1rem!important;line-height:1!important;text-decoration:none!important}
  .deck-player{margin-left:auto!important;min-width:0!important;display:flex!important;align-items:center!important;gap:7px!important;text-align:right!important}
  .deck-player strong{display:block!important;min-width:0!important;max-width:32vw!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;line-height:1.05!important}

  /* Identité du Grand Hall : centrage vertical et aucun débordement du pseudo. */
  .menu-player{grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important}
  .menu-player>div{min-width:0!important;align-self:center!important;display:grid!important;align-content:center!important;gap:1px!important}
  .menu-player>div>strong{display:block!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;line-height:1.08!important}
  .menu-player-meta{min-width:0!important;align-items:center!important;white-space:nowrap!important;line-height:1.05!important}
  .menu-player-online{align-self:center!important;white-space:nowrap!important}
  .menu-brand .menu-logo{width:min(155px,92%)!important;max-height:48px!important;justify-self:start!important}

  /* Tous les shells contextuels utilisent la nouvelle barre de 38 px. */
  .shop-page .live-shell,.deck-builder-page .deck-shell,.launch-deck-page .launch-shell,body.live-page:not(.shop-page) .live-shell{height:calc(100dvh - var(--ts-context-bar))!important}

  /* Collection : la grille reste le seul scroll permanent. */
  .deck-builder-page .deck-shell{padding:44px max(8px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important}
  .collection-library-heading{height:30px;padding:0 3px 4px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(233,202,133,.07)}
  .collection-library-heading h2{margin:0;color:#e6d2a4;font-size:.72rem}
  .collection-library-heading small{display:none}
  .deck-library-panel{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important}
  .deck-card-grid{min-height:0!important}
  .deck-card-tile.is-inspected{border-color:rgba(246,207,119,.6)!important;box-shadow:0 0 0 1px rgba(246,207,119,.16)!important}

  /* Un même rail physique sert aux deux tiroirs, mais sans mélanger leurs contenus. */
  .deck-sidebar,.deck-current-panel{top:calc(var(--ts-context-bar) + 8px)!important}
  .collection-panel-backdrop{inset:var(--ts-context-bar) 0 0!important}
  .collection-panel-filters .deck-sidebar{transform:translateX(0)!important}
  .collection-panel-filters .collection-decks-block{display:none!important}
  .collection-panel-decks .collection-filter-block{display:none!important}
  .collection-filter-block{border:0!important;padding:0!important}
  .collection-filter-block .collection-rail-heading{margin:0 0 8px!important}
  .collection-filter-block .deck-library-toolbar{position:static!important;left:auto!important;top:auto!important;width:100%!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;grid-template-columns:1fr!important;gap:7px!important}
  .collection-panel-filters .collection-filter-block .deck-library-toolbar{display:grid!important}
  .collection-side-inspector{display:none!important}
  .collection-deck-summary{display:block!important;padding:0!important;border:0!important}

  /* Connexion : véritable panneau application, sans scroll de page ni du formulaire. */
  .auth-card{max-height:calc(100dvh - 16px)!important;overflow:hidden!important;padding:8px 12px!important}
  .auth-form{gap:4px!important;margin-top:5px!important}
  .auth-form-heading p,.auth-card>p:not(.auth-message){display:none!important}
  .auth-form input[type=text],.auth-form input[type=email],.auth-form input[type=password]{height:31px!important}
  .auth-submit{height:33px!important}
  .auth-prism{min-height:36px!important}
}

@media (orientation:landscape) and (max-height:390px) and (pointer:coarse){
  .auth-brand>p{display:none!important}
  .auth-brand>img{max-height:48px!important}
  .auth-brand h1{font-size:1.3rem!important}
  .auth-tabs button{min-height:30px!important}
  .auth-form label>span{display:none!important}
  .auth-form input[type=text],.auth-form input[type=email],.auth-form input[type=password]{height:29px!important}
  .menu-brand .menu-logo{width:125px!important;max-height:38px!important}
}

/* 0.2.28-rc.3 — retour contextuel minimal sur les écrans où il est autorisé. */
a[aria-label="Retour au Grand Hall"]{display:inline-grid;place-items:center;width:36px;height:36px;min-width:36px;padding:0;border:1px solid rgba(232,199,128,.18);border-radius:50%;background:rgba(31,20,15,.62);color:#d8c49b;text-decoration:none;font:700 1.1rem/1 Georgia,serif}
a[aria-label="Retour au Grand Hall"]:hover,a[aria-label="Retour au Grand Hall"]:focus-visible{border-color:rgba(239,207,137,.48);background:rgba(65,39,24,.72);outline:none}
