/* Suite framing only. Native Trench gameplay retains its own presentation. */
#realmTile{text-align:left;width:100%;font:inherit;background:none;border:0;padding:8px 0;box-shadow:none;letter-spacing:inherit;display:block;grid-column:2;grid-row:1/3;min-width:0}
#futureGames>div:has(#realmTile){border-left-color:var(--accent)}
#realmSetup{width:760px;max-width:calc(100% - 24px)}
#realmParticipants{max-height:190px;overflow:auto;border:1px solid var(--edge)}#realmParticipants label{display:block;padding:5px}#realmSetup input{width:20px;height:20px;vertical-align:middle;margin-right:10px}
#realmSetup .actions{position:sticky;bottom:-24px;background:var(--case);padding:12px 0}#realmQuestions li{margin-bottom:15px;overflow-wrap:anywhere}#realmQuestions p{font-size:14px}
#realmModule{position:fixed;inset:0;height:100dvh;display:flex;flex-direction:column;background:var(--glass)}
#realmModule>header{padding:6px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border-bottom:1px solid var(--edge);flex:none}
#realmModule .actions{margin:0;gap:6px}#realmModule button{padding:8px 10px;font-size:13px;min-height:44px}
#realmRunnersLabel{margin:0;flex:1;min-width:140px;font-size:14px;overflow-wrap:anywhere}#realmFrameSlot{flex:1;min-height:0}#realmFrame{width:100%;height:100%;border:0;display:block}
#realmSaveStatus{max-height:20dvh;overflow:auto;padding:0 12px;flex:none}#realmSaveStatus:empty{display:none}#realmSaveStatus p{font-size:13px;margin:4px 0}#realmRecent{margin-top:25px}#realmRecentList{padding-left:20px}#realmRecentList li{padding:8px 0;overflow-wrap:anywhere}
@media(max-width:540px){#realmModule .actions{width:100%}#realmModule .actions button{flex:1;font-size:12px}#realmSetup{padding:18px}#realmSetup .actions{bottom:-18px}}

/* Keep the existing native button as the entire instrument tile hit target. */
#realmTile::after{content:"";position:absolute;inset:0;cursor:pointer}
#futureGames>div:has(#realmTile:focus-visible){outline:3px solid var(--accent);outline-offset:3px}

#realmSetup select{display:block;width:100%;margin:8px 0 16px}#realmQuestions p,#realmSaveStatus details{white-space:pre-wrap}#realmSaveStatus details{font-size:14px}#realmSaveStatus summary{cursor:pointer}

#realmSetup textarea{width:100%;min-height:140px;white-space:pre-wrap}#realmSetup input[type=file]{width:100%;height:auto}#realmSource{margin-bottom:16px}#realmModule #realmSaveStatus{max-height:12dvh}#realmUploadFields{padding:12px;border:1px solid var(--edge)}#realmRecent{margin-top:24px}
#realmTile .game-name{color:var(--ink)}#futureGames>div:has(#realmTile){--game-accent:var(--accent)}#realmQuestions{max-height:45dvh;overflow:auto}
.realm-match-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 18px;margin-top:20px}#realmModeRules{border-left:3px solid var(--accent);padding:10px 14px;background:var(--glass)}
@media(max-width:540px){.realm-match-fields{grid-template-columns:1fr}}

#realmModule[hidden]{display:none} #realmTile .game-name{font-size:20px} #realmSetup label{display:block} .realm-portraits{display:flex;align-items:center;justify-content:center}.realm-portraits img{width:50%;height:64px;object-fit:contain}

.realm-portraits img.realm-game-icon{width:100%;height:100%;object-fit:cover}.realm-launch-heading{display:flex;align-items:center;gap:18px}.realm-launch-heading img{border-radius:18px;flex:none}.realm-launch-heading h2{margin:0}#realmSetup>.actions{position:sticky;bottom:-1px;background:var(--paper);padding:12px 0;z-index:2}#realmSetup>.actions button{min-height:46px}#realmSetup summary{padding:10px 0;cursor:pointer}#realmModule>header{padding:3px 8px}#realmModule #realmSaveStatus:empty{display:none}@media(max-width:540px){.realm-match-fields{grid-template-columns:1fr 1fr;gap:10px}.realm-launch-heading img{width:72px;height:72px}#realmSetup{padding:16px}#realmSetup select{font-size:14px}.realm-launch-heading h2{font-size:21px}}@media(max-height:480px){#realmModule>header p{font-size:11px;margin:0}#realmModule>header button{font-size:12px;min-height:36px;padding:5px 8px}#realmModule>header{flex-wrap:nowrap}#realmModule #realmSaveStatus{max-height:10dvh}}
