/* Last layer: one safe rectangle, readable type and explicit content pages. */
html,body{height:100%;margin:0;overflow:hidden!important;overscroll-behavior:none}
body{padding:0!important}
.screen:not([hidden]){position:fixed;top:var(--app-top);left:var(--app-left);width:var(--app-width);height:var(--app-height);min-height:0;margin:0;padding:0 8px 6px!important;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;gap:6px}
.fit-originals[hidden]{display:none!important}
.shell-header{flex:0 0 auto;min-height:46px;padding:0!important;gap:6px;flex-wrap:nowrap!important}
.shell-header button{min-height:44px;padding:4px 8px;font-size:12px;white-space:nowrap}
.shell-header>.wordmark{margin-right:auto;min-width:24px}
.shell-header>.wordmark [data-project-title],.shell-header>span,.shell-header .language-picker>span{display:none}
.shell-header .language-picker{margin:0;min-width:0}
.shell-header select{min-width:72px;width:72px;min-height:44px;padding:4px}
.fit-tabs{display:flex;flex:0 0 44px;gap:4px;min-height:44px}
.fit-tabs>button{flex:1;min-width:0;min-height:44px;padding:4px;font-size:13px}
.fit-tabs>[aria-selected=true]{background:var(--ink,#17221d);color:var(--paper,#e9ece9)}
.fit-identity{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;flex:0 0 44px;font-size:12px}
.fit-identity input{min-height:44px;width:100%;margin:0}
.fit-screen-body{flex:1 1 0;min-height:0;width:100%;max-width:920px;align-self:center}
.fit-screen-body .fit-pager-content>*{margin-top:0;margin-bottom:8px}
.fit-screen-body button,.fit-screen-body input,.fit-screen-body select{min-height:44px}
.fit-screen-body h1{font-size:26px;margin:8px 0}.fit-screen-body h2{font-size:20px;margin:4px 0}
.fit-screen-body p{font-size:14px;line-height:1.4;margin:4px 0 8px}
.fit-screen-body .mode-picker,.fit-screen-body .map-select-group,.fit-screen-body .difficulty-group{padding:8px;margin:0;max-height:none}
.fit-screen-body .mode-options label{min-height:76px;padding:8px}.fit-screen-body .mode-options span{font-size:12px}
.fit-screen-body .source-strip{max-height:140px}.fit-screen-body .source-strip img{height:80px;width:auto}
.fit-screen-body .room-list{max-height:none;overflow:visible}
.lobby-title{flex:0 0 auto;padding:0!important;margin:0!important}.lobby-title h1{font-size:20px;margin:0}.lobby-title p{margin:0;font-size:11px}
.fit-lobby-actions{flex:0 0 auto}.fit-lobby-actions .ready-actions{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:0}.fit-lobby-actions button{min-height:44px;padding:4px;font-size:12px}.fit-lobby-actions #readyCount{grid-column:1/-1;font-size:12px}
.fit-screen-body .seats{display:grid;grid-template-columns:1fr 1fr;gap:6px}.fit-screen-body .team-slots{padding:4px}.fit-screen-body .seat{padding:4px;min-height:48px;font-size:12px}
dialog[open]:not(#presenceDialog){height:var(--dialog-content-height,calc(var(--overlay-height) - 16px));max-height:calc(var(--overlay-height) - 16px)!important;box-sizing:border-box;padding:8px!important;overflow:hidden!important}
#modal:has(.draft-review-root){--dialog-content-height:min(680px,calc(var(--overlay-height) - 16px))}
#modal[open]{display:flex;flex-direction:column;gap:4px}
#modal>.close-modal{position:static!important;float:none;align-self:flex-end;flex:0 0 44px;width:44px;height:44px;margin:0;padding:0}
#modalContent{flex:1 1 0;min-height:0;max-height:none!important;overflow:hidden!important;width:100%}
.fit-reference h2{font-size:20px;margin:4px 0 8px}.fit-reference h3{font-size:16px;margin:4px 0}.fit-reference p{font-size:14px;line-height:1.4;margin:6px 0}
.fit-reference .card-art,.fit-reference .card-illustration,.fit-reference .card-placeholder{display:none!important}
.fit-reference .system-card{aspect-ratio:auto!important;min-height:0!important;height:auto!important;max-width:none;width:100%;padding:8px!important;cursor:pointer}
.fit-reference .system-card .card-effect{max-height:none!important;overflow:visible!important;font-size:13px!important;line-clamp:unset!important;-webkit-line-clamp:unset!important}
.fit-reference .system-card p{overflow:visible!important;max-height:none!important;display:block!important}
.fit-reference .card-detail{display:block!important}.fit-reference .card-detail>.system-card{display:none!important}
.fit-reference .draft-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:6px}
.fit-reference .draft-entry{padding:0}.fit-reference .draft-card{display:block;min-height:44px;padding:8px;width:100%;text-align:left}.fit-reference .draft-body{padding:0!important}.fit-reference .draft-body p{font-size:13px}
.fit-reference .modal-actions{margin:6px 0}.fit-reference .map-choice .mini-map{max-height:96px}
#glossaryDialog[open]{display:flex;flex-direction:column;gap:4px}#glossaryDialog>.close-modal{position:absolute!important;right:8px;top:8px!important;margin:0;width:44px;height:44px}#glossaryTitle{padding-right:48px;font-size:20px;margin:4px 0 0}#glossaryIntro{font-size:12px;margin:0}#glossaryCount{font-size:12px;margin:0}.glossary-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}.glossary-filters input,.glossary-filters select{min-height:44px;width:100%}.glossary-filters label{min-width:0;font-size:12px}#glossaryEntries{flex:1 1 0;min-height:0;overflow:hidden}.glossary-entry{padding:6px!important}.glossary-entry p{font-size:13px;line-height:1.4}
#effectInspector{height:calc(var(--overlay-height) - 16px)!important;display:flex;flex-direction:column;overflow:hidden!important;padding:8px!important;box-sizing:border-box}#effectInspector:not(:popover-open)[popover]{display:none}#effectInspector>header{position:static!important;flex:0 0 44px}#effectInspector>header button{min-height:44px;min-width:44px}.inspector-body{display:flex!important;flex:1 1 0;min-height:0;overflow:hidden!important}.inspector-body>.fit-pager-content>.system-card{display:none!important}
.safe-settings{max-width:520px!important;height:auto!important}.safe-settings button,.safe-settings select{min-height:44px}.safe-settings p{font-size:14px;line-height:1.4}
@media(max-height:460px){.screen:not([hidden]){gap:3px}.fit-identity{position:absolute;right:8px;top:0;width:34%;height:44px}.fit-identity label{display:none}#homeScreen>.shell-header{padding-right:35%!important}.fit-screen-body .mode-options label{min-height:58px}.fit-screen-body .mode-picker,.fit-screen-body .map-select-group,.fit-screen-body .difficulty-group{padding:4px}.fit-screen-body .map-select-group p,.fit-screen-body .difficulty-group p{font-size:12px}.fit-screen-body .seats{grid-template-columns:1fr 1fr}.glossary-filters{position:absolute;right:60px;top:8px;width:45%;grid-template-columns:1fr 1fr}#glossaryIntro{max-width:45%}}
