/* Readability and interaction budgets shared by the campaign and arena. */
.transcript-navigation{display:flex;flex-wrap:wrap;gap:8px;padding:12px;border:1px solid #847451;background:#171d1c;position:sticky;top:0;z-index:2}.transcript-navigation button{min-height:44px;padding:10px 14px;background:#2b302a;color:#efdab0;border:1px solid #8e7a50;font:13px/1.3 system-ui;cursor:pointer}.table-deck-filter,.table-deck-scroll,.table-deck-dossier-btn{min-height:44px!important;min-width:44px}.table-deck-card-title{font-size:14px!important}.table-deck-card-desc{font-size:12px!important;line-height:1.55}.table-deck-card-field,.table-deck-card-prop{font-size:11px!important}.table-deck-card-type,.table-deck-card-footer{font-size:10px!important}.table-deck-filter{font-size:12px!important}.table-deck-dossier-btn{font-size:11px!important}.table-deck-card-art-image{transition:filter .2s ease}.table-deck-card.is-awakened .table-deck-card-art-image{filter:saturate(1.15) brightness(1.12)}
@media(max-width:600px){.quick-btn{min-height:44px!important}.input-container{padding-bottom:env(safe-area-inset-bottom)}.pwa-install-banner{position:static!important;margin:12px}.table-deck-filter{font-size:12px!important}.message-text{font-size:15px!important;line-height:1.7!important}.table-deck{max-height:280px;overflow:auto}.table-deck-card-title{font-size:14px!important}.input-controls{flex-wrap:wrap}.dice-btn-inline{min-width:44px;min-height:44px}}
@media(prefers-reduced-motion:reduce){.table-deck-card-art-image{transition:none}}
body.realms-in-battle .pwa-install-banner{display:none!important}
@media(max-width:600px){body.realms-in-battle:not(.realms-pending-choice):not(.realms-inspect-cards) .table-deck-content{display:none!important}body.realms-in-battle:not(.realms-pending-choice):not(.realms-inspect-cards) .table-deck-container{max-height:70px}.realms-in-battle #trackedCombatActions{max-height:190px}.realms-in-battle .narrative-content{min-height:120px}.realms-pending-choice .table-deck-container{max-height:320px;overflow:auto}.transcript-navigation{position:relative}}

.hero-portrait-control{display:block;padding:12px;margin-bottom:16px;color:#dec28d;font-size:14px}.hero-portrait-control select{margin-left:8px;min-height:44px;padding:8px;background:#1a2425;border:1px solid #8a7850;color:#eee2c8;font:inherit}
/* Reserve a place for language and keep the phone navigation fully visible. */
#vg-language-control{left:auto!important;right:8px!important;top:6px!important}
#vg-language-control button{min-width:44px;min-height:44px}
.game-nav{padding-right:110px!important}
.chronicle-topbar{padding-right:110px!important}
@media(max-width:600px){
 :root{--nav-height:104px}
 .game-nav{height:104px!important;display:grid!important;grid-template-columns:1fr;grid-template-rows:44px 44px;gap:4px;padding:4px 8px!important;overflow:visible!important}
 .game-nav .nav-left{min-width:0;padding-right:102px}
 .game-title .title-main{font-size:12px!important;letter-spacing:1px!important}
 .game-nav .nav-right{width:100%;min-width:0;display:flex;gap:6px}
 .game-nav .realm-nav-action{flex:1;min-width:0!important;min-height:44px!important;font-size:11px!important;padding:8px!important}
 .game-nav .user-badge{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .game-nav .realm-nav-action#btnCampaigns,.game-nav .realm-nav-action#btnParty{display:none!important}
 .realm-command-menu .command-item{min-height:44px!important;font-size:12px!important}
}
#vg-language-control button{min-width:44px!important;min-height:44px!important}
@media(max-width:600px){.game-layout,.narrative-panel{min-height:0!important}.realms-in-battle .narrative-content{min-height:70px!important}}

.battlefield-target img.phase-echo{filter:grayscale(.6) contrast(1.15);opacity:.8}

/* A dialog owns its header and dismissal target. */
body.modal-open #vg-language-control,body:has(dialog[open]) #vg-language-control,body:has(.table-deck-dossier-overlay) #vg-language-control{visibility:hidden!important;pointer-events:none!important}
.battle-action-row{display:inline-flex;flex-direction:column;gap:4px;margin:4px;max-width:100%;vertical-align:top}.battle-action-row small{color:#edc995;font:13px/1.5 system-ui}.battle-resource-summary,.battle-condition-summary{color:#eee3c4;font:14px/1.5 system-ui;margin:6px 0}
/* Short-height layouts keep one deliberate scroll owner for actions and input. */
@media(max-height:650px){
 .narrative-panel{overflow-y:auto!important;overscroll-behavior:contain}
 .narrative-header{min-height:36px!important;padding:6px 12px!important}
 .narrative-content{flex:0 0 auto!important;min-height:70px!important;max-height:130px;overflow-y:auto!important}
 .input-area{flex:0 0 auto!important}
 .dice-tray-inline{flex:0 0 auto!important}
 body.realms-in-battle:not(.realms-pending-choice):not(.realms-inspect-cards) .table-deck-content{display:none!important}
 body.realms-in-battle:not(.realms-pending-choice):not(.realms-inspect-cards) .table-deck-container{max-height:56px!important;flex:0 0 auto!important}
 .realms-in-battle #trackedCombatActions{max-height:190px;overflow-y:auto!important}
 .table-deck-container{max-height:30dvh!important}
}

#workshopScene{padding:12px;border:1px solid #89754b;margin-bottom:12px;background:#171e1e}#workshopScene h3{margin:0 0 8px;color:#e7c884}#workshopScene p{font:14px/1.5 system-ui;color:#e4e0cd}#workshopScene button,#workshopScene a{display:inline-block;min-height:44px;margin:4px;padding:10px}

#campaignRecovery{max-width:min(480px,90vw);color:var(--realm-text,#eee);background:#111b1e;border:1px solid #b99d5c;padding:24px}#campaignRecovery::backdrop{background:#000b}#campaignRecovery button{margin:8px 8px 0 0;min-height:44px}#btnRecoverTurn{margin:8px 0;min-height:44px}
#fullInventory{width:min(620px,90vw);max-height:85dvh;overflow:auto;color:#eee4cc;background:#111b1e;border:1px solid #b99d5c;padding:20px;box-sizing:border-box}#fullInventory::backdrop{background:#000b}#fullInventory article{padding:12px 0;border-bottom:1px solid #817253}#fullInventory p{font:14px/1.5 system-ui;overflow-wrap:anywhere}#fullInventory button{min-height:44px;margin:4px;white-space:normal}#fullInventory>button:first-child{position:sticky;top:0;float:right;background:#253032}
