/* BLACK PIRATE KINGDOM V18.14 — final readability and performance layer */
:root{font-size:17px!important}
body{font-size:16px!important;line-height:1.48!important;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:600 14px/1.25 system-ui,-apple-system,"Segoe UI",sans-serif!important}
header{min-height:70px!important;align-items:center!important}
header h1{font-size:24px!important;line-height:1!important}
header small,#captain{font-size:12px!important}
#nav{gap:5px!important;align-items:center!important;flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:thin}
#nav button{min-height:40px!important;padding:8px 11px!important;font-size:12px!important;white-space:nowrap!important}
#resources{min-height:62px!important;overflow-x:auto!important;overflow-y:hidden!important}
#resources .pill{min-width:132px!important;padding:9px 12px!important}
#resources .pill>span{font-size:10px!important;letter-spacing:.06em!important}
#resources .pill>b{font-size:16px!important;line-height:1.2!important}
#resources .pill small{font-size:10px!important}
main{font-size:15px!important}
h2{font-size:30px!important;line-height:1.12!important}h3{font-size:18px!important;line-height:1.25!important}p,li,label,small{line-height:1.48!important}
.eyebrow{font-size:11px!important;letter-spacing:.15em!important}
.v185WorldTitle h2,.v184WorldTop h2,.livingSeaHeader h2{font-size:30px!important}
.v185WorldTitle p,.v184WorldTop p,.livingSeaHeader p,.v17ControlHint,.seaHint{font-size:12px!important;color:#c8dce2!important}
.v185WorldGrid,.v184World{grid-template-columns:280px minmax(760px,1fr) 300px!important;gap:12px!important}
.v185MapFrame,.v184MapFrame{min-height:760px!important;height:calc(100vh - 245px)!important}
.v17SeaViewport,.v184SeaViewport,.v185SeaViewport{min-height:720px!important}
.v17Panel,.v184Side section,.seaInspect,.v185Inspect{font-size:13px!important}
.v17PanelTitle,.v17PanelTitle span,.v184ShipCard h3,.v185FleetPanel h3{font-size:14px!important}
.v17Production span,.v17Production b,.v184ShipStats small,.v184ShipStats b{font-size:12px!important}
.seaVessel span{font-size:12px!important;line-height:1.15!important;padding:4px 7px!important;max-width:180px!important;text-shadow:0 2px 3px #000,0 0 8px #000!important}
.seaVessel img{image-rendering:auto!important;filter:drop-shadow(0 7px 7px rgba(0,0,0,.75))!important}
.seaVessel{will-change:transform;transition:none!important;contain:layout style paint}
.seaVessel.safeCaptain{filter:drop-shadow(0 0 9px rgba(69,225,198,.75))!important}
.seaVessel.duelCaptain{filter:drop-shadow(0 0 11px rgba(255,103,78,.82))!important}
.seaVessel.trainingTarget{filter:drop-shadow(0 0 12px #ffd052)!important}
.seaVessel.trainingTarget span{outline:2px solid #ffd052!important}
.seaInspect,.v185Inspect{font-size:14px!important;max-height:calc(100vh - 230px)!important;overflow:auto!important;padding:18px!important}
.seaInspect h2,.seaInspect h3,.v185Inspect h2,.v185Inspect h3{font-size:21px!important;color:#ffd05c!important}
.seaInspect .heroActions,.v1814PlayerActions{position:sticky!important;bottom:0!important;background:linear-gradient(180deg,rgba(4,28,36,.1),#071f28 34%)!important;padding-top:14px!important;z-index:4!important;display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
.v1814SafeNotice,.v1814DuelNotice{padding:12px!important;border:1px solid #287c89!important;border-radius:8px!important;background:#092d36!important;font-size:13px!important;margin:12px 0!important}
.v1814DuelNotice{border-color:#c58c22!important;background:#31250f!important}
.v1814Coach{position:sticky;top:8px;z-index:80;margin:8px 12px 14px;padding:15px 18px;display:grid;grid-template-columns:50px 1fr;gap:12px;border:2px solid #f0b638;border-radius:12px;background:linear-gradient(135deg,#112f38,#10212a 65%,#30230c);box-shadow:0 14px 34px rgba(0,0,0,.48)}
.v1814CoachNo{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#efb638;color:#081319;font-size:24px;font-weight:900}
.v1814Coach small{color:#8ed6e4;font-size:11px!important;font-weight:900;letter-spacing:.12em}.v1814Coach h3{color:#ffd15c;margin:3px 0 5px;font-size:21px!important}.v1814Coach p{margin:0;font-size:14px!important;color:#e7f2f4}.v1814Coach em{display:block;margin-top:7px;color:#9fe9c7;font-style:normal;font-size:12px}
.v1814CoachProgress{grid-column:1/-1;height:5px;background:#06161c;border-radius:5px;overflow:hidden}.v1814CoachProgress i{display:block;height:100%;background:linear-gradient(90deg,#e5a72d,#fff16b)}
#nav button.tutorialLocked{opacity:.28!important;filter:grayscale(1)!important;cursor:not-allowed!important}#nav button.tutorialTargetNav{outline:2px solid #ffd052!important;box-shadow:0 0 16px rgba(255,208,82,.6)!important}
#v184MissionFloat{display:none!important}
#v1814Perf{position:fixed;left:10px;bottom:10px;z-index:9998;padding:5px 8px;border:1px solid #2d6975;border-radius:6px;background:rgba(2,17,23,.82);color:#9ee6ca;font:800 11px/1 system-ui;pointer-events:none}
.v1814LowFx .v17Fog,.v1814LowFx .fog,.v1814LowFx .seaWater,.v1814LowFx .worldDepth,.v1814LowFx .v17OceanTexture{animation:none!important;filter:none!important;opacity:.28!important}.v1814LowFx *{backdrop-filter:none!important}
.dockLayout{grid-template-columns:270px minmax(0,1fr)!important;gap:16px!important}.shipRail{contain:strict!important;height:calc(100vh - 245px)!important}.shipRailItem{min-height:78px!important;font-size:13px!important}.shipRailItem b{font-size:14px!important}.shipRailItem small{font-size:11px!important}.shipRailItem img{width:74px!important;height:52px!important}.dockSwitching{opacity:.66;transform:translateY(2px);transition:opacity .1s ease!important}.dockLoose{content-visibility:auto;contain-intrinsic-size:900px}.dockLoose article{content-visibility:auto;contain-intrinsic-size:100px}
.shipStats .req,.equipGrid em,.dockLoose em{font-size:12px!important;line-height:1.35!important}.megaPower{font-size:35px!important}
.v1814WalletCheckout{margin:14px 18px 18px;padding:18px;border:1px solid #d6a52e;border-radius:12px;background:linear-gradient(120deg,#102f39,#1d180b);display:flex;align-items:center;justify-content:space-between;gap:18px}.v1814WalletCheckout>div{display:flex;gap:14px;align-items:center}.v1814WalletCheckout>div>span{font-size:42px}.v1814WalletCheckout small{color:#91d9e6;font-weight:900;letter-spacing:.1em}.v1814WalletCheckout h3{margin:3px 0;color:#ffd15d}.v1814WalletCheckout p{margin:0;max-width:850px}.v1814WalletCheckout.connected{border-color:#4dc491;background:linear-gradient(120deg,#0d342f,#102a34)}
.v1814MarketGuide{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 18px}.v1814MarketGuide article{padding:14px;border:1px solid #2f6470;border-radius:9px;background:#09252e}.v1814MarketGuide b{display:block;color:#ffd15c;margin-bottom:5px}.v1814MarketGuide span{font-size:13px}
.v1814OpponentPicker{margin:14px 18px;padding:16px;border:1px solid #396b78;border-radius:10px;background:#08232c;display:grid;grid-template-columns:1fr auto;gap:12px}.v1814OpponentPicker small{color:#88d8e6;font-weight:900;letter-spacing:.12em}.v1814OpponentPicker h3{margin:3px 0}.v1814OpponentPicker p{margin:0}.v1814OpponentPicker>#v1814Opponents{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px}.v1814Opponent{display:flex!important;flex-direction:column!important;align-items:flex-start!important;text-align:left!important;min-height:76px!important;background:#0c3440!important}.v1814Opponent b{color:#ffd15c;font-size:14px}.v1814Opponent span,.v1814Opponent small{font-size:11px!important}.v1814Opponent.recent{opacity:.58}
.v1814Guide{position:fixed;inset:0;z-index:10050;background:rgba(0,7,10,.9);display:grid;place-items:center;padding:24px}.v1814Guide>section{position:relative;width:min(1050px,96vw);max-height:92vh;overflow:auto;padding:28px;border:2px solid #d9a52d;border-radius:14px;background:#071f28}.v1814Guide>section>button{position:absolute;right:16px;top:14px;font-size:24px!important}.v1814Guide>section>div{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.v1814Guide article{display:grid;grid-template-columns:42px 1fr;gap:10px;padding:14px;border:1px solid #285b68;border-radius:9px;background:#0b2a34}.v1814Guide article>b{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#e8ad30;color:#06151a;font-size:18px}.v1814Guide h3{margin:0 0 5px;color:#ffd15c}.v1814Guide p{margin:0;font-size:13px}
.v1813ActionModal{z-index:11000!important}.v1813ActionModal section{width:min(760px,94vw)!important;font-size:15px!important}.v1813ActionModal h2{font-size:28px!important}
.marketRow{font-size:13px!important;min-height:82px!important}.marketRow b{font-size:14px!important}.marketRow small{font-size:11px!important}.shopCard p{font-size:13px!important}.shopCard h3{font-size:18px!important}
.bossCard p,.bossCard button{font-size:13px!important}.bossCard h3{font-size:24px!important}.battleLog{font-size:12px!important;max-height:145px!important;overflow:auto!important}
@media(max-width:1350px){:root{font-size:16px!important}.v185WorldGrid,.v184World{grid-template-columns:235px minmax(620px,1fr) 250px!important}.v185MapFrame,.v184MapFrame{height:700px!important}.seaVessel span{font-size:11px!important}}
@media(max-width:1050px){.v185WorldGrid,.v184World{display:block!important}.v184Side,.v185WorldLeft,.v185WorldRight{display:none!important}.v185MapFrame,.v184MapFrame{height:calc(100vh - 230px)!important}.v1814MarketGuide{grid-template-columns:1fr}.v1814Guide>section>div{grid-template-columns:1fr}}


/* V18.14.1 — world map readability and smooth local sailing */
html.v1814 .v185SeaStage{backface-visibility:hidden;transform-style:preserve-3d}
html.v1814 .seaVessel{width:104px!important;height:86px!important;cursor:pointer!important;overflow:visible!important;contain:layout style!important;touch-action:manipulation}
html.v1814 .seaVessel img{width:92px!important;height:62px!important;object-fit:contain!important;transform:scale(var(--ship-comp,1))!important;transform-origin:center center!important;image-rendering:auto!important;backface-visibility:hidden!important}
html.v1814 .seaVessel.me{width:126px!important;height:102px!important}
html.v1814 .seaVessel.me img{width:112px!important;height:76px!important}
html.v1814 .seaVessel span{top:60px!important;min-width:max-content!important;max-width:220px!important;padding:5px 8px!important;border-radius:5px!important;background:rgba(0,10,15,.94)!important;color:#f4fbff!important;font-size:13px!important;font-weight:900!important;letter-spacing:.015em!important;transform:translateX(-50%) rotate(var(--counter-heading,0deg)) scale(var(--map-inverse,1))!important;transform-origin:50% 0!important;pointer-events:none!important;text-shadow:0 2px 2px #000,0 0 7px #000!important;box-shadow:0 2px 8px #000b!important}
html.v1814 .seaVessel.me span{top:72px!important;color:#9fffe9!important;font-size:14px!important}
html.v1814 .seaVessel.trainingTarget span{background:#2b2004!important;color:#fff2a1!important;border:2px solid #ffd052!important}
html.v1814 .seaVessel:focus-visible{outline:4px solid #ffe06a!important;outline-offset:6px!important;border-radius:50%!important}
html.v1814 .v17CoordinateHud b,html.v1814 .v17CoordinateHud span{font-size:13px!important}
html.v1814 .v185MiniMap small{font-size:10px!important}
@media(max-width:1350px){html.v1814 .seaVessel span{font-size:12px!important;padding:4px 7px!important}html.v1814 .seaVessel img{width:86px!important;height:58px!important}}


/* V18.14.3 — lower clutter without clipping ship labels */
html.v1814 .seaVessel{content-visibility:visible!important;contain:layout style!important;overflow:visible!important}
html.v1814 .seaVessel span{font-size:13px!important;max-width:190px!important;padding:4px 7px!important}
html.v1814 .seaVessel:not(.me):not(.trainingTarget) img{filter:drop-shadow(0 4px 4px rgba(0,0,0,.62))!important}
html.v1814.v1814LowFx .seaVessel:not(.me):not(.trainingTarget){filter:none!important}
html.v1814.v1814LowFx .seaVessel span{box-shadow:none!important;text-shadow:0 1px 2px #000!important}
@media(max-width:1350px){html.v1814 .seaVessel{width:92px!important;height:76px!important}html.v1814 .seaVessel img{width:80px!important;height:54px!important}html.v1814 .seaVessel span{font-size:12px!important;max-width:165px!important}}

/* V18.14.4 — stacked HUD, denser sea, quick PvP and far-zoom performance */
html.v1814 body #game>header{position:sticky!important;top:0!important;z-index:230!important;height:70px!important;min-height:70px!important}
html.v1814 body #resources{position:sticky!important;top:70px!important;z-index:220!important;height:64px!important;min-height:64px!important}
html.v1814 .v1814Coach{top:142px!important;z-index:210!important}
html.v1814 #v1814Perf[data-mode]:not([data-mode=""])::after{content:" · " attr(data-mode);color:#f3c75d}

html.v1814 .v18144PlayerQuickActions{position:sticky;top:-1px;z-index:12;margin:6px -4px 12px;padding:8px;border:1px solid #936c25;border-radius:9px;background:linear-gradient(180deg,#0b3039 0,#071c24 100%);box-shadow:0 7px 18px #000a}
html.v1814 .v18144PlayerQuickActions .v1814SafeNotice,html.v1814 .v18144PlayerQuickActions .v1814DuelNotice{margin:0 0 8px!important;padding:9px!important;font-size:12px!important}
html.v1814 .v18144PlayerQuickActions .heroActions{position:static!important;display:grid!important;grid-template-columns:1fr 1fr!important;padding:0!important;background:none!important}
html.v1814 .v18144PlayerQuickActions button{min-height:38px!important;font-size:12px!important}

html.v1814 .v18144HarborLesson{margin:0 0 18px;padding:18px;border:1px solid #bc8a2e;border-radius:12px;background:linear-gradient(135deg,#0b3039,#071a22 62%,#2b1d08);box-shadow:0 12px 30px #0008}
html.v1814 .v18144HarborLesson.training{outline:2px solid #ffd15c;box-shadow:0 0 24px #d6a52e66,0 12px 30px #0008}
html.v1814 .v18144HarborLesson h2{margin:4px 0 7px!important;font-size:27px!important;color:#ffd063!important}
html.v1814 .v18144HarborLesson p{margin:0;color:#cbe0e4}
html.v1814 .v18144HarborLessonGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}
html.v1814 .v18144HarborLessonGrid article{padding:12px;border:1px solid #32616d;border-radius:8px;background:#08252e}
html.v1814 .v18144HarborLessonGrid b,html.v1814 .v18144HarborLessonGrid span{display:block}
html.v1814 .v18144HarborLessonGrid b{color:#ffd168;margin-bottom:5px}
html.v1814 .v18144HarborLessonGrid span{font-size:12px;color:#b9d0d5}
html.v1814 .v18144HarborLesson>.heroActions{display:flex;gap:8px;position:static!important;background:none!important;padding:0!important}

html.v1814 .v185MiniMap i.npc{width:4px!important;height:4px!important;opacity:.95!important}
html.v1814 .v185MiniMap i.training{width:6px!important;height:6px!important;box-shadow:0 0 6px #7be1a4!important}
html.v1814 .v185MiniMap i.player{width:5px!important;height:5px!important;box-shadow:0 0 6px #5ccde8!important}
html.v1814 .v185MiniMap i.me{width:9px!important;height:9px!important}

html.v1814.v18144FarZoom .v17Fog,html.v1814.v18144FarZoom .fog,html.v1814.v18144FarZoom .seaWater,html.v1814.v18144FarZoom .worldDepth,html.v1814.v18144FarZoom .v185Current,html.v1814.v18144FarZoom .reef,html.v1814.v18144FarZoom .v185Reef{display:none!important}
html.v1814.v18144FarZoom .v17OceanTexture,html.v1814.v18144FarZoom .v185OceanLight{animation:none!important;filter:none!important;opacity:.32!important}
html.v1814.v18144FarZoom .seaVessel:not(.me):not(.trainingTarget),html.v1814.v18144FarZoom .seaVessel img{filter:none!important;box-shadow:none!important}
html.v1814.v18144FarZoom .seaVessel span{box-shadow:none!important;text-shadow:0 1px 2px #000!important;background:rgba(0,10,15,.9)!important}
html.v1814.v18144FarZoom .livingIsland{filter:none!important}

@media(max-width:1200px){
 html.v1814 body #game>header{height:auto!important;min-height:70px!important}
 html.v1814 body #resources{top:70px!important}
 html.v1814 .v1814Coach{top:142px!important}
 html.v1814 .v18144HarborLessonGrid{grid-template-columns:1fr}
}
@media(max-width:860px){
 html.v1814 body #game>header,html.v1814 body #resources{position:relative!important;top:auto!important;height:auto!important}
 html.v1814 .v1814Coach{position:relative!important;top:auto!important}
 html.v1814 .v18144PlayerQuickActions .heroActions{grid-template-columns:1fr!important}
}


/* V18.14.5 — mandatory action focus, elevated captain card and responsive Duel Waters */
html.v1814 .v18145CoachAction{display:block!important;margin-top:10px!important;min-height:40px!important;padding:9px 14px!important;border:2px solid #ffd15c!important;background:linear-gradient(180deg,#f0bd43,#b97812)!important;color:#07151a!important;font-weight:950!important;box-shadow:0 0 16px #e7b33566!important}
html.v1814 .v18145RequiredAction{position:relative!important;z-index:80!important;outline:4px solid #ffe26c!important;outline-offset:5px!important;animation:v18145RequiredPulse .9s ease-in-out infinite!important;box-shadow:0 0 0 8px rgba(255,204,73,.18),0 0 28px rgba(255,201,62,.95)!important}
html.v1814 .v18145RequiredAction::after{content:attr(data-required-action);position:absolute;left:50%;bottom:calc(100% + 10px);transform:translateX(-50%);min-width:max-content;padding:7px 12px;border:2px solid #ffd15c;border-radius:7px;background:#271a03;color:#fff4ae;font-size:12px;font-weight:950;pointer-events:none;box-shadow:0 6px 18px #000c}
@keyframes v18145RequiredPulse{50%{filter:brightness(1.35);transform:translateY(-2px)}}

html.v1814 #seaInspect.v18145PlayerInspect{position:fixed!important;right:18px!important;top:148px!important;bottom:auto!important;width:310px!important;max-width:calc(100vw - 36px)!important;max-height:calc(100vh - 166px)!important;min-height:0!important;overflow:auto!important;z-index:520!important;box-shadow:0 18px 50px #000d,0 0 0 2px rgba(226,174,58,.32)!important}
html.v1814 #seaInspect.v18145PlayerInspect .v18144PlayerQuickActions{position:sticky!important;top:-18px!important;margin:-2px -4px 10px!important;z-index:40!important}
html.v1814 #seaInspect.v18145PlayerInspect .inspectShip{height:105px!important}
html.v1814 #seaInspect.v18145PlayerInspect .captainRankCard{margin-top:8px!important}
html.v1814 #seaInspect.v18145PlayerInspect .heroActions button{font-size:12px!important;min-height:40px!important}

html.v1814 .seaVessel.player{will-change:transform!important;transition:none!important}
html.v1814 .seaVessel.player img{will-change:transform!important}
@media(max-width:1050px){html.v1814 #seaInspect.v18145PlayerInspect{right:10px!important;top:112px!important;width:290px!important;max-height:calc(100vh - 125px)!important}}


/* V18.14.12 — NPC sink lifecycle and extreme-zoom FPS governor */
html.v1814 .seaVessel.npcSinking{pointer-events:none!important;z-index:2!important;animation:v181412NpcSink .9s cubic-bezier(.35,.05,.7,.3) forwards!important}
html.v1814 .seaVessel.npcSinking span{opacity:.35!important}
@keyframes v181412NpcSink{0%{opacity:1}55%{opacity:.72;filter:grayscale(.35) brightness(.75)}100%{opacity:0;filter:grayscale(1) brightness(.25);transform:var(--npc-last-transform) translateY(18px) scale(.72)}}
html.v1814.v181412ExtremeZoom .seaVessel.npc:not(.trainingTarget) span{display:none!important}
html.v1814.v181412ExtremeZoom .seaVessel.player span{font-size:10px!important;padding:2px 4px!important;box-shadow:none!important}
html.v1814.v181412ExtremeZoom .seaVessel:not(.me){will-change:auto!important;contain:layout style paint!important}
html.v1814.v181412ExtremeZoom .seaVessel:not(.me) img{width:70px!important;height:46px!important;filter:none!important}
html.v1814.v181412ExtremeZoom .v183CourseSvg,html.v1814.v181412ExtremeZoom .v185Current,html.v1814.v181412ExtremeZoom .v185Reef,html.v1814.v181412ExtremeZoom .livingIsland small{display:none!important}
html.v1814.v181412ExtremeZoom #seaStage{image-rendering:auto;backface-visibility:hidden;transform-style:flat!important}

/* V18.14.12 mini-map/main-map consistency */
html.v1814 .v185MiniMap i.npc.offscreen{opacity:.34;transform:translate(-50%,-50%) scale(.72)}
html.v1814 .v185MiniMap i.npc.onscreen{opacity:1;box-shadow:0 0 0 1px rgba(255,255,255,.7),0 0 7px rgba(242,188,77,.95)}
html.v1814 .v185MiniMap i.npc.training.onscreen{box-shadow:0 0 0 1px #fff,0 0 8px #7be1a4}
