/* Load after the game's CSS, together with mobile-port-v3.mjs.
   Uses the real preparation DOM, canvas, portraits, icons and paper material. */
.mobile-port-services,.mobile-port-close,.mobile-port-pager,.mobile-port-page-title,.mobile-port-slot-caption{display:none}
@media(orientation:landscape){
 #preparation.mobile-port-v3{--port-panel:334px;position:fixed;inset:0;width:100%;height:100dvh;padding:0;display:block;overflow:hidden;transform:none;zoom:1;font-size:16px}
 #preparation.mobile-port-v3[hidden]{display:none!important}
 #preparation.mobile-port-v3 .prep-scene{inset:0}
 #preparation.mobile-port-v3 .prep-top{position:absolute;inset:8px 12px auto;height:52px;display:grid;grid-template-columns:180px minmax(0,1fr) 206px;gap:8px;align-items:start}
 #preparation.mobile-port-v3 .prep-port{position:absolute;left:50px;top:0;display:grid;gap:0}
 #preparation.mobile-port-v3 .prep-location{font:600 14px/18px var(--font-display);letter-spacing:.4px}
 #preparation.mobile-port-v3 #prepPortMoney{min-height:28px;display:flex;gap:8px}
 #preparation.mobile-port-v3 .prep-currency{gap:3px;min-height:25px}
 #preparation.mobile-port-v3 .prep-currency img{width:22px;height:22px}
 #preparation.mobile-port-v3 .prep-currency b{font:600 17px/25px var(--font-body)}
 #preparation.mobile-port-v3 .prep-heading{grid-column:2;min-width:0;text-align:center;pointer-events:none}
 #preparation.mobile-port-v3 #prepType{font:600 12px/16px var(--font-display);letter-spacing:.7px}
 #preparation.mobile-port-v3 .prep-heading h1{font:600 26px/29px var(--font-display)!important;letter-spacing:.3px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#f1dbb0;text-shadow:0 2px 4px #081a20}
 #preparation.mobile-port-v3 #prepChangeShip{position:fixed;right:max(62px,env(safe-area-inset-right));top:8px;min-height:44px;width:158px;padding:5px 8px;font:600 16px/18px var(--font-display);letter-spacing:.2px}
 body.preparing.mobile-port-v3-active>.fullscreen-button{right:max(12px,env(safe-area-inset-right));top:8px;width:44px;height:44px;min-height:44px}
 #preparation.mobile-port-v3 #prepAppearance{display:none}
 #preparation.mobile-port-v3 #prepResume{position:fixed;right:12px;top:58px;min-height:44px;max-width:158px;font-size:15px}
 #preparation.mobile-port-v3 #prepMainMenu{position:fixed;left:max(12px,env(safe-area-inset-left));top:8px;width:44px;height:44px;min-height:44px;padding:5px;display:grid;place-items:center}
 #preparation.mobile-port-v3 #prepMainMenu img{display:block;width:30px;height:30px}
 #preparation.mobile-port-v3 #prepMainMenu span{display:none}
 #preparation.mobile-port-v3 .prep-main{position:absolute;inset:62px 12px 70px;display:block;pointer-events:none}
 #preparation.mobile-port-v3 .prep-preview{position:absolute;inset:0;min-height:0;pointer-events:none}
 #preparation.mobile-port-v3:not([data-mobile-service=harbor]) .prep-preview{left:calc(var(--port-panel) + 12px)}
 #preparation.mobile-port-v3 .preview-controls{position:absolute;bottom:0;right:0;height:1px;min-height:0;padding:0;margin:0}
 #preparation.mobile-port-v3 .preview-controls span{display:none}
 #preparation.mobile-port-v3 :is(.prep-equipment,.prep-posts){position:absolute;inset:0 auto 0 0;width:var(--port-panel);height:100%;max-height:none;display:none;padding:12px 14px 8px;pointer-events:auto;overflow:hidden}
 #preparation.mobile-port-v3[data-mobile-service=equipment]:not(.mobile-port-detail) .prep-equipment,#preparation.mobile-port-v3[data-mobile-service=officers]:not(.mobile-port-detail) .prep-posts{display:flex;flex-direction:column}
 #preparation.mobile-port-v3 :is(.prep-equipment,.prep-posts) h2{font:600 21px/25px var(--font-display);margin:0 40px 7px 0;padding-bottom:6px}
 #preparation.mobile-port-v3 .prep-posts h2 small{font-size:15px}
 #preparation.mobile-port-v3 :is(#prepEquipment,#prepOfficers){display:flex;flex-direction:column;gap:0;overflow-y:hidden;overflow-x:hidden;overscroll-behavior:contain;touch-action:manipulation;scrollbar-width:thin;scrollbar-color:#967047 #ecd8ae;min-height:0;flex:1}
 #preparation.mobile-port-v3 .equipment-slot{display:grid;grid-template-columns:42px minmax(0,1fr) 12px;align-items:center;gap:8px;flex:none;min-height:57px;padding:5px 0;text-align:left}
 #preparation.mobile-port-v3 .equipment-slot>img{width:40px;height:40px}
 #preparation.mobile-port-v3 .equipment-slot small{font:500 14px/17px var(--font-body)}
 #preparation.mobile-port-v3 .equipment-slot b{font:600 18px/20px var(--font-display);white-space:normal}
 #preparation.mobile-port-v3 #prepOfficers .prep-officer{display:grid;grid-template-columns:8px 50px minmax(0,1fr);gap:7px;min-height:65px;flex:none;padding:5px 0}
 #preparation.mobile-port-v3 #prepOfficers .prep-officer .officer-mini{width:50px;height:50px}
 #preparation.mobile-port-v3 #prepOfficers .prep-officer-info b{font:600 20px/22px var(--font-display)}
 #preparation.mobile-port-v3 #prepOfficers .prep-officer-info small{font:600 14px/17px var(--font-body)!important}
 #preparation.mobile-port-v3 #prepOfficers .prep-skills-grid{display:none}
 #preparation.mobile-port-v3 .panel-hint{font:500 14px/17px var(--font-body);padding:5px 0 0;margin:0}
 #preparation.mobile-port-v3 #prepPopover{position:absolute;left:12px!important;top:62px!important;width:var(--port-panel)!important;max-height:calc(100dvh - 132px)!important;min-height:0;overflow:hidden!important;padding:12px 14px;overscroll-behavior:contain;touch-action:manipulation;scrollbar-width:thin}
 #preparation.mobile-port-v3 #prepPopover h3{position:sticky;top:-12px;z-index:1;background:var(--paper);font:600 21px/24px var(--font-display);margin:0 40px 10px 0;padding-bottom:6px}
 #preparation.mobile-port-v3 :is(.popover-close,.mobile-port-close){width:44px;height:44px;min-height:44px;padding:0;font:400 28px/42px var(--font-body);display:block}
 #preparation.mobile-port-v3 .popover-close{position:sticky;right:auto;top:-9px;float:right;margin:-9px -7px 0 0;z-index:2}
 #preparation.mobile-port-v3 .mobile-port-close{position:absolute;left:calc(var(--port-panel) - 36px);top:66px;z-index:4}
 #preparation.mobile-port-v3 .mobile-port-close[hidden],#preparation.mobile-port-v3.mobile-port-detail .mobile-port-close{display:none}
 #preparation.mobile-port-v3 #gearGrid{--gear-columns:3!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;justify-items:stretch}
 #preparation.mobile-port-v3 .gear-icon{width:100%;min-width:44px;min-height:76px;height:auto;padding:5px}
 #preparation.mobile-port-v3 .gear-icon>.gear-art{width:100%;height:100%;max-width:100%;object-fit:contain}
 #preparation.mobile-port-v3 .gear-tools{display:flex;flex-wrap:wrap;gap:5px}
 #preparation.mobile-port-v3 .gear-tools[hidden]{display:none}
 #preparation.mobile-port-v3 #gearSearch{min-height:44px;min-width:0;width:100%;font:500 16px var(--font-body)}
 #preparation.mobile-port-v3 .gear-pages button{min-height:44px;min-width:44px}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .officer-candidate{grid-template-columns:54px minmax(0,1fr);gap:8px;min-height:0;padding:8px 0;align-items:start}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .candidate-portrait{width:54px;height:64px;grid-column:1;grid-row:1}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .candidate-details{grid-column:2;grid-row:1}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .candidate-heading{font:700 19px/21px var(--font-body)}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .candidate-heading small{display:inline;font-size:14px;line-height:18px}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .candidate-actions{margin-top:6px}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .assign-officer{min-height:44px;min-width:118px;padding:5px 9px}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .prep-skills-grid{grid-column:1/-1;grid-row:2;display:flex;gap:9px;--prep-skill-size:44px;justify-content:flex-end;padding:0 3px}
 #preparation.mobile-port-v3 .prep-skills-grid>.prep-skill{min-height:44px;min-width:44px}
 #preparation.mobile-port-v3 .prep-bottom{position:absolute;left:12px;top:62px;bottom:70px;width:var(--port-panel);height:auto;display:none;grid-template-columns:1fr;align-content:start;justify-content:stretch;gap:14px;padding:12px 14px;overflow:hidden;overscroll-behavior:contain;touch-action:manipulation}
 #preparation.mobile-port-v3[data-mobile-service=ship] .prep-bottom{display:grid}
 #preparation.mobile-port-v3 #prepVital{padding-top:38px;display:grid;gap:9px}
 #preparation.mobile-port-v3 #prepVital :is(.prep-health-row,.prep-crew-row){display:grid;grid-template-columns:minmax(0,1fr) 114px;gap:8px;align-items:center}
 #preparation.mobile-port-v3 .prep-stat,#preparation.mobile-port-v3 #prepCargo{min-height:44px!important}
 #preparation.mobile-port-v3 #prepRepair{width:114px;height:55px;min-height:55px;display:flex;gap:7px;padding:3px;text-align:left}
 #preparation.mobile-port-v3 #prepRepair img{width:38px;height:38px}
 #preparation.mobile-port-v3 #prepRepair b{position:static;font-size:16px;line-height:19px}
 #preparation.mobile-port-v3 #prepRepair .repair-button-details{display:grid;gap:2px}
 #preparation.mobile-port-v3 #prepRepair .repair-button-cost{display:flex;align-items:center;gap:3px;font-size:14px}
 #preparation.mobile-port-v3 #prepRepair .repair-button-cost img{width:19px;height:19px}
 #preparation.mobile-port-v3 #prepReplenishCrew{min-height:44px;min-width:104px}
 #preparation.mobile-port-v3 #prepReplenishCrew img{width:24px;height:24px}
 #preparation.mobile-port-v3 :is(#prepRepairDock,#prepCrewDock){width:100%}
 #preparation.mobile-port-v3 #prepHull .hull-diagram{grid-template-columns:54px minmax(0,1fr) 54px;width:100%}
 #preparation.mobile-port-v3 #prepHull .hull-facet span{font-size:16px}
 #preparation.mobile-port-v3 #prepMovement{display:flex;flex-wrap:wrap;gap:10px}
 #preparation.mobile-port-v3 .mobile-port-services{position:absolute;left:max(12px,env(safe-area-inset-left));right:180px;bottom:max(10px,env(safe-area-inset-bottom));display:flex;gap:4px;align-items:center;justify-content:space-between;z-index:3}
 #preparation.mobile-port-v3 .mobile-port-services button{display:flex;align-items:center;justify-content:center;flex:1;gap:5px;min-width:44px;min-height:48px;padding:4px 6px;background:#11292ce8;border:1px solid #c4a37088;box-shadow:0 3px 7px #07171988;color:#f0dcad;font:600 16px/18px var(--font-display);letter-spacing:0}
 #preparation.mobile-port-v3 .mobile-port-services button img{width:26px;height:26px;object-fit:contain}
 #preparation.mobile-port-v3 .mobile-port-services button[aria-pressed=true]{background:#e7cf9f;color:#3e2c1f;border-color:#a07d45}
 #preparation.mobile-port-v3>#prepBattle{position:absolute;right:max(12px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));width:156px;min-height:48px;height:48px;padding:5px 8px;font:600 18px/19px var(--font-display);letter-spacing:.3px;z-index:3}
 #preparation.mobile-port-v3 #prepTooltip{left:calc(var(--port-panel) + 24px)!important;top:65px!important;width:min(290px,calc(100vw - var(--port-panel) - 38px));max-height:calc(100dvh - 142px);overflow:hidden;pointer-events:auto;font-size:16px;z-index:7}
 #preparation.mobile-port-v3 #prepTooltip>b{font-size:20px;line-height:23px}
 #preparation.mobile-port-v3 #prepTooltip>span{font-size:16px;line-height:20px}
 #preparation.mobile-port-v3 #mobilePortApplyGear{display:block;width:100%;min-height:44px;margin-top:10px;font:600 17px/20px var(--font-display)}
 #preparation.mobile-port-v3.mobile-port-gear-detail #prepPopover{opacity:0;pointer-events:none}
 #preparation.mobile-port-v3 #prepTooltip.gear-tooltip{display:none;left:12px!important;top:62px!important;width:var(--port-panel);padding:12px 14px;max-height:calc(100dvh - 132px)}
 #preparation.mobile-port-v3.mobile-port-gear-detail #prepTooltip.gear-tooltip:not([hidden]){display:block}
 #preparation.mobile-port-v3 #prepTooltip.gear-tooltip>b{padding-right:38px}
 #preparation.mobile-port-v3 #mobilePortGearBack{position:absolute;right:5px;top:4px;width:44px;height:44px;min-height:44px;padding:0;font:400 28px/42px var(--font-body)}
 body.mobile-port-v3-active #cargoDialog{position:fixed;left:12px;right:auto;top:62px;bottom:auto;margin:0;width:334px;max-width:334px;max-height:calc(100dvh - 132px);height:auto;padding:13px 14px;overflow:hidden}
 body.mobile-port-v3-active #cargoDialog::backdrop{background:#071b203d}
 body.mobile-port-v3-active #cargoDialog h2{font:600 23px/27px var(--font-display);margin:0 40px 8px 0}
 body.mobile-port-v3-active #cargoDialog>p{font:500 16px/20px var(--font-body);margin:7px 0}
 body.mobile-port-v3-active .cargo-close{right:4px;top:3px;width:44px;height:44px;min-height:44px;font-size:28px;padding:0}
 body.mobile-port-v3-active .cargo-grid{grid-template-columns:1fr;gap:8px}
 body.mobile-port-v3-active .cargo-grid article{grid-template-columns:44px 1fr}
 body.mobile-port-v3-active .cargo-grid button,body.mobile-port-v3-active .cargo-pages button{min-height:44px;min-width:44px}
 body.mobile-port-v3-active .ship-appearance-editor{left:12px!important;top:62px!important;right:auto!important;bottom:auto!important;width:334px!important;max-width:334px!important;max-height:calc(100dvh - 132px)!important;padding:12px!important;grid-template-columns:72px minmax(0,1fr)!important;gap:8px!important;overscroll-behavior:contain;touch-action:manipulation}
 body.mobile-port-v3-active .ship-appearance-editor button,body.mobile-port-v3-active .ship-appearance-editor input[type=color]{min-width:44px!important;min-height:44px!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-close{height:44px!important;width:44px!important;font-size:28px!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-swatch{width:44px!important;height:44px!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-colors{gap:7px!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-colors label{font-size:16px;flex-wrap:wrap}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-emblems{gap:7px!important}
 body.mobile-port-v3-active #repairBeforeBattle{width:min(570px,calc(100vw - 28px));max-height:calc(100dvh - 24px);padding:15px 18px;overflow:hidden}
 body.mobile-port-v3-active #repairBeforeBattle h2{font-size:25px;line-height:28px}
 body.mobile-port-v3-active #repairBeforeBattle :is(p,.repair-offer-cost span){font-size:16px;line-height:20px;margin:6px 0}
 body.mobile-port-v3-active #repairBeforeBattle .repair-health-preview{font-size:19px;gap:8px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-departure-actions{gap:7px;grid-template-columns:1fr 1fr 1fr}
 body.mobile-port-v3-active #repairBeforeBattle button{min-height:44px;font-size:16px;padding:5px}
}
@media(max-width:720px) and (max-height:600px){
 #preparation.mobile-port-v3{--port-panel:302px}
 #preparation.mobile-port-v3 .prep-top{grid-template-columns:154px minmax(0,1fr) 178px}
 #preparation.mobile-port-v3 .prep-heading h1{font-size:23px!important;line-height:27px!important}
 #preparation.mobile-port-v3 #prepChangeShip{width:130px;font-size:15px}
 #preparation.mobile-port-v3 .mobile-port-services{right:156px;gap:3px}
 #preparation.mobile-port-v3 .mobile-port-services button{flex-direction:column;gap:0;padding:3px;font-size:13px;line-height:15px;min-height:48px}
 #preparation.mobile-port-v3 .mobile-port-services button img{width:23px;height:23px}
 #preparation.mobile-port-v3>#prepBattle{width:132px;font-size:16px}
 body.mobile-port-v3-active :is(#cargoDialog,.ship-appearance-editor){width:302px!important;max-width:302px!important}
 #preparation.mobile-port-v3 #prepTooltip{font-size:15px;padding:8px}
}
/* Owner requirement: every mobile service is paged; no user scroll surface. */
@media(orientation:landscape){
 #preparation.mobile-port-v3 [data-mobile-page-hidden],body.mobile-port-v3-active :is(#cargoDialog,.ship-appearance-editor) [data-mobile-page-hidden]{display:none!important}
 #preparation.mobile-port-v3 :is(.prep-equipment,.prep-posts){padding:10px 12px 58px;overflow:hidden!important}
 #preparation.mobile-port-v3 :is(.prep-equipment,.prep-posts) h2{margin-bottom:6px;line-height:24px}
 #preparation.mobile-port-v3 .prep-posts h2{font-size:18px}
 #preparation.mobile-port-v3 .panel-hint{display:none}
 #preparation.mobile-port-v3 :is(#prepEquipment,#prepOfficers){overflow:hidden!important;justify-content:start;flex:1;gap:0}
 #preparation.mobile-port-v3 #prepPopover{height:calc(100dvh - 132px);max-height:calc(100dvh - 132px)!important;padding:10px 12px 58px;overflow:hidden!important}
 #preparation.mobile-port-v3 #prepPopover h3{position:static;margin:0 42px 8px 0;padding-bottom:5px;font-size:20px;line-height:23px;background:none}
 #preparation.mobile-port-v3 .popover-close{position:absolute;right:5px;top:4px;float:none;margin:0}
 #preparation.mobile-port-v3 #gearGrid{gap:6px;grid-template-columns:repeat(3,minmax(0,1fr));overflow:hidden}
 #preparation.mobile-port-v3 .gear-icon{height:68px;min-height:68px;max-height:68px;aspect-ratio:auto;display:grid;place-items:center;padding:3px}
 #preparation.mobile-port-v3 .gear-icon>.gear-art{width:100%;height:60px;object-fit:contain}
 #preparation.mobile-port-v3 .gear-empty-cell{display:none}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .officer-candidate{margin:0;padding:0;min-height:0;row-gap:8px}
 #preparation.mobile-port-v3 #prepPopover.officer-picker{padding-bottom:44px}
 #preparation.mobile-port-v3 #prepPopover.officer-picker>.mobile-port-pager{bottom:4px}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .candidate-heading{font-size:18px;line-height:21px}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .candidate-actions{margin-top:5px}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .prep-skills-grid{justify-content:start;gap:8px}
 #preparation.mobile-port-v3 .prep-bottom{padding:10px 12px 52px;display:none;overflow:hidden!important}
 #preparation.mobile-port-v3[data-mobile-service=ship] .prep-bottom{display:block}
 #preparation.mobile-port-v3 .mobile-port-page-title,body.mobile-port-v3-active :is(#cargoDialog,.ship-appearance-editor) .mobile-port-page-title{display:block;margin:0 40px 5px 0;padding:0;font:600 19px/23px var(--font-display);letter-spacing:0;white-space:normal}
 #preparation.mobile-port-v3 #prepVital{padding:0;gap:4px;align-content:start}
 #preparation.mobile-port-v3 #prepVital #prepCargo{display:none}
 #preparation.mobile-port-v3 #prepRepair{height:50px;min-height:50px}
 #preparation.mobile-port-v3 #prepMasts .mast-diagram,#preparation.mobile-port-v3 #prepHull .hull-diagram{margin:0}
 #preparation.mobile-port-v3 #prepMovement{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 #preparation.mobile-port-v3 #prepTooltip{overflow:hidden!important}
 #preparation.mobile-port-v3 #prepTooltip.gear-tooltip{padding:10px 12px;overflow:hidden!important}
 #preparation.mobile-port-v3 #prepTooltip.gear-tooltip>b{font-size:19px;line-height:22px}
 #preparation.mobile-port-v3 .gear-tip-stats{gap:3px;margin:5px 0;padding:5px 0}
 #preparation.mobile-port-v3 .gear-tip-stat{font-size:16px;line-height:19px;grid-template-columns:21px minmax(0,1fr) auto;gap:5px}
 #preparation.mobile-port-v3 .gear-tip-stat>img{width:21px;height:21px}
 #preparation.mobile-port-v3 .gear-tip-stat>strong{font-size:18px;line-height:21px}
 #preparation.mobile-port-v3 #prepTooltip .gear-tip-status{font-size:16px;line-height:19px}
 #preparation.mobile-port-v3 #mobilePortApplyGear{margin-top:5px}
 #preparation.mobile-port-v3 .mobile-port-pager,body.mobile-port-v3-active :is(#cargoDialog,.ship-appearance-editor) .mobile-port-pager{position:absolute;left:12px;right:12px;bottom:8px;height:44px;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:6px;align-items:center;z-index:3;background:none;color:var(--ink);font:600 16px/18px var(--font-body);text-align:center}
 #preparation.mobile-port-v3 .mobile-port-pager button,body.mobile-port-v3-active :is(#cargoDialog,.ship-appearance-editor) .mobile-port-pager button{width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:5px;display:grid;place-items:center;clip-path:none;letter-spacing:0}
 #preparation.mobile-port-v3 .mobile-port-pager button img,body.mobile-port-v3-active :is(#cargoDialog,.ship-appearance-editor) .mobile-port-pager button img{width:28px;height:28px;object-fit:contain}
 body.mobile-port-v3-active #cargoDialog{height:calc(100dvh - 132px);padding:10px 12px 58px;overflow:hidden!important}
 body.mobile-port-v3-active #cargoDialog h2{font-size:21px;line-height:24px;margin-bottom:5px}
 body.mobile-port-v3-active #cargoDialog>p{font-size:16px;line-height:19px;margin:5px 0}
 body.mobile-port-v3-active .cargo-grid{gap:0;overflow:hidden}
 body.mobile-port-v3-active .cargo-grid>p{font-size:16px;line-height:19px;margin:5px 0}
 body.mobile-port-v3-active .cargo-grid article{margin:0;padding:8px;gap:4px 8px}
 body.mobile-port-v3-active .cargo-grid article b{font-size:18px;line-height:21px}
 body.mobile-port-v3-active .cargo-grid article small{font-size:15px;line-height:18px}
 body.mobile-port-v3-active .ship-appearance-editor{display:block!important;height:calc(100dvh - 132px)!important;padding:10px 12px 58px!important;overflow:hidden!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-close{position:absolute!important;right:5px!important;top:4px!important;margin:0!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-preview{position:absolute!important;left:12px!important;top:42px!important;width:72px!important;height:80px!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-colors{position:absolute!important;left:90px!important;right:12px!important;top:42px!important;display:flex!important;gap:4px!important;align-content:start!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-colors label{height:44px!important;min-height:44px;flex-wrap:nowrap;gap:4px;font-size:14px}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-swatch{min-width:44px!important;width:44px!important;height:44px!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-emblems{position:absolute!important;left:12px!important;right:12px!important;top:44px!important;display:grid!important;grid-template-columns:repeat(4,minmax(44px,1fr))!important;gap:8px!important;align-items:start!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-emblems button{min-height:48px!important;width:100%!important;padding:2px!important;font-size:15px}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-emblems button canvas{margin:auto}
 body.mobile-port-v3-active .ship-appearance-editor[data-mobile-appearance-page='3'] .appearance-emblems{left:98px!important;top:60px!important;display:block!important}
 body.mobile-port-v3-active .ship-appearance-editor .appearance-status{display:block;position:absolute;top:44px;left:12px;right:12px;font:500 16px/20px var(--font-body);overflow:hidden}
 body.mobile-port-v3-active .ship-appearance-editor .mobile-port-pager{color:#f0dfbc}
 body.mobile-port-v3-active .ship-appearance-editor .mobile-port-page-title{color:#f0dfbc}
 body.mobile-port-v3-active #repairBeforeBattle{overflow:hidden!important}
 body.mobile-port-v3-active #repairBeforeBattle #cancelDeparture{grid-column:auto}
 body.mobile-port-v3-active #repairBeforeBattle h2{margin:0 0 7px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-health-preview{padding:6px 0}
 body.mobile-port-v3-active #repairBeforeBattle button{font-size:16px;line-height:18px;min-height:44px}
}
/* Equipment uses the whole real scene, with the actual available source slots. */
@media(orientation:landscape){
 #preparation.mobile-port-v3 .prep-location{display:none}
 #preparation.mobile-port-v3 .prep-port{top:7px}
 #preparation.mobile-port-v3 .prep-top{grid-template-columns:180px minmax(0,1fr) 104px}
 #preparation.mobile-port-v3 #prepChangeShip{width:44px;height:44px;min-height:44px;padding:3px;font-size:0;clip-path:none}
 #preparation.mobile-port-v3 #prepChangeShip img,#preparation.mobile-port-v3 #prepMainMenu img{width:38px;height:38px;object-fit:contain}
 #preparation.mobile-port-v3 .mobile-port-services{justify-content:start;gap:6px}
 #preparation.mobile-port-v3 .mobile-port-services button{flex:0 0 48px;width:48px;height:48px;min-width:48px;flex-direction:row;padding:4px;gap:5px}
 #preparation.mobile-port-v3 .mobile-port-services button img{width:32px;height:32px}
 #preparation.mobile-port-v3 .mobile-port-services button span{display:none}
 #preparation.mobile-port-v3 .mobile-port-services button[aria-pressed=true]{flex:0 0 auto;width:auto;padding-inline:7px}
 #preparation.mobile-port-v3 .mobile-port-services button[aria-pressed=true] span{display:block;font:600 15px/18px var(--font-display)}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .prep-preview{left:0;top:-18px;bottom:88px}
 #preparation.mobile-port-v3[data-mobile-service=equipment].mobile-port-detail .prep-preview{bottom:128px}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .prep-equipment{inset:0;width:auto;max-height:none;padding:0;border:0;box-shadow:none;background:none;overflow:hidden!important}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .prep-equipment h2{display:none}
 #preparation.mobile-port-v3[data-mobile-service=equipment] #prepEquipment{position:absolute;left:0;right:0;bottom:0;width:100%;height:90px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;overflow:hidden!important}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .equipment-slot{--slot-width:clamp(52px,calc((100vw - 100px)/var(--mobile-slot-count,8)),74px);display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 var(--slot-width);width:var(--slot-width);height:88px;min-height:88px;max-height:88px;gap:2px;padding:4px;border:1px solid #b08b50;background:#10282edb;color:#f0dcad}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .equipment-slot>img{width:48px;height:48px;object-fit:contain}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .equipment-slot>div,#preparation.mobile-port-v3[data-mobile-service=equipment] .equipment-slot>.swap-cue{display:none}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .equipment-slot>.mobile-port-slot-caption{display:block;height:26px;max-width:100%;font:600 12px/13px var(--font-body);color:#f0dcad!important;text-align:center;white-space:normal}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .equipment-slot[aria-expanded=true]{background:#e7cf9f;color:#392b20}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .mobile-port-close{display:none}
 #preparation.mobile-port-v3[data-mobile-service=equipment] #prepPopover.gear-picker{left:12px!important;top:62px!important;width:calc(100vw - 24px)!important;height:calc(100dvh - 132px);padding:8px 12px;border:0;box-shadow:none;background:none;color:#f0dcad}
 #preparation.mobile-port-v3[data-mobile-service=equipment] #prepPopover.gear-picker h3{font-size:22px;line-height:26px;border:0;color:#f0dcad;padding:0;margin:0 44px 0 0;max-width:calc(100% - 44px)}
 #preparation.mobile-port-v3[data-mobile-service=equipment] #gearGrid{position:absolute;left:12px;right:12px;bottom:14px;display:grid;grid-template-columns:repeat(3,112px);grid-auto-rows:112px;justify-content:center;gap:12px;overflow:hidden}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .gear-icon{width:112px;height:112px;min-height:112px;max-height:112px;padding:4px}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .gear-icon>.gear-art{width:100%;height:102px}
 #preparation.mobile-port-v3[data-mobile-service=equipment] #prepTooltip.gear-tooltip{left:12px!important;top:62px!important;width:calc(100vw - 24px);height:calc(100dvh - 132px);max-height:calc(100dvh - 132px);padding:8px 12px;border:0;box-shadow:none;background:none;color:#f0dcad;overflow:hidden!important}
 #preparation.mobile-port-v3[data-mobile-service=equipment] #prepTooltip.gear-tooltip>b{padding:0;margin:0 44px 0 0;font:600 22px/26px var(--font-display);color:#f0dcad}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .mobile-port-item-art{position:absolute;left:24px;top:48px;width:180px;height:140px;object-fit:contain}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .mobile-port-item-details{position:absolute;right:12px;top:40px;bottom:8px;width:270px;padding:8px;display:flex;flex-direction:column;gap:4px;color:var(--ink);background:var(--paper) url('assets/parchment-grain.svg');border:1px solid var(--paper-border);box-shadow:0 4px 12px #07191d66}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .mobile-port-item-details .gear-tip-stats{margin:0;padding:0;gap:2px;border:0}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .mobile-port-item-details .gear-tip-stat{font-size:16px;line-height:20px}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .mobile-port-item-details .gear-tip-stat>strong{font-size:18px;line-height:20px}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .mobile-port-item-details .gear-tip-stat>img{width:20px;height:20px}
 #preparation.mobile-port-v3[data-mobile-service=equipment] .mobile-port-item-details .gear-tip-status{font-size:15px;line-height:17px}
 #preparation.mobile-port-v3[data-mobile-service=equipment] #mobilePortApplyGear{margin-top:auto;flex:0 0 44px;min-height:44px;height:44px}
 #preparation.mobile-port-v3[data-mobile-service=equipment] #mobilePortGearBack{right:5px;top:2px}
}

/* Current desktop port: keep the real owned-ship carousel and name editor.
   Only its geometry changes; native instance IDs and all callbacks survive. */
@media(orientation:landscape){
 body.mobile-port-v3-active{--port-left:max(12px,env(safe-area-inset-left));--port-right:max(12px,env(safe-area-inset-right))}
 #preparation.mobile-port-v3{--port-left:max(12px,env(safe-area-inset-left));--port-right:max(12px,env(safe-area-inset-right));--port-top:max(8px,env(safe-area-inset-top));--port-bottom:max(10px,env(safe-area-inset-bottom))}
 #preparation.mobile-port-v3 .prep-top{left:var(--port-left);right:var(--port-right);top:var(--port-top);height:64px;display:block}
 #preparation.mobile-port-v3 .prep-port{left:50px;top:0;width:108px}
 #preparation.mobile-port-v3 #prepPortMoney{display:flex;flex-direction:column;align-items:start;gap:0}
 #preparation.mobile-port-v3 .prep-currency{min-height:24px;gap:3px}
 #preparation.mobile-port-v3 .prep-currency img{width:20px;height:20px}
 #preparation.mobile-port-v3 .prep-currency b{font:600 16px/22px var(--font-body)}
 #preparation.mobile-port-v3 .prep-heading.port-fleet-enabled{position:absolute;left:166px;right:108px;top:0;min-width:0;max-width:none;height:64px;container-type:normal;pointer-events:auto}
 #preparation.mobile-port-v3 .port-fleet-carousel{height:64px;max-height:64px;display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;gap:4px}
 #preparation.mobile-port-v3 .port-fleet-window,#preparation.mobile-port-v3 .port-fleet-window[data-ship-count]{display:block;min-width:0}
 #preparation.mobile-port-v3 .port-fleet-neighbor-slot{display:none}
 #preparation.mobile-port-v3 .port-fleet-current{min-height:62px;max-height:64px;padding:1px 0;background:none;border:0;box-shadow:none}
 #preparation.mobile-port-v3 .port-fleet-current:before,#preparation.mobile-port-v3 .port-fleet-current:after{content:none}
 #preparation.mobile-port-v3 .port-fleet-meta{height:16px;gap:4px;font-size:12px;line-height:16px}
 #preparation.mobile-port-v3 .port-fleet-meta>img{width:16px;height:16px}
 #preparation.mobile-port-v3 .port-fleet-position,#preparation.mobile-port-v3 .port-fleet-type-slot #prepType{font:600 12px/16px var(--font-body);letter-spacing:0}
 #preparation.mobile-port-v3 .port-fleet-current .prep-name-row{height:44px;min-height:44px;gap:0}
 #preparation.mobile-port-v3 .port-fleet-current .prep-name-row h1{max-height:44px;font:600 20px/22px var(--font-display)!important;white-space:normal;text-align:center;-webkit-line-clamp:2;overflow-wrap:anywhere}
 #preparation.mobile-port-v3 .port-fleet-current .prep-name-row>button,#preparation.mobile-port-v3 .port-fleet-current .prep-name-form button{width:44px;height:44px;min-width:44px;min-height:44px;padding:5px}
 #preparation.mobile-port-v3 .port-fleet-current .prep-name-row>button svg{width:28px;height:28px}
 #preparation.mobile-port-v3 .port-fleet-current #prepPalette{display:none}
 #preparation.mobile-port-v3 .port-fleet-current .prep-name-form{gap:0;width:100%;min-width:0}
 #preparation.mobile-port-v3 .port-fleet-current .prep-name-form input{min-width:0;width:1px;min-height:44px;height:44px;padding:4px;font:600 18px/24px var(--font-display)}
 #preparation.mobile-port-v3 .prep-name-error{font-size:15px;line-height:18px}
 #preparation.mobile-port-v3 button.port-fleet-arrow,#preparation.mobile-port-v3 button.port-fleet-new{width:44px;min-width:44px;height:44px;min-height:44px;padding:3px;clip-path:none}
 #preparation.mobile-port-v3 button.port-fleet-new{display:grid;place-items:center;background:#10282edb;border:1px solid #b08b50;color:#f0dcad}
 #preparation.mobile-port-v3 button.port-fleet-new>img{width:36px;height:36px;object-fit:contain}
 #preparation.mobile-port-v3 button.port-fleet-new>span{display:none}
 #preparation.mobile-port-v3 .port-fleet-arrow svg{width:19px;height:28px}
 #preparation.mobile-port-v3 #prepMainMenu{left:var(--port-left);top:var(--port-top)}
 body.preparing.mobile-port-v3-active>.fullscreen-button{display:grid!important;right:max(12px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));width:44px;height:44px;min-width:44px;min-height:44px}
 body.preparing.mobile-port-v3-active>.global-sound-button{display:grid;right:calc(max(12px,env(safe-area-inset-right)) + 50px);top:max(8px,env(safe-area-inset-top));width:44px;height:44px;min-width:44px;min-height:44px}
 #preparation.mobile-port-v3 #prepResume{display:none}
 #preparation.mobile-port-v3[data-mobile-service=harbor] #prepResume:not([hidden]){display:block;right:var(--port-right);top:80px;max-width:156px;width:156px;margin:0;min-height:44px}
 #preparation.mobile-port-v3 .prep-main{inset:80px var(--port-right) 70px var(--port-left)}
 #preparation.mobile-port-v3 #prepPopover{left:var(--port-left)!important;top:80px!important;height:calc(100dvh - 150px);max-height:calc(100dvh - 150px)!important}
 #preparation.mobile-port-v3 #prepPopover.officer-picker .prep-skills-grid>.prep-skill{width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;max-height:44px;flex:0 0 44px}
 #preparation.mobile-port-v3 .prep-bottom{left:var(--port-left);top:80px}
 #preparation.mobile-port-v3 .mobile-port-close{left:calc(var(--port-left) + var(--port-panel) - 48px);top:84px}
 #preparation.mobile-port-v3 .mobile-port-services{left:var(--port-left);bottom:var(--port-bottom)}
 #preparation.mobile-port-v3>#prepBattle{right:var(--port-right);bottom:var(--port-bottom)}
 #preparation.mobile-port-v3 #prepTooltip.gear-tooltip{left:var(--port-left)!important;top:80px!important;height:calc(100dvh - 150px);max-height:calc(100dvh - 150px)}
 #preparation.mobile-port-v3[data-mobile-service=equipment] #prepPopover.gear-picker,#preparation.mobile-port-v3[data-mobile-service=equipment] #prepTooltip.gear-tooltip{left:var(--port-left)!important;top:80px!important;width:calc(100vw - var(--port-left) - var(--port-right))!important;height:calc(100dvh - 150px);max-height:calc(100dvh - 150px)!important}
 body.mobile-port-v3-active #cargoDialog,body.mobile-port-v3-active .ship-appearance-editor{left:var(--port-left,12px)!important;top:80px!important;height:calc(100dvh - 150px)!important;max-height:calc(100dvh - 150px)!important}
 body.mobile-port-v3-active #repairBeforeBattle[open]{width:min(720px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 24px);height:auto;margin:auto;padding:12px 14px;display:grid;grid-template-columns:1fr 1fr;gap:7px 12px;overflow:hidden}
 body.mobile-port-v3-active #repairBeforeBattle h2{grid-column:1/-1;margin:0;font:600 23px/26px var(--font-display)}
 body.mobile-port-v3-active #repairBeforeBattle .repair-health-preview{grid-column:1;grid-row:2;padding:0;min-height:46px;gap:6px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-health-preview>img{width:28px;height:28px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-health-preview>b{font-size:16px;line-height:20px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-offer-details{grid-column:1;grid-row:3;margin:0;font-size:15px;line-height:18px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-offer-cost{grid-column:2;grid-row:2;margin:0;gap:6px;padding:0;font-size:15px;line-height:18px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-offer-cost>img{width:26px;height:26px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-offer-cost>b{font-size:20px;line-height:24px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-crew-note{grid-column:2;grid-row:3;margin:0;font-size:15px;line-height:18px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-offer-reason{grid-column:1/-1;margin:0;font-size:15px;line-height:18px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-departure-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:2px}
 body.mobile-port-v3-active #repairBeforeBattle .repair-departure-actions>button{grid-column:auto;min-height:44px;padding:5px;font-size:15px;line-height:17px}
}

/* Low-height phone composition. Existing game nodes and handlers are retained. */
@media(orientation:landscape){
 body.naval-mobile #preparation.mobile-port-v3{--port-left:max(8px,env(safe-area-inset-left));--port-right:max(8px,env(safe-area-inset-right));--port-bottom:max(8px,env(safe-area-inset-bottom));font:400 16px/1.3 var(--font-body)}
 body.naval-mobile #preparation.mobile-port-v3 .prep-main{inset:76px var(--port-right) 62px var(--port-left)}
 body.naval-mobile #preparation.mobile-port-v3 .prep-preview{inset:0!important}
 body.naval-mobile #preparation.mobile-port-v3 .preview-controls{display:none!important}
 body.naval-mobile #preparation.mobile-port-v3 .port-fleet-meta,body.naval-mobile #preparation.mobile-port-v3 .port-fleet-type-slot #prepType,body.naval-mobile #preparation.mobile-port-v3 .port-fleet-tier{font:600 16px/1.2 var(--font-body);height:auto;color:#f2dfb5;letter-spacing:0}
 body.naval-mobile #preparation.mobile-port-v3 .port-fleet-current .prep-name-row h1{font:600 20px/22px var(--font-display)!important}
 body.naval-mobile #preparation.mobile-port-v3 .mobile-port-services{gap:6px;height:48px}
 body.naval-mobile #preparation.mobile-port-v3 .mobile-port-services button[aria-pressed=true] span{font:600 16px/1.2 var(--font-display)}
 body.naval-mobile #preparation.mobile-port-v3[data-mobile-service=equipment] .prep-preview{bottom:64px!important}
 body.naval-mobile #preparation.mobile-port-v3[data-mobile-service=equipment] #prepEquipment{height:60px;bottom:0;gap:8px}
 body.naval-mobile #preparation.mobile-port-v3[data-mobile-service=equipment] .equipment-slot{flex:0 0 58px;width:58px;height:58px;min-height:58px;max-height:58px;padding:3px;gap:0;background:#112a31e8;border-color:#ac8852}
 body.naval-mobile #preparation.mobile-port-v3[data-mobile-service=equipment] .equipment-slot>img{height:32px;width:32px}
 body.naval-mobile #preparation.mobile-port-v3[data-mobile-service=equipment] .equipment-slot>.mobile-port-slot-caption{height:18px;font:600 16px/18px var(--font-body);white-space:nowrap}
 /* Focus is a view of one real service. Chrome returns on close/Escape/menu. */
 body.naval-mobile.naval-port-focus.mobile-port-v3-active:is(.preparing,.main-menu)>.fullscreen-button,body.naval-mobile.naval-port-focus.mobile-port-v3-active>.global-sound-button{display:none!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .prep-top,body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 :is(#prepMainMenu,.mobile-port-services,#prepBattle,#prepResume){visibility:hidden!important;pointer-events:none!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3.mobile-port-renaming .prep-top{visibility:visible!important;pointer-events:auto!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 :is(.prep-posts,.prep-bottom,#prepPopover,#prepTooltip),body.naval-mobile.naval-port-focus :is(#cargoDialog,.ship-appearance-editor){box-sizing:border-box!important;position:fixed!important;inset:8px!important;width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:0!important;padding:48px 16px 56px!important;overflow:hidden!important;z-index:3600}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .prep-main{pointer-events:none}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3[data-mobile-service=equipment] .prep-main{inset:56px 8px 8px}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3[data-mobile-service=equipment] .prep-equipment{pointer-events:none}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3[data-mobile-service=equipment] #prepEquipment{pointer-events:auto}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3[data-mobile-service=equipment] .prep-equipment>h2{display:none}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .prep-posts{pointer-events:auto}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .prep-posts>h2,body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepPopover>h3,body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .mobile-port-page-title,body.naval-mobile.naval-port-focus #cargoDialog>h2,body.naval-mobile.naval-port-focus .ship-appearance-editor>.mobile-port-page-title{position:absolute!important;top:12px;left:16px;right:60px;margin:0!important;padding:0!important;max-width:none;height:auto;font:600 22px/1.15 var(--font-display);background:none;border:0}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .prep-posts>h2 small{font:400 16px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .mobile-port-close,body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .popover-close,body.naval-mobile.naval-port-focus #mobilePortGearBack,body.naval-mobile.naval-port-focus #mobilePortTipBack,body.naval-mobile.naval-port-focus .appearance-close,body.naval-mobile.naval-port-focus .cargo-close{position:fixed!important;left:auto!important;right:16px!important;top:12px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin:0!important;padding:0!important;display:grid;place-items:center;font:400 28px/1 var(--font-body);z-index:3650}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .mobile-port-pager,body.naval-mobile.naval-port-focus :is(#cargoDialog,.ship-appearance-editor) .mobile-port-pager{left:16px!important;right:16px!important;bottom:8px!important;height:44px!important;font:600 16px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .mobile-port-pager span{font:600 16px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepOfficers{display:block;overflow:hidden!important;flex:1;min-height:0}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepOfficers .prep-officer{display:grid;grid-template-columns:88px minmax(0,1fr);grid-template-rows:72px 44px;gap:8px 12px;align-items:center;min-height:132px;height:132px;width:100%;padding:4px 8px}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepOfficers .prep-officer>.officer-mini{grid-column:1;grid-row:1/3;width:80px;height:112px;object-fit:cover}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepOfficers .prep-officer-info{grid-column:2;grid-row:1;margin:0}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepOfficers .prep-officer-info small,body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .officer-level{font:400 16px/1.2 var(--font-body)!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepOfficers .prep-officer-info b{font:700 22px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepOfficers .prep-officer>.prep-skills-grid{grid-column:2;grid-row:2;display:flex;justify-content:start;gap:8px}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .prep-skill{min-width:44px;min-height:44px;width:44px;height:44px;flex:0 0 44px}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .skill-cooldown{font:700 20px/1 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .officer-candidate{display:grid!important;grid-template-columns:88px minmax(0,1fr)!important;grid-template-rows:80px 44px;gap:8px 12px!important;position:relative;margin:0!important;padding:0!important;min-height:132px!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .candidate-portrait{grid-column:1!important;grid-row:1/3!important;width:80px!important;height:120px!important;object-fit:cover}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .candidate-details{grid-column:2!important;grid-row:1!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .candidate-heading{font:700 22px/1.2 var(--font-body)!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .candidate-heading small{font:400 16px/1.2 var(--font-body)!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .candidate-actions{margin-top:6px!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .assign-officer{height:44px;min-height:44px;font:600 16px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepPopover.officer-picker .prep-skills-grid{grid-column:2!important;grid-row:2!important;justify-content:start!important;padding:0;gap:8px}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepPopover.gear-picker{background:var(--paper) url('assets/parchment-grain.svg')!important;color:var(--ink)!important;border:1px solid var(--paper-border)!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepPopover.gear-picker>h3{color:var(--ink)!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #gearGrid{top:52px;bottom:56px;left:16px;right:16px;grid-template-columns:repeat(3,112px);grid-auto-rows:112px;align-content:center;gap:12px}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepTooltip.gear-tooltip{padding-bottom:12px!important;background:#10272fee!important;color:#f3dfb8!important;border:1px solid #ad864d!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepTooltip.gear-tooltip>b{position:absolute;left:16px;right:60px;top:12px;margin:0!important;padding:0!important;font:600 22px/1.2 var(--font-display);color:#f3dfb8}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .mobile-port-item-art{left:16px;top:58px;width:144px;height:calc(100% - 72px);max-height:180px}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .mobile-port-item-details{left:176px;right:16px;top:58px;bottom:12px;width:auto;padding:8px;gap:4px;box-shadow:none}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .gear-tip-stat{min-height:24px;font:400 16px/1.3 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .gear-tip-stat>strong{font:700 20px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 .gear-tip-status{font:400 16px/1.25 var(--font-body)}
 body.naval-mobile.naval-port-focus #mobilePortApplyGear{height:44px;min-height:44px;margin-top:auto;font:600 16px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepTooltip:not(.gear-tooltip){padding:68px 24px 16px!important;background:var(--paper) url('assets/parchment-grain.svg');color:var(--ink);z-index:3700}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepTooltip:not(.gear-tooltip)>b{position:absolute;top:16px;left:24px;right:72px;font:600 24px/1.2 var(--font-display)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepTooltip:not(.gear-tooltip)>span{font:400 18px/1.4 var(--font-body);color:var(--ink);display:block}
 body.naval-mobile.naval-port-focus #mobilePortTipBack{z-index:3750}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-tip-detail #prepPopover{visibility:hidden!important;pointer-events:none!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepVital{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepVital .prep-health-row,body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepVital .prep-crew-row{margin:0;min-width:0}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepMasts,body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepHull{max-height:100%;align-content:center}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 :is(#prepMasts,#prepHull,#prepMovement) :is(small,em,figcaption){font-size:16px;line-height:1.25}
 body.naval-mobile.naval-port-focus #cargoDialog[open]{display:block}
 body.naval-mobile.naval-port-focus #cargoDialog>p,body.naval-mobile.naval-port-focus .cargo-grid>p{font:400 18px/1.35 var(--font-body);margin:0}
 body.naval-mobile.naval-port-focus .cargo-grid article{display:grid;grid-template-columns:112px minmax(0,1fr);grid-template-rows:auto auto 44px;gap:4px 16px;padding:0;align-items:center;min-height:120px}
 body.naval-mobile.naval-port-focus .cargo-grid article>img{grid-column:1;grid-row:1/4;width:112px;height:112px;object-fit:contain}
 body.naval-mobile.naval-port-focus .cargo-grid article>b{grid-column:2;grid-row:1;font:700 22px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus .cargo-grid article>small{grid-column:2;grid-row:2;font:400 16px/1.25 var(--font-body)}
 body.naval-mobile.naval-port-focus .cargo-grid article>button{grid-column:2;grid-row:3;min-height:44px;font:600 16px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus .ship-appearance-editor{background:#211b16!important;color:#f0dfbc!important;display:block!important}
 body.naval-mobile.naval-port-focus .ship-appearance-editor .mobile-port-pager,body.naval-mobile.naval-port-focus .ship-appearance-editor .mobile-port-pager span{color:#f0dfbc!important}
 body.naval-mobile.naval-port-focus .ship-appearance-editor .appearance-preview{left:16px!important;top:64px!important;width:112px!important;height:124px!important}
 body.naval-mobile.naval-port-focus .ship-appearance-editor .appearance-colors{left:152px!important;right:16px!important;top:64px!important;display:grid!important;grid-template-columns:repeat(auto-fit,44px)!important;gap:8px!important;align-content:start!important}
 body.naval-mobile.naval-port-focus .ship-appearance-editor .appearance-colors label{font-size:0!important;line-height:0!important;width:44px!important;height:44px!important;display:block}
 body.naval-mobile.naval-port-focus .ship-appearance-editor .appearance-colors input{width:44px!important;height:44px!important;min-width:44px;min-height:44px;margin:0;padding:2px}
 body.naval-mobile.naval-port-focus .ship-appearance-editor .appearance-emblems{left:16px!important;right:16px!important;top:56px!important;display:grid!important;grid-template-columns:repeat(4,minmax(44px,1fr))!important;grid-auto-rows:48px;gap:8px!important}
 body.naval-mobile.naval-port-focus .ship-appearance-editor .appearance-emblems button{font:600 16px/1.2 var(--font-body);color:#f0dfbc;min-height:48px}
 body.naval-mobile.naval-port-focus .ship-appearance-editor[data-mobile-appearance-page='3'] .appearance-emblems{left:152px!important;top:80px!important;display:block!important}
 body.naval-mobile.naval-port-focus .ship-appearance-editor .appearance-upload{width:min(360px,100%)!important;min-height:44px!important}
 body.naval-mobile.naval-port-focus .ship-appearance-editor .appearance-status{left:16px;right:16px;top:64px;font:400 18px/1.4 var(--font-body);color:#f0dfbc}
 body.naval-mobile.naval-port-focus .ship-appearance-editor>a{position:absolute;left:152px;right:16px;bottom:60px;font:400 16px/1.3 var(--font-body)!important;color:#f0dfbc!important}
 body.mobile-port-v3-active #repairBeforeBattle[open]{font:400 16px/1.3 var(--font-body)}
 body.mobile-port-v3-active #repairBeforeBattle :is(.repair-offer-details,.repair-offer-cost,.repair-crew-note,.repair-offer-reason,.repair-departure-actions>button){font-size:16px;line-height:1.25}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .prep-top{position:fixed!important;inset:8px!important;height:calc(100dvh - 16px)!important;padding:16px;background:#10272ff5;border:1px solid #ad864d;z-index:3600}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .prep-port,body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .port-fleet-meta,body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .port-fleet-arrow,body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .port-fleet-new{display:none!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .prep-heading.port-fleet-enabled{inset:16px!important;height:auto!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .port-fleet-carousel{display:block;height:auto}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .port-fleet-current{height:auto;min-height:0;max-height:none}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .prep-name-row{height:auto!important;display:block!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .prep-name-form{display:grid!important;grid-template-columns:minmax(0,1fr) 44px 44px;gap:8px!important;width:100%;height:auto}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .prep-name-form input{width:100%!important;min-height:44px;font:600 20px/1.2 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-renaming .prep-name-error{font:400 16px/1.25 var(--font-body)}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 [data-mobile-page-hidden],body.naval-mobile.naval-port-focus #cargoDialog [data-mobile-page-hidden],body.naval-mobile.naval-port-focus .ship-appearance-editor [data-mobile-page-hidden]{display:none!important}
 body.naval-mobile.naval-port-focus #preparation.mobile-port-v3 #prepOfficers .swap-cue{display:none!important}
 body.naval-mobile #preparation.mobile-port-v3 #mobilePortClose[hidden]{display:none!important}
}
