@font-face { font-family: 'Barlow'; src: url('../../assets/fonts/barlow-condensed-latin-800-italic.woff2') format('woff2'); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../../assets/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM'; src: url('../../assets/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM'; src: url('../../assets/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root { --ink: #0e2a44; --ink2: #4a6680; --panel: #f4fbffee; --card: #e3f3fb; --line: #c9e2ef; --aqua: #1fa6c8; --aqua2: #157f9c; --sun: #ffd23f; --sun2: #e0a800; --coral: #ff6b4a; --shadow: 0 18px 50px #04203a55; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0f4c78; color: var(--ink); font-family: DM, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 3px; }
[hidden] { display: none !important; }
#sea { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.coin { display: inline-block; width: .8em; height: .8em; margin-right: 5px; border-radius: 50%; vertical-align: -1px; background: radial-gradient(circle at 35% 30%, #fff3b0 0 18%, #ffd23f 22% 60%, #d99a00 64%); box-shadow: inset 0 0 0 2px #c98d00; font-style: normal; }

.back { position: fixed; top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); z-index: 6; padding: 10px 14px; border-radius: 999px; background: #ffffffe0; color: var(--ink); font-weight: 700; font-size: 13px; text-decoration: none; box-shadow: 0 6px 18px #0003; }
.top-coins { position: fixed; top: max(14px, env(safe-area-inset-top)); left: max(150px, calc(env(safe-area-inset-left) + 150px)); z-index: 6; }
body:not(.menu-on) .back, body:not(.menu-on) .top-coins { display: none; }

.panel { position: fixed; z-index: 5; top: 18px; right: 18px; bottom: 18px; width: min(420px, 42vw); overflow-y: auto; overscroll-behavior: contain; background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); border: 3px solid #fff; }
.logo { font: 800 italic 76px/.82 Barlow, sans-serif; display: flex; gap: 10px; letter-spacing: -1px; text-shadow: 0 4px 0 #0e2a4418; }
.logo span { color: var(--aqua); }
.logo b { color: var(--coral); font-weight: 800; }
.tag { margin: 8px 0 14px; color: var(--ink2); font-size: 14px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stats-row > div { background: var(--card); border-radius: 14px; padding: 9px 11px; }
.stats-row small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; color: var(--ink2); }
.stats-row b { font: 800 italic 25px/1.1 Barlow, sans-serif; white-space: nowrap; }
.play { width: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px 20px; border-radius: 20px; background: var(--sun); color: var(--ink); font: 800 italic 40px/1 Barlow, sans-serif; letter-spacing: 1px; box-shadow: 0 7px 0 var(--sun2), 0 12px 24px #b0800044; transition: transform .08s, box-shadow .08s; }
.play span { font-size: .7em; }
.play:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--sun2); }
.gear { text-align: center; font-size: 12px; color: var(--ink2); margin: 12px 0 0; }
.card { background: var(--card); border-radius: 18px; padding: 12px 14px; margin-top: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card-head b { font: 800 italic 24px Barlow, sans-serif; }
.card-head span { font-size: 12px; font-weight: 700; color: var(--ink2); }
.spots { display: grid; gap: 7px; margin-top: 8px; }
.spot { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; text-align: left; padding: 10px 12px; border-radius: 14px; background: #fff; border: 3px solid transparent; position: relative; overflow: hidden; }
.spot::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; }
.spot-lagoon::before { background: #2fb2cf; } .spot-reef::before { background: #ff8a6a; } .spot-kelp::before { background: #4f8a3a; } .spot-arctic::before { background: #9fd8f0; } .spot-abyss::before { background: #2a1c40; }
.spot b { font: 800 italic 20px/1.1 Barlow, sans-serif; padding-left: 6px; }
.spot small { grid-column: 1; font-size: 11.5px; color: var(--ink2); padding-left: 6px; }
.spot span { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 12.5px; font-weight: 700; padding: 6px 10px; border-radius: 10px; background: var(--card); white-space: nowrap; }
.spot.on { border-color: var(--aqua); }
.spot.on span { background: var(--aqua); color: #fff; }
.spot.locked { opacity: .85; }
.spot.locked span { background: var(--sun); }
.menu-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.menu-buttons button { background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 10px 2px 8px; font-weight: 700; font-size: 12px; position: relative; line-height: 1.2; }
.menu-buttons button span { display: block; font-size: 22px; margin-bottom: 3px; }
.menu-buttons button i { position: absolute; top: 5px; right: 5px; font-style: normal; font-size: 9.5px; background: var(--coral); color: #fff; border-radius: 999px; padding: 1px 5px; }
.settings { display: grid; gap: 10px; margin-top: 12px; background: var(--card); border-radius: 16px; padding: 12px 14px; }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; cursor: pointer; flex-wrap: wrap; }
.switch small { flex-basis: 100%; padding-left: 58px; margin-top: -6px; font-weight: 400; font-size: 11.5px; color: var(--ink2); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span { width: 46px; height: 26px; border-radius: 999px; background: #b9d3e0; position: relative; transition: background .2s; flex: none; }
.switch > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px #0003; }
.switch input:checked + span { background: var(--aqua); }
.switch input:checked + span::after { left: 23px; }
.help, .fine { font-size: 11.5px; color: var(--ink2); line-height: 1.45; }
.help { text-align: center; margin: 14px 0 0; }

.side-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.side-head h2 { font: 800 italic 36px/1 Barlow, sans-serif; margin: 0; flex: 1; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 3px solid var(--line); font-weight: 700; font-size: 18px; display: grid; place-items: center; flex: none; }
.coin-chip { display: inline-flex; align-items: center; background: #fff; border: 3px solid #f2dc9a; border-radius: 999px; padding: 5px 12px; font: 800 italic 22px Barlow, sans-serif; box-shadow: 0 4px 12px #0002; }
.count { font: 800 italic 22px Barlow, sans-serif; color: var(--ink2); }
.tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; background: var(--card); padding: 4px; border-radius: 14px; margin-bottom: 12px; }
.tabs.five { grid-template-columns: repeat(5, 1fr); }
.tabs button { padding: 9px 2px; border-radius: 11px; font-weight: 700; font-size: 12.5px; color: var(--ink2); }
.tabs button[aria-selected=true] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px #0001; }
.list { display: grid; gap: 8px; }
.row-item { background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 10px 12px; display: grid; grid-template-columns: 48px 1fr auto; gap: 3px 12px; align-items: center; text-align: left; }
.row-item .icon { grid-row: 1 / 4; width: 48px; height: 48px; border-radius: 13px; background: var(--card); display: grid; place-items: center; font-size: 26px; }
.boat-swatch { box-shadow: inset 0 0 0 3px #fff; }
.row-item b { font: 800 italic 21px/1 Barlow, sans-serif; }
.row-item small { font-size: 11.5px; color: var(--ink2); line-height: 1.3; }
.row-item .buy { grid-column: 3; grid-row: 1 / 4; min-width: 92px; text-align: center; padding: 9px 10px; border-radius: 11px; background: var(--sun); font-weight: 700; font-size: 13px; box-shadow: 0 3px 0 var(--sun2); white-space: nowrap; }
.row-item .buy.short { background: #e4eef3; box-shadow: 0 3px 0 #c9d9e2; color: #6f8799; }
.row-item .buy.max { background: var(--aqua); color: #fff; box-shadow: 0 3px 0 var(--aqua2); }
.row-item .buy.own { background: #def4fb; box-shadow: 0 3px 0 #b9e0ee; }
.pips { display: flex; gap: 4px; }
.pips i { width: 16px; height: 7px; border-radius: 9px; background: #dbeaf1; }
.pips i.on { background: linear-gradient(90deg, var(--aqua), #7fe0f5); }
.book-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fishcard { background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.fishcard canvas { align-self: center; background: radial-gradient(ellipse at center, #d9f2fb, #fff 70%); border-radius: 10px; }
.fishcard:not(.got) canvas { background: #eaf4f8; }
.fishcard b { font: 800 italic 18px/1.05 Barlow, sans-serif; }
.fishcard small { font-size: 11px; color: var(--ink2); line-height: 1.3; flex: 1; }
.fishcard em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--aqua2); }
.fishcard.legend.got { border-color: #f2c94c; background: #fffbea; }
.trophy-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.trophy { background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 10px; display: grid; grid-template-columns: 38px 1fr; gap: 2px 10px; align-items: center; opacity: .65; }
.trophy.got { opacity: 1; border-color: #f2c94c; background: #fffbea; }
.trophy span { font-size: 26px; grid-row: 1 / 4; filter: grayscale(1); }
.trophy.got span { filter: none; }
.trophy b { font: 800 italic 18px/1.05 Barlow, sans-serif; }
.trophy small { font-size: 11px; color: var(--ink2); line-height: 1.25; }
.trophy em { font-style: normal; font-size: 11px; font-weight: 700; color: #b07d00; }
.lifetime { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 12px; }
.lifetime b { display: block; font: 800 italic 22px Barlow, sans-serif; }
.lifetime small { color: var(--ink2); font-size: 10.5px; }

#results h2 { font: 800 italic 46px/1 Barlow, sans-serif; margin: 2px 0 12px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 3px; color: var(--aqua2); margin: 0; text-transform: uppercase; }
.catch-list { display: grid; gap: 6px; max-height: 38vh; overflow-y: auto; }
.catch { display: grid; grid-template-columns: 70px 1fr auto; gap: 0 10px; align-items: center; background: #fff; border-radius: 14px; padding: 4px 12px 4px 4px; }
.catch canvas { grid-row: 1 / 3; }
.catch b { font-size: 14px; }
.catch small { font-size: 11.5px; color: var(--ink2); }
.catch em { grid-column: 3; grid-row: 1 / 3; font-style: normal; font: 800 italic 20px Barlow, sans-serif; }
.catch.legend { background: #fffbea; box-shadow: inset 0 0 0 3px #f2c94c; }
.badge { font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 999px; color: #fff; vertical-align: 2px; letter-spacing: .5px; }
.badge.new { background: var(--aqua); }
.badge.rec { background: var(--coral); }
.extras { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.extras span { background: #fffbea; border: 2px solid #f2c94c; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.extras:empty { display: none; }
.total { display: flex; justify-content: space-between; align-items: center; background: var(--card); border-radius: 16px; padding: 10px 14px; margin-bottom: 4px; }
.total small { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--ink2); }
.total b { font: 800 italic 38px/1 Barlow, sans-serif; }
#rNext { margin: 6px 0 14px; text-align: center; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.row.one { grid-template-columns: 1fr; }
.row button { background: #fff; border: 3px solid var(--line); border-radius: 14px; padding: 11px; font-weight: 700; font-size: 15px; }

/* HUD */
#hud { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.pause-btn { pointer-events: auto; position: absolute; top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); width: 50px; height: 50px; font: 800 italic 20px Barlow, sans-serif; background: #ffffffe6; border-color: #fff; box-shadow: 0 6px 16px #0003; }
.depth { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); text-align: center; color: #fff; text-shadow: 0 3px 0 #06223a99, 0 0 14px #0006; }
.depth b { display: block; font: 800 italic 52px/.95 Barlow, sans-serif; }
.depth small { font: 700 15px Barlow, sans-serif; letter-spacing: 1px; }
.phase { display: block; margin-top: 4px; font: 700 13px Barlow, sans-serif; letter-spacing: 2px; padding: 3px 10px; border-radius: 999px; background: #ffffff2a; text-shadow: none; }
.phase.reel { background: var(--sun); color: var(--ink); }
.hud-right { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); display: grid; gap: 6px; justify-items: end; }
.pill { background: #ffffffe6; border-radius: 999px; padding: 5px 12px; font: 800 italic 22px Barlow, sans-serif; box-shadow: 0 4px 12px #0002; }
#hud.haul .depth, #hud.haul .gauge, #hud.haul .pill, #hud.haul .pause-btn { display: none; }
.gauge { position: absolute; right: max(18px, env(safe-area-inset-right)); top: 34%; bottom: 22%; width: 10px; border-radius: 9px; background: #ffffff33; overflow: hidden; }
.gauge i { display: block; width: 100%; background: linear-gradient(#7fe0f5, #ffd23f); border-radius: 9px; height: 0; }
#castBtns { position: fixed; inset: auto 0 0 0; z-index: 5; display: flex; justify-content: space-between; padding: 0 max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); pointer-events: none; }
.round { pointer-events: auto; width: 84px; height: 84px; border-radius: 50%; background: #ffffff40; border: 3px solid #ffffffcc; color: #fff; font-size: 30px; line-height: 1; display: grid; place-content: center; text-shadow: 0 2px 4px #0006; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); touch-action: none; }
.round small { font: 700 12px DM, sans-serif; margin-top: 2px; }
.round.reel { background: #ffd23fcc; color: var(--ink); text-shadow: none; border-color: #fff; }
.round.down { transform: scale(.94); background: #ffffff8c; }
#toasts { position: fixed; top: calc(max(14px, env(safe-area-inset-top)) + 110px); left: 50%; transform: translateX(-50%); z-index: 8; display: grid; gap: 8px; pointer-events: none; width: min(420px, calc(100vw - 32px)); }
.toast { background: #f4fbfff2; border-radius: 16px; padding: 10px 14px; box-shadow: 0 10px 26px #0003; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; animation: tin .35s ease; border: 3px solid #fff; }
.toast span { font-size: 22px; }
.toast small { display: block; font-weight: 400; color: var(--ink2); font-size: 12px; }
.toast.out { animation: tout .4s ease forwards; }
@keyframes tin { from { transform: translateY(-14px); opacity: 0; } }
@keyframes tout { to { transform: translateY(-14px); opacity: 0; } }
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: #04203a66; padding: 18px; }
.sheet { width: min(380px, 100%); background: var(--panel); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); border: 3px solid #fff; text-align: center; }
.sheet h2 { font: 800 italic 46px/1 Barlow, sans-serif; margin: 0 0 6px; }

@media (max-width: 760px) and (orientation: portrait) {
  .panel { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 62vh; border-radius: 24px; padding: 16px; }
  .logo { font-size: 56px; }
  .tag { margin: 4px 0 10px; font-size: 13px; }
  .stats-row b { font-size: 21px; }
  .play { font-size: 34px; padding: 13px; }
  .menu-buttons button { font-size: 11px; }
  .depth b { font-size: 42px; }
  .pill, .coin-chip { font-size: 19px; }
  .round { width: 74px; height: 74px; }
  .catch-list { max-height: 26vh; }
  #results h2 { font-size: 38px; }
  .top-coins { left: auto; right: max(14px, env(safe-area-inset-right)); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .panel { top: 8px; bottom: 8px; right: 8px; width: min(390px, 50vw); padding: 14px 16px; border-radius: 20px; }
  .logo { font-size: 46px; margin-bottom: 8px; }
  .tag { display: none; }
  .play { font-size: 28px; padding: 10px; }
  .depth b { font-size: 36px; }
  .round { width: 64px; height: 64px; font-size: 24px; }
  .catch-list { max-height: 34vh; }
  #results h2 { font-size: 32px; }
  #toasts { top: 70px; }
  .back { top: 8px; left: 8px; }
  .top-coins { top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
