*{box-sizing:border-box}body{margin:0;background:#122c35;color:#fff;font-family:Arial,sans-serif;overflow:hidden}#world{width:100vw;height:100dvh;display:block;touch-action:none}header{position:absolute;top:26px;left:30px;right:30px;display:flex;gap:15px;align-items:center}header a{color:#ffc479;text-decoration:none;font-weight:900;font-size:27px}header span{font-weight:bold;letter-spacing:3px;font-size:12px}small{display:block;font-size:8px;letter-spacing:2px;margin-top:5px;opacity:.65}button{border:1px solid #ffffff50;background:#142b35d9;color:white;padding:15px 20px;cursor:pointer;letter-spacing:1px;font-size:10px;font-weight:bold}button:hover{background:#d99b46;color:#142b35}#sound{margin-left:auto}#intro{position:absolute;left:9vw;top:24vh;max-width:450px}h1{font-size:clamp(55px,8vw,110px);letter-spacing:-5px;line-height:.95;margin:20px 0 25px}.eyebrow{color:#ffc479;font-size:10px;letter-spacing:4px}#intro>p{line-height:1.7;font-size:13px}#start{background:#f3b966;color:#142b35;margin:20px 0}.controls{opacity:.6}#location{position:absolute;left:30px;bottom:35px}#location span{font-size:8px;letter-spacing:3px;color:#ffc479}#location b{display:block;font-size:23px;margin-top:8px}#hint{font-size:11px;color:#c4d6d8}#dash{position:absolute;bottom:30px;right:35px;text-align:right}#speed{font-size:65px;letter-spacing:-4px}#dash span{font-size:10px;margin-left:12px}#gear{font-style:normal;color:#ffc479;font-size:11px;letter-spacing:3px}#mode{font-size:8px;letter-spacing:2px;opacity:.6}#map{position:absolute;right:30px;top:105px;border:1px solid #ffffff40;border-radius:50%;width:150px;height:150px}#pause{position:absolute;inset:0;background:#10232bd9;display:grid;place-content:center;text-align:center}#pause[hidden],#intro[hidden]{display:none}#touch{display:none;position:absolute;bottom:140px;left:20px;right:20px;justify-content:space-between;gap:8px}#touch button{touch-action:none;user-select:none;min-height:60px}#error{position:absolute;top:35%;left:10%;right:10%;background:#152a35;padding:24px}@media(pointer:coarse){#touch{display:flex}#location{bottom:20px;left:20px}#hint{max-width:200px}#map{width:105px;height:105px;top:90px}#sound{max-width:110px;padding:10px}header{left:20px;right:20px}#dash{right:20px}#intro{top:20vh}#intro .controls{max-width:240px}}

/* Keep the launch button above passive HUD overlays at every viewport size. */
#intro{z-index:5;top:clamp(100px,18vh,190px);max-height:calc(100dvh - 125px);overflow:auto;padding:0 12px 20px 0}#intro h1{font-size:clamp(48px,7vw,96px)}#location,#dash,#map{pointer-events:none}body:not(.playing) #location,body:not(.playing) #dash,body:not(.playing) #map{visibility:hidden}#world:focus{outline:none}#pause{z-index:10}#touch{z-index:6}

#fishing{position:absolute;top:110px;left:30px;width:290px;background:#102b35ed;border:1px solid #aac5c54a;padding:18px;z-index:7;border-radius:6px}#fishing[hidden]{display:none}#fishing>b{font-size:11px;letter-spacing:3px;color:#ffc479}#fish-status{font-size:13px;line-height:1.5;min-height:42px}#fishing button{padding:12px 9px;margin:3px 0;touch-action:none}#fishing button:disabled{opacity:.35;cursor:default}#catch-count{font-size:11px;color:#aac5c5}.fish-meters{font-size:11px}.fish-meters progress{width:100%;accent-color:#e9b66f;margin:6px 0}#fish-tension{accent-color:#f18060}@media(max-width:600px){#fishing{top:85px;left:15px;width:215px;padding:12px}#fishing button{font-size:9px}#fish-status{font-size:11px}}

#catch-celebration{position:absolute;z-index:20;left:50%;top:48%;transform:translate(-50%,-50%);width:min(490px,88vw);padding:30px;text-align:center;border:1px solid #f6d59c99;background:linear-gradient(140deg,#173b40f5,#0b202cf5);border-radius:16px;box-shadow:0 24px 100px #0008;pointer-events:none;animation:catch-pop .45s ease-out}#catch-celebration[hidden]{display:none}.catch-eyebrow{color:#ffd68e;font-size:10px;letter-spacing:4px}#catch-celebration h2{font-size:34px;margin:15px 0 0;color:#ffe3ac}#catch-celebration svg{width:100%;filter:drop-shadow(0 12px 12px #0006)}#catch-celebration h3{font-size:24px;margin:0}#catch-celebration p{font-size:13px;color:#cbdcd6}#catch-celebration.leaving{opacity:0;transform:translate(-50%,-55%);transition:opacity .65s,transform .65s}@keyframes catch-pop{from{opacity:0;transform:translate(-50%,-42%) scale(.88)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}

.catch-fish-art{display:block;width:100%;aspect-ratio:3/2;object-fit:contain;border-radius:12px;margin:14px 0;animation:fish-float 2s ease-in-out infinite}@keyframes fish-float{50%{transform:translateY(-5px) rotate(-1deg)}}

.header-logo{width:110px;height:55px;object-fit:cover;border-radius:4px}.title-logo{width:240px;max-width:65vw;border-radius:8px}#intro{top:100px}#intro h1{font-size:clamp(42px,5vw,66px);margin:12px 0}#leaderboard-open{margin-left:0}#leaderboard-dialog{color:#e8efeb;background:#102b35;border:1px solid #d5b176;border-radius:12px;width:min(680px,94vw);max-height:85dvh;padding:30px}#leaderboard-dialog::backdrop{background:#05121caa}#lb-close{float:right}#leaderboard-dialog h2{font-size:30px}#leaderboard-dialog p{font-size:13px;line-height:1.5}#lb-name{display:block;background:#203f48;border:1px solid #829991;color:white;padding:12px;width:100%;margin:8px 0 15px}.lb-opt{font-size:13px}.lb-note{color:#a6bfbd}.lb-scroll{overflow:auto}#leaderboard-dialog table{width:100%;border-collapse:collapse;margin:20px 0;font-size:13px;text-align:left}#leaderboard-dialog th,#leaderboard-dialog td{padding:12px 8px;border-bottom:1px solid #ffffff20}@media(max-width:600px){header{gap:8px}.header-logo{width:75px;height:42px}header button{padding:9px;font-size:8px}#sound{max-width:80px}.title-logo{width:160px}#intro{top:90px}#intro h1{font-size:42px}#leaderboard-dialog{padding:20px}}

.hero-strip{display:flex;gap:10px;margin:15px 0 4px;max-width:350px}.hero-strip figure{margin:0;position:relative;flex:1;overflow:hidden;border-radius:6px;border:1px solid #ffffff30;height:78px}.hero-strip img{width:100%;height:100%;object-fit:cover;opacity:.8}.hero-strip figcaption{position:absolute;bottom:0;left:0;right:0;padding:13px 8px 7px;font-size:8px;letter-spacing:1px;background:linear-gradient(transparent,#061e2be8)}@media(max-height:750px){#intro .title-logo{width:150px}#intro h1{font-size:42px}#intro>p{margin:8px 0}.hero-strip figure{height:60px}#start{margin:12px 0}#intro{top:85px;max-height:calc(100dvh - 95px)}}

header>a{white-space:nowrap;flex-shrink:0}@media(max-width:600px){header>a{font-size:20px}.header-logo{width:60px}header{gap:6px}}

/* Preserve title and instrument contrast over a sunlit, reflective lake. */
body:not(.playing)::before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#071c27a8,transparent 57%)}
#intro .controls{opacity:.91}
#location,#dash{text-shadow:0 1px 5px #071a20}

#mode{display:block;margin:6px 0 0 auto;padding:6px 9px;opacity:1;pointer-events:auto;color:#fff;background:#102b35db;border:1px solid #bcd1d45e;cursor:pointer}
@media(pointer:coarse){#mode{min-height:36px}}

#crew-framing{display:none;position:absolute;z-index:7;bottom:28px;left:50%;transform:translateX(-50%);padding:3px;background:#102b35ed;border:1px solid #bcd1d45e;border-radius:4px}
.playing.crew-view #crew-framing{display:flex}
#crew-framing button{margin:0;padding:9px 14px;border:0;background:transparent;color:#efeee7}
#crew-framing button[aria-pressed=true]{background:#edbc78;color:#142b35;border-radius:2px}
@media(max-width:700px){#crew-framing{top:79px;bottom:auto}#crew-framing button{padding:9px 10px}.crew-view #fishing{top:128px}}

#stern-cheer{position:absolute;left:50%;top:20%;transform:translateX(-50%);color:#fff3d9;font-size:clamp(22px,3vw,36px);font-weight:800;text-shadow:0 2px 5px #071a20;pointer-events:none}
.stern-shot :is(#map,#fishing,#crew-framing){visibility:hidden}
.stern-shot #catch-celebration{left:18px;top:95px;transform:none;width:185px;padding:12px;animation:none}
.stern-shot #catch-celebration h2{font-size:18px;margin:5px 0}
.stern-shot #catch-celebration h3{font-size:16px}
.stern-shot #catch-celebration .catch-fish-art{max-height:72px;margin:4px auto}
.stern-shot #catch-celebration .catch-eyebrow{font-size:8px;letter-spacing:1px}
.stern-shot #catch-celebration p{font-size:11px}
@media(max-width:700px){.stern-shot #catch-celebration{left:12px;top:76px;width:142px;padding:8px}.stern-shot #catch-celebration .catch-fish-art{max-height:48px}.stern-shot #stern-cheer{top:30%}}

/* Floating controls share the edges of the viewport with the instruments. */
.game-bar{inset:14px 24px auto;gap:8px;z-index:8;pointer-events:none}
.game-bar>*{pointer-events:auto}
.game-brand{display:block;margin-right:auto;line-height:0}
#game-logo{width:132px;height:auto;filter:drop-shadow(0 1px 2px #07131c) drop-shadow(0 0 5px #07131c99)}
.game-bar button,#mode,#fishing summary,.hud-popup button,.hud-popup label,.guide-close{border:1px solid #c9d7d25c;border-radius:6px;background:#102b34ed;color:#fff4e4;font:700 13px/1.2 Arial,sans-serif;letter-spacing:.1px;padding:11px 14px}
button:focus-visible,summary:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #ffce87;outline-offset:3px}
.game-bar button:hover,#mode:hover,#fishing summary:hover,.hud-popup button:hover{background:#294751;color:#fff}
.hud-popup{position:fixed;inset:auto 24px auto auto;margin:0;padding:7px;background:#102b34fa;border:1px solid #a0b9b75c;border-radius:10px;color:white;box-shadow:0 8px 25px #00162166;min-width:180px}
.hud-popup:popover-open{display:grid;gap:3px}
.hud-popup button,.hud-popup label{display:flex;gap:8px;align-items:center;justify-content:space-between;text-align:left;background:transparent;border-color:transparent;margin:0;min-height:36px}
.hud-popup label{justify-content:start;cursor:pointer}
.hud-popup input{accent-color:#edbc78}
#game-menu{top:81px}
#game-menu #sound{margin:0;max-width:none}
.hud-popup b,#play-guide h3{color:#ffc479;text-transform:uppercase;font:bold 10px/1.5 Arial,sans-serif;letter-spacing:1.7px}
.hud-popup b{padding:7px 12px 2px}
.hud-popup button[aria-pressed=true]{color:#ffd499;background:#29434a}
#camera-picker{bottom:76px;max-height:calc(100dvh - 92px);overflow:auto}
#mode{margin-top:6px}
#fishing{width:max-content;max-width:calc(100vw - 30px);top:104px;left:24px;border:0;padding:0;background:transparent}
#fishing summary{display:flex;align-items:center;gap:9px;cursor:pointer;list-style:none;width:max-content;max-width:100%}
#fishing summary::-webkit-details-marker{display:none}
#fishing summary::after{content:"▾";font-size:12px}
#fishing[open] summary::after{content:"▴"}
#fishing[open]{width:min(282px,calc(100vw - 30px));background:#102b34ee;border:1px solid #a8bdba66;border-radius:8px;overflow:auto;max-height:calc(100dvh - 175px)}
#fishing[open] summary{width:100%;background:transparent;border-color:transparent;border-bottom:1px solid #dae2d52c;border-radius:0}
#fishing[open] summary::after{margin-left:auto}
#compact-fish{color:#ffce80;font-size:12px}
#compact-fish:empty{display:none}
.fish-content{padding:0 14px 12px}
#fish-status{margin:10px 0;min-height:0}
#trout-sonar{font-size:12px;line-height:1.4;margin:8px 0 0}
.instruments-hidden :is(#map,#location){display:none}
#play-guide{width:min(440px,calc(100vw - 24px));max-height:85dvh;padding:22px 24px;border:1px solid #a2b6ad88;border-radius:12px;background:#112c35;color:#f4f5ee;box-shadow:0 16px 64px #061d24aa}
#play-guide::backdrop{background:#03131c99}
#play-guide h2{font-size:25px;margin:3px 0 20px}
#play-guide h3{margin:18px 0 4px}
#play-guide p,#play-guide li{font-size:14px;line-height:1.5}
#play-guide p{margin:4px 0}
#play-guide ol{padding-left:19px;margin:4px 0}
#play-guide li+li{margin-top:4px}
.guide-close{float:right;padding:8px 10px}
kbd{font:600 .88em/1.25 ui-monospace,monospace;padding:1px 4px;background:#fff1;border:1px solid #d2dace44;border-radius:3px}
#play-guide .guide-shortcuts{margin-top:16px;padding-top:12px;border-top:1px solid #fff2;font-size:12px;color:#c5d3d2}
body:not(.playing) #touch{display:none}
@media(max-width:700px){
  .game-bar{inset:10px 12px auto}
  #game-logo{width:92px}
  .game-bar button,#mode,#fishing summary{min-height:40px;padding:9px 11px}
  #game-menu{top:65px}
  .hud-popup{right:12px}
  #fishing{top:76px;left:12px}
  #fishing[open]{width:min(240px,calc(100vw - 24px));max-height:calc(100dvh - 245px)}
  .crew-view #fishing{top:125px}
  #touch{left:10px;right:10px;bottom:148px;gap:5px}
  #touch button{flex:1;min-width:0;min-height:47px;padding:8px 4px;letter-spacing:0}
  #dash{bottom:16px;right:12px}
  #speed{font-size:44px;letter-spacing:-2px}
  #location{left:12px;max-width:calc(100vw - 165px)}
  #location b{font-size:18px}
  #camera-picker{bottom:64px}
  #map{top:78px;right:12px;width:82px;height:82px}
}
@media(pointer:coarse) and (max-height:520px){
  #touch{bottom:12px;left:14px;right:auto}
  #touch button{min-height:42px;padding:7px 12px}
  #location{display:none}
  #fishing[open]{max-height:calc(100dvh - 145px)}
}

#catch-celebration{width:min(540px,90vw);padding:clamp(12px,3vh,26px)}
#catch-celebration h2{margin:0;font-size:clamp(20px,4vh,34px)}
#catch-celebration .catch-fish-art{height:min(30dvh,240px);object-fit:contain;margin:10px 0}
.stern-shot #catch-celebration .catch-fish-art{height:72px;margin:2px 0}
@media(max-width:700px){#catch-celebration{width:min(92vw,460px);padding:14px}.stern-shot #catch-celebration .catch-fish-art{height:48px}}
@media(prefers-reduced-motion:reduce){#catch-celebration,.catch-fish-art{animation:none}}

#play-guide .art-credit{font-size:10px;color:#c2cfca;line-height:1.35;margin-top:16px}
.art-credit a{color:inherit}
#crew-framing button{white-space:nowrap}
@media(max-width:700px){#crew-framing button{padding:8px;font-size:10px}}

#shore-action {position:absolute;bottom:8vh;left:50%;transform:translateX(-50%);border-radius:6px;background:#f3b966;color:#142b35;z-index:4;padding:13px 19px}
#shore-picker {width:min(650px,94vw);max-height:92dvh;overflow:auto;padding:20px;color:#f4f5ee;background:#112c35;border:1px solid #a2b6ad88;border-radius:12px;text-align:center}
#shore-picker::backdrop {background:#071820aa}
#shore-picker h2 {margin:0 0 18px;font-size:23px}
.angler-choices {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.angler-choices button {position:relative;flex:1;padding:0;overflow:hidden;border-radius:6px;background:#244a67;font-size:16px;text-align:left}
.angler-choices img {display:block;width:100%;height:auto;max-height:44dvh;object-fit:cover;object-position:50% 35%}
.angler-choices span {position:absolute;inset:auto 0 0;padding:24px 10px 9px;background:linear-gradient(transparent,#102027e8);color:white}
.angler-choices button:is(:hover,:focus-visible) {outline:2px solid #f3b966;outline-offset:2px}
.angler-choices button:disabled {opacity:.45;cursor:wait}
@media(max-width:540px) and (min-height:450px) {
  #shore-picker {width:min(360px,92vw)}
  .angler-choices {grid-template-columns:repeat(2,minmax(0,1fr))}
  .angler-choices img {max-height:24dvh}
}
#shore-picker form button {border:0;background:transparent;color:#d1dcd7}
.ashore :is(#dash,#crew-framing,#brake){display:none}
@media(pointer:coarse) {#shore-action{bottom:85px}}
@media(pointer:coarse) and (max-height:520px) {#shore-action{bottom:14px;left:auto;right:14px;transform:none}}

#world.target-gallery {cursor:crosshair}
@media not all and (any-pointer:fine){.town-guide{display:none}}

#town-counter {color:#f3ecdb;background:#163138;border:1px solid #849992;border-radius:10px;padding:22px;width:min(450px,92vw);max-height:86dvh;overflow:auto}
#town-counter::backdrop {background:#07171ac9}
#town-counter form {float:right}
#town-counter form button {padding:7px 10px}
#town-counter h2 {margin:0 0 4px;font-size:23px}
#town-counter .wallet {margin:4px 0 15px;color:#f6c878}
.counter-item {display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #73958c55;padding:10px 0}
.counter-item small {font-size:12px;line-height:1.35;letter-spacing:normal;color:#d1ded9;margin-top:4px;opacity:1}
.counter-item button {flex:none;min-width:68px;padding:9px 6px}
.counter-item button:disabled {opacity:.55;cursor:default}
.counter-receipt {margin:10px 0 0;color:#f1cc92;min-height:1.4em}
#fishing .bait-choice {display:flex;align-items:center;gap:8px;margin:5px 0 8px}
#bait-choice {min-width:0;max-width:100%;padding:4px;background:#14343a;color:white;border:1px solid #8a9e98;border-radius:3px}
#town-counter[data-venue="bar"] {background:#352a23;border-color:#927a65}
#town-counter[data-venue="bar"] .counter-item {border-color:#a28c6955}
