/* BLACK PIRATE KINGDOM V18.3 — readable beta polish */
:root{--v183-bg:#041319;--v183-panel:#07222b;--v183-line:#315d69;--v183-gold:#efbd54;--v183-text:#f4f0e4;--v183-muted:#a9c1c8}
html.v183 body{font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;font-size:14px;line-height:1.45;letter-spacing:.01em;color:var(--v183-text);text-rendering:optimizeLegibility}
html.v183 h2,html.v183 h3,html.v183 p,html.v183 span,html.v183 small,html.v183 b{max-width:none;text-overflow:clip}
html.v183 button,html.v183 input,html.v183 select{font-family:inherit}

/* Header: game pages and account tools stay in one clean top bar. */
html.v18.v181.v183 #game>header{display:grid!important;grid-template-columns:225px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;min-height:64px!important;height:64px!important;padding:6px 10px!important;background:linear-gradient(180deg,#071b22,#031016)!important;border-bottom:1px solid #6c5428!important;box-shadow:0 8px 24px #0008!important}
html.v183 #game>header>div:first-child{min-width:0;display:grid!important;grid-template-columns:47px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:9px!important;align-items:center!important}
html.v183 #game>header>div:first-child:before{grid-row:1/3;width:45px!important;height:45px!important;flex-basis:45px!important;background-size:33px!important}
html.v183 #game>header h1{font-family:Georgia,"Times New Roman",serif!important;font-size:17px!important;line-height:1.02!important;letter-spacing:2.4px!important;white-space:normal!important}
html.v183 #captain{font-size:10px!important;color:#b8cbd0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.v183 #nav{min-width:0;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important;flex-wrap:nowrap!important}
html.v183 .v17NavScroll{display:flex!important;align-items:center!important;gap:2px!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;scrollbar-color:#8e6c2d transparent!important;padding-bottom:1px}
html.v183 .v17NavBtn{flex:0 0 auto!important;min-height:36px!important;height:36px!important;padding:5px 7px!important;gap:4px!important;border-radius:6px!important;font-size:10px!important;line-height:1!important;border-color:transparent!important;background:transparent!important;color:#dce6e8!important;box-shadow:none!important}
html.v183 .v17NavBtn:hover{background:#12303a!important;border-color:#315d69!important}
html.v183 .v17NavBtn.active{background:linear-gradient(180deg,#f4c45b,#9b6519)!important;border-color:#ffd77c!important;color:#130e07!important;box-shadow:0 0 15px #c98a273b!important}
html.v183 .v17NavBtn img{width:16px!important;height:16px!important;object-fit:contain!important}
html.v183 .v17NavBtn span{display:inline!important;white-space:nowrap!important;font-weight:750!important}
html.v183 .v17NavTools{display:flex!important;align-items:center!important;gap:4px!important;flex:0 0 auto!important;border-left:1px solid #29464e;padding-left:7px}
html.v183 .v17UtilityBtn,html.v183 .v183Language{height:36px!important;border-radius:7px!important;background:#0d2b35!important;border:1px solid #3c6875!important;color:#f4f0e4!important}
html.v183 .v17UtilityBtn{display:flex!important;align-items:center!important;gap:5px!important;padding:5px 9px!important;font-size:10px!important}
html.v183 .v17UtilityBtn>span{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#173e4a;color:#ffd476;font-size:12px;font-weight:900}
html.v183 .v17UtilityBtn>b{font-size:10px;white-space:nowrap}
html.v183 .v183Language{display:flex!important;align-items:center!important;gap:3px!important;padding:3px 5px!important;width:70px!important}
html.v183 .v183Language>span{font-size:12px}
html.v183 .v183Language select{width:43px!important;height:28px!important;min-width:43px!important;padding:3px 4px!important;border:0!important;background:transparent!important;font-size:10px!important;font-weight:800!important}
html.v183 .v183Logout{border-color:#724145!important;background:#321b20!important}

/* Resource bar remains readable without becoming taller. */
html.v183 #resources{font-variant-numeric:tabular-nums!important}
html.v183 .v17Resource{min-width:0!important}
html.v183 .v17Resource>span:not(.solGlyph):not(.v181PoolGlyph){font-size:8px!important;letter-spacing:.03em!important}
html.v183 .v17Resource>b{font-size:11px!important}

/* World map: mouse-first controls and clear-weather default. */
html.v183 body[data-page="world"] main{padding-top:9px!important}
html.v183 .v17World{grid-template-columns:215px minmax(650px,1fr) 248px!important;gap:10px!important}
html.v183 .v17WorldCenter{min-width:0}
html.v183 .v17WorldTopbar{min-height:0!important;margin-bottom:5px!important}
html.v183 .v17WorldTopbar h2{font-size:27px!important;line-height:1.05!important;margin:2px 0!important}
html.v183 .v17WorldTopbar p{font-size:11px!important;line-height:1.4!important;color:#c5d6da!important;margin:2px 0!important}
html.v183 .v17MapToolbar{min-height:39px!important;align-items:center!important}
html.v183 .v17ControlHint{display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:1px!important;font-size:9px!important;white-space:normal!important;text-align:right!important;color:#b7c9ce!important}
html.v183 .v17ControlHint b{color:#f0c865!important;font-size:10px!important}
html.v183 .v17ControlHint span{max-width:720px!important}
html.v183 .v17MapFrame{position:relative!important;padding-top:47px!important}
html.v183 .v17CoordinateHud{top:47px!important;z-index:16!important}
html.v183 .v17SeaViewport{cursor:crosshair!important;user-select:none!important;touch-action:none!important}
html.v183 .seaHint{font-size:9px!important;line-height:1.2!important;max-width:700px!important;padding:4px 8px!important;background:#031217d9!important}
html.v183 .v17Fog,html.v183 .v17StormCell{opacity:0!important;pointer-events:none!important}
html.v183 #seaViewport[data-weather="rain"] .v17Fog,html.v183 #seaViewport[data-weather="fog"] .v17Fog,html.v183 #seaViewport[data-weather="storm"] .v17Fog{opacity:.6!important}
html.v183 #seaViewport[data-weather="storm"] .v17StormCell{opacity:.85!important}
html.v183 #seaViewport[data-weather="night"] .v17OceanTexture{filter:brightness(.48) saturate(.8)!important}
html.v183 #seaViewport[data-weather="clear"] .v17OceanTexture{filter:brightness(1.1) saturate(1.12) contrast(1.03)!important}
html.v183 #seaViewport[data-weather="clear"]:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 78% 10%,#ffe7a629 0 8%,transparent 30%),linear-gradient(160deg,#7de4ff10,transparent 45%);z-index:1}

/* Mouse course visualization. */
html.v183 .v183CourseSvg{position:absolute;inset:0;width:100%;height:100%;z-index:5;pointer-events:none;overflow:visible}
html.v183 .v183CourseSvg path{fill:none;stroke:#eec85e;stroke-width:.22;stroke-dasharray:1.1 1.25;filter:drop-shadow(0 0 .7px #000);animation:v183RouteDash 1.2s linear infinite}
html.v183 .v183CourseMarker{position:absolute;z-index:11;transform:translate(-50%,-50%);display:none;pointer-events:none}
html.v183 .v183CourseMarker.show{display:block}
html.v183 .v183CourseMarker i{display:block;width:22px;height:22px;border:2px solid #ffd66f;border-radius:50%;box-shadow:0 0 0 5px #f5c85922,0 0 18px #f5c85988;animation:v183Pulse 1.4s ease-out infinite}
html.v183 .v183CourseMarker span{position:absolute;top:25px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#061820e8;border:1px solid #ae8130;border-radius:5px;padding:2px 6px;font-size:8px;color:#ffe091}
html.v183 .v183PointerMarker{position:absolute;z-index:10;width:8px;height:8px;border:1px solid #bdeeff;border-radius:50%;transform:translate(-50%,-50%);display:none;pointer-events:none;box-shadow:0 0 10px #74dfff}
html.v183 .v183PointerMarker.show{display:block}
@keyframes v183RouteDash{to{stroke-dashoffset:-2.35}}
@keyframes v183Pulse{0%{transform:scale(.7);opacity:1}100%{transform:scale(1.5);opacity:0}}

/* Boss invasion is always visible at the top of the map, not buried in a side panel. */
html.v183 .v183BossInvasion{position:absolute;left:0;right:0;top:0;height:40px;z-index:18;display:grid;grid-template-columns:auto 56px minmax(0,1fr) auto;align-items:center;gap:8px;padding:5px 8px;background:linear-gradient(90deg,#271219f2,#092530f2 55%,#071b22f2);border:1px solid #9a573d;border-radius:8px;color:#f5eee1;box-shadow:0 6px 16px #0007}
html.v183 .v183BossInvasion>span{font-size:9px;font-weight:900;letter-spacing:.08em;color:#ffb58d;white-space:nowrap}
html.v183 .v183BossInvasion img{width:54px;height:28px;object-fit:contain}
html.v183 .v183BossInvasion>div{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center;min-width:0}
html.v183 .v183BossInvasion b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.v183 .v183BossInvasion small{font-size:8px;color:#d3e0e3;white-space:nowrap}
html.v183 .v183BossInvasion i{grid-column:1/-1;height:4px;background:#1a0b0d;border-radius:999px;overflow:hidden}
html.v183 .v183BossInvasion i em{display:block;height:100%;background:linear-gradient(90deg,#b02c2c,#f0a53e)}
html.v183 .v183BossInvasion button{height:27px;padding:3px 8px;font-size:9px;border-radius:5px}
html.v183 .v183BossInvasion.idle{grid-template-columns:auto 1fr auto;border-color:#426c75;background:linear-gradient(90deg,#0b3038f2,#071b22f2)}
html.v183 .v183BossInvasion.idle>span{color:#ffe296}

/* Right-side panels and spyglass are no longer microscopic. */
html.v183 .v17RightSide{gap:8px!important}
html.v183 .v17RightSide>.v17Panel:first-child{order:0!important}
html.v183 .v17Inspect{order:1!important;min-height:225px!important;padding:12px!important}
html.v183 .v17Inspect .eyebrow{font-size:9px!important;letter-spacing:.11em!important;color:#8ed6e5!important}
html.v183 .v17Inspect h2,html.v183 .v17Inspect h3{font-size:17px!important;line-height:1.15!important;margin:6px 0!important;color:#f4d27e!important}
html.v183 .v17Inspect p{font-size:11px!important;line-height:1.45!important;color:#d4e0e3!important;margin:6px 0!important}
html.v183 .v17Inspect .inspectType{font-size:10px!important;color:#9dc8d1!important}
html.v183 .v17Inspect .inspectShip{height:68px!important;margin:4px auto!important;filter:drop-shadow(0 8px 8px #0009)}
html.v183 .v17Inspect .inspectStats b{font-size:12px!important}
html.v183 .v17Inspect .inspectStats span{font-size:8px!important}
html.v183 .v17Inspect .heroActions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
html.v183 .v17Inspect .heroActions button{padding:6px 5px!important;font-size:9px!important}
html.v183 .seaLegend{font-size:9px!important;line-height:1.5!important}
html.v183 .v17BossQuick b{font-size:11px!important}
html.v183 .v17BossQuick small{font-size:8.5px!important;line-height:1.25!important}

/* Ship sprites: stronger depth on every screen. */
html.v183 .seaVessel img,html.v183 .shipTurntable img,html.v183 .harborHero>img,html.v183 .v17FleetList img,html.v183 .battleShip img{filter:drop-shadow(0 8px 7px #000b) saturate(1.07) contrast(1.05)!important}
html.v183 .seaVessel span{font-family:"Segoe UI",Arial,sans-serif!important;font-size:9px!important;line-height:1.15!important;letter-spacing:.01em!important;background:#031218e8!important;border:1px solid #567d87!important;color:#f8f2e8!important;text-shadow:0 1px 2px #000!important;transform:translateX(-50%) rotate(var(--counter-heading,0deg))}

/* Story campaign. */
html.v183 body[data-page="story"] main{max-width:1500px!important;margin:0 auto!important;padding:20px!important}
html.v18.v181.v183 body[data-page="story"] #app>section.v183Story>header.v183StoryHero{position:relative!important;top:auto!important;z-index:auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) 180px!important;gap:25px!important;align-items:center!important;width:100%!important;height:auto!important;min-height:210px!important;padding:30px 34px!important;border:1px solid #6e572b!important;border-radius:16px!important;background:linear-gradient(90deg,#051b24ee,#092c37d9),radial-gradient(circle at 82% 30%,#eeb95022,transparent 30%)!important;box-shadow:none!important;overflow:hidden!important}
html.v18.v181.v183 .v183StoryHero>div:first-child{display:block!important;grid-template-columns:none!important;margin:0!important;min-width:0!important}
html.v18.v181.v183 .v183StoryHero>div:first-child:before{content:none!important;display:none!important}
html.v183 .v183StoryHero:after{content:"";position:absolute;right:-40px;bottom:-80px;width:380px;height:260px;background:url('/assets/v18/ships/ghost-meridian.svg') center/contain no-repeat;opacity:.17;transform:rotate(-9deg);pointer-events:none}
html.v183 .v183StoryHero h2{font-family:Georgia,"Times New Roman",serif!important;font-size:38px!important;line-height:1.05!important;margin:5px 0 12px!important;color:#f2c35e!important}
html.v183 .v183StoryHero p{max-width:760px!important;font-size:14px!important;line-height:1.65!important;color:#d4e0e2!important}
html.v183 .v183StoryProgress{position:relative;z-index:2;display:grid;gap:4px;padding:18px;border:1px solid #80652d;border-radius:12px;background:#04151bcc;text-align:center}
html.v183 .v183StoryProgress small{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:#9fc2c9}
html.v183 .v183StoryProgress b{font-size:31px;color:#f2c35e}
html.v183 .v183StoryProgress span{font-size:10px;color:#c9d7da}
html.v183 .v183StoryLine{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}
html.v183 .v183Chapter{display:grid;grid-template-columns:64px minmax(0,1fr);gap:14px;min-height:245px;padding:20px;border:1px solid #315863;border-radius:14px;background:linear-gradient(145deg,#09242d,#05171d);box-shadow:0 10px 25px #0004}
html.v183 .v183Chapter.locked{filter:saturate(.45);opacity:.6}
html.v183 .v183Chapter.complete{border-color:#8b7135;box-shadow:inset 0 0 30px #d9a8410e,0 10px 25px #0004}
html.v183 .v183ChapterNo{font:700 34px/1 Georgia;color:#e9b84c2e;border-right:1px solid #294a53;padding-right:12px}
html.v183 .v183ChapterCopy>span{font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:#82c9d7}
html.v183 .v183Chapter.complete .v183ChapterCopy>span{color:#efc45e}
html.v183 .v183Chapter h3{font-family:Georgia,"Times New Roman",serif!important;font-size:21px!important;line-height:1.15!important;margin:7px 0!important;color:#f1cf78!important}
html.v183 .v183Chapter p{font-size:12px!important;line-height:1.55!important;color:#c8d8dc!important;min-height:76px}
html.v183 .v183Objective{display:grid;gap:3px;margin:10px 0 12px;padding:9px 10px;border-left:3px solid #d5a43d;background:#031319}
html.v183 .v183Objective b{font-size:8px;text-transform:uppercase;letter-spacing:.1em;color:#8bb9c3}
html.v183 .v183Objective em{font-size:10px;font-style:normal;color:#f5e4b4}
html.v183 .v183Chapter button{padding:7px 11px;font-size:10px}

/* Combat overlay: visible shots, explosions and readable logs. */
html.v183 #bossBattleStage.v181BattleOverlay.v183Combat{background:radial-gradient(circle at 50% 35%,#0c3442,#02090d 70%)!important;border:1px solid #c28c31!important;box-shadow:0 0 0 9999px #000d,0 0 40px #000!important}
html.v183 #bossBattleStage.v183Combat .battleControls:before{content:attr(data-title)!important;font:700 14px Georgia!important;letter-spacing:.12em!important;color:#f0c65f!important}
html.v183 #bossBattleStage.v183Combat .battleArena{position:relative!important;overflow:hidden!important;background:radial-gradient(ellipse at center,#0f425177,#04151b 72%),repeating-linear-gradient(18deg,#ffffff05 0 1px,transparent 1px 28px)!important}
html.v183 #bossBattleStage.v183Combat .battleArena:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 25% 40%,#61d6ff0e,transparent 25%),radial-gradient(circle at 75% 60%,#ffbd5c0c,transparent 24%);pointer-events:none}
html.v183 #bossBattleStage.v183Combat .battleShip{position:relative!important;overflow:visible!important;transition:transform .18s,filter .18s,opacity .3s!important}
html.v183 #bossBattleStage.v183Combat .battleShip.firing{transform:translateX(8px) scale(1.02)!important;filter:brightness(1.25)!important}
html.v183 #bossBattleStage.v183Combat .enemySide .battleShip.firing{transform:translateX(-8px) scale(1.02)!important}
html.v183 #bossBattleStage.v183Combat .battleShip.hit{animation:v183Hit .36s ease!important}
html.v183 #bossBattleStage.v183Combat .battleShip.destroyed{opacity:.35!important;filter:grayscale(.8) brightness(.55)!important;transform:scale(.96)!important}
html.v183 .v183CannonShot{position:absolute;z-index:40;width:10px;height:10px;border-radius:50%;background:#fff4b7;box-shadow:0 0 7px 3px #ffbf45,0 0 18px 6px #ff6d2d;pointer-events:none}
html.v183 .v183CannonShot:after{content:"";position:absolute;right:5px;top:3px;width:65px;height:3px;background:linear-gradient(90deg,transparent,#ffd878);transform-origin:right center}
html.v183 .v183Blast{position:absolute;z-index:45;left:50%;top:50%;width:14px;height:14px;border-radius:50%;background:#fff3b0;box-shadow:0 0 0 8px #ffb33b77,0 0 0 18px #e84b2444,0 0 28px 18px #ff8c36;animation:v183Blast .62s ease-out forwards;pointer-events:none}
html.v183 .v183Blast.critical{box-shadow:0 0 0 9px #fff4a988,0 0 0 22px #ff3d1f66,0 0 42px 25px #ff8c36}
html.v183 .v183BattleLogHead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
html.v183 .v183BattleLogHead h3{font-size:12px!important;margin:0!important}
html.v183 .v183BattleLogHead span{font:700 9px Georgia;letter-spacing:.12em;color:#d8b35c}
html.v183 #bossBattleStage .battleLogRows{height:calc(100% - 28px);overflow:auto}
html.v183 #bossBattleStage .battleLogRows>div{font-size:11px!important;line-height:1.35!important}
html.v183 #bossBattleStage .battleLogRows>div.critical{background:#4a260d66!important;border-left:3px solid #ffbd4d!important}
html.v183 #bossBattleStage .battleLogRows>div.sunk{background:#4a111566!important;border-left:3px solid #e04d56!important}
html.v183 .v183BattleResult{position:absolute;z-index:60;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;gap:5px;padding:18px 38px;border:2px solid #e5b84e;border-radius:10px;background:#031117e8;box-shadow:0 0 45px #000,0 0 30px #d6a44344;animation:v183Result .35s ease-out}
html.v183 .v183BattleResult b{font:800 31px Georgia;letter-spacing:.15em;color:#f0c65f}
html.v183 .v183BattleResult span{font-size:28px}
html.v183 .v183BattleResult.lost{border-color:#9d3e46}.v183BattleResult.lost b{color:#ef7f86}
@keyframes v183Hit{0%,100%{transform:translateX(0)}25%{transform:translateX(-7px)}60%{transform:translateX(5px)}}
@keyframes v183Blast{0%{transform:translate(-50%,-50%) scale(.25);opacity:1}100%{transform:translate(-50%,-50%) scale(2.2);opacity:0}}
@keyframes v183Result{from{transform:translate(-50%,-50%) scale(.7);opacity:0}to{transform:translate(-50%,-50%) scale(1);opacity:1}}

@media(max-width:1500px){
 html.v18.v181.v183 #game>header{grid-template-columns:205px minmax(0,1fr)!important}
 html.v183 #game>header h1{font-size:15px!important;letter-spacing:1.8px!important}
 html.v183 .v17NavBtn{padding:5px 6px!important;font-size:9px!important}
 html.v183 .v17UtilityBtn>b{display:none}
 html.v183 .v17UtilityBtn{padding:5px 7px!important}
 html.v183 .v17World{grid-template-columns:195px minmax(570px,1fr) 225px!important}
}
@media(max-width:1280px){
 html.v183 .v17NavBtn span{display:none!important}
 html.v183 .v17NavBtn{padding:5px 8px!important}
 html.v183 .v17NavBtn img{width:18px!important;height:18px!important}
 html.v183 .v17World{grid-template-columns:190px minmax(560px,1fr)!important}
 html.v183 .v17RightSide{grid-column:1/-1!important;display:grid!important;grid-template-columns:1.2fr 1fr 1fr!important;max-height:none!important}
 html.v183 .v183StoryLine{grid-template-columns:1fr}
}
@media(max-width:860px){
 html.v18.v181.v183 #game>header{height:auto!important;min-height:0!important;grid-template-columns:1fr!important}
 html.v183 #nav{grid-template-columns:1fr!important}
 html.v183 .v17NavTools{border-left:0;padding-left:0;justify-content:flex-end}
 html.v183 .v17NavBtn span{display:inline!important}
 html.v183 .v17World{grid-template-columns:1fr!important}
 html.v183 .v17RightSide{grid-template-columns:1fr!important}
 html.v183 .v183StoryHero{grid-template-columns:1fr!important;padding:22px!important}
 html.v183 .v183StoryHero h2{font-size:30px!important}
 html.v183 .v183StoryLine{grid-template-columns:1fr}
 html.v183 .v183Chapter{grid-template-columns:44px minmax(0,1fr);padding:14px}
}
