/* The fishing screens (fishing.js builds them). Same soft UI as the town: cream cards, Fredoka, the orange accent for
   the one thing to look at, teal for calm structure, gold for reward. Research rule: the world stays visible, one meter
   by the fish, a cream card with three lines for the catch. */

/* the town's buttons step aside while fishing */
body .top, body .side, body .bottom, body .sign, body #prompt { transition: opacity .3s; }
body.fishing .top, body.fishing .side, body.fishing .bottom, body.fishing .sign, body.fishing #prompt, body.fishing #hint, body.fishing #say { opacity: 0 !important; pointer-events: none !important; }
body.fishing .top *, body.fishing .side *, body.fishing .bottom *, body.fishing #menu { pointer-events: none !important; }
body.fishing #menu { display: none !important; }

.fx { position: fixed; z-index: 48; font-family: "Fredoka", system-ui, sans-serif; color: var(--ink); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.fx[hidden] { display: none !important; }
.fx-top { z-index: 58; left: 0; right: 0; top: 0; padding: calc(12px + env(safe-area-inset-top)) 14px 0; display: flex; justify-content: space-between; pointer-events: none; opacity: 0; transition: opacity .35s; }
body.fishing .fx-top { opacity: 1; }
body:not(.fishing) .fx-top, body:not(.fishing) .fx-top * { pointer-events: none !important; visibility: hidden; }   /* gone in town, so it never catches a tap meant for the town's buttons (Oct 29) */
.fx-top button { pointer-events: auto; font-family: inherit; font-weight: 600; font-size: 16px; color: var(--ink); background: var(--card); border: 0; border-radius: 999px; box-shadow: var(--shadow);
  padding: 11px 17px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fx-top button:active { transform: scale(.96); }
.fx-top svg { width: 20px; height: 20px; }
.fx-count { font-variant-numeric: tabular-nums; }
.fx-jbtn.bump { animation: fxBump .5s cubic-bezier(.2,.9,.3,1.6); }
@keyframes fxBump { 40% { transform: scale(1.18); background: var(--star); } }

/* the hint at the bottom */
.fx-hint { left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(74,58,48,.84); color: #fff; font-weight: 500; font-size: 16px;
  padding: 11px 18px; border-radius: 999px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .3s; display: flex; align-items: center; gap: 10px; }
.fx-hint.on { opacity: 1; }
.fx-hint i { width: 14px; height: 14px; border-radius: 50%; background: #fff; display: inline-block; animation: fxPull 1.4s ease-in-out infinite; }
@keyframes fxPull { 0% { transform: translateY(-6px); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(8px); opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }

/* the "!" over the slime when a fish bites */
.fx-bang { left: 0; top: 0; pointer-events: none; display: none; will-change: transform; }
.fx-bang.on { display: block; }
.fx-bang b { display: block; width: 64px; height: 64px; border-radius: 50%; background: var(--card); box-shadow: 0 6px 16px rgba(74,58,48,.25), 0 0 0 3px var(--ink);
  font-weight: 700; font-size: 44px; line-height: 64px; text-align: center; color: var(--accent); animation: fxBang .28s cubic-bezier(.2,.9,.3,1.8); }
@keyframes fxBang { from { transform: scale(.2) rotate(-25deg); } }

/* the fight gauge: one round meter that rides above the fish */
.fx-gauge { left: 0; top: 0; width: 132px; height: 132px; pointer-events: none; display: none; will-change: transform; }
.fx-gauge.on { display: block; }
.fx-gauge svg { width: 132px; height: 132px; overflow: visible; filter: drop-shadow(0 6px 10px rgba(74,58,48,.22)); }
.fx-gauge.run svg { animation: fxShake .12s linear infinite; }
@keyframes fxShake { 25% { transform: translate(1.5px, -1px); } 75% { transform: translate(-1.5px, 1px); } }
.fx-word { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); font-weight: 700; font-size: 20px; white-space: nowrap; color: var(--ink);
  background: var(--card); padding: 5px 14px; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; transition: opacity .15s; }
.fx-word.on { opacity: 1; }
.fx-word.go { color: #fff; background: var(--accent); animation: fxPulse .45s ease-in-out infinite alternate; }
@keyframes fxPulse { to { transform: translateX(-50%) scale(1.1); } }
.fx-bottle { position: absolute; right: -40px; top: 34px; width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: none; }
.fx-bottle.on { display: block; animation: fxBang .3s cubic-bezier(.2,.9,.3,1.6); }
.fx-bottle svg { width: 44px; height: 44px; filter: none; }

/* a short note by the bobber (too soon, it got away) */
.fx-note { left: 0; top: 0; pointer-events: none; display: none; font-weight: 600; font-size: 18px; background: var(--card); padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; will-change: transform; }
.fx-note.on { display: block; animation: fxNote 1.3s ease-out forwards; }
@keyframes fxNote { 0% { opacity: 0; translate: 0 8px; } 15% { opacity: 1; translate: 0 0; } 75% { opacity: 1; } 100% { opacity: 0; translate: 0 -14px; } }

/* the white flash on a catch */
.fx-flash { inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 47; }
.fx-flash.on { animation: fxFlash .2s ease-out; }
@keyframes fxFlash { 0%, 30% { opacity: .75; } 100% { opacity: 0; } }

/* the catch card: a cream bubble in the bottom third, like the family's chat bubbles */
.fx-card { left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); width: min(440px, calc(100vw - 28px)); transform: translate(-50%, 140%); transition: transform .32s cubic-bezier(.2,.9,.3,1.15);
  background: var(--card); border-radius: 30px; box-shadow: 0 10px 28px rgba(74,58,48,.25); padding: 22px 22px 26px; text-align: center; pointer-events: auto; cursor: pointer; z-index: 52; }
.fx-card.on { transform: translate(-50%, 0); }
.fx-card .l1 { font-weight: 500; font-size: 21px; line-height: 1.3; }
.fx-card .l1 em { font-style: normal; font-weight: 700; color: var(--accent); }
.fx-card .l2 { font-weight: 500; font-size: 18px; line-height: 1.35; margin-top: 4px; color: #5d4c40; }
.fx-card .meta { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.fx-chip { font-weight: 600; font-size: 15px; background: var(--cream); padding: 6px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.fx-dots { display: inline-flex; gap: 3px; } .fx-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(74,58,48,.18); } .fx-dots i.f { background: var(--star); box-shadow: inset 0 0 0 1.5px rgba(74,58,48,.35); }
.fx-card .arrow { position: absolute; left: 50%; bottom: 8px; width: 0; height: 0; margin-left: -7px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--accent); animation: moreArrow 1s infinite; opacity: 0; }
.fx-card.ready .arrow { opacity: 1; }
.fx-stamps { position: absolute; left: 12px; top: -22px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 24px); }
.fx-stamp { font-weight: 700; font-size: 14px; padding: 7px 12px; border-radius: 999px; background: var(--card); color: var(--accent); box-shadow: 0 0 0 2.5px var(--accent), 0 4px 10px rgba(74,58,48,.2);
  transform: rotate(-6deg); animation: fxStamp .34s cubic-bezier(.2,.9,.3,1.8) backwards; }
.fx-stamp.gold { color: #8a5a00; background: #fff4cc; box-shadow: 0 0 0 2.5px var(--star), 0 4px 10px rgba(74,58,48,.2); }
.fx-stamp.teal { color: #fff; background: var(--teal); box-shadow: 0 4px 10px rgba(74,58,48,.2); }
@keyframes fxStamp { from { transform: scale(2.2) rotate(-14deg); opacity: 0; } }
.fx-card .letter { font-family: "Nunito", system-ui, sans-serif; font-weight: 600; font-size: 18px; line-height: 1.5; text-align: left; background: #fbf5e6; border-radius: 16px; padding: 14px 16px; margin-top: 10px; }
.fx-card .letter a { color: var(--teal); }
.fx-card .sign { position: static; display: block; text-align: right; margin-top: 6px; font-family: "Fredoka", sans-serif; color: var(--muted); opacity: 1 !important; background: none; box-shadow: none; padding: 0; transform: none; }
.fx-card .reward-ic { font-size: 40px; line-height: 1; }
.fx-card h3 { font-weight: 700; font-size: 24px; margin: 6px 0 2px; }

/* confetti for stamps */
.fx-confetti { position: fixed; z-index: 53; left: 0; top: 0; width: 9px; height: 13px; border-radius: 2px; pointer-events: none; animation: fxConf 1.1s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes fxConf { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* Gus talks in a caption under the top buttons (the town's .say look, without the tail), so he never covers the water */
.say.fx-gus { z-index: 49; left: 50%; top: calc(74px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: min(400px, calc(100vw - 28px)); width: max-content; text-align: left;
  gap: 10px; align-items: baseline; padding: 10px 16px; pointer-events: auto; }
.say.fx-gus.on { display: flex; }
.say.fx-gus::after { display: none; }
.say.fx-gus b { flex: none; margin: 0; } .say.fx-gus span { font-size: 15.5px; }

/* the journal */
.fx-jwrap { inset: 0; z-index: 60; display: none; }
.fx-jwrap.on { display: block; }
.fx-jbg { position: absolute; inset: 0; background: rgba(40,60,70,.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fxFade .25s; }
@keyframes fxFade { from { opacity: 0; } }
.fx-jsheet { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(920px, 100vw); max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--card); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 30px rgba(74,58,48,.2); padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); animation: fxUp .3s cubic-bezier(.2,.9,.3,1.1); }
@media (min-width: 760px) { .fx-jsheet { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 26px; max-height: 86vh; padding: 24px 26px 28px; animation: fxFade .25s; } }
@keyframes fxUp { from { transform: translate(-50%, 40%); } }
.fx-jhead { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.fx-jhead h3 { font-weight: 700; font-size: 26px; margin: 0; flex: 1; }
.fx-x { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--cream); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.fx-x svg { width: 16px; height: 16px; }
.fx-prog { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--muted); margin: 4px 2px 14px; }
.fx-prog .bar { flex: 1; height: 10px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.fx-prog .bar i { display: block; height: 100%; background: var(--star); border-radius: 999px; }
.fx-sec { font-weight: 600; font-size: 17px; margin: 18px 2px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.fx-sec small { font-weight: 500; font-size: 13.5px; color: var(--muted); }
.fx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 560px) { .fx-grid { grid-template-columns: repeat(4, 1fr); } }
.fx-tile { border: 0; font-family: inherit; color: var(--ink); background: var(--cream); border-radius: 18px; padding: 8px 6px 10px; text-align: center; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.fx-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.fx-tile b { display: block; font-weight: 600; font-size: 14px; line-height: 1.15; margin-top: 2px; }
.fx-tile small { display: block; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fx-tile.no { background: #efe9dc; } .fx-tile.no b { color: var(--muted); }
.fx-tile .fx-dots { margin-top: 4px; }
.fx-tile .new { position: absolute; right: 6px; top: 6px; font-weight: 700; font-size: 11px; color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 7px; }
.fx-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.fx-mini.b6 { grid-template-columns: repeat(6, 1fr); }
.fx-mini .fx-tile { padding: 4px 3px 6px; border-radius: 14px; } .fx-mini .fx-tile b { font-size: 11.5px; }
.fx-rods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fx-rod { background: var(--cream); border-radius: 16px; padding: 10px; text-align: center; }
.fx-rod i { display: block; height: 8px; border-radius: 999px; margin: 6px 8px 8px; transform: rotate(-12deg); }
.fx-rod b { display: block; font-weight: 600; font-size: 14.5px; } .fx-rod small { font-size: 12.5px; color: var(--muted); }
.fx-rod.no { opacity: .55; }
.fx-plaque { background: #f3e2c4; border-radius: 16px; padding: 12px 14px; font-weight: 600; font-size: 15.5px; box-shadow: inset 0 0 0 2px #d9bc8c; }
.fx-plaque em { font-style: normal; color: var(--accent); }
.fx-odds { font-family: "Nunito", system-ui, sans-serif; font-size: 14.5px; line-height: 1.5; color: #5d4c40; background: var(--cream); border-radius: 14px; padding: 10px 14px; }
.fx-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--cream); border-radius: 14px; padding: 10px 14px; margin-top: 8px; font-weight: 600; font-size: 15.5px; cursor: pointer; }
.fx-switch small { display: block; font-family: "Nunito", sans-serif; font-weight: 600; font-size: 13px; color: var(--muted); }
.fx-switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #d6ccbb; position: relative; flex: none; cursor: pointer; transition: background .2s; }
.fx-switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.fx-switch input:checked { background: var(--teal); } .fx-switch input:checked::after { left: 21px; }
.fx-detail { text-align: center; }
.fx-detail img { width: min(320px, 80%); aspect-ratio: 4 / 3; object-fit: contain; }
.fx-detail h4 { font-weight: 700; font-size: 26px; margin: 2px 0; color: var(--accent); }
.fx-detail .q { font-weight: 500; font-size: 17px; color: #5d4c40; margin: 4px 0 12px; }
.fx-rows { display: grid; gap: 8px; text-align: left; }
.fx-row { display: flex; justify-content: space-between; gap: 12px; background: var(--cream); border-radius: 12px; padding: 9px 13px; font-size: 15px; }
.fx-row span:first-child { color: var(--muted); font-weight: 500; } .fx-row span:last-child { font-weight: 600; text-align: right; }
.fx-back { border: 0; background: var(--cream); font-family: inherit; font-weight: 600; font-size: 15px; color: var(--ink); border-radius: 999px; padding: 9px 15px; cursor: pointer; }
.fx-note2 { font-family: "Nunito", sans-serif; font-size: 13.5px; color: var(--muted); margin: 6px 2px 0; }

@media (prefers-reduced-motion: reduce) { .fx-gauge.run svg, .fx-word.go, .fx-confetti { animation: none !important; } }

/* the "?" next to the journal, and the quest tracker under the top buttons */
.fx-topr { display: flex; gap: 8px; }
.fx-top button.fx-help { width: 44px; height: 44px; padding: 0; justify-content: center; font-weight: 700; font-size: 20px; }
.fx-quest { left: 50%; top: calc(66px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: calc(100vw - 28px); width: max-content; z-index: 47;
  background: rgba(255,253,247,.94); border-radius: 999px; box-shadow: var(--shadow); padding: 8px 15px; font-weight: 500; font-size: 14.5px; pointer-events: none;
  opacity: 0; transition: opacity .3s; text-align: center; }
body.fishing .fx-quest.on { opacity: 1; }
.fx-quest b { font-weight: 700; color: var(--accent); margin-right: 4px; }
.fx-quest.done { background: #fff4cc; box-shadow: 0 0 0 2.5px var(--star), var(--shadow); }
body.fishing .say.fx-gus { top: calc(112px + env(safe-area-inset-top)); }
/* the how-to card */
.fx-steps { display: grid; gap: 10px; text-align: left; margin-top: 10px; }
.fx-steps div { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.4; font-weight: 500; }
.fx-steps i { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.fx-steps b { font-weight: 700; }
/* the "!" over a boy with a fishing quest (index.html places it) */
.fx-kidmark { position: fixed; left: 0; top: 0; z-index: 44; display: none; pointer-events: none; width: 30px; height: 30px; border-radius: 50%; background: var(--card);
  box-shadow: 0 0 0 2.5px var(--accent), 0 4px 10px rgba(74,58,48,.25); font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 20px; line-height: 30px; text-align: center; color: var(--accent); will-change: transform; }
.fx-kidmark.on { display: block; animation: fxMark 1s ease-in-out infinite; }
.fx-kidmark.ready { background: var(--star); color: #6b4a00; box-shadow: 0 0 0 2.5px #e0a800, 0 4px 10px rgba(74,58,48,.25); }
.fx-kidmark.active { color: #8a7a70; box-shadow: 0 0 0 2.5px #c9bcb2, 0 4px 10px rgba(74,58,48,.18); animation-duration: 2.4s; }   /* his job is on: a quiet ? that stays on him */
@keyframes fxMark { 50% { margin-top: -5px; } }
body.fishing .fx-kidmark { display: none; }
body.fx-aiming .fx-quest.on, body.fx-aiming .say.fx-gus { opacity: 0 !important; }
