/* Echoes of Aether v2.1.6v — non-destructive UI consistency layer.
   This overrides presentation only; no save, equipment, combat, quest or RPG state. */
:root{
  --ea-surface:#10232d;
  --ea-surface-2:#182f39;
  --ea-surface-3:#223e48;
  --ea-gold:#f0cf91;
  --ea-teal:#a8ded2;
  --ea-border:#869f9b83;
  --ea-border-gold:#d7b67c88;
  --ea-text:#f4f0e7;
  --ea-subtext:#c4d4d0;
  --ea-focus:#ffe4a6;
}
.rpgRoot, #armoryOverlay, #questBoardOverlay, #bossChoiceOverlay{
  font-family:system-ui,-apple-system,'Segoe UI',sans-serif;
  -webkit-font-smoothing:antialiased;
}
:is(.rpgRoot,#armoryOverlay,#questBoardOverlay,#bossChoiceOverlay) button{
  -webkit-tap-highlight-color:transparent;
}
:is(.rpgRoot,#armoryOverlay,#questBoardOverlay,#bossChoiceOverlay) :is(button,input,select,textarea):focus-visible{
  outline:2px solid var(--ea-focus)!important;
  outline-offset:2px;
}
.rpgRoot :is(button,input,select),#armoryOverlay button{font-family:inherit}
.rpgRoot button:disabled,#armoryOverlay button:disabled{opacity:.55!important;filter:saturate(.45)}
.rpgRoot :is(.rpgCharacterWindow,.rpgPickerWindow,.rpgCompareWindow,.rpgSkinWindow,.invWindow,.runeWindow,.rpgDialog),
#armoryOverlay .armoryCard{
  border-color:var(--ea-border-gold)!important;
  background:linear-gradient(145deg,#172d36 0%,#101f2a 62%,#0b1823 100%);
  box-shadow:0 14px 46px #000c,inset 0 1px #e5d8ad0d;
  border-radius:15px;
}
.rpgRoot :is(.rpgStatsPanel,.rpgEquipmentPanel,.rpgSkinDetail,.invTile,.rpgItemCard,.fcTile,.rpgCompareCard,.rpgStat),
#armoryOverlay :is(.armoryEntry,.armorySlot){border-radius:9px}
:is(.rpgRoot,#armoryOverlay) :is(.rpgMenuGrid,.invScroll,.fcScroll,.rpgItemGrid,.rpgPickerFilters,.rpgSkinList,#armoryBody,.rpgCompareGrid,.invCategories,.fcCodexTabs,.fcModes){
  scrollbar-width:thin;
  scrollbar-color:#82ad9a83 transparent;
  overscroll-behavior:contain;
}
.rpgScreen button:not(:disabled):focus-visible,#armoryOverlay button:not(:disabled):focus-visible{
  box-shadow:0 0 0 3px #ead29a36!important;
}
/* --- HOME: cleaner hierarchy and safe-area support --- */
#rpgMain{isolation:isolate;background:
  radial-gradient(ellipse at 77% 48%,#466f6960,transparent 45%),
  radial-gradient(ellipse at 13% 17%,#58463143,transparent 39%),
  linear-gradient(106deg,#0a1721 0%,#10222a 60%,#111b21 100%);
}
#rpgMain .rpgMainPanel{max-width:calc(100% - 18px);min-width:0}
#rpgMain .rpgMainPanel h1{color:#fff3d7;text-shadow:0 2px 10px #0009}
#rpgMain .rpgMainLead{color:#c5e4d7;font-size:clamp(13px,1.7vw,19px);line-height:1.35}
#rpgMain .rpgVersionBadge{font-size:10px;max-width:100%;margin:6px 0 2px;line-height:1.35}
#rpgMain .rpgVersionBadge strong{white-space:nowrap}
#rpgMain .eaModeButton{border-radius:11px;border-color:#789c9588}
#rpgMain :is(.eaModeButton,#rpgContinue,#rpgNew){min-height:44px}
#rpgMain .eaStartChoices,#rpgMain .eaHomeChoices{max-width:460px}
/* --- GAME MENU: all nine destinations visible with consistent primary labels --- */
#rpgPause .rpgDialog{
  width:min(785px,calc(100vw - 16px));max-width:785px;
  max-height:calc(100dvh - 14px);min-height:0;
  padding:clamp(10px,2.2vh,21px);
  display:flex;flex-direction:column;overflow:hidden;
}
#rpgPause .rpgKicker{flex:none;color:#dbc28e}
#rpgPause .rpgDialog h2{
  flex:none;margin:4px 0 12px;font-size:clamp(22px,3.4vw,33px);
  line-height:1.12;color:#f4e6c8;letter-spacing:.04em;
  display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;
}
#rpgPause .rpgMenuSubTitle{font-family:system-ui,sans-serif;font-size:10px;letter-spacing:.12em;font-weight:650;color:#9dc8bd}
#rpgPause .rpgMenuGrid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;
  align-content:start;padding:2px 3px 5px;
}
#rpgPause .rpgMenuGrid button{
  width:100%;min-width:0;min-height:58px;padding:9px 11px;
  display:flex;align-items:center;justify-content:flex-start;gap:9px;
  text-align:left;border:1px solid #719a9577;border-radius:10px;
  background:linear-gradient(135deg,#26404a,#172d39);
  color:var(--ea-text);font-size:12px;box-shadow:inset 0 1px #fff1;
}
#rpgPause .rpgMenuGrid button:not(:disabled):active{background:#34535a}
#rpgPause .rpgMenuItemIcon{
  display:grid;place-items:center;flex:none;
  width:35px;height:35px;background:#102b33;
  border:1px solid #719d9383;border-radius:9px;
  color:#e6cc8d;font-size:20px;
}
#rpgPause .rpgMenuItemText{display:flex;flex-direction:column;min-width:0;gap:4px;flex:1}
#rpgPause .rpgMenuItemText strong{font-size:11px;line-height:1.2;letter-spacing:.04em;font-weight:800;color:#fff1d6;overflow-wrap:anywhere}
#rpgPause .rpgMenuItemText small{font-size:10px;font-weight:500;line-height:1.2;letter-spacing:0;color:#b3d2cb;overflow-wrap:anywhere}
#rpgPause .rpgMenuItemArrow{flex:none;font-size:21px;color:#f0d69e;line-height:1}
#rpgPause .rpgBoardHint{font-size:10px;line-height:1.35;color:#b8d1c9;flex:none;margin:8px 0 0;max-height:46px;overflow-y:auto}
#rpgPause .rpgFootActions{flex:none;align-items:center;margin-top:9px}
#rpgPause .rpgFootActions button{min-height:37px;padding:8px 13px;font-size:11px}
#rpgPause .rpgFootActions .rpgPrimary{margin-left:auto}
/* --- SHARED WARDEN WINDOWS --- */
#rpgCharacter .rpgCharacterWindow,#rpgPicker .rpgPickerWindow,#rpgCompare .rpgCompareWindow,#rpgSkins .rpgSkinWindow{
  max-height:calc(100dvh - 16px);
}
.rpgRoot :is(.rpgCharacterWindow,.rpgPickerWindow,.rpgCompareWindow,.rpgSkinWindow)>header,
.rpgRoot #rpgInventory .invHeader,
.rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .runeWindow>header{
  border-bottom:1px solid #c5b18350;
  background:linear-gradient(90deg,#203a42,#11232d);
}
.rpgRoot :is(.rpgCharacterWindow,.rpgPickerWindow,.rpgCompareWindow,.rpgSkinWindow)>header button,
.rpgRoot #rpgInventory .invHeaderRight>button,
.rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .runeWindow>header button{
  flex:none;min-width:38px;min-height:34px!important;
  border:1px solid #9eb9ac69;border-radius:9px;
  background:#243c44;color:#f6eacb;
}
.rpgRoot :is(.rpgCharacterWindow,.rpgPickerWindow,.rpgCompareWindow,.rpgSkinWindow)>footer,
.rpgRoot .invFooter,.rpgRoot .fcFooter{
  background:#11242e;border-top:1px solid #8fb7a348;
}
.rpgRoot .rpgCharacterGrid{min-height:0}
.rpgRoot .rpgStatsPanel{min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
#rpgCharacter .rpgStat span{font-size:clamp(9px,1vw,11px);line-height:1.2}
#rpgCharacter .rpgStat b{font-size:clamp(11px,1.2vw,15px);line-height:1.2}
#rpgCharacter .rpgCharIdentity{flex-shrink:0}
#rpgCharacter .rpgGearSlot{border-color:#a4b69b8c;min-height:35px!important}
#rpgCharacter .rpgEquipmentOrbit .rpgGearSlot:focus-visible{z-index:8}
#rpgPicker .rpgItemCard{min-height:96px!important}
#rpgPicker .rpgPickerFilters button.active,#rpgSkins .rpgSkinClasses button.active{border-color:#f6d89b;background:#635a3c;color:#fff5dc}
#rpgCompare .rpgCompareCard{min-width:0}
#rpgCompare .rpgCompareGrid{min-height:0}
/* --- BAG: room for labels and a persistent no-keyboard-reset search field --- */
.rpgRoot #rpgInventory .invWindow{width:min(1170px,calc(100vw - 14px));height:calc(100dvh - 18px);max-height:765px}
#rpgInventory .invTabs{gap:6px}
#rpgInventory .invTabs button{font-size:11px!important;border-radius:8px;letter-spacing:.01em}
#rpgInventory .invTabs button.active{box-shadow:inset 0 -3px #edce8d;background:#5c593f;color:#fff6df}
#rpgInventory .invFilters{gap:7px}
#rpgInventory .invSearchLabel{
  min-width:135px;max-width:235px;width:20%;height:32px;
  display:flex;align-items:center;gap:5px;flex:none;
  border:1px solid #7ca19b94;border-radius:8px;
  background:#0f2932;color:#d9d0a0;padding:0 8px;
}
#rpgInventory .invSearchLabel>span{font-size:16px;line-height:1}
#rpgInventory .invSearchLabel input{
  width:100%;min-width:0;background:transparent;border:0;
  outline:none;color:#fff1d5;font-size:11px;padding:5px 0;
  user-select:text;-webkit-user-select:text;
}
#rpgInventory .invSearchLabel:focus-within{border-color:#f4d58f;box-shadow:0 0 0 2px #cfb2772b}
#rpgInventory .invSearchLabel input::placeholder{color:#a5c5bb;opacity:1}
#rpgInventory .invCategories button.active{background:#62583c;color:#ffe9b2}
#rpgInventory .invGrid{gap:9px}
#rpgInventory .invTile{
  border:1px solid #6d9b9386!important;
  border-left:3px solid var(--item-rarity)!important;
  border-radius:10px;background:#1b3640!important;
  min-height:73px!important;padding:9px!important;gap:9px;
}
#rpgInventory .invTile:active{background:#2b5157!important}
#rpgInventory .invTile[hidden]{display:none!important}
#rpgInventory .invIcon{width:36px;font-size:25px}
#rpgInventory .invTileText strong{font-size:12px;line-height:1.3}
#rpgInventory .invTileText>span{font-size:10px;line-height:1.36}
#rpgInventory .invAmount{font-size:11px;color:#f0d497}
#rpgInventory .invSearchEmpty{margin-bottom:8px;padding:10px}
#rpgInventory .invSearchEmpty[hidden]{display:none!important}
#rpgInventory .invFilters select{min-height:30px;border-color:#7e9f9a}
#rpgInventory .invModal{width:min(715px,97%);border-radius:13px}
#rpgInventory .invModalScroll{min-height:0;flex:1}
#rpgInventory .invModal>footer{flex-wrap:wrap}
/* --- CODEX, RUNES, STONES: same window, tab geometry, tile spacing --- */
.rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .runeWindow{
  width:min(1150px,calc(100vw - 14px));
  height:calc(100dvh - 16px);max-height:770px;
  display:flex;flex-direction:column;min-height:0;
}
.rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .runeWindowBody{min-width:0;min-height:0;flex:1}
.rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .runeWindow>header h2{font-size:clamp(15px,2vw,21px)}
.rpgRoot :is(.fcCodexTabs,.fcModes,.fcFilterRow,.fcReactionFilters){scrollbar-width:thin}
.rpgRoot :is(.fcCodexTabs,.fcModes) button.active,.rpgRoot .fcReactionFilters button.active{box-shadow:inset 0 -2px #f1d398}
.rpgRoot :is(.fcCodexTabs,.fcModes,.fcFilterRow,.fcReactionFilters) button{min-height:30px!important}
.rpgRoot .fcTileGrid{gap:9px}
.rpgRoot .fcTile{min-height:68px!important;border-radius:9px!important;background:#1c3640!important}
.rpgRoot .fcTileContent strong{font-size:12px}
.rpgRoot .fcTileContent small{font-size:10px;line-height:1.4}
.rpgRoot .fcModal{max-height:100%;overflow:hidden}
.rpgRoot .fcModalScroll{min-height:0;flex:1;overscroll-behavior:contain}
.rpgRoot .fcFooter>span{line-height:1.3;overflow-wrap:anywhere}
#rpgSkins .rpgSkinCard{background:#1e3841!important;border-radius:9px}
#rpgSkins .rpgSkinCard.active{background:#344b43!important}
/* --- SKILL TREE: sticky weapon selector and consistently sized action buttons --- */
#armoryOverlay{padding:8px;backdrop-filter:blur(5px)}
#armoryOverlay .armoryCard{width:min(950px,calc(100vw - 16px));max-height:calc(100dvh - 16px)}
#armoryOverlay .armoryHead{background:linear-gradient(90deg,#243b45,#162532);border-bottom-color:#c1ac7b5e}
#armoryOverlay .armoryHead h2{color:#f4e1b9}
#armoryOverlay .armoryHead button{min-width:40px;min-height:34px;background:#2b4048;border-color:#9cb2a6}
#armoryOverlay #armoryBody{padding:10px 13px 16px;min-height:0}
#armoryOverlay .armoryClasses{
  position:sticky;top:0;z-index:4;
  padding:3px 0 9px;margin-bottom:8px;
  background:linear-gradient(#192b37 82%,#192b3700);
  grid-template-columns:repeat(6,minmax(0,1fr));
}
#armoryOverlay .armoryClasses button{min-height:46px;border:1px solid #6899918c;background:#1a3440;border-radius:9px;font-size:11px;font-weight:750}
#armoryOverlay .armoryClasses button.selected{border-color:#efce87;background:#475448;box-shadow:inset 0 -3px #e4c37e}
#armoryOverlay .armoryEntry{border-color:#6e97927a;background:#172e3b;padding:10px}
#armoryOverlay .armoryEntryTitle b{font-size:12px;color:#f1dfbf}
#armoryOverlay .armoryEntry p{font-size:11px;line-height:1.42;color:#cedddc}
#armoryOverlay .armoryEntryActions{flex-wrap:wrap}
#armoryOverlay .armoryEntryActions button{min-height:32px;border-radius:7px;font-weight:750}
#armoryOverlay .armorySkillViewBtn{min-height:32px!important}
#armoryOverlay .armoryCard>footer{background:#11242f;color:#c0d1cb;line-height:1.35}
#armoryOverlay .skillViewBackdrop{max-height:100dvh}
#armoryOverlay .skillViewCard{width:min(750px,calc(100vw - 16px));max-height:calc(100dvh - 16px);border-radius:13px}
/* --- QUEST/PUZZLE HUD: preserve joystick/safe areas --- */
.inChapter #chapterOnePanel,.inShrine #chapterOnePanel{border-radius:12px;border-color:#9bb7a18f;box-shadow:0 8px 24px #0008}
#chapterOnePanel #shrinePanelToggle{border-radius:7px;border-color:#8cab9a}
#chapterOneStory .ch1StoryCard{border-radius:12px;max-height:calc(100dvh - 16px);overflow:auto}
#townMainQuest,#townHud{border-radius:10px}
#questBoardOverlay .questBoardWindow,#bossChoiceOverlay .bossChoiceWindow{max-height:calc(100dvh - 16px);overflow-y:auto}
#chapterOnePanel button:focus-visible{outline:2px solid #f9dc9e;outline-offset:2px}
/* --- Tablet and short-landscape phone tuning --- */
@media(max-width:960px){
  #rpgInventory .invGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .fcTileGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #rpgPause .rpgMenuGrid{gap:6px}
}
@media(orientation:landscape) and (max-height:520px){
  #rpgPause .rpgDialog{padding:9px 12px}
  #rpgPause .rpgKicker{font-size:9px}
  #rpgPause .rpgDialog h2{font-size:22px;margin:2px 0 7px}
  #rpgPause .rpgMenuSubTitle{font-size:9px}
  #rpgPause .rpgMenuGrid button{min-height:51px;padding:6px 8px;gap:7px}
  #rpgPause .rpgMenuItemIcon{width:30px;height:30px;font-size:17px}
  #rpgPause .rpgMenuItemText strong{font-size:10px}
  #rpgPause .rpgMenuItemText small{font-size:9px}
  #rpgPause .rpgMenuItemArrow{font-size:18px}
  #rpgPause .rpgBoardHint{font-size:9px;margin:5px 0 0;line-height:1.25;max-height:32px}
  #rpgPause .rpgFootActions{margin-top:6px}
  #rpgPause .rpgFootActions button{min-height:32px;font-size:10px;padding:5px 9px}
  #rpgCharacter .rpgStat span{font-size:9px!important;line-height:1.17}
  #rpgCharacter .rpgStat b{font-size:11px!important;line-height:1.17}
  #rpgCharacter .rpgStat{min-height:30px!important;padding:3px 5px!important}
  #rpgCharacter .rpgStatRows{gap:4px!important}
  #rpgCharacter .rpgCharKicker{font-size:9px!important}
  #rpgCharacter .rpgXPLine{font-size:9px!important}
  #rpgCharacter .rpgStatResistance :is(span,strong){font-size:9px!important}
  #rpgCharacter .rpgEquippedRuneEffect,#rpgCharacter .rpgEquippedRuneLocation{font-size:9px!important}
  #rpgInventory .invHeader{padding:5px 11px}
  #rpgInventory .invTabs{padding:5px 9px 3px}
  #rpgInventory .invTabs button{min-height:29px!important;font-size:10px!important}
  #rpgInventory .invFilters{padding:4px 9px;min-height:36px}
  #rpgInventory .invSearchLabel{min-width:130px;width:17%;height:29px}
  #rpgInventory .invSearchLabel input{font-size:10px}
  #rpgInventory .invCategories button{min-height:27px!important;font-size:10px!important}
  #rpgInventory .invFilters select{min-height:29px;font-size:10px}
  #rpgInventory .invGrid{gap:6px}
  #rpgInventory .invTile{min-height:63px!important;padding:7px!important}
  #rpgInventory .invIcon{font-size:22px;width:29px}
  #rpgInventory .invTileText strong{font-size:11px}
  #rpgInventory .invTileText>span{font-size:10px}
  #rpgInventory .invFooter{padding:4px 10px}
  #rpgInventory .invFooter button{min-height:30px!important}
  .rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .runeWindow>header{min-height:37px;padding:4px 10px}
  .rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .runeWindow>header h2{font-size:15px}
  .rpgRoot .fcTile{min-height:60px!important}
  .rpgRoot .fcTileContent small{font-size:10px}
  #armoryOverlay .armoryHead{padding:6px 11px}
  #armoryOverlay #armoryBody{padding:5px 10px 11px}
  #armoryOverlay .armoryClasses{gap:4px;padding:2px 0 6px}
  #armoryOverlay .armoryClasses button{min-height:40px;font-size:10px}
  #armoryOverlay .armoryClasses .weaponIcon{font-size:17px}
  #armoryOverlay .armoryEntry{padding:7px 9px}
  #armoryOverlay .armoryEntry p{font-size:10px}
  #armoryOverlay .armoryCard>footer{padding:5px 11px;font-size:9px}
}
@media(max-width:700px){
  #rpgPause .rpgMenuGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #rpgPause .rpgMenuSubTitle{display:none}
  #rpgInventory .invSearchLabel{min-width:110px}
  #rpgInventory .invFilters{flex-wrap:wrap}
  #rpgInventory .invCategories{order:3;flex-basis:100%}
  #rpgInventory .invSearchLabel{order:0;flex:1}
  #rpgInventory .invFilters label:not(.invSearchLabel){order:1}
  .rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .fcTileGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  #rpgPause .rpgMenuGrid button{min-height:48px}
  #rpgPause .rpgMenuItemArrow{display:none}
  #rpgInventory .invGrid{grid-template-columns:1fr}
  .rpgRoot :is(#rpgRunes,#rpgCodex,#rpgStones) .fcTileGrid{grid-template-columns:1fr}
  #rpgCharacter .rpgCharacterGrid{grid-template-columns:1fr}
  #rpgCharacter .rpgEquipmentPanel{min-height:180px}
}
@media(prefers-reduced-motion:reduce){
  .rpgRoot button,#armoryOverlay button{transition:none!important}
}
/* Development telemetry is useful while loading/failing but not as permanent
   on-screen text during normal Story play. Keep fallback errors visible. */
#engineStatus[data-mode="ok"]{display:none!important}
#engineStatus[data-mode="fallback"]{display:block;color:#ffe0b2;border-color:#df9768}

/* v2.1.6x — Rune Viewer visibility and landscape touch-scroll fix. */
#rpgCharacter .rpgCharacterWindow{position:relative}
#rpgCharacter .rpgCharacterWindow>header .rpgCharacterHeadActions{
 display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:0 0 auto;min-width:0
}
#rpgCharacter .rpgRuneTopButton{
 display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;
 min-height:40px!important;padding:8px 15px!important;border:1px solid #e3c78d!important;
 background:linear-gradient(120deg,#6c5737,#3c4c43)!important;color:#fff0cb!important;
 font-size:clamp(11px,1.4vw,14px)!important;font-weight:850!important;letter-spacing:.05em!important;
 box-shadow:inset 0 1px 0 #f5e2b733,0 2px 10px #07101080;
}
#rpgCharacter .rpgRuneTopButton:focus-visible{outline:2px solid #f1dda3;outline-offset:2px}
/* The earlier 1.6.3 layout forced overflow:hidden; it clipped the old Rune shelf. */
#rpgCharacter .rpgStatsPanel{
 overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;
 -webkit-overflow-scrolling:touch;touch-action:pan-y;
}
/* No more bottom clipped Rune shelf; the shortcut remains in the header. */
#rpgCharacter .rpgRuneViewerHost{
 position:absolute;inset:0;z-index:60;
}
#rpgCharacter .rpgRuneViewerLayer{padding:clamp(5px,1.5vh,14px)}
#rpgCharacter .rpgRuneViewerPanel{
 width:min(970px,98vw);height:min(680px,94dvh);max-height:94dvh;
 min-width:0;min-height:0;display:flex;flex-direction:column;
}
#rpgCharacter .rpgRuneViewerPanel>header,#rpgCharacter .rpgRuneViewerPanel>footer{flex-shrink:0}
#rpgCharacter .rpgRuneViewerBody{
 flex:1 1 auto;min-height:0;overflow-y:auto!important;overflow-x:hidden;
 overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;
 scrollbar-width:thin;scrollbar-color:#d4ba84 #203039;
}
#rpgCharacter .rpgRuneViewerPanel>footer button{min-height:36px!important}
#rpgCharacter .rpgRuneViewerPanel>header button{min-height:34px!important}
#rpgCharacter .rpgRuneSlotCard{min-width:0}
@media (orientation:landscape) and (max-height:520px){
 #rpgCharacter .rpgRuneTopButton{min-height:34px!important;padding:6px 12px!important;font-size:11px!important}
 #rpgCharacter .rpgRuneViewerPanel{height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}
 #rpgCharacter .rpgRuneViewerPanel>header,#rpgCharacter .rpgRuneViewerPanel>footer{padding:5px 10px}
 #rpgCharacter .rpgRuneViewerBody{padding:8px}
 #rpgCharacter .rpgRuneViewerPanel>footer span{font-size:10px}
}
@media (max-width:600px){
 #rpgCharacter .rpgRuneTopButton{min-height:34px!important;padding:6px 9px!important;font-size:10px!important}
 #rpgCharacter .rpgCharacterWindow>header .rpgCharacterHeadActions{gap:5px}
}
/* v2.1.6x QA correction — existing header rules set all spans to column. */
#rpgCharacter .rpgCharacterWindow>header>.rpgCharacterHeadActions{
 flex-direction:row!important;align-items:center;justify-content:flex-end;
}
#rpgCharacter .rpgRuneViewerPanel>header>div{
 display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;
}
#rpgCharacter .rpgRuneViewerPanel>header>div b{display:block;line-height:1.15}
@media (min-width:760px) {
 #rpgCharacter .rpgRuneViewerGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
