:root { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif; color: #213f48; background: #edf3f2; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #e7bb67; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.fishing-shell { max-width: 450px; margin: auto; padding: 8px 10px 24px; }
.sea {
    position: relative; isolation: isolate; height: clamp(440px, calc(100svh - 105px), 760px);
    overflow: hidden; border-radius: 18px; background: #1798b0 var(--map-background, url('./assets/sunlit-cove-v1.webp')) center center / cover;
    box-shadow: 0 12px 35px #1c5c7015;
}
.sea::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(#092e4640, transparent 25%, transparent 64%, #00273675); }
.hud { position: absolute; z-index: 4; top: 13px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; color: white; pointer-events: none; }
.hud > div { padding: 6px 11px; background: #07394f80; border: 1px solid #ffffff33; border-radius: 25px; backdrop-filter: blur(8px); }
.hud { justify-content: space-between; }
.hud strong { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.6px; text-shadow: 0 1px 3px #00293a55; }
.hud small { font-size: 10px; margin-left: 3px; }
.rod { position: absolute; left: -6%; bottom: 4%; width: 52%; height: 52%; z-index: 1; transform-origin: bottom left; transition: transform .2s; pointer-events: none; filter: drop-shadow(1px 3px 2px #00293a66); }
.line { position: absolute; z-index: 1; left: 39%; top: 49%; width: 1px; height: 11%; background: #fff9; transform: rotate(-27deg); transform-origin: top; }
.bobber { position: absolute; z-index: 2; left: calc(50% - 9px); top: 57%; width: 18px; height: 30px; border-radius: 50%; background: linear-gradient(90deg, #0002, transparent 45%, #0002), linear-gradient(#f66b4d 52%, #fff4d9 52%); border: 1px solid #fff8; box-shadow: 0 6px 4px #00384944; animation: bob 2s ease-in-out infinite; }
.bobber::before { content: ''; position: absolute; width: 3px; height: 11px; left: 6px; top: -9px; border-radius: 2px; background: #e65734; }
.ripples { position: absolute; z-index: 1; left: calc(50% - 36px); top: calc(57% + 22px); width: 72px; height: 19px; border: 2px solid #e1ffffbb; border-radius: 50%; animation: ripple 2s ease-out infinite; }
.ripples::after { content: ''; position: absolute; inset: -6px -16px; border: 1px solid #e1ffff88; border-radius: 50%; }
.bite-mark { display: none; position: absolute; z-index: 3; top: calc(57% - 80px); left: calc(50% - 18px); font-size: 65px; font-weight: 900; color: #fff4bc; text-shadow: 0 3px #b86f2c, 0 0 15px #ffde86; transform: rotate(7deg); }
.is-biting .bite-mark { display: block; animation: hit .3s ease-out; }
.is-biting .bobber { animation: bite .18s infinite alternate; }
.is-biting .ripples { animation-duration: .4s; }
.is-biting .rod, .is-reeling .rod { transform: rotate(-7deg); }
.shadow { position: absolute; width: 65px; height: 23px; border-radius: 50%; background: #043e5066; animation: swim 8s ease-in-out infinite alternate; filter: blur(1px); }
.shadow::after { content: ''; position: absolute; right: -12px; top: 0; border-right: 18px solid #043e5066; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.shadow-one { scale: var(--fish-scale, 1); top: 61%; left: 48%; }
.shadow-two { top: 44%; left: 18%; opacity: .45; transform: scale(.65); animation-delay: -3s; }
.shadow-three { top: 75%; left: 72%; opacity: .4; transform: scale(.5); animation-delay: -5s; }
.is-rare .shadow-one { filter: blur(1px) drop-shadow(0 0 8px #fff3a4); width: 84px; }
.reel-target { display: none; position: absolute; z-index: 3; top: min(51%, calc(100% - 250px)); left: 50%; width: 180px; height: 180px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #063b5066, #063b5022 68%, transparent 70%); }
.is-reeling .reel-target { display: block; }
.target-band { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, transparent calc(var(--target-inner-radius) - 1px), #fff var(--target-inner-radius), #e9fff45c calc(var(--target-inner-radius) + 1px), #e9fff45c calc(var(--target-outer-radius) - 1px), #fff var(--target-outer-radius), transparent calc(var(--target-outer-radius) + 1px)); }
.aim-ring { position: absolute; inset: 30px; border: 4px solid #ffd776; border-radius: 50%; transform: scale(var(--aim-scale, 1)); box-shadow: 0 0 8px #ffdd93aa; }
.aim-ring.is-aligned { border-color: #fffbd1; outline: 1px solid #fffbd1; background: #e8ffbf22; box-shadow: 0 0 24px #f1ffb9, inset 0 0 12px #f1ffb966; }
.target-hook { position: absolute; width: 26px; height: 34px; top: 66px; left: 81px; color: #fff5d7; filter: drop-shadow(0 2px 2px #00394c); }
.reel-meter { position: absolute; display: flex; gap: 9px; justify-content: center; bottom: 6px; left: 0; right: 0; }
.reel-meter i { width: 12px; height: 12px; border-radius: 50%; background: #113b4d88; border: 1px solid #fff9; }
.reel-meter[data-hits='1'] i:first-child, .reel-meter[data-hits='2'] i:nth-child(-n+2), .reel-meter[data-hits='3'] i { background: #ffdd8d; box-shadow: 0 0 8px #ffe7a6; }
.is-pull-miss .aim-ring:not(.is-aligned) { border-color: #ff967e; }
.is-reeling .bobber, .is-reeling .line, .is-reeling .ripples { opacity: 0; }
.is-reeling .shadow-one { scale: var(--fish-scale, 1); top: 49%; left: 41%; width: 85px; animation: struggle .45s infinite alternate; }
.is-reeling #status { padding: 8px 14px; border-radius: 22px; background: #043047e6; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.message { position: absolute; bottom: 119px; left: 10px; right: 10px; z-index: 4; min-height: 23px; display: flex; justify-content: center; gap: 10px; align-items: center; color: white; font-size: 18px; font-weight: 700; text-shadow: 0 2px 7px #002d43; pointer-events: none; }

.catch-button { position: absolute; z-index: 4; left: calc(50% - 45px); bottom: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 90px; height: 90px; padding: 0; border-radius: 50%; border: 2px solid #fff9; background: linear-gradient(145deg, #258d8c, #08556b); color: #fff8dd; box-shadow: 0 5px 0 #073d50, 0 8px 20px #002f4e66, inset 0 2px 3px #ffffff66; }
.catch-button svg { width: 40px; height: 40px; }
.catch-button span { font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.catch-button:active:enabled { transform: translateY(3px); box-shadow: 0 2px 0 #073d50; }
.catch-button.is-ready:enabled { background: linear-gradient(145deg, #ffe9a5, #eab94f); color: #78501f; border-color: #fff1b9; box-shadow: 0 5px 0 #9a722b, 0 0 30px #ffdc9766, inset 0 2px 3px white; }
.catch-button:disabled { opacity: .35; }
.is-reeling .catch-button::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(#ffe3a0 var(--pull-progress, 0%), #ffffff33 0); mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 0); pointer-events: none; }
.is-reeling .catch-button[data-waiting='true'] { border-style: dashed; }
.pull-feedback { position: absolute; z-index: 5; top: min(51%, calc(100% - 250px)); left: 50%; transform: translate(-50%, -50%); padding: 5px 12px; border-radius: 20px; background: #07394ff0; color: #ffe3a0; font-size: 16px; font-weight: 700; pointer-events: none; }
.pull-feedback:empty { display: none; }
.pull-feedback[data-good='false'] { color: #ffb9a6; }
.strike-meter { display: none; position: absolute; z-index: 4; bottom: 24px; left: 8px; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 14px; background: #043047e6; color: #fff5d7; font-size: 11px; pointer-events: none; }
.is-reeling .strike-meter { display: flex; }
.strike-meter i { width: 8px; height: 12px; border: 1px solid #fff5d7; border-radius: 3px; background: #ffe3a0; }
.strike-meter[data-strikes='1'] i:last-child, .strike-meter[data-strikes='2'] i:nth-last-child(-n+2) { background: transparent; border-style: dashed; opacity: .5; }
.primary { min-width: 160px; min-height: 48px; padding: 12px 26px; border: 1px solid #fff9; border-radius: 28px; background: linear-gradient(160deg, #fff0bf, #eac779); box-shadow: 0 4px 0 #866b3a, 0 8px 20px #00334544; color: #4e482e; font-size: 13px; font-weight: 700; }
.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #866b3a; }
.resume { position: absolute; z-index: 6; bottom: 35px; left: 50%; transform: translateX(-50%); }
.resume:active { transform: translate(-50%, 2px); }
.intro { position: absolute; z-index: 3; inset: 19% 8% auto; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.intro-fish { width: min(100%, 310px); height: min(270px, 34svh); filter: drop-shadow(0 12px 15px #003b4b66); animation: float 3s ease-in-out infinite; }
.hint { padding: 10px 17px; border-radius: 24px; background: #043047e6; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.7; }
.hint-ring { display: inline-block; position: relative; width: 15px; height: 15px; border: 2px solid #ffe3a0; border-radius: 50%; vertical-align: -3px; }
.hint-ring::after { content: ''; position: absolute; inset: 2px; border: 1px solid white; border-radius: 50%; }
.start { position: absolute; z-index: 5; bottom: 35px; left: 50%; transform: translateX(-50%); }
.start:active { transform: translate(-50%, 2px); }
.is-finished .start { animation: appear .25s ease-out both; }
.fish-sprite { width: 100%; height: 100%; }
.fish-sprite img { display: block; width: 100%; height: 100%; object-fit: contain; }
.reveal .fish-sprite { transform: scale(var(--reveal-scale, 1)); }
.reveal { display: none; position: absolute; z-index: 4; top: 15%; left: 3%; width: 94%; height: 50%; filter: drop-shadow(0 12px 12px #00384866); }
.is-caught .catch-button { opacity: 0; pointer-events: none; }
.is-caught .reveal { display: block; animation: land .9s cubic-bezier(.2,.8,.3,1) both; }
.is-caught .bobber, .is-caught .line, .is-caught .rod { opacity: 0; }
.catch-label { position: absolute; z-index: 4; left: 8px; right: 8px; top: 65%; text-align: center; color: white; font-size: 14px; line-height: 1.5; text-shadow: 0 2px 5px #00364b; }
.catch-score { position: absolute; z-index: 4; left: 8px; right: 8px; top: calc(65% + 44px); color: #ffe3a0; text-align: center; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 2px 5px #00364b; pointer-events: none; }
.is-perfect .catch-score { animation: perfect-catch .55s ease-out both; }
@keyframes perfect-catch { from { transform: scale(.85); } 50% { text-shadow: 0 0 12px #ffd971, 0 2px 5px #00364b; transform: scale(1.08); } to { transform: scale(1); } }
.splash { position: absolute; top: 57%; left: 50%; z-index: 4; pointer-events: none; }
.splash i { position: absolute; width: 6px; height: 11px; background: #dbfbff; border: 1px solid #fff; border-radius: 60% 40% 60% 50%; box-shadow: 0 0 5px #bcefff; animation: droplet .7s ease-out both; animation-delay: var(--delay); }

.map-button { position: absolute; z-index: 5; top: 17px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; max-width: 54%; padding: 7px 9px; color: white; background: #07394f80; border: 1px solid #ffffff40; border-radius: 20px; backdrop-filter: blur(8px); font-size: 9px; white-space: nowrap; }
.map-button span { overflow: hidden; text-overflow: ellipsis; }
.map-button svg { width: 15px; height: 15px; flex-shrink: 0; }
.map-sheet { position: absolute; inset: 8px; z-index: 10; display: flex; flex-direction: column; padding: 12px; border: 1px solid #fff8; border-radius: 14px; color: white; background: #062d41ed; backdrop-filter: blur(16px); }
.map-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.map-sheet-head h2 { margin: 0; font-size: 12px; font-weight: 500; }
.map-sheet-head button { min-width: 36px; min-height: 36px; border: 0; background: transparent; color: white; font-size: 25px; }
.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-height: 0; overflow-y: auto; padding: 2px; overscroll-behavior: contain; }
.map-card { position: relative; min-width: 0; padding: 0; border: 2px solid transparent; border-radius: 9px; background: #234d5a; overflow: hidden; color: white; text-align: left; }
.map-card img { display: block; width: 100%; height: clamp(78px, 13svh, 125px); object-fit: cover; }
.map-card span { display: block; position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 4px 5px; font-size: 9px; background: linear-gradient(transparent, #002737d9); }
.map-card small { display: block; font-size: 8px; color: #e3efec; font-weight: 400; }
.map-card b { display: block; font-size: 10px; font-weight: 500; }
.map-card[aria-pressed='true'] { border-color: #ffe1a0; box-shadow: 0 0 0 1px #ffe1a066; }
.primary:disabled { opacity: .5; cursor: wait; }

.is-paused *, .is-paused *::after, .is-paused *::before { animation-play-state: paused !important; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes bob { 50% { transform: translateY(4px) rotate(5deg); } }
@keyframes ripple { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
@keyframes bite { to { transform: translateY(12px) rotate(-10deg); } }
@keyframes swim { to { translate: -50px 8px; } }
@keyframes struggle { to { transform: rotate(15deg) translateX(-20px); } }
@keyframes float { 50% { transform: translateY(-7px) rotate(-2deg); } }
@keyframes hit { from { transform: scale(.3) rotate(-10deg); } to { transform: scale(1) rotate(7deg); } }
@keyframes land { from { transform: translateY(120px) scale(.35) rotate(-20deg); opacity: 0; } 55% { transform: translateY(-35px) scale(1.08) rotate(6deg); opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes droplet { from { transform: translate(0,0) scale(.5); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }
@media (max-width: 360px) { .fishing-shell { padding-inline: 7px; } .sea { border-radius: 14px; } .intro-fish { height: min(210px, 30svh); }  }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Legendary catches stay on the same scene; their art carries the rarity. */
.is-caught.is-legendary .reveal { filter: drop-shadow(0 0 14px #ffd971bb) drop-shadow(0 0 32px #7ff5ef88); }
.is-caught.is-legendary .catch-label { color: #ffe6a1; text-shadow: 0 0 9px #ffbb4566, 0 2px 5px #002a3f; }
.is-caught.is-legendary .reveal::before { content: ''; position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(ellipse, #fff0aa44 0%, #ffd97118 36%, transparent 70%); }
.is-caught.is-legendary .fish-legendary { position: relative; }

/* The journal opens between rounds and never takes height away from fishing. */
.journal-button { position: absolute; z-index: 5; bottom: 98px; left: 50%; transform: translateX(-50%); min-height: 36px; padding: 7px 16px; border: 1px solid #e8cd8f; border-radius: 20px; background: #07394fe8; color: #ffe6a1; font-size: 12px; }
.journal-sheet { border-color: #d5b776; }
.journal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 3px 12px; font-size: 12px; line-height: 1.7; }
.journal-body:focus-visible { outline: 2px solid #e7bb67; outline-offset: -2px; }
.journal-body h3 { color: #ffe6a1; font-size: 13px; margin: 16px 0 6px; }
.journal-goals, .journal-fish { list-style: none; margin: 0; padding: 0; }
.journal-goals li { padding: 6px 9px; margin: 4px 0; border-radius: 7px; background: #ffffff0b; }
.journal-goals .goal-complete { background: linear-gradient(105deg, #b488333f, #ffffff09); color: #ffe6a1; box-shadow: inset 2px 0 #e4c479; }
.journal-fish li { display: flex; align-items: center; gap: 8px; min-height: 42px; border-bottom: 1px solid #ffffff14; }
.journal-fish img { width: 48px; height: 42px; object-fit: contain; flex-shrink: 0; }
.journal-fish span { overflow-wrap: anywhere; }
.journal-save { color: #cadadf; font-size: 11px; }
.is-finished .message { bottom: 146px; font-size: 15px; }
