#seaChat[hidden],#seaChat [hidden],#worldChooser [hidden],#eventDrawerContent [hidden]{display:none!important}
#seaChat{position:fixed;left:70px;bottom:18px;top:auto;width:min(350px,calc(100vw - 84px));height:min(420px,calc(100dvh - 94px));margin:0;padding:9px;box-sizing:border-box;display:flex;flex-direction:column;gap:7px;background:linear-gradient(#24180ee8,#20170ff5),var(--wood-texture);border:1px solid #bc9455;border-radius:10px;box-shadow:0 5px 22px #0008;color:#f1dfb6;z-index:65;backdrop-filter:none}
#seaChat .chatHead{display:flex;align-items:center;justify-content:space-between;flex:none;cursor:move;touch-action:none;pointer-events:auto;padding:2px 3px;position:static;height:auto;background:none}
#seaChat .chatHead button{min-width:32px;min-height:30px;padding:2px;font-size:20px}
#seaChat .chatChannels{display:flex;gap:3px;flex:none;overflow:auto}
#seaChat .chatChannels button{flex:1;min-width:48px;min-height:30px;padding:4px;font-size:11px;white-space:nowrap}
#seaChat [aria-pressed=true]{background:#78572a;color:#ffdf85}
#seaChat ol{padding:0;margin:0;overflow-y:auto;flex:1;min-height:45px;list-style:none;scrollbar-width:thin}
#seaChat li{display:flex;align-items:flex-start;gap:7px;margin:0 0 9px;padding:0;background:none;border:0}
#seaChat li>img{width:30px;height:30px;object-fit:cover;border:1px solid #b68b43;border-radius:50%;flex:none}
#seaChat li>div{background:#433421b8;border:1px solid #99773b;border-radius:4px 12px 12px;padding:7px 9px;min-width:0;flex:1}
#seaChat li.own>div{background:#4b4629bd;border-radius:12px 4px 12px}
#seaChat li>div>div{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
#seaChat li b{font:600 12px Arial;color:#eac46c;overflow-wrap:anywhere}
#seaChat time{font:10px Arial;color:#c3b8a1;flex:none}
#seaChat li p{margin:5px 0 0;font:13px/1.4 Arial;color:#f0e2c8;overflow-wrap:anywhere;white-space:pre-wrap}
#seaChat form,#seaChat .chatRecipient{display:flex;gap:5px;align-items:center;margin:0;flex:none}
#seaChat input{min-width:0;width:100%;height:34px;box-sizing:border-box;background:#211a11;border:1px solid #a28043;color:#fff;padding:6px}
#seaChat form button,#seaChat .chatRecipient button{padding:5px 9px;min-height:34px;font-size:11px}
#seaChat>small{font:10px Arial;color:#c8b895;min-height:12px}
.avatarPickerLaunch{float:left;border:0;background:none!important;box-shadow:none;padding:0;margin:0 16px 10px 0;width:112px;height:112px}
.avatarPickerLaunch .appProfilePortrait{float:none!important;width:100%!important;height:100%!important;margin:0!important;border-radius:50%;object-fit:cover}
#avatarPicker,#worldChooser{width:min(480px,calc(100vw - 40px));max-height:calc(100dvh - 24px);box-sizing:border-box;overflow:auto;background:#332315;color:#ecd6ae;border:1px solid #c49c59;padding:18px}
#avatarPicker header,#worldChooser header{display:flex;align-items:center;justify-content:space-between;position:static;background:none;height:auto;padding:0;gap:16px;pointer-events:auto}
#avatarPicker h2,#worldChooser h2{margin:0;font-size:22px}
#avatarPicker header button,#worldChooser header button{width:36px;height:34px;padding:0}
#avatarPicker .portraitChoices{display:flex;gap:12px;margin:20px 0}
#avatarPicker .portraitChoices button{width:90px;height:90px;padding:3px}
#avatarPicker .portraitChoices img{width:100%;height:100%;object-fit:cover;border-radius:50%}
#avatarPicker .avatarUpload{display:flex;flex-wrap:wrap;gap:10px}
#avatarPicker p,#worldChooser p{font:13px/1.5 Arial}
#worldChooser .worldChoices{display:grid;gap:10px}
#worldChooser .worldChoices button{padding:14px;display:flex;justify-content:space-between;gap:14px;align-items:center;text-align:left}
#worldChooser strong{font:18px Georgia}#worldChooser small{font:12px Arial;color:#e3cfaa}
#eventDrawerContent>header{position:static;display:flex;justify-content:space-between;gap:15px;align-items:center;background:none;height:auto;padding:0;pointer-events:auto}
#eventDrawerContent>header h2{margin:0;font-size:18px}
#eventDrawerContent>nav{display:flex;gap:6px;margin:12px 0}
#eventDrawerContent>nav button{flex:1;padding:7px}
#eventDrawerContent [aria-pressed=true]{background:#78572a;color:#ffe5a6}
#eventDrawerContent details{border-top:1px solid #a8864c;padding:10px 0}
.landscapeApp .eventToggle{display:none!important}
.landscapeApp .eventDrawer{left:max(12px,env(safe-area-inset-left));top:calc(var(--app-band) + var(--app-top) + 50px);z-index:64}
.landscapeApp #eventDrawerContent{width:min(350px,calc(100vw - 24px));max-height:calc(100dvh - var(--app-band) - 74px);overflow:auto;background:linear-gradient(#2e1d10db,#2e1d10f5),var(--wood-texture);color:#ead5ae;border-color:#a8854a;box-sizing:border-box}
.landscapeApp #appTimber{padding-left:calc(max(10px,env(safe-area-inset-left)) + 162px);gap:8px}
.landscapeApp #appDockShortcuts{min-width:0;flex:1;display:flex;gap:3px;overflow-x:auto;scrollbar-width:thin;padding:2px 0}
.landscapeApp #appDockShortcuts[hidden]{display:none}
.landscapeApp #appDockShortcuts button{flex:0 0 52px;min-width:52px;height:46px;padding:2px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#382415a6;border:1px solid #a7844c;color:#f5deac}
.landscapeApp #appDockShortcuts img{width:25px;height:25px;object-fit:contain}
.landscapeApp #appDockShortcuts span{font:8px/1.1 Georgia;max-width:52px;white-space:normal}
.landscapeApp .appRankSlots>span{width:16px}.landscapeApp .appScores{gap:14px}
.landscapeApp.appBattleFolded #appCaptain{min-width:40px;max-width:150px}
.landscapeApp .battleDock .dockTop{display:grid;grid-template-columns:minmax(0,1fr) 36px minmax(0,1fr);align-items:center;gap:6px}
.landscapeApp .battleDock .dockTop>.dockBarColumn{display:none}
.landscapeApp .battleDock #hpMeter,.landscapeApp .battleDock #defenseMeter{margin:0;width:100%;min-width:0;height:18px;box-sizing:border-box}
.landscapeApp .battleDock #centerShip{width:36px;height:36px;padding:1px;display:grid;place-items:center}
.landscapeApp #centerShip .actionIcon3d{width:32px!important;height:32px!important;max-width:none;object-fit:contain}
.landscapeApp #appMiniVitals{position:fixed;left:50%;bottom:calc(18px + var(--app-bottom));transform:translateX(-50%);width:min(650px,calc(100vw - 230px));display:flex;justify-content:space-between;gap:142px;pointer-events:none}
.landscapeApp #appMiniVitals[hidden]{display:none}
.landscapeApp #appMiniVitals .appVital{width:calc((100% - 142px)/2);height:19px;min-width:0}
.landscapeApp #appMiniVitals .appVital span{font-size:10px;line-height:19px}
.landscapeApp .battleDock.folded{bottom:calc(14px + var(--app-bottom))!important}
.landscapeApp .battleDock.folded #battleDockToggle{position:absolute;top:auto;bottom:0;left:50%;transform:translateX(-50%);width:132px;margin:0;min-height:27px}
.landscapeApp #appCombatQuick{position:absolute;right:8px;bottom:82px;pointer-events:none}
.landscapeApp #appCombatQuickToggle{width:44px;height:44px;pointer-events:auto}
.landscapeApp .appCombatRail{position:absolute;right:48px;top:0;display:flex;gap:5px;padding:5px;box-sizing:border-box;border:1px solid #b28d50;border-radius:6px 0 0 6px;background:linear-gradient(#302014ee,#20170ff5),var(--wood-texture);pointer-events:auto}
.landscapeApp .appCombatRail[hidden]{display:none}
.landscapeApp #appCombatQuick .appQuickItem{width:48px;height:48px;flex:none;border-radius:3px;padding:3px;position:relative;background:#251c12;border:1px solid #a78549}
.landscapeApp #appCombatQuick .appQuickItem.selected{border-color:#f4d47c;box-shadow:inset 0 0 8px #eabf4444}
.landscapeApp .combatReady{position:absolute;top:0;right:1px;color:#ffe8a1;font:11px Arial;text-shadow:0 1px 3px #000}
.landscapeApp .appCombatRail button:disabled{opacity:.5}
.landscapeApp .fermanCard{display:grid;grid-template-columns:38px 1fr;gap:2px 8px;text-align:left;padding:8px!important;min-height:54px!important}
.landscapeApp .fermanCard img{grid-column:1;grid-row:1/4;width:36px;height:36px;align-self:center}
.landscapeApp .fermanCard strong,.landscapeApp .fermanCard small{grid-column:2;font-size:11px;line-height:1.3}
.landscapeApp .nauticalMap{pointer-events:auto}.landscapeApp #minimap{pointer-events:auto;touch-action:none}
@media(max-height:550px){
 .landscapeApp #appTimber{padding-left:calc(max(10px,env(safe-area-inset-left)) + 140px)}
 .landscapeApp #appDockShortcuts button{height:38px;flex-basis:45px;min-width:45px}.landscapeApp #appDockShortcuts img{width:21px;height:21px}
 .landscapeApp #appCombatQuick{right:5px;bottom:70px}.landscapeApp #appCombatQuickToggle{width:38px;height:38px}.landscapeApp .appCombatRail{right:42px}.landscapeApp #appCombatQuick .appQuickItem{width:40px;height:42px}
 #seaChat{height:calc(100dvh - 64px);bottom:10px;width:min(320px,calc(100vw - 84px))}
}
@media(max-width:1000px){.landscapeApp.appBattleFolded #appCaptain span,.landscapeApp .appRankSlots{display:none}.landscapeApp .appScores{gap:8px}.landscapeApp .appScores b{font-size:12px}.landscapeApp .appScores small{font-size:6px}}
@media(max-width:600px){.landscapeApp #appMiniVitals{width:calc(100vw - 180px);gap:122px}.landscapeApp #appMiniVitals .appVital{width:calc((100% - 122px)/2);height:18px}.landscapeApp #appMiniVitals .appVital span{font-size:8px}.landscapeApp .battleDock.folded #battleDockToggle{width:112px;font-size:9px}.landscapeApp .appScores{gap:5px}.landscapeApp .appScores b{font-size:10px}}
