#phoneBridge {display:none}
@media (orientation:landscape) {
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.mobileLogged {
    --ph-top:calc(env(safe-area-inset-top,0px) + 3px);
    --ph-left:max(5px,env(safe-area-inset-left,0px));
    --ph-right:max(5px,env(safe-area-inset-right,0px));
    --ph-bottom:max(5px,env(safe-area-inset-bottom,0px));
    --ph-height:44px;
    --ph-repair:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23c7e4e9%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%203a5%205%200%200%200-4%208L2%2019l3%203%208-9a5%205%200%200%200%208-5l-4%203-4-4%203-4z%22%2F%3E%3C%2Fsvg%3E"); --ph-gold:#c59a57; --ph-ink:#0b1b23; --ph-panel:linear-gradient(155deg,#302b23,#182832 50%,#0a1922);
    --ph-sz:clamp(44px,8.5vmin,54px);
  }
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.mobileLogged #phoneBridge {
    display:block;position:fixed;inset:0;pointer-events:none;z-index:47;color:#fcf0d9;
    font:600 12px/1.14 Arial,sans-serif;font-variant-numeric:tabular-nums;
  }
  #phoneBridge [hidden]{display:none!important}
  #phoneBridge :is(button,summary){cursor:pointer;color:#f6e9cd;background:var(--ph-panel);border:1px solid #97754a;border-radius:3px;text-shadow:0 1px 2px #000;touch-action:manipulation}
  #phoneBridge :is(button,summary):focus-visible{outline:2px solid #8adedb;outline-offset:1px;z-index:2}
  #phoneBridge button:disabled{filter:saturate(.55);opacity:.76}
  #phoneBridge :is(.phBar,.phDeck,.phInfo,.phChat,.phDrop,.phDismiss){position:absolute;pointer-events:auto;box-sizing:border-box}
  #phoneBridge .phBar{z-index:3;left:var(--ph-left);right:var(--ph-right);top:var(--ph-top);height:var(--ph-height);display:flex;align-items:stretch;background:#111d24f5;border:1px solid #ab8858;box-shadow:0 2px 9px #0009;border-radius:4px}
  #phoneBridge .phTab,#phoneBridge .phBalance{padding:2px 4px;border-width:0 1px 0 0;border-radius:0;min-width:44px;min-height:0;box-sizing:border-box}
  #phoneBridge .phBalance{display:flex;flex:0 1 88px;flex-direction:column;justify-content:center;align-items:flex-start;gap:2px;padding-left:6px}
  #phoneBridge .phBalance>span{display:flex;align-items:center;gap:4px}
  #phoneBridge .phBalance b{font-size:clamp(10px,1.3vw,13px)}
  #phoneBridge .phBalance .phIcon{width:13px;height:13px}
  #phoneBridge .phTab{flex:1 1 0;display:grid;justify-items:center;align-content:center;gap:2px;font:600 clamp(10px,1.23vw,13px)/1.05 Arial,sans-serif;white-space:nowrap}
  #phoneBridge .phIcon{width:19px;height:19px;display:inline-block;background:#dfb76b;mask:var(--icon) center/contain no-repeat;-webkit-mask:var(--icon) center/contain no-repeat}
  #phoneBridge .phMenuLines{font-size:18px;height:19px;line-height:17px;color:#e4bd75}
  #phoneBridge .phTab[aria-expanded=true],#phoneBridge .phBalance[aria-expanded=true]{background:linear-gradient(#254858,#123240);box-shadow:inset 0 -2px #e7bf76}
  #phoneBridge .phVitals{flex:0 1 156px;min-width:98px;display:grid;grid-template-rows:1fr 1fr;gap:2px;padding:3px;box-sizing:border-box}
  #phoneBridge .phGauge{position:relative;background:#08141a;border:1px solid #5c5145;border-radius:2px;overflow:hidden;display:grid;place-items:center}
  #phoneBridge .phGauge i{position:absolute;inset:0 auto 0 0;background:linear-gradient(#489c76,#24664b)}
  #phoneBridge .phGauge[data-gauge=EP] i{background:linear-gradient(#377ea7,#22506c)}
  #phoneBridge .phGauge b{z-index:1;font-size:clamp(9px,1.25vw,12px);white-space:nowrap;text-shadow:0 1px 2px #000}
  #phoneBridge .phDismiss{inset:0;z-index:2;background:transparent;touch-action:none}
  #phoneBridge .phDrop{z-index:4;background:#10232afa;border:1px solid #ae8857;box-shadow:0 5px 15px #0009;min-width:128px;max-height:calc(100dvh - 59px);overflow-y:auto;overscroll-behavior:contain;border-radius:0 0 4px 4px}
  #phoneBridge .phEntry{display:block;min-height:38px;width:100%;padding:7px 12px;text-align:left;border-width:0 0 1px;border-radius:0;font:600 12px/1.2 Arial,sans-serif}
  #phoneBridge .phStock{display:grid;grid-template-columns:16px 1fr auto;align-items:center;gap:8px;padding:6px 9px}
  #phoneBridge .phStock .phIcon{width:15px;height:15px}
  #phoneBridge .phInfo{top:calc(var(--ph-top) + var(--ph-height) + 6px);right:calc(var(--ph-right) + 125px);max-width:min(26vw,190px);border-radius:4px;overflow:hidden;background:#10212bef}
  #phoneBridge .phInfo summary{padding:8px;min-height:30px;font-size:11px;box-sizing:border-box}
  #phoneBridge .phInfo strong,#phoneBridge .phInfo ul{display:block;margin:5px 7px;padding:0;list-style:none;font-size:11px}
  #phoneBridge .phChat{left:var(--ph-left);bottom:var(--ph-bottom);height:44px;min-width:69px;padding:0 10px;font-size:13px}
  #phoneBridge .phDeck{right:var(--ph-right);bottom:var(--ph-bottom);width:calc(4.0 * var(--ph-sz));height:calc(3.13 * var(--ph-sz));pointer-events:none}
  #phoneBridge .phDeck button{position:absolute;pointer-events:auto;display:grid;place-items:center;overflow:visible;padding:0;aspect-ratio:1;border-radius:50%;background:radial-gradient(at 45% 35%,#36515b,#10202b 64%);box-shadow:inset 0 0 0 2px #192027,0 2px 4px #000a}
  #phoneBridge .phItem{width:var(--ph-sz);height:var(--ph-sz);min-height:0;border:1.5px solid #ba995d}
  #phoneBridge .phItem img,#phoneBridge .phFire img{display:block;width:64%;height:64%;object-fit:contain;object-position:center;align-self:start;margin-top:5%;pointer-events:none}
  #phoneBridge .phItem .phRepair{width:56%;height:56%;margin-top:-13%;background:var(--ph-repair) center/contain no-repeat}
  #phoneBridge .phCount{position:absolute;bottom:3px;left:1px;right:1px;text-align:center;color:#fff7e5;font:bold 10px/1 Arial,sans-serif;text-shadow:0 1px 2px black,0 0 3px black;white-space:nowrap}
  #phoneBridge .phWait{position:absolute;top:-3px;right:-2px;background:#152936;color:#ffe1a1;border:1px solid #9e7d48;border-radius:6px;padding:1px 3px;font:bold 10px Arial,sans-serif}
  #phoneBridge .phItem[aria-pressed=true]{border-color:#83dfd5;box-shadow:inset 0 0 0 2px #4c998c,0 0 4px #233f43}
  #phoneBridge .phFire{right:0;bottom:0;width:calc(1.57 * var(--ph-sz));height:calc(1.57 * var(--ph-sz));border:2px solid #e0b15e;font:bold 11px/1.05 Arial,sans-serif}
  #phoneBridge .phFire span{position:absolute;bottom:7px;left:6px;right:6px;background:#0c1c23d9;border-radius:6px;padding:2px 0}
  #phoneBridge .phFire[aria-pressed=true]{border-color:#ed9565;background:radial-gradient(#6b362a,#312123)}
  #phoneBridge [data-item=AP]{bottom:0;right:calc(1.73 * var(--ph-sz))}
  #phoneBridge [data-item=HE]{bottom:0;right:calc(2.8 * var(--ph-sz))}
  #phoneBridge [data-item=PUMPKIN]{bottom:calc(1.12 * var(--ph-sz));right:calc(2.97 * var(--ph-sz))}
  #phoneBridge [data-item=rocket]{bottom:calc(1.87 * var(--ph-sz));right:calc(1.05 * var(--ph-sz))}
  #phoneBridge [data-item=repair]{bottom:calc(1.67 * var(--ph-sz));right:0}
  #phoneBridge [data-item=boost]{bottom:calc(1.13 * var(--ph-sz));right:calc(1.88 * var(--ph-sz))}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 :is(#mobileTop,#mobileRail,#mobileTarget,#mobileFullscreen14,.actions,#combatDock1,#seaCommandN1,#captainMenu1){display:none!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #mobileHelm14{left:var(--ph-left)!important;right:auto!important;top:auto!important;bottom:calc(var(--ph-bottom) + 52px)!important;width:58px!important;height:58px!important;z-index:46!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #mapDock1{top:calc(var(--ph-top) + var(--ph-height) + 6px)!important;right:var(--ph-right)!important;width:119px!important;max-width:119px!important;background:#15252bec!important;border:1px solid var(--ph-gold)!important;border-radius:4px;z-index:46!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #tfMiniMap>span{display:none!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #mapHeading1{font-size:0!important;white-space:normal;margin:0 25px 0 2px!important;min-height:22px}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #mapHeading1::after{content:attr(data-phone-name);font:bold 10px/1.05 Arial;color:#f5dfb3;display:block}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #mapDock1 #mapCollapse1{width:30px;min-height:30px;height:30px;top:0;right:0}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #mapDock1:not(.mapMinimized1) #tfMiniMap{width:65px!important;height:65px!important;margin:auto!important;box-sizing:border-box}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #tfMiniMap canvas{width:100%!important;height:100%!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #mapControls1{display:none!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #combatReload11{bottom:var(--ph-bottom)!important;max-width:35vw!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.mobileChatOpen #phoneChat,html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.mobileChatOpen #mobileHelm14{visibility:hidden!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layout1.mobileLogged.mobileChatOpen #chatBox{inset:auto auto max(var(--ph-bottom),calc(100dvh - var(--mobile-vh,100dvh) - var(--mobile-vtop,0px) + var(--ph-bottom))) var(--ph-left)!important;width:clamp(240px,39vw,400px)!important;height:min(44dvh,180px,calc(var(--mobile-vh,100dvh) - var(--ph-bottom)))!important;max-height:var(--mobile-vh)!important;min-height:0!important;padding:0!important;z-index:81!important;border-radius:4px}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layout1.mobileChatOpen #chatHeader{flex:0 0 31px!important;height:31px!important;min-height:31px!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layout1.mobileChatOpen #chatHeader button{width:auto!important;min-width:35px!important;height:30px!important;min-height:30px!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layout1.mobileChatOpen #chatBody{display:flex!important;min-height:0!important;flex:1;flex-direction:column;overflow:hidden}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layout1.mobileChatOpen #chatMessages{min-height:0!important;flex:1;overflow-y:auto;height:auto!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layout1.mobileChatOpen #chatForm{display:flex!important;flex:none;padding:3px!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layout1.mobileChatOpen #chatForm :is(input,button){min-height:34px!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.mobileMenuOpen #phoneBridge,html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.mobileMenuOpen #mapDock1{visibility:hidden!important}
  html:is([data-tideforge-device=phone],[data-tideforge-device=tablet]) body.layoutLogged1 #navigationStatus{top:calc(var(--ph-top) + var(--ph-height) + 4px)!important;max-width:43vw;pointer-events:none}
}
@media (orientation:landscape) and (max-width:760px){#phoneBridge .phBar [data-tab="Gilde"],#phoneBridge .phBar [data-tab="Rangliste"]{display:none}}
@media (orientation:landscape) and (max-width:555px){#phoneBridge .phBar [data-tab="Weltkarte"]{display:none}#phoneBridge .phInfo{right:var(--ph-right);top:calc(var(--ph-top) + var(--ph-height) + 107px)}}

@media (orientation:landscape) {
 html[data-tideforge-device=tablet] #phoneBridge .phBar { min-height:48px }
 html[data-tideforge-device=tablet] #phoneBridge .phDeck button { min-width:50px;min-height:48px }
}
@media (orientation:landscape) and (max-width:630px){
 #phoneBridge .phBar [data-tab="Weltkarte"]{display:none}
}
