/* A fixed 16:9 game screen, scaled as one surface instead of reflowing like a page. */
body:has(#game-screen:not([hidden])){width:100vw;height:100dvh;overflow:hidden;background:#0b1420}
#game-screen.app-shell{position:fixed;left:0;top:0;width:1600px;height:900px;max-width:none;margin:0;padding:8px 10px;overflow:hidden;transform-origin:top left}
#game-screen>.masthead{display:none}
#game-screen>main{display:flex;flex:none;flex-direction:column;justify-content:flex-start;width:1580px;height:884px;min-height:0;overflow:hidden}
#game-screen .location-heading{width:100%;height:54px;min-height:54px;flex:none;padding:4px 5px}
#game-screen .location-heading .eyebrow{margin-bottom:2px;font-size:8px}
#game-screen .location-heading h1{font-size:20px}
#game-screen .world-status{gap:9px;font-size:12px}
#game-screen #sound{display:block;flex:none;width:31px;height:31px;margin-left:14px;font-size:18px}
#game-screen .hud-menu{height:30px;padding:0 10px;font-size:11px}
#game-screen .game-layout{display:grid;width:100%;height:830px;min-height:0;max-height:none;flex:none;grid-template-columns:300px minmax(0,1fr) 420px;grid-template-rows:minmax(0,1fr);gap:15px;align-items:stretch;padding:0}
#game-screen .left-column,#game-screen .center-column,#game-screen .right-column{display:flex;grid-column:auto;grid-row:auto;order:initial;min-width:0;min-height:0}
#game-screen .left-column{flex-direction:column;justify-content:space-between;gap:10px}
#game-screen .bag-panel{display:flex;flex:1;flex-direction:column;min-height:0;margin:0;padding:12px 11px;overflow:hidden;background:linear-gradient(140deg,#1b2a37,#121e2a);border-color:#405563}
#game-screen .bag-panel>.section-title{height:22px;margin:0 2px 7px;color:#d6c188}
#game-screen .bag-panel>.section-title span:last-child{font:8px Arial,sans-serif;letter-spacing:1px}
#game-screen .bag-category{display:flex;flex:none;flex-direction:column;min-height:0;border-top:1px solid #425460}
#game-screen .bag-category:not(.open)>.bag-inventory{display:none}
#game-screen .bag-category.open{flex:1;overflow:hidden}
#game-screen .bag-category:last-child{border-bottom:1px solid #425460}
#game-screen .bag-category-toggle{width:100%;height:34px;min-height:34px;display:flex;align-items:center;justify-content:space-between;padding:0;color:#d6d9cf;text-align:left;font:11px Arial,sans-serif;letter-spacing:.4px}
#game-screen .bag-category-toggle:before{content:'+';width:17px;color:#d5b66e;font:17px Georgia,serif}
#game-screen .bag-category.open>.bag-category-toggle:before{content:'−'}
#game-screen .bag-category-count{margin-left:auto;color:#98aeb4;font:9px Arial,sans-serif}
#game-screen .bag-inventory{display:grid;flex:1 1 0;height:auto;min-height:0;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:58px;align-content:start;gap:4px;margin:0;padding:5px 4px 8px;overflow-x:hidden;overflow-y:scroll;overscroll-behavior:contain;scrollbar-width:auto;scrollbar-color:#b59c61 #101b26}
#game-screen .bag-inventory .item{height:58px;min-width:0;margin:0;border-color:#425461;background:#0e1824}
#game-screen .bag-inventory::-webkit-scrollbar{width:14px}
#game-screen .bag-inventory::-webkit-scrollbar-track{background:#101b26}
#game-screen .bag-inventory::-webkit-scrollbar-thumb{background:#b59c61;border:3px solid #101b26;border-radius:5px}
#game-screen .bag-inventory .item:not(.empty):hover{border-color:#d2b971;background:#243340}
#game-screen .bag-inventory .item small{bottom:3px;right:4px;min-width:14px;padding:2px 3px;background:#101923dc;text-align:center;color:#f1d78d;font-size:9px}
#game-screen .bag-inventory .item-icon{width:19px;height:25px;border-width:2px;border-color:#d0c7a0;background:linear-gradient(0deg,#a9524b 0 70%,#24343b 70%);border-radius:4px 4px 6px 6px;box-shadow:inset 3px 0 #ffffff18}
#game-screen .bag-inventory .item-icon:before{content:'';position:absolute;width:7px;height:7px;left:4px;top:-8px;background:#b8b49a;border-top:2px solid #88785a}
#game-screen .bag-inventory .item-icon.ether{border-color:#a9d2d5;background:linear-gradient(0deg,#528597 0 70%,#22343d 70%)}
#game-screen .bag-inventory .item-key{font-size:28px;color:#dfc77e}
#game-screen .bag-inventory .item-relic{font-size:31px;color:#bba0ed}
#game-screen .bag-inventory .item-ration{font-size:25px;color:#e0b077}
#game-screen .bag-inventory .item-gold{font-size:27px;color:#e8c765}
#game-screen .bag-object-icon{font:29px Georgia,'Segoe UI Symbol',serif;color:var(--item-color,#c7b88b);text-shadow:0 0 9px color-mix(in srgb,var(--item-color,#c7b88b) 35%,transparent)}
#game-screen .bag-inventory [data-bag-item].empty .bag-object-icon{opacity:.18}
#game-screen .bag-inventory .item.empty{border-style:dashed;background:#111b26;color:#475866}
#game-screen .bag-inventory .item.empty:before,#game-screen .bag-inventory .item.empty:after{display:none}
#game-screen .bag-inventory [data-bag-item].empty>span:not(.sr-only){opacity:.18}
#game-screen .bag-inventory [data-bag-item].empty small{display:none}
#game-screen .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#game-screen .map-panel{flex:none;width:100%;margin:0;padding:11px 12px;background:linear-gradient(140deg,#1b2a37,#121e2a);border-color:#405563}
#game-screen .map-panel .section-title{height:23px;margin:0 2px 7px}
#game-screen .map-panel .section-title button{color:#d4c38d}
#game-screen .map-trigger{width:100%;padding:0}
#game-screen .map-trigger canvas{width:100%;height:auto;aspect-ratio:1;image-rendering:pixelated}
#game-screen .map-caption{margin-top:8px;font-size:10px}
#game-screen .resources{display:none}
#game-screen .center-column{flex-direction:column;justify-content:space-between;gap:0}
#game-screen .scene-frame{flex:none;align-self:center;width:100%;height:auto;max-height:none;min-height:0;aspect-ratio:1.6}
#game-screen .scene-frame #scene{position:absolute;inset:5px;width:calc(100% - 10px);height:calc(100% - 10px);min-height:0;object-fit:contain}
#game-screen .action-bar{width:100%;height:78px;min-height:78px;flex:none;gap:14px;padding:5px 3px}
#game-screen .action-bar .movement button{width:31px;height:26px;font-size:20px}
#game-screen .action-bar .movement{flex:none}
#game-screen .action-bar .movement-label{display:block;min-width:150px}
#game-screen .utility-actions{gap:8px}
#game-screen .utility-actions button{padding:9px 10px;font-size:11px}
#game-screen .log-panel{display:block;width:100%;height:145px;min-height:145px;flex:none;padding:11px 14px;background:#101b26;border-color:#3d5664}
#game-screen .log-panel .section-title{height:23px;margin:0 0 8px;padding-bottom:7px;border-bottom:1px solid #344754;color:#a9cdca}
#game-screen .log-panel #event-log{height:88px;max-height:88px;overflow:auto}
#game-screen .right-column{flex-direction:column;gap:8px;overflow:hidden}
#game-screen .party-heading{height:34px;min-height:34px;margin:0;padding:8px 10px;background:#1b2a37;border:1px solid #405a68;color:#c7dadd}
#game-screen .party{display:grid;flex:1;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:9px}
#game-screen .hero{display:flex;flex-direction:column;min-width:0;min-height:0;gap:0;padding:7px;background:linear-gradient(140deg,#1c2c39,#14212d);border:1px solid #405462;overflow:hidden}
#game-screen .hero-select{position:relative;inset:auto;display:grid;width:100%;flex:none;grid-template-columns:minmax(0,1fr);grid-template-rows:175px auto auto;gap:0;padding:0}
#game-screen .portrait-wrap{position:relative;inset:auto;display:grid;width:100%;height:175px;grid-column:1;grid-row:1;place-items:center;align-self:stretch;padding:3px;border-color:#536d75;background:#111b26;opacity:1}
#game-screen .portrait-wrap img,#game-screen .portrait-wrap canvas{display:block;width:100%;height:100%;aspect-ratio:1;object-fit:contain;image-rendering:pixelated;opacity:1;filter:none}
#game-screen .hero.fallen .portrait-wrap img,#game-screen .hero.fallen .portrait-wrap canvas{filter:grayscale(1);opacity:.55}
#game-screen .hero-number{z-index:2}
#game-screen .hero-name{grid-column:1;grid-row:2;margin:5px 0 0;padding:0;font-size:15px}
#game-screen .hero-name span{font-size:15px;text-shadow:none}
#game-screen .hero-role{position:static;grid-column:1;grid-row:3;align-self:auto;margin:2px 0 5px;font-size:10px}
#game-screen .hero .stat{position:static;inset:auto;flex:none;margin:4px 0 0}
#game-screen .hero .mana{display:block}
#game-screen .hero .stat-line{font-size:9px}
#game-screen .hero .stat-bar{height:4px}
#game-screen .hero-actions{position:relative;inset:auto;display:flex;gap:5px;margin-top:auto;padding-top:7px}
#game-screen .hero-actions button{width:50%;height:30px;background:#263947;border-color:#536d75}
#game-screen .experience{flex:none;height:36px;margin:0;padding:7px 9px;background:#1b2a37;border:1px solid #405a68}
#game-screen .experience>span{font-size:8px}
#game-screen .inventory-open{display:none}
#game-screen .hero-sheet-open{position:absolute;z-index:5;top:10px;right:10px;display:grid;place-items:center;width:27px;height:27px;padding:0;border:1px solid #8aa6ad;background:#172632eF;color:#e2d3a6;font-size:15px;line-height:1}
#game-screen .hero-sheet-open:hover,#game-screen .hero-sheet-open:focus-visible{background:#344b56;color:#fff0bd;border-color:#e1c78a}
#game-screen .party-heading #character-sheet-close{border:1px solid #536d75;padding:4px 6px;color:#d6d9c8;font:8px Arial,sans-serif;letter-spacing:.6px}
#game-screen .character-sheet{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;overflow:hidden;border:1px solid #405462;background:linear-gradient(145deg,#1d3040,#111c29)}
#game-screen .character-sheet-nav{display:grid;grid-template-columns:42px 28px minmax(0,1fr) 28px;align-items:center;gap:5px;min-height:53px;padding:5px 7px;border-bottom:1px solid #405462}
#game-screen .character-sheet-portrait{width:40px;height:43px;overflow:hidden;border:1px solid #657a7d;background:#101b26}
#game-screen .character-sheet-portrait img{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
#game-screen .character-sheet-nav>button{width:28px;height:28px;border:1px solid #536d75;background:#233744;color:#dfd2aa;font-size:20px;line-height:20px}
#game-screen .character-sheet-nav>div{min-width:0;text-align:center;display:grid;gap:2px}
#game-screen .character-sheet-nav strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:400;color:#eee3c5}
#game-screen .character-sheet-nav span{font:8px Arial,sans-serif;letter-spacing:.7px;color:#aab9b5}
#game-screen .character-sheet-scroll{min-height:0;overflow:auto;padding:9px 10px 12px;scrollbar-color:#536d75 #172632;scrollbar-width:thin}
#game-screen .character-sheet-level{display:grid;grid-template-columns:1fr auto;gap:4px 8px;font:9px Arial,sans-serif;letter-spacing:.5px;color:#c6d0c7}
#game-screen .character-sheet-level>span{color:#e1c78a}
#game-screen .character-sheet-level strong{font-weight:400}
#game-screen .character-sheet-xp{grid-column:1/3;height:4px;background:#34434a}
#game-screen .character-sheet-xp i{display:block;height:100%;background:#c0a96f}
#game-screen .character-sheet-level small{grid-column:1/3;color:#91a49e;font-size:8px;letter-spacing:0}
#game-screen .character-sheet-resources{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0;padding:8px 0;border-top:1px solid #344b56;border-bottom:1px solid #344b56}
#game-screen .character-sheet-resources>div{display:grid;grid-template-columns:1fr auto;gap:5px;font:8px Arial,sans-serif;color:#a9b8b2}
#game-screen .character-sheet-resources strong{font-weight:400;color:#e1e2ce}
#game-screen .character-sheet-resources i{grid-column:1/3;height:4px;background:#263944}
#game-screen .character-sheet-resources i b{display:block;height:100%;background:#789777}
#game-screen .character-sheet-resources>div+div i b{background:#6b9ba7}
#game-screen .character-sheet-stats h3,#game-screen .character-sheet-skill h3,#game-screen .character-sheet-equipment h3,#game-screen .character-sheet-spells h3{margin:9px 0 4px;color:#d6c38e;font:8px Arial,sans-serif;letter-spacing:1px}
#game-screen .character-sheet-stats>div{display:flex;justify-content:space-between;padding:3px 1px;border-bottom:1px solid #263b47;font-size:10px;color:#c2cbc2}
#game-screen .character-sheet-stats strong{font-weight:400;color:#e1ddc3}
#game-screen .character-sheet-skill strong{font-size:10px;font-weight:400;color:#d8e0d2}
#game-screen .character-sheet-skill p,#game-screen .character-sheet-equipment p,#game-screen .character-sheet-spells p{margin:4px 0 8px;color:#94a69e;font-size:9px;line-height:1.4}
#game-screen .item-detail-window{position:absolute;z-index:30;width:330px;max-height:460px;overflow:auto;border:1px solid #879194;background:linear-gradient(145deg,#263845f5,#101a24f8);box-shadow:0 14px 42px #000b;scrollbar-color:#718087 #14222c;scrollbar-width:thin}
#game-screen .item-detail-window-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;height:31px;padding:0 9px;background:#1a2a36;border-bottom:1px solid #536772;color:#cabb8c;font:8px Arial,sans-serif;letter-spacing:1.4px}
#game-screen .item-detail-window-head button{width:25px;height:25px;color:#d8d9ce;font:20px Arial,sans-serif;line-height:20px}
#game-screen .item-detail-window .item-detail{padding:12px 15px 15px}
#game-screen .item-detail-window .item-detail-icon{width:58px;height:58px;margin:0 auto 9px}
#game-screen .item-detail-window .item-detail-icon img{width:44px;height:44px}
#game-screen .item-detail-window .item-detail-heading h2{font-size:19px}
#game-screen .item-detail-window .item-detail p{font-size:11px;line-height:1.45}
#game-screen .item-detail-window .item-detail h3{margin:12px 0 4px!important}
#game-screen .item-detail-window .item-detail-pending{padding:7px;font-size:9px!important}
#game-screen .item-detail-window .primary-button{padding:9px 10px;font-size:11px}
#game-screen .item-detail-window .item-detail-target{display:flex;justify-content:space-between;gap:8px;margin:10px 0;padding:7px 8px;border:1px solid #405a68;background:#15232d;color:#a9bdc0;font:8px Arial,sans-serif;letter-spacing:.8px}
#game-screen .item-detail-window .item-detail-target strong{color:#ead9a5;font:12px Georgia,serif;letter-spacing:0}
#game-screen .item-detail-window .item-equip-choice{margin:8px 0;padding-top:7px;border-top:1px solid #435664}
#game-screen .item-detail-window .item-equip-choice>span{display:block;margin-bottom:5px;color:#c7d0cb;font:9px Arial,sans-serif}
#game-screen .item-detail-window .item-equip-choice small{display:block;margin-top:4px;color:#d59a86;font:9px Arial,sans-serif}
#game-screen .character-sheet-equipment>div{display:flex;justify-content:space-between;gap:8px;padding:4px 1px;border-bottom:1px solid #263b47;color:#aebbb5;font-size:9px}
#game-screen .character-sheet-equipment>div strong{font-weight:400;color:#e1ddc3;text-align:right}
#game-screen .character-sheet-equipment .character-equipment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:6px 0 8px}
#game-screen .character-sheet-equipment .character-equipment-slot{min-width:0;min-height:46px;display:flex;align-items:center;gap:6px;padding:4px;border:1px solid #344b56;background:linear-gradient(145deg,#1d303a,#15232c);color:#94a69e}
#game-screen .character-sheet-equipment .character-equipment-slot.filled{border-color:#6a684f;background:linear-gradient(145deg,#353a30,#1c2b30)}
#game-screen .character-equipment-slot-icon{width:30px;height:32px;flex:0 0 30px;display:flex;align-items:center;justify-content:center;border:1px solid #475c62;background:#101c24;overflow:hidden}
#game-screen .character-equipment-slot-icon .bag-item-image{display:block;width:25px;height:25px;max-width:calc(100% - 3px);max-height:calc(100% - 3px);object-fit:contain;pointer-events:none}
#game-screen .character-equipment-slot-icon .bag-object-icon{font-size:20px;color:var(--item-color)}
#game-screen .character-equipment-slot-copy{min-width:0;display:grid;gap:3px}
#game-screen .character-equipment-slot-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#b9a976;font:7px Arial,sans-serif;letter-spacing:.35px}
#game-screen .character-equipment-slot-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d8ded3;font:8px Arial,sans-serif;font-weight:400}
#game-screen .empty-equipment-mark{color:#65757a;font-size:18px;line-height:1}
#game-screen .two-hand-mark{color:#dfc47e;font-size:17px;line-height:1}#game-screen .hero-actions button .bag-item-image{display:block;width:16px;height:16px;max-width:calc(100% - 2px);max-height:calc(100% - 2px);object-fit:contain;pointer-events:none}/* Lisibilité renforcée de la fiche personnage */
#game-screen .character-sheet-nav{grid-template-columns:46px 30px minmax(0,1fr) 30px;gap:6px;min-height:58px;padding:6px 8px}
#game-screen .character-sheet-portrait{width:44px;height:47px}
#game-screen .character-sheet-nav>button{width:30px;height:30px}
#game-screen .character-sheet-nav strong{font-size:16px}
#game-screen .character-sheet-nav span{font-size:10px;letter-spacing:.3px}
#game-screen .character-sheet-scroll{padding:11px 12px 14px}
#game-screen .character-sheet-level{font-size:12px;letter-spacing:.2px;gap:5px 8px}
#game-screen .character-sheet-level small{font-size:10px;line-height:1.4}
#game-screen .character-sheet-xp{height:5px}
#game-screen .character-sheet-resources{gap:9px;margin:12px 0;padding:10px 0}
#game-screen .character-sheet-resources>div{font-size:11px;gap:6px}
#game-screen .character-sheet-resources i{height:5px}
#game-screen .character-sheet-stats h3,#game-screen .character-sheet-skill h3,#game-screen .character-sheet-equipment h3,#game-screen .character-sheet-spells h3{margin:12px 0 6px;font-size:11px;letter-spacing:1.1px}
#game-screen .character-sheet-stats>div{padding:5px 2px;font-size:12px}
#game-screen .character-sheet-skill strong{font-size:12px}
#game-screen .character-sheet-skill p,#game-screen .character-sheet-equipment p,#game-screen .character-sheet-spells p{margin:6px 0 10px;font-size:11px;line-height:1.5}
#game-screen .character-sheet-equipment .character-equipment-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:7px 0 10px}
#game-screen .character-sheet-equipment .character-equipment-slot{min-height:50px;gap:7px;padding:5px}
#game-screen .character-equipment-slot-icon{width:34px;height:36px;flex-basis:34px}
#game-screen .character-equipment-slot-icon .bag-item-image{width:29px;height:29px}
#game-screen .character-equipment-slot-copy small{font-size:9px;letter-spacing:.2px}
#game-screen .character-equipment-slot-copy strong{font-size:10px;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.15}#game-screen .character-sheet-scroll{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:auto;scrollbar-color:#b7a56c #182a35;scrollbar-gutter:stable;padding-right:14px}
#game-screen .character-sheet-scroll::-webkit-scrollbar{width:12px}
#game-screen .character-sheet-scroll::-webkit-scrollbar-track{background:#182a35;border-left:1px solid #405462}
#game-screen .character-sheet-scroll::-webkit-scrollbar-thumb{min-height:38px;border:2px solid #182a35;background:#b7a56c;border-radius:6px}
#game-screen .character-sheet-scroll::-webkit-scrollbar-thumb:hover{background:#e0c784}