/* ==== styles-v3 ==== */
:root {
  color-scheme: light;
  --ink: #172a31;
  --ink-soft: #30474d;
  --paper: #f6f3df;
  --paper-bright: #fffdf1;
  --paper-dim: #d9ded2;
  --teal: #1f9eb1;
  --game-blue: #1f9eb1;
  --teal-bright: #27bfd0;
  --teal-dark: #137181;
  --green: #75d14a;
  --green-dark: #3f942f;
  --money-green: #15963d;
  --yellow: #f3c845;
  --coral: #ef684f;
  --muted: #607276;
  --tier-1: #6b797d;
  --tier-2: #319447;
  --tier-3: #327fc8;
  --tier-4: #9459bd;
  --tier-5: #c79508;
  --tier-6: #e86b24;
  --tier-7: #147f78;
  --tier-8: #497c34;
  --tier-9: #db5d43;
  --tier-10: #318bad;
  --tier-11: #bd4a31;
  --tier-12: #6f56b2;
  --outline: 3px solid var(--ink);
  --button-corner-radius: 11px;
  --hard-shadow: 4px 4px 0 var(--ink);
  --backdrop-art: url("./assets/muddy-bend.webp");
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--game-blue);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  color: var(--ink);
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

body::before {
  content: "";
  display: none;
  position: fixed;
  z-index: -1;
  inset: -30px;
  background: #0d2d36 var(--backdrop-art) center / cover no-repeat;
  filter: blur(18px) brightness(.34) saturate(.72);
  opacity: .72;
  transform: scale(1.08);
}
button { color: inherit; font: inherit; }
img { -webkit-user-drag: none; user-drag: none; }
button,
[role="button"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* Touch/pointer interactions can inherit :focus-visible from a dialog.
   Only keyboard input paints this ring; controllers have their own selection. */
:where(button, a, [tabindex]):focus { outline: none; }
html[data-input-mode="keyboard"] :where(button, a, [tabindex]):focus-visible {
  outline: 4px solid #ffffff;
  outline-offset: 3px;
}

.app {
  --scene-overlay: transparent;
  position: relative;
  width: 100%;
  height: 100cqh;
  height: 100cqh;
  min-height: 0;
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  overflow: hidden;
  background: var(--game-blue);
  border-inline: 3px solid var(--ink);
  box-shadow: 0 0 0 3px rgba(246, 243, 223, .08), 0 0 38px rgba(0, 0, 0, .5);
  touch-action: pan-y pinch-zoom;
}

[data-tier="1"] { --tier-color: var(--tier-1); }
[data-tier="2"] { --tier-color: var(--tier-2); }
[data-tier="3"] { --tier-color: var(--tier-3); }
[data-tier="4"] { --tier-color: var(--tier-4); }
[data-tier="5"] { --tier-color: var(--tier-5); }
[data-tier="6"] { --tier-color: var(--tier-6); }
[data-tier="7"] { --tier-color: var(--tier-7); }
[data-tier="8"] { --tier-color: var(--tier-8); }
[data-tier="9"] { --tier-color: var(--tier-9); }
[data-tier="10"] { --tier-color: var(--tier-10); }
[data-tier="11"] { --tier-color: var(--tier-11); }
[data-tier="12"] { --tier-color: var(--tier-12); }

.hud,
.scene,
.dock {
  width: 100%;
  min-width: 0;
}

.hud {
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(108px, .82fr) minmax(148px, 1.2fr) 48px;
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 11px 10px;
  background: var(--game-blue);
  border-bottom: var(--outline);
}

.money-card,
.location-card,
.icon-button {
  min-height: 50px;
  border: var(--outline);
  border-radius: 13px;
  background: var(--paper-bright);
  box-shadow: 3px 3px 0 var(--ink);
}

.money-card,
.location-card {
  min-width: 0;
  display: flex;
  justify-content: center;
  padding: 5px 10px;
}

.money-card {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.money-label,
.location-label,
.dock-heading > div > span,
.sheet-header span,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .06em;
}

.money-card strong {
  margin-top: 2px;
  color: var(--money-green);
  font-family: "Arial Black", "Trebuchet MS", sans-serif;
  font-size: clamp(1.1rem, 5cqw, 1.42rem);
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-2px);
}

.location-card {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.location-card > div { flex: 1; min-width: 0; }
.location-card strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: .88rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-pin {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--paper-bright);
  background: linear-gradient(180deg, #2ea6b2, #187889);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(217, 247, 239, .42);
}

.location-pin svg { width: 23px; height: 23px; }
.location-pin .current-wave {
  fill: none;
  stroke: #fff8df;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.location-pin .current-wave-top { stroke: #f5d04f; }
.location-pin .current-wave-bottom { opacity: .78; }
.location-arrow { flex: none; margin-left: -3px; font-size: 1.45rem; font-weight: 1000; line-height: 1; }
.location-card:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.icon-button svg { width: 25px; height: 25px; }
.icon-button path,
.icon-button circle { fill: var(--paper-bright); stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:active { transform: translate(3px, 3px); box-shadow: none; }

.scene {
  position: relative;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #72b7ba;
}

.scene-art,
.scene-tint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-art {
  z-index: -3;
  object-fit: cover;
  object-position: center center;
  transition: filter .55s ease, opacity .2s linear;
}

.scene-tint {
  z-index: -2;
  background: var(--scene-overlay);
  opacity: .2;
  pointer-events: none;
  transition: background-color .4s linear;
}

.water-surface {
  position: absolute;
  z-index: -1;
  inset: 29% 0 8%;
  overflow: hidden;
  pointer-events: none;
}

.water-surface > i {
  --wave-start: -20px;
  --wave-end: 28px;
  --wave-duration: 4.8s;
  position: absolute;
  display: block;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    transparent 0 5%,
    rgba(187, 228, 222, .7) 5% 37%,
    transparent 37% 48%,
    rgba(187, 228, 222, .58) 48% 83%,
    transparent 83% 100%);
  filter: drop-shadow(0 3px 0 rgba(18, 106, 119, .36));
  opacity: .2;
  transform: translate3d(var(--wave-start), 0, 0) scaleX(.72);
  transform-origin: center;
  animation: currentDrift var(--wave-duration) ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.water-surface > i:nth-child(1) { top: 5%; left: 4%; width: 20%; --wave-duration: 4.2s; animation-delay: -1.1s; }
.water-surface > i:nth-child(2) { top: 15%; left: 62%; width: 24%; --wave-start: 26px; --wave-end: -22px; --wave-duration: 5.6s; animation-delay: -3.8s; }
.water-surface > i:nth-child(3) { top: 29%; left: 22%; width: 16%; --wave-duration: 3.9s; animation-delay: -2.4s; }
.water-surface > i:nth-child(4) { top: 42%; left: 76%; width: 19%; --wave-start: 22px; --wave-end: -30px; --wave-duration: 6.2s; animation-delay: -4.7s; }
.water-surface > i:nth-child(5) { top: 56%; left: 3%; width: 25%; --wave-duration: 5.1s; animation-delay: -3.2s; }
.water-surface > i:nth-child(6) { top: 68%; left: 48%; width: 18%; --wave-start: 30px; --wave-end: -18px; --wave-duration: 4.5s; animation-delay: -1.9s; }
.water-surface > i:nth-child(7) { top: 82%; left: 18%; width: 27%; --wave-duration: 6.6s; animation-delay: -5.4s; }
.water-surface > i:nth-child(8) { top: 94%; left: 72%; width: 17%; --wave-start: 24px; --wave-end: -25px; --wave-duration: 4.9s; animation-delay: -2.7s; }

.area-0 .scene-art { filter: saturate(.9); }
.area-1 { --scene-overlay: rgba(48, 185, 166, .12); }
.area-1 .scene-art { filter: saturate(1.02); }
.area-2 { --scene-overlay: rgba(49, 159, 209, .1); }
.area-2 .scene-art { filter: saturate(1.05); }
.area-3 { --scene-overlay: rgba(33, 122, 196, .08); }
.area-3 .scene-art { filter: saturate(1.08); }
.area-4 { --scene-overlay: rgba(34, 89, 153, .08); }
.area-4 .scene-art { filter: saturate(1.08) contrast(1.03); }
.area-5 { --scene-overlay: rgba(240, 180, 84, .07); }
.area-5 .scene-art { filter: saturate(1.08) brightness(1.03); }

.area-banner {
  position: absolute;
  z-index: 10;
  top: 12px;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: min(78%, 390px);
  min-width: 190px;
  transform: rotate(-1deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 14px 8px;
  color: var(--ink);
  background: var(--paper-bright);
  border: var(--outline);
  border-radius: 12px;
  box-shadow: var(--hard-shadow);
}

.area-banner::after {
  content: "";
  position: absolute;
  left: 44%;
  bottom: -10px;
  width: 14px;
  height: 14px;
  background: var(--paper-bright);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(45deg);
}

.area-banner span {
  color: var(--teal-dark);
  font-size: .7rem;
  font-weight: 1000;
  letter-spacing: .08em;
}

.area-banner strong {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  margin-top: 1px;
  font-family: "Arial Black", "Trebuchet MS", sans-serif;
  font-size: .88rem;
  line-height: 1.13;
  text-align: center;
}

.area-banner.traveling { animation: bannerPop 1.2s cubic-bezier(.2,.8,.2,1) both; }
.area-banner.joke-pop { animation: jokePop .52s cubic-bezier(.16,.82,.3,1.22) both; }

.boat-wrap {
  --cooler-left: 1.6%;
  --cooler-top: 31.2%;
  --cooler-width: 42%;
  --water-left: 6%;
  --water-width: 88%;
  --water-bottom: 9.5%;
  --cooler-target-left: 8%;
  --cooler-target-top: 36%;
  --cooler-target-width: 25%;
  --cooler-target-height: 22%;
  position: absolute;
  z-index: 5;
  /* Layout owns centering so startup/resizes cannot leave an animated
     percentage translation cached against the previous portal size. */
  left: 0;
  right: 0;
  margin-inline: auto;
  bottom: 22%;
  width: min(96%, 510px);
  transform: none;
  transform-origin: 50% 78%;
  animation: boatBob 2.6s ease-in-out infinite;
  transition: filter .35s linear, bottom .35s ease;
  pointer-events: none;
}

.boat-wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: var(--water-left);
  bottom: calc(var(--water-bottom) + 1%);
  width: var(--water-width);
  height: 6%;
  border-radius: 50%;
  background: rgba(15, 91, 104, .3);
  filter: blur(3px);
  transform-origin: center;
  animation: waterSurfaceLock 2.6s ease-in-out infinite;
}

.rig-art {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  filter: drop-shadow(2px 3px 1px rgba(14, 78, 90, .52));
}

.boat-water-contact {
  position: absolute;
  z-index: 5;
  left: var(--water-left);
  bottom: var(--water-bottom);
  width: var(--water-width);
  height: 10%;
  transform-origin: center;
  animation: waterSurfaceLock 2.6s ease-in-out infinite;
  pointer-events: none;
}

.boat-water-contact > i {
  --wake-tilt: 0deg;
  position: absolute;
  top: 61%;
  height: 3px;
  border-radius: 50%;
  background: rgba(185, 230, 223, .76);
  box-shadow: 0 3px 0 rgba(19, 105, 117, .5);
  opacity: 0;
  will-change: transform, opacity;
}

.boat-water-contact > i:nth-child(1) {
  --wake-tilt: -2deg;
  left: 1%;
  width: 25%;
  transform-origin: right center;
  animation: wakeTravelLeft 2.05s -1.2s ease-out infinite;
}
.boat-water-contact > i:nth-child(2) {
  --wake-tilt: 2deg;
  right: 1%;
  width: 25%;
  transform-origin: left center;
  animation: wakeTravelRight 2.05s -.18s ease-out infinite;
}
.boat-water-contact > i:nth-child(3) {
  display: none;
}

.rig-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.boat-layer { z-index: 1; }
.master-rig-layer { z-index: 1; }
.cooler-layer {
  position: absolute;
  z-index: 2;
  left: var(--cooler-left);
  top: var(--cooler-top);
  width: var(--cooler-width);
  height: auto;
  transform-origin: 50% 82%;
  pointer-events: none;
}
.rod-layer {
  z-index: 3;
  translate: 1.65% -.5%;
}
.angler-layer { z-index: 4; }
.boat-front-layer {
  z-index: 5;
  clip-path: polygon(0 61%, 31% 61%, 37% 64%, 100% 64%, 100% 100%, 0 100%);
}
.cooler-target {
  position: absolute;
  z-index: 6;
  left: var(--cooler-target-left);
  top: var(--cooler-target-top);
  width: var(--cooler-target-width);
  height: var(--cooler-target-height);
  border-radius: 45%;
  pointer-events: none;
}
.cooler-target::after {
  content: "";
  position: absolute;
  inset: 20%;
  border: 3px solid rgba(255, 253, 241, .9);
  border-radius: 50%;
  opacity: 0;
}
.boat-wrap.boat-tier-1 .boat-front-layer,
.boat-wrap.boat-tier-2 .boat-front-layer {
  clip-path: polygon(0 54.5%, 9% 56%, 20% 58%, 31% 61%, 37% 62.25%, 45% 64%, 100% 64%, 100% 100%, 0 100%);
}
.rig-layer.gear-pop,
.cooler-layer.gear-pop { animation: gearPop .42s cubic-bezier(.2,.82,.25,1.22); }

.boat-wrap.boat-tier-2 { --cooler-left: 6.6%; --cooler-top: 34.8%; --cooler-width: 36.5%; --water-left: 5%; --water-width: 90%; --water-bottom: 9.5%; filter: saturate(1.02); }
.boat-wrap.boat-tier-3 { --cooler-left: 12%; --cooler-top: 38%; --cooler-width: 32%; --water-left: 2%; --water-width: 96%; --water-bottom: 8.2%; filter: saturate(1.04) brightness(1.01); }
.boat-wrap.boat-tier-4 { --cooler-left: 8.8%; --cooler-top: 41.7%; --cooler-width: 30%; --water-left: 6%; --water-width: 88%; --water-bottom: 7.5%; filter: saturate(1.06) brightness(1.02); }
.boat-wrap.boat-tier-5 { --cooler-left: 12.1%; --cooler-top: 41.2%; --cooler-width: 28.5%; --water-left: 4%; --water-width: 92%; --water-bottom: 6.8%; filter: saturate(1.08) brightness(1.03); }
.boat-wrap.boat-tier-6 { --cooler-left: 12.3%; --cooler-top: 41.5%; --cooler-width: 26.5%; --water-left: 1.5%; --water-width: 97%; --water-bottom: 5.5%; filter: saturate(1.1) brightness(1.04); }
.boat-wrap.boat-tier-7 { --cooler-target-left: 15%; --cooler-target-top: 42%; --cooler-target-width: 20%; --cooler-target-height: 23%; --water-left: 2%; --water-width: 96%; --water-bottom: 7%; filter: saturate(1.04); }
.boat-wrap.boat-tier-8 { --cooler-target-left: 13%; --cooler-target-top: 47%; --cooler-target-width: 22%; --cooler-target-height: 22%; --water-left: 2%; --water-width: 96%; --water-bottom: 3.5%; filter: saturate(1.05); }
.boat-wrap.boat-tier-9 { --cooler-target-left: 12%; --cooler-target-top: 46%; --cooler-target-width: 22%; --cooler-target-height: 23%; --water-left: 1%; --water-width: 98%; --water-bottom: 4%; filter: saturate(1.06); }
.boat-wrap.boat-tier-10 { --cooler-target-left: 7%; --cooler-target-top: 49%; --cooler-target-width: 24%; --cooler-target-height: 24%; --water-left: 1%; --water-width: 98%; --water-bottom: 2%; filter: saturate(1.04); }
.boat-wrap.boat-tier-11 { --cooler-target-left: 13%; --cooler-target-top: 45%; --cooler-target-width: 21%; --cooler-target-height: 23%; --water-left: 0; --water-width: 100%; --water-bottom: 1%; filter: saturate(1.08); }
.boat-wrap.boat-tier-12 { --cooler-target-left: 7%; --cooler-target-top: 47%; --cooler-target-width: 23%; --cooler-target-height: 24%; --water-left: 0; --water-width: 100%; --water-bottom: 3.5%; filter: saturate(1.07); }
.boat-wrap.casting { animation: castKick .6s cubic-bezier(.22,.68,.25,1), boatBob 2.6s .6s ease-in-out infinite; }
.cooler-layer.receive-catch { animation: coolerCatch .34s cubic-bezier(.2,.78,.3,1.25); }
.cooler-target.receive-catch::after { animation: coolerTargetCatch .42s ease-out; }

.fishing-line {
  z-index: 8;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .1s linear;
}

.fishing-line path {
  fill: none;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fishing-line .line-outline { stroke: var(--paper-bright); stroke-width: 4.4; opacity: .9; }
.fishing-line .line-core { stroke: var(--ink); stroke-width: 2.15; }
.scene.casting-line .fishing-line,
.scene.line-out .fishing-line { opacity: 1; }
.scene.has-bite .fishing-line { opacity: 1; }
.scene.reeling .fishing-line { opacity: 1; }

.bobber {
  position: absolute;
  z-index: 9;
  left: 82%;
  bottom: 25.5%;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 0;
  transform: scale(.4);
  transform-origin: var(--active-tackle-x, 62%) var(--active-tackle-y, 11%);
  will-change: transform;
}

.bobber::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("./assets/ui/angler-tiers-v1.webp");
  background-position: var(--tackle-x) var(--tackle-y);
  background-repeat: no-repeat;
  background-size: 400% 300%;
  filter: drop-shadow(1px 2px 0 rgba(23, 42, 49, .3));
  transition: opacity .16s ease-out;
}
.bobber[data-tier="1"] { --tackle-x: 0%; --tackle-y: 0%; }
.bobber[data-tier="2"] { --tackle-x: 33.333%; --tackle-y: 0%; }
.bobber[data-tier="3"] { --tackle-x: 66.667%; --tackle-y: 0%; }
.bobber[data-tier="4"] { --tackle-x: 100%; --tackle-y: 0%; }
.bobber[data-tier="5"] { --tackle-x: 0%; --tackle-y: 50%; }
.bobber[data-tier="6"] { --tackle-x: 33.333%; --tackle-y: 50%; }
.bobber[data-tier="7"] { --tackle-x: 66.667%; --tackle-y: 50%; }
.bobber[data-tier="8"] { --tackle-x: 100%; --tackle-y: 50%; }
.bobber[data-tier="9"] { --tackle-x: 0%; --tackle-y: 100%; }
.bobber[data-tier="10"] { --tackle-x: 33.333%; --tackle-y: 100%; }
.bobber[data-tier="11"] { --tackle-x: 66.667%; --tackle-y: 100%; }
.bobber[data-tier="12"] { --tackle-x: 100%; --tackle-y: 100%; }
.scene.line-out .bobber { opacity: 1; animation: none; transform: none; }
.scene.casting-line .bobber { opacity: 1; animation: none; will-change: transform; }
.scene.line-out:not(.casting-line):not(.submerging):not(.submerged):not(.has-bite):not(.reeling) .bobber { animation: tackleDrift 2.8s ease-in-out infinite; }
.scene.has-bite .bobber { opacity: 1; animation: none; transform: none; }
.scene.has-bite .bobber::before { filter: brightness(1.08) saturate(1.14) drop-shadow(1px 2px 0 rgba(23, 42, 49, .3)); }
.scene.reeling .bobber { opacity: 1; animation: none; }

.hooked-fish {
  position: absolute;
  left: var(--fish-attach-x, 20%);
  top: var(--fish-attach-y, 54%);
  width: 76px;
  opacity: 0;
  transform: translate(var(--fish-mouth-offset-x, -96%), var(--fish-mouth-offset-y, -56%)) rotate(-18deg) scale(.9);
  transform-origin: var(--fish-mouth-x, 96%) var(--fish-mouth-y, 56%);
  pointer-events: none;
}

.hooked-fish img {
  --fight-duration: .72s;
  --fight-rot-a: -7deg;
  --fight-rot-b: 6deg;
  --fight-bend-a: -2deg;
  --fight-bend-b: 2deg;
  display: block;
  width: 100%;
  transform: scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1)));
  transform-origin: var(--fish-mouth-x, 96%) var(--fish-mouth-y, 56%);
}
.hooked-fish img[data-fish-tier="2"] { --fight-duration: .6s; --fight-rot-a: -10deg; --fight-rot-b: 9deg; --fight-bend-a: -2.5deg; --fight-bend-b: 2.5deg; }
.hooked-fish img[data-fish-tier="3"] { --fight-duration: .5s; --fight-rot-a: -14deg; --fight-rot-b: 13deg; --fight-bend-a: -3deg; --fight-bend-b: 3deg; }
.hooked-fish img[data-fish-tier="4"] { --fight-duration: .41s; --fight-rot-a: -18deg; --fight-rot-b: 17deg; --fight-bend-a: -4deg; --fight-bend-b: 4deg; }
.hooked-fish img[data-fish-tier="5"] { --fight-duration: .34s; --fight-rot-a: -23deg; --fight-rot-b: 21deg; --fight-bend-a: -5deg; --fight-bend-b: 5deg; }
.hooked-fish img[data-fish-tier="6"] { --fight-duration: .28s; --fight-rot-a: -29deg; --fight-rot-b: 27deg; --fight-bend-a: -6deg; --fight-bend-b: 6deg; }
.hooked-fish img[data-fish-tier="7"] { --fight-duration: .22s; --fight-rot-a: -36deg; --fight-rot-b: 33deg; --fight-bend-a: -7deg; --fight-bend-b: 7deg; }
.scene[data-catch-tier="1"] { --fight-ripple-duration: .92s; --fight-ripple-delay: .46s; --fight-drop-duration: .94s; --fight-drop-size: 4px; --fight-drop-scale: .45; --fight-ring-x: 4.8; --fight-ring-y: 2.5; --breach-ring-x: 6.4; --breach-ring-y: 3.2; --breach-ring-duration: .88s; --breach-ring-after-duration: .92s; --breach-drop-duration: .68s; --breach-drop-scale: .55; }
.scene[data-catch-tier="2"] { --fight-ripple-duration: .8s; --fight-ripple-delay: .4s; --fight-drop-duration: .84s; --fight-drop-size: 5px; --fight-drop-scale: .53; --fight-ring-x: 5.5; --fight-ring-y: 2.9; --breach-ring-x: 7.2; --breach-ring-y: 3.7; --breach-ring-duration: .84s; --breach-ring-after-duration: .88s; --breach-drop-duration: .65s; --breach-drop-scale: .62; }
.scene[data-catch-tier="3"] { --fight-ripple-duration: .68s; --fight-ripple-delay: .32s; --fight-drop-duration: .76s; --fight-drop-size: 6px; --fight-drop-scale: .62; --fight-ring-x: 6.4; --fight-ring-y: 3.4; --breach-ring-x: 8.2; --breach-ring-y: 4.3; --breach-ring-duration: .8s; --breach-ring-after-duration: .84s; --breach-drop-duration: .62s; --breach-drop-scale: .7; }
.scene[data-catch-tier="4"] { --fight-ripple-duration: .56s; --fight-ripple-delay: .27s; --fight-drop-duration: .66s; --fight-drop-size: 7px; --fight-drop-scale: .72; --fight-ring-x: 7.2; --fight-ring-y: 3.8; --breach-ring-x: 9.2; --breach-ring-y: 4.8; --breach-ring-duration: .76s; --breach-ring-after-duration: .8s; --breach-drop-duration: .59s; --breach-drop-scale: .8; }
.scene[data-catch-tier="5"] { --fight-ripple-duration: .48s; --fight-ripple-delay: .23s; --fight-drop-duration: .58s; --fight-drop-size: 7px; --fight-drop-scale: .82; --fight-ring-x: 8.1; --fight-ring-y: 4.2; --breach-ring-x: 10.2; --breach-ring-y: 5.3; --breach-ring-duration: .72s; --breach-ring-after-duration: .76s; --breach-drop-duration: .56s; --breach-drop-scale: .9; }
.scene[data-catch-tier="6"] { --fight-ripple-duration: .41s; --fight-ripple-delay: .2s; --fight-drop-duration: .5s; --fight-drop-size: 8px; --fight-drop-scale: .9; --fight-ring-x: 9; --fight-ring-y: 4.7; --breach-ring-x: 11.1; --breach-ring-y: 5.8; --breach-ring-duration: .68s; --breach-ring-after-duration: .72s; --breach-drop-duration: .53s; --breach-drop-scale: .98; }
.scene[data-catch-tier="7"] { --fight-ripple-duration: .35s; --fight-ripple-delay: .17s; --fight-drop-duration: .44s; --fight-drop-size: 9px; --fight-drop-scale: 1; --fight-ring-x: 10; --fight-ring-y: 5.2; --breach-ring-x: 12; --breach-ring-y: 6.2; --breach-ring-duration: .64s; --breach-ring-after-duration: .68s; --breach-drop-duration: .5s; --breach-drop-scale: 1.08; }
.scene.has-bite .hooked-fish,
.scene.reeling .hooked-fish {
  opacity: .36;
  filter: brightness(0) saturate(0);
  mix-blend-mode: multiply;
}
.scene.has-bite .hooked-fish img,
.scene.reeling .hooked-fish img {
  animation: hookedFishFight var(--fight-duration) ease-in-out infinite alternate;
}
.scene.reeling.surface-break .hooked-fish {
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
  animation: none;
}

.bobber-splash {
  position: absolute;
  z-index: 9;
  left: calc(82% + 26px);
  bottom: calc(25.5% + 8px);
  width: 16px;
  height: 8px;
  pointer-events: none;
}

.bobber-splash::before,
.bobber-splash::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 253, 241, .9);
  border-radius: 50%;
  opacity: 0;
}

.bobber-splash.show::before { animation: splashRing .6s cubic-bezier(.1,.65,.25,1) both; }
.bobber-splash.show::after { animation: splashRing .68s .09s cubic-bezier(.1,.65,.25,1) both; }

.bobber-splash span {
  --splash-x: 0px;
  --splash-y: -18px;
  position: absolute;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 4px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-bright);
  opacity: 0;
}

.bobber-splash span:nth-child(1) { --splash-x: -23px; --splash-y: -18px; }
.bobber-splash span:nth-child(2) { --splash-x: -11px; --splash-y: -31px; animation-delay: .025s; }
.bobber-splash span:nth-child(3) { --splash-x: 1px; --splash-y: -38px; animation-delay: .05s; }
.bobber-splash span:nth-child(4) { --splash-x: 13px; --splash-y: -30px; animation-delay: .035s; }
.bobber-splash span:nth-child(5) { --splash-x: 24px; --splash-y: -17px; animation-delay: .07s; }
.bobber-splash span:nth-child(6) { --splash-x: -5px; --splash-y: -23px; animation-delay: .08s; }
.bobber-splash span:nth-child(7) { --splash-x: 8px; --splash-y: -22px; animation-delay: .09s; }
.bobber-splash.show span { animation-name: splashDrop; animation-duration: .5s; animation-timing-function: ease-out; animation-fill-mode: both; }

.scene.line-out:not(.casting-line):not(.has-bite):not(.reeling) .bobber-splash::before {
  animation: lineRipple 1.45s ease-out infinite;
}
.scene.line-out:not(.casting-line):not(.has-bite):not(.reeling) .bobber-splash::after {
  animation: lineRipple 1.45s .7s ease-out infinite;
}
.scene.has-bite:not(.reeling) .bobber-splash::before,
.scene.reeling:not(.surface-break) .bobber-splash::before {
  animation: lineRipple var(--fight-ripple-duration, .68s) ease-out infinite;
  border-width: 3px;
}
.scene.has-bite:not(.reeling) .bobber-splash::after,
.scene.reeling:not(.surface-break) .bobber-splash::after {
  animation: lineRipple var(--fight-ripple-duration, .68s) var(--fight-ripple-delay, .32s) ease-out infinite;
  border-width: 3px;
}
.scene.has-bite:not(.reeling) .bobber-splash span,
.scene.reeling:not(.surface-break) .bobber-splash span {
  animation: lineTugDrop var(--fight-drop-duration, .78s) ease-out infinite;
  width: var(--fight-drop-size, 7px);
  height: var(--fight-drop-size, 7px);
  border-width: 2px;
  box-shadow: 0 1px 0 rgba(23, 42, 49, .48);
}
.scene.has-bite:not(.reeling) .bobber-splash span:nth-child(2),
.scene.reeling:not(.surface-break) .bobber-splash span:nth-child(2) { animation-delay: -.26s; }
.scene.has-bite:not(.reeling) .bobber-splash span:nth-child(3),
.scene.reeling:not(.surface-break) .bobber-splash span:nth-child(3) { animation-delay: -.52s; }
.scene[data-catch-tier="1"].has-bite:not(.reeling) .bobber-splash span:nth-child(n+4),
.scene[data-catch-tier="1"].reeling:not(.surface-break) .bobber-splash span:nth-child(n+4) { display: none; }
.scene[data-catch-tier="2"].has-bite:not(.reeling) .bobber-splash span:nth-child(n+5),
.scene[data-catch-tier="2"].reeling:not(.surface-break) .bobber-splash span:nth-child(n+5) { display: none; }
.scene[data-catch-tier="3"].has-bite:not(.reeling) .bobber-splash span:nth-child(n+6),
.scene[data-catch-tier="3"].reeling:not(.surface-break) .bobber-splash span:nth-child(n+6) { display: none; }
.scene[data-catch-tier="4"].has-bite:not(.reeling) .bobber-splash span:nth-child(n+7),
.scene[data-catch-tier="4"].reeling:not(.surface-break) .bobber-splash span:nth-child(n+7) { display: none; }

.fish-school {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.water-fish {
  --fish-size: 58px;
  --fish-depth: 17%;
  --fish-opacity: .22;
  --fish-duration: 11s;
  --fish-delay: 0s;
  position: absolute;
  left: -22%;
  bottom: var(--fish-depth);
  width: var(--fish-size);
  opacity: var(--fish-opacity);
  filter: brightness(0) saturate(0);
  animation: fishCruise var(--fish-duration) linear var(--fish-delay) infinite;
  will-change: left, transform;
}
.water-fish img {
  display: block;
  width: 100%;
  transform: scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1)));
  transform-origin: center;
}
.fish-a { --fish-size: 74px; --fish-depth: 13%; --fish-opacity: .23; --fish-duration: 10.5s; --fish-delay: -3s; }
.fish-b { --fish-size: 47px; --fish-depth: 22%; --fish-opacity: .17; --fish-duration: 14s; --fish-delay: -10s; }
.fish-c { --fish-size: 62px; --fish-depth: 31%; --fish-opacity: .14; --fish-duration: 16s; --fish-delay: -6s; }
.fish-d { --fish-size: 39px; --fish-depth: 40%; --fish-opacity: .12; --fish-duration: 18s; --fish-delay: -14s; }
.fish-e { --fish-size: 55px; --fish-depth: 26%; --fish-opacity: .16; --fish-duration: 13s; --fish-delay: -1s; filter: brightness(0) saturate(0) hue-rotate(60deg); }

.cast-button {
  position: absolute;
  z-index: 18;
  left: 50%;
  bottom: 14px;
  min-width: min(76%, 330px);
  height: 60px;
  transform: translateX(-50%) rotate(-.5deg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  color: var(--ink);
  background: var(--green);
  border: var(--outline);
  border-radius: 14px;
  box-shadow: 5px 6px 0 var(--ink);
  font-family: "Arial Black", "Trebuchet MS", sans-serif;
  font-size: 1.02rem;
  font-weight: 1000;
  letter-spacing: .035em;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease, color .15s ease;
}

.auto-quick-toggle {
  flex: none;
  min-width: 83px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 6px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
}
.auto-quick-toggle:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.auto-quick-label { font-size: .65rem; font-weight: 1000; letter-spacing: .04em; }
.auto-quick-state { color: var(--muted); font-size: .58rem; font-weight: 1000; }
.auto-quick-state:empty { display: none; }
.auto-quick-track {
  width: 29px;
  height: 18px;
  padding: 2px;
  background: #9da9a6;
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.auto-quick-track > span {
  display: block;
  width: 10px;
  height: 10px;
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: transform .16s ease;
}
.auto-quick-toggle[aria-checked="true"] .auto-quick-track { background: var(--green); }
.auto-quick-toggle[aria-checked="true"] .auto-quick-track > span { transform: translateX(11px); }
.auto-quick-toggle.locked { min-width: 86px; opacity: .72; cursor: default; }
.auto-quick-toggle.locked .auto-quick-track { background: #aeb8b4; }
.auto-quick-toggle.locked .auto-quick-track > span { transform: translateX(5.5px); }

.cast-button:active:not(:disabled) { transform: translate(-50%, 5px) rotate(-.5deg); box-shadow: 1px 1px 0 var(--ink); }
.cast-button:disabled { color: #526368; background: var(--paper-dim); box-shadow: 4px 4px 0 var(--ink); cursor: default; }
.cast-button.bite { color: var(--paper-bright); background: var(--coral); animation: bitePulse .55s ease-in-out infinite; }
.cast-icon { width: 29px; height: 29px; display: grid; place-items: center; }
.cast-icon svg { width: 28px; height: 28px; }
.cast-icon path,
.cast-icon circle { fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.cast-icon .bobber-dot { fill: var(--yellow); }

.catch-burst {
  position: absolute;
  z-index: 20;
  left: 0;
  top: 0;
  width: clamp(145px, 34cqw, 180px);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.catch-burst img {
  width: 100%;
  transform: scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1)));
  transform-origin: center;
}
.catch-burst.show { opacity: 1; }

.catch-toast {
  position: absolute;
  z-index: 24;
  top: 67px;
  left: 50%;
  width: min(calc(100% - 28px), 392px);
  min-height: 78px;
  transform: translate(-50%, -16px) rotate(.5deg);
  opacity: 0;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 7px;
  color: var(--ink);
  background: var(--paper-bright);
  border: var(--outline);
  border-radius: 15px;
  box-shadow: var(--hard-shadow);
  pointer-events: none;
  transition: opacity .16s linear, transform .24s cubic-bezier(.2,.8,.2,1);
}

.catch-toast::after {
  content: "";
  position: absolute;
  right: 42px;
  bottom: -11px;
  width: 15px;
  height: 15px;
  background: var(--paper-bright);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(45deg);
}

.catch-toast.show { opacity: 1; transform: translate(-50%, 0) rotate(.5deg); }
.catch-toast > img {
  width: 68px;
  max-height: 57px;
  object-fit: contain;
  transform: scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1)));
  transform-origin: center;
}
.catch-toast > div { min-width: 0; display: flex; flex-direction: column; }
.catch-toast .rarity {
  width: fit-content;
  margin-bottom: 2px;
  padding: 2px 6px;
  color: var(--paper-bright);
  background: var(--teal-dark);
  border: 2px solid var(--ink);
  border-radius: 7px;
  font-size: .7rem;
  font-weight: 1000;
  letter-spacing: .04em;
}
.catch-toast .rarity[class*="tier-"] { background: var(--tier-color); }
.catch-toast .rarity.tier-5 { color: var(--ink); }
.catch-toast .rarity.tier-7 { background: linear-gradient(135deg, var(--tier-7), #1762a4); }
.catch-toast strong { overflow: hidden; color: var(--tier-color, var(--ink)); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.catch-toast small { color: var(--muted); font-size: .75rem; }
.catch-toast > b { color: var(--money-green); font-family: "Arial Black", sans-serif; font-size: 1.08rem; white-space: nowrap; }

.dock {
  z-index: 26;
  padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  color: var(--ink);
  background: var(--game-blue);
  border-top: var(--outline);
  box-shadow: 0 -4px 0 rgba(255, 253, 241, .2);
}

.dock-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.dock-heading > div { min-width: 0; }
.dock-heading > div:first-child { flex: 1; }
.dock-actions { flex: none; display: flex; align-items: center; gap: 6px; }
.dock-heading > div > span { color: #123e48; }
.dock-heading > div > strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--paper-bright);
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 1px 1px 0 var(--ink);
}
.dock-heading .money-amount { color: var(--money-green); }

.collection-button {
  flex: none;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
}

.collection-button:active { transform: translate(2px, 2px); box-shadow: none; }
.collection-button > span:not(.controller-button-hint) { width: 23px; height: 23px; display: grid; place-items: center; }
.collection-button svg { width: 22px; height: 22px; }
.collection-button svg { transform: translate(-1px, .5px); }
.collection-button path,
.collection-button circle { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.collection-button b { font-size: .76rem; }

.upgrade-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }

.upgrade-card {
  position: relative;
  min-width: 0;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 8px 35px;
  color: var(--ink);
  background: var(--paper-bright);
  border: var(--outline);
  border-radius: 12px;
  box-shadow: 3px 4px 0 var(--ink);
  text-align: center;
  cursor: pointer;
  transition: transform .08s linear, box-shadow .08s linear, background-color .12s linear;
}

.upgrade-card:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: none; }
.upgrade-card.can-buy {
  background: var(--paper-bright);
  box-shadow: 3px 4px 0 var(--ink), 0 0 0 3px var(--yellow);
  animation: upgradeReady 1.15s ease-in-out infinite;
}
.upgrade-card.can-buy::after {
  content: "UPGRADE!";
  position: absolute;
  z-index: 3;
  top: -9px;
  right: 5px;
  padding: 3px 6px 2px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 1px 2px 0 var(--ink);
  font-size: .52rem;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: .035em;
}
.upgrade-card:disabled { color: #718085; background: var(--paper-dim); cursor: default; }

.upgrade-card[data-tier] .upgrade-copy small,
.upgrade-card[data-tier] .upgrade-copy strong { color: var(--tier-color); }

.upgrade-copy { width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.upgrade-copy small { color: var(--teal-dark); font-size: .75rem; font-style: normal; font-weight: 1000; line-height: 1; }
.upgrade-copy strong {
  width: 100%;
  min-height: 2.16em;
  margin-top: 3px;
  overflow: visible;
  font-size: .78rem;
  line-height: 1.08;
  text-overflow: clip;
  white-space: normal;
}
.upgrade-copy em {
  width: 100%;
  min-height: 2.2em;
  margin-top: 3px;
  overflow: visible;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.1;
  font-style: normal;
  text-overflow: clip;
  white-space: normal;
}

.upgrade-cost {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--money-green);
  background: #edf2e6;
  border: 2px solid var(--ink);
  border-radius: 7px;
  font-size: .76rem;
  font-weight: 1000;
}

.upgrade-card:disabled .upgrade-cost { color: #627277; background: #b9c3ba; }

.scrim {
  position: absolute;
  z-index: 80;
  inset: 0;
  background: rgba(16, 34, 40, .74);
}

.sheet {
  position: absolute;
  z-index: 90;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(78cqh, 720px);
  padding: 7px 15px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  color: var(--ink);
  background: var(--paper);
  border: var(--outline);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -7px 0 var(--ink);
  animation: sheetUp .26s cubic-bezier(.2,.8,.2,1) both;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.compact-sheet { max-height: min(78cqh, 650px); }
.sheet-handle { width: 46px; height: 6px; margin: 0 auto 10px; background: var(--ink); border-radius: 99px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-header span { color: var(--teal-dark); }
.sheet-header h2 { margin: 3px 0 0; font-family: "Arial Black", sans-serif; font-size: 1.35rem; }

.close-button {
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: var(--coral);
  border: var(--outline);
  border-radius: var(--button-corner-radius);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.close-button:active { transform: translate(3px, 3px); box-shadow: none; }

.daily-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  background: #e7eee0;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
}
.daily-card.complete { background: #e9f6d9; box-shadow: 0 0 0 3px var(--green), 3px 3px 0 var(--ink); }
.daily-card.claimed { opacity: .72; }
.daily-card > img { width: 68px; height: 56px; object-fit: contain; transform: scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1))); }
.daily-card > div { min-width: 0; display: flex; flex-direction: column; }
.daily-card > div > span { color: var(--teal-dark); font-size: .63rem; font-weight: 1000; letter-spacing: .06em; }
.daily-card > div > strong { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.daily-card > div > small { margin-top: 2px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.daily-card > button,
.voyage-panel > button {
  min-height: 36px;
  padding: 6px 9px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: .65rem;
  font-weight: 1000;
  cursor: pointer;
}
.daily-card > button:disabled,
.voyage-panel > button:disabled { color: var(--muted); background: #c9d1c7; box-shadow: none; cursor: default; }

.collection-waters { display: flex; flex-direction: column; gap: 14px; }
.collection-water { position: relative; }
.collection-water > h3 { margin: 0 0 7px 2px; color: var(--teal-dark); font-family: "Arial Black", sans-serif; font-size: .9rem; }
.collection-water > span { position: absolute; top: 0; right: 2px; color: var(--muted); font-size: .73rem; font-weight: 1000; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fish-entry {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 5px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 11px;
  box-shadow: 2px 2px 0 var(--ink);
  overflow: hidden;
  text-align: center;
  cursor: pointer;
}
.fish-entry:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.fish-entry.gilded-caught {
  border-color: var(--yellow);
  box-shadow:
    inset 0 0 0 1px var(--tier-5),
    inset 0 0 10px rgba(243, 200, 69, .2),
    2px 2px 0 var(--ink),
    0 0 7px rgba(199, 149, 8, .35),
    0 0 12px rgba(243, 200, 69, .25);
}
.fish-entry img {
  width: 64px;
  height: 43px;
  object-fit: contain;
  transform: scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1)));
  transform-origin: center;
}
.fish-entry strong { width: 100%; margin-top: 4px; overflow: hidden; color: var(--tier-color, var(--ink)); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.fish-entry small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.fish-entry.locked { color: #788689; background: #d8ddd1; cursor: default; }
.fish-entry.locked img { filter: brightness(0); opacity: .3; }
.fish-entry.locked strong { color: #788689; }
.fish-entry.locked small { color: #718085; }

.fish-detail { padding-bottom: 8px; }
.detail-back {
  margin: 0 0 10px;
  padding: 5px 9px;
  color: var(--teal-dark);
  background: transparent;
  border: 0;
  font-size: .75rem;
  font-weight: 1000;
  cursor: pointer;
}
.detail-hero {
  min-height: 170px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
  background: linear-gradient(150deg, #d6eee5, #b9ddd9);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
}
.detail-art-frame {
  min-width: 0;
  height: 142px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.detail-art-frame > img {
  display: block;
  width: 100%;
  height: 142px;
  max-width: 100%;
  max-height: 142px;
  object-fit: contain;
  transform: scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1)));
  transform-origin: center;
}
.detail-copy { min-width: 0; padding-left: 3px; }
.detail-hero h3 {
  margin: 5px 0 2px;
  font-family: "Arial Black", sans-serif;
  font-size: clamp(.9rem, 4.5cqw, 1.12rem);
  line-height: 1.03;
  overflow-wrap: anywhere;
}
.detail-hero p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(.72rem, 3.3cqw, .83rem);
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.detail-hero .rarity { display: inline-block; padding: 3px 7px; color: var(--paper-bright); background: var(--teal-dark); border: 2px solid var(--ink); border-radius: 7px; font-size: .68rem; font-weight: 1000; }
.detail-hero .rarity.tier-1 { background: var(--tier-1); }
.detail-hero .rarity.tier-2 { background: var(--tier-2); }
.detail-hero .rarity.tier-3 { background: var(--tier-3); }
.detail-hero .rarity.tier-4 { background: var(--tier-4); }
.detail-hero .rarity.tier-5 { color: var(--ink); background: var(--tier-5); }
.detail-hero .rarity.tier-6 { background: var(--tier-6); }
.detail-hero .rarity.tier-7 { background: linear-gradient(135deg, var(--tier-7), #1762a4); }
.detail-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.detail-stats > div { padding: 10px; background: var(--paper-bright); border: 2px solid var(--ink); border-radius: 10px; }
.detail-stats dt { color: var(--muted); font-size: .66rem; font-weight: 1000; text-transform: uppercase; }
.detail-stats dd { margin: 2px 0 0; font-size: .88rem; font-weight: 1000; }
.detail-variants { display: flex; flex-direction: column; margin-top: 9px; padding: 11px; background: #e7eee0; border: 2px solid var(--ink); border-radius: 10px; }
.detail-variants span { color: var(--teal-dark); font-size: .66rem; font-weight: 1000; letter-spacing: .05em; }
.detail-variants strong { margin-top: 3px; font-size: .83rem; }

.travel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.travel-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper-bright);
  border: 3px solid var(--ink);
  border-radius: 13px;
  box-shadow: 3px 3px 0 var(--ink);
  text-align: left;
  cursor: pointer;
}
.travel-card img { display: block; width: 100%; height: 84px; object-fit: cover; border-bottom: 2px solid var(--ink); }
.travel-card-copy { min-height: 55px; display: flex; flex-direction: column; justify-content: center; padding: 7px 9px 8px; }
.travel-card-copy strong { overflow: hidden; color: var(--tier-color, var(--ink)); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.travel-card-copy small { margin-top: 2px; color: var(--muted); font-size: .72rem; font-weight: 800; }
.travel-card:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: none; }
.travel-card.current { box-shadow: 0 0 0 3px var(--green), 3px 3px 0 var(--ink); }
.travel-card.current .travel-card-copy small { color: var(--green-dark); }
.travel-card.locked { opacity: .58; cursor: default; }
.travel-card.locked img { filter: grayscale(1) brightness(.72); }

.voyage-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 13px;
  padding: 13px;
  background: linear-gradient(145deg, #d4ebe3, #e9e6c9);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
}
.voyage-panel > span { color: var(--teal-dark); font-size: .67rem; font-weight: 1000; letter-spacing: .07em; }
.voyage-panel > strong { font-family: "Arial Black", sans-serif; font-size: 1rem; }
.voyage-panel > small { color: var(--muted); font-size: .74rem; font-weight: 800; line-height: 1.28; }
.voyage-panel > button { align-self: stretch; margin-top: 6px; background: var(--green); }

.setting-row {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 3px;
  border-bottom: 2px solid var(--ink);
}
.setting-row > div { display: flex; flex-direction: column; }
.setting-row strong { font-size: .94rem; }
.setting-row small { margin-top: 2px; color: var(--muted); font-size: .75rem; }
.locked-setting { opacity: .56; }

.toggle {
  flex: none;
  width: 56px;
  height: 32px;
  padding: 2px;
  background: #9da9a6;
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}
.toggle span { display: block; width: 24px; height: 24px; background: var(--paper-bright); border: 2px solid var(--ink); border-radius: 50%; transition: transform .16s ease; }
.toggle[aria-checked="true"] { background: var(--green); }
.toggle[aria-checked="true"] span { transform: translateX(24px); }
.toggle:disabled { cursor: default; }

.save-panel {
  margin-top: 14px;
  padding: 12px;
  background: #e7eee0;
  border: 2px solid var(--ink);
  border-radius: 12px;
}
.save-panel-copy { display: flex; flex-direction: column; }
.save-panel-copy strong { font-size: .94rem; }
.save-panel-copy small { margin-top: 3px; color: var(--green-dark); font-size: .75rem; font-weight: 900; }
.save-panel[data-state="warning"] .save-panel-copy small { color: #a14832; }
.save-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.save-actions button {
  min-height: 40px;
  padding: 6px 8px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: .7rem;
  font-weight: 1000;
  cursor: pointer;
}
.save-actions button:last-child { background: var(--paper-bright); }
.save-actions button:active { transform: translate(2px, 2px); box-shadow: none; }
.save-help { display: block; margin-top: 9px; color: var(--muted); font-size: .68rem; font-weight: 800; line-height: 1.25; }

.reset-button {
  width: 100%;
  height: 48px;
  margin-top: 17px;
  color: var(--paper-bright);
  background: var(--coral);
  border: var(--outline);
  border-radius: 11px;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
}

.modal {
  position: absolute;
  z-index: 100;
  left: 50%;
  top: 50%;
  width: min(calc(100% - 36px), 380px);
  transform: translate(-50%, -50%) rotate(-.7deg);
  padding: 23px 21px 19px;
  color: var(--ink);
  background: var(--paper-bright);
  border: var(--outline);
  border-radius: 17px;
  box-shadow: 8px 9px 0 var(--ink);
  text-align: center;
  animation: modalPop .25s cubic-bezier(.2,.8,.2,1) both;
}

.modal-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  color: var(--ink);
  background: var(--yellow);
  border: var(--outline);
  border-radius: 50%;
}
.modal-icon svg { width: 37px; height: 37px; }
.modal-icon path { fill: var(--teal-dark); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.modal .eyebrow { color: var(--teal-dark); }
.modal h2 { margin: 6px 0; font-family: "Arial Black", sans-serif; font-size: 1.3rem; }
.modal p { margin: 0; color: var(--muted); font-size: .86rem; }
.modal > strong { display: block; margin: 13px 0; color: var(--money-green); font-family: "Arial Black", sans-serif; font-size: 2.05rem; }
.modal button { width: 100%; height: 50px; color: var(--ink); background: var(--green); border: var(--outline); border-radius: 11px; box-shadow: 3px 3px 0 var(--ink); font-weight: 1000; letter-spacing: .04em; }

.notice {
  position: absolute;
  z-index: 120;
  left: 50%;
  bottom: calc(190px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 28px);
  transform: translateX(-50%) rotate(-.5deg);
  padding: 9px 13px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: .78rem;
  font-weight: 900;
  text-align: center;
  animation: noticeIn .2s ease-out both;
}
.notice .money-amount { color: var(--money-green); }

[hidden] { display: none !important; }

@keyframes boatBob {
  0%, 100% { transform: rotate(-.8deg) translateY(0); }
  50% { transform: rotate(.7deg) translateY(5px); }
}
@keyframes waterSurfaceLock {
  0%, 100% { transform: translateY(0) rotate(.8deg) scaleX(.98); }
  50% { transform: translateY(-5px) rotate(-.7deg) scaleX(1.03); }
}
@keyframes currentDrift {
  0% { opacity: .16; transform: translate3d(var(--wave-start), 0, 0) scaleX(.72); }
  42% { opacity: .72; }
  100% { opacity: .24; transform: translate3d(var(--wave-end), 2px, 0) scaleX(1.12); }
}
@keyframes wakeTravelLeft {
  0% { opacity: 0; transform: translateX(17px) rotate(var(--wake-tilt)) scaleX(.18); }
  24% { opacity: .8; }
  100% { opacity: 0; transform: translateX(-29px) rotate(var(--wake-tilt)) scaleX(1.32); }
}
@keyframes wakeTravelRight {
  0% { opacity: 0; transform: translateX(-17px) rotate(var(--wake-tilt)) scaleX(.18); }
  24% { opacity: .8; }
  100% { opacity: 0; transform: translateX(29px) rotate(var(--wake-tilt)) scaleX(1.32); }
}
@keyframes castKick {
  0% { transform: rotate(0); }
  45% { transform: rotate(2.5deg) translateY(-3px); }
  100% { transform: rotate(-.8deg); }
}
@keyframes gearPop {
  0% { opacity: .3; transform: scale(.92) translateY(8px); }
  70% { opacity: 1; transform: scale(1.035) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes coolerCatch {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(3px) scale(.93, 1.08); }
}
@keyframes bobberLand {
  0% { opacity: .96; transform: translateY(var(--cast-start-y, -280px)); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes splashRing {
  0% { opacity: .95; transform: scale(.25); }
  100% { opacity: 0; transform: scale(5.6, 3.2); }
}
@keyframes splashDrop {
  0% { opacity: 0; transform: translate(0, 3px) scale(.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--splash-x), var(--splash-y)) scale(.75); }
}
@keyframes lineRipple {
  0% { opacity: .95; transform: scale(.45); }
  72%, 100% { opacity: 0; transform: scale(var(--fight-ring-x, 6.2), var(--fight-ring-y, 3.35)); }
}
@keyframes lineTugDrop {
  0% { opacity: 0; transform: translate(0, 4px) scale(.45); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--splash-x), var(--splash-y)) scale(var(--fight-drop-scale, .65)); }
}
@keyframes tackleDrift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1.5px); }
}
@keyframes bobberReel {
  0% { transform: translateY(var(--submerge-depth, 0px)); opacity: 1; }
  100% { transform: translate(var(--reel-x, 0), var(--reel-y, -160px)); opacity: 1; }
}
@keyframes fishNibble {
  from { transform: translate(0, -50%) rotate(-7deg) scale(.82); }
  to { transform: translate(3px, -50%) rotate(3deg) scale(.86); }
}
@keyframes hookedWiggle {
  from { transform: translate(0, -50%) rotate(-13deg) scale(.9); }
  to { transform: translate(2px, -50%) rotate(8deg) scale(.94); }
}
@keyframes hookedFishFight {
  from { transform: translateY(3px) rotate(var(--fight-rot-a)) skewY(var(--fight-bend-a)) scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1))) scaleY(.92); }
  to { transform: translateY(-3px) rotate(var(--fight-rot-b)) skewY(var(--fight-bend-b)) scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1))) scaleY(1.05); }
}
@keyframes jokePop {
  0% { opacity: .25; transform: translateY(-6px) rotate(-1deg) scale(.94); }
  70% { opacity: 1; transform: translateY(1px) rotate(.5deg) scale(1.025); }
  100% { opacity: 1; transform: translateY(0) rotate(-1deg) scale(1); }
}
@keyframes fishCruise {
  0% { left: -22%; transform: translateY(0) scaleX(1); }
  23% { transform: translateY(6px) scaleX(1) rotate(-2deg); }
  48% { left: 112%; transform: translateY(-3px) scaleX(1); }
  50% { left: 112%; transform: translateY(-3px) scaleX(-1); }
  73% { transform: translateY(5px) scaleX(-1) rotate(2deg); }
  98% { left: -22%; transform: translateY(0) scaleX(-1); }
  100% { left: -22%; transform: translateY(0) scaleX(1); }
}
@keyframes bitePulse { 0%, 100% { transform: translateX(-50%) rotate(-.5deg) scale(1); } 50% { transform: translateX(-50%) rotate(.5deg) scale(1.035); } }
@keyframes fishJump {
  0% { opacity: 0; transform: translate(0, 30px) rotate(-25deg) scale(.5); }
  25% { opacity: 1; }
  60% { opacity: 1; transform: translate(-125px, -155px) rotate(18deg) scale(1.15); }
  100% { opacity: 0; transform: translate(-205px, -55px) rotate(45deg) scale(.72); }
}
@keyframes upgradeReady {
  0%, 100% { box-shadow: 3px 4px 0 var(--ink), 0 0 0 3px var(--yellow); }
  50% { box-shadow: 3px 4px 0 var(--ink), 0 0 0 5px rgba(243, 200, 69, .48); }
}
@keyframes bannerPop { 0%, 100% { transform: rotate(-1deg) scale(1); } 35% { transform: rotate(1deg) scale(1.12); } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes modalPop { from { opacity: 0; transform: translate(-50%, -48%) rotate(-2deg) scale(.92); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-.7deg) scale(1); } }
@keyframes noticeIn { from { opacity: 0; transform: translate(-50%, 8px) rotate(-.5deg); } to { opacity: 1; transform: translate(-50%, 0) rotate(-.5deg); } }
@keyframes coolerTargetCatch { 0% { opacity: .8; transform: scale(.25); } 100% { opacity: 0; transform: scale(1.55); } }

@container reel-rich (max-height: 720px) {
  .app { grid-template-rows: auto minmax(210px, 1fr) auto; }
  .dock { padding-top: 7px; }
  .dock-heading { margin-bottom: 5px; }
  .upgrade-card { min-height: 100px; padding-top: 6px; }
  .boat-wrap { width: min(76%, 410px); bottom: 23%; }
  .cast-button { height: 54px; bottom: 11px; }
}

@container reel-rich (max-width: 370px) {
  .hud { grid-template-columns: 106px minmax(127px, 1fr) 44px; gap: 6px; padding-inline: 7px; }
  .money-card,
  .location-card { padding-inline: 7px; }
  .location-pin { width: 27px; height: 27px; }
  .upgrade-grid { gap: 5px; }
  .upgrade-card { padding-inline: 6px; }
  .upgrade-copy strong { font-size: .75rem; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-card { grid-template-columns: 52px minmax(0, 1fr); }
  .daily-card > img { width: 52px; }
  .daily-card > button { grid-column: 1 / -1; width: 100%; }
}

@container reel-rich (min-width: 820px) {
  html,
  body { background: #0d2d36; }
  body::before { display: block; }
  .hud { padding-inline: 15px; }
  .dock { padding-inline: 15px; }
  .upgrade-grid { gap: 10px; }
  .upgrade-card { min-height: 122px; padding-inline: 11px; }
}

@container reel-rich (max-width: 900px) {
  .app {
    width: 100cqw;
    max-width: 100cqw;
    margin-inline: 0;
    border-inline: 0;
    box-shadow: none;
  }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Illustrated tackle-box interface. Gameplay art and scene geometry stay untouched. */
.money-card,
.location-card,
.icon-button {
  border-width: 3px;
  border-color: var(--ink);
  border-radius: 15px;
  background:
    radial-gradient(ellipse at 18% 24%, rgba(128, 82, 35, .1) 0 2px, transparent 3px),
    radial-gradient(ellipse at 81% 72%, rgba(128, 82, 35, .08) 0 3px, transparent 4px),
    repeating-linear-gradient(2deg, rgba(137, 92, 44, .045) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #fff8df 0%, #f5e6be 100%);
  box-shadow: 4px 5px 0 var(--ink), inset 0 0 0 1px rgba(255, 255, 255, .75);
}

.money-card {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding-inline: 5px 7px;
  text-align: left;
}

.bank-cash {
  flex: none;
  width: 42px;
  height: 36px;
  display: grid;
  place-items: center;
  transform: rotate(-3deg);
}
.bank-cash svg { width: 100%; height: 100%; overflow: visible; }
.bank-cash path,
.bank-cash circle { stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }
.bank-cash .cash-shadow { fill: #1c682f; opacity: .38; transform: translate(2px, 2px); }
.bank-cash .cash-note { fill: #72d34b; }
.bank-cash .cash-note-back { fill: #95e866; }
.bank-cash .cash-note-front { fill: #54b93e; }
.bank-cash .cash-band { fill: #e7e46f; }
.bank-cash circle { fill: #d5f3a0; }
.bank-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.money-card strong { transform: none; }

.location-card { padding-inline: 9px 8px; }
.location-pin { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .58); }
.icon-button { background-color: #faedc9; }

.cast-button {
  min-width: min(78%, 370px);
  height: clamp(62px, 8.2cqh, 74px);
  gap: 8px;
  padding: 0 31px;
  color: #fffdf0;
  background:
    radial-gradient(circle at 17px 50%, #d9ddd0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px),
    radial-gradient(circle at calc(100% - 17px) 50%, #d9ddd0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px),
    repeating-linear-gradient(1deg, rgba(255, 255, 255, .13) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, #8aed4f 0 15%, #64cc35 16% 82%, #49ad2b 100%);
  border: 4px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 #74451d, 0 9px 0 var(--ink), inset 0 0 0 2px rgba(255, 255, 255, .35);
  font-size: clamp(1.02rem, 4.2cqw, 1.36rem);
  letter-spacing: .025em;
  text-shadow: -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink), 0 3px 0 rgba(23, 42, 49, .62);
}
.cast-button:active:not(:disabled) {
  transform: translate(-50%, 5px) rotate(-.5deg);
  box-shadow: 0 2px 0 #74451d, 0 4px 0 var(--ink), inset 0 0 0 2px rgba(255, 255, 255, .28);
}
.cast-button:disabled {
  color: #fffdf0;
  background:
    radial-gradient(circle at 17px 50%, #d9ddd0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px),
    radial-gradient(circle at calc(100% - 17px) 50%, #d9ddd0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px),
    repeating-linear-gradient(1deg, rgba(255, 255, 255, .09) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, #74ce47, #55b936);
  box-shadow: 0 5px 0 #74451d, 0 9px 0 var(--ink), inset 0 0 0 2px rgba(255, 255, 255, .25);
  filter: saturate(.78);
}
.cast-button.bite {
  color: #fffdf0;
  background:
    radial-gradient(circle at 17px 50%, #d9ddd0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px),
    radial-gradient(circle at calc(100% - 17px) 50%, #d9ddd0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px),
    linear-gradient(180deg, #ff8267, var(--coral));
}
.cast-icon { width: 58px; height: 48px; margin-left: -7px; }
.cast-icon svg { width: 58px; height: 48px; overflow: visible; filter: drop-shadow(1px 2px 0 rgba(23, 42, 49, .45)); }
.cast-icon path { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cast-icon .cast-ripple { fill: none; stroke: #e3fbff; stroke-width: 3; }
.cast-icon .ripple-back { opacity: .72; }
.cast-icon .cast-splash { fill: none; stroke: #e3fbff; stroke-width: 3; }
.cast-icon .bobber-stem { fill: none; stroke: var(--ink); stroke-width: 4; }
.cast-icon .bobber-top { fill: #fff8e6; }
.cast-icon .bobber-bottom { fill: #f15f43; }
.cast-icon .bobber-shine { fill: none; stroke: #fff; stroke-width: 2; }

.dock {
  padding: 11px 10px max(11px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 0 rgba(255, 253, 241, .27), inset 0 2px 0 rgba(255, 255, 255, .12);
}

.dock-heading {
  display: grid;
  grid-template-columns: minmax(122px, 158px) minmax(38px, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
  padding: 0;
}
.dock-heading > div:first-child { min-width: 0; }

.gear-banner {
  position: relative;
  height: 49px;
  display: flex;
  align-items: center;
  padding: 4px 8px 4px 38px;
  background:
    radial-gradient(ellipse at 74% 25%, rgba(87, 44, 17, .3) 0 2px, transparent 3px),
    repeating-linear-gradient(0deg, rgba(84, 42, 17, .12) 0 1px, transparent 1px 10px),
    linear-gradient(180deg, #e6ac53, #ba712c);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 4px 0 var(--ink), inset 0 0 0 2px rgba(255, 224, 150, .48);
  transform: rotate(-.35deg);
}
.gear-banner::after {
  content: "";
  position: absolute;
  inset: 5px -5px 5px auto;
  width: 7px;
  z-index: -1;
  background: #8e4f22;
  border: 2px solid var(--ink);
  border-left: 0;
}
.gear-bag {
  position: absolute;
  left: -9px;
  bottom: -7px;
  width: 48px;
  height: 57px;
  transform: rotate(-4deg);
  filter: drop-shadow(2px 3px 0 var(--ink));
}
.gear-bag svg { width: 100%; height: 100%; overflow: visible; }
.gear-bag path { stroke: var(--ink); stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.gear-bag .bag-handle { fill: none; stroke: #8b5827; stroke-width: 5; }
.gear-bag .bag-body { fill: #238998; }
.gear-bag .bag-flap { fill: #2ba7ad; }
.gear-bag .bag-pocket { fill: #147181; }
.gear-bag .bag-buckle { fill: #f2c44c; }
.gear-banner-copy { min-width: 0; display: block; }
.gear-banner-copy > span {
  display: block;
  color: var(--ink);
  font-size: .69rem;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: .035em;
  white-space: nowrap;
}
.dock-heading .gear-banner-copy > strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: .58rem;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow: none;
  white-space: nowrap;
}

.gear-progress {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: repeat(10, minmax(3px, 1fr));
  align-items: center;
  gap: clamp(1px, .45cqw, 3px);
  padding: 0 clamp(5px, 1.4cqw, 9px);
  background: #106476;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 2px 3px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, .1);
}
.gear-progress i {
  aspect-ratio: 1;
  min-width: 3px;
  max-width: 10px;
  justify-self: center;
  background: #4e8994;
  border: 1.5px solid #b7d5d8;
  border-radius: 50%;
}
.gear-progress i.filled {
  background: #79e24a;
  border-color: #4bb72a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), 0 0 7px rgba(121, 226, 74, .5);
}

.dock-actions { gap: 6px; }
.auto-quick-toggle,
.collection-button {
  height: 40px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 2px 3px 0 var(--ink), inset 0 0 0 1px rgba(255, 255, 255, .55);
}
.auto-quick-toggle {
  min-width: 78px;
  padding-inline: 5px;
  background: linear-gradient(180deg, #fff8df, #e8e9d8);
}
.auto-quick-toggle.locked { min-width: 81px; }
.auto-quick-label { font-size: .63rem; }
.auto-quick-state { font-size: .54rem; }
.collection-button { padding-inline: 7px; background: linear-gradient(180deg, #ffda53, #efb936); }
.collection-button > span:not(.controller-button-hint) { width: 20px; }
.collection-button b { font-size: .7rem; }

.upgrade-grid { gap: 9px; }
.upgrade-card {
  min-height: 166px;
  align-items: stretch;
  justify-content: flex-start;
  padding: 9px 8px 7px;
  background:
    radial-gradient(ellipse at 13% 18%, rgba(121, 75, 28, .13) 0 2px, transparent 3px),
    radial-gradient(ellipse at 82% 64%, rgba(121, 75, 28, .09) 0 3px, transparent 4px),
    repeating-linear-gradient(2deg, rgba(121, 75, 28, .035) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #fff9e2 0%, #f5e7c2 100%);
  border: 4px solid #89552a;
  border-radius: 9px;
  box-shadow: 0 0 0 2px var(--ink), 4px 5px 0 var(--ink), inset 0 0 0 2px rgba(255, 255, 255, .62);
  text-align: left;
}
.upgrade-card:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 2px var(--ink), 1px 2px 0 var(--ink), inset 0 0 0 2px rgba(255, 255, 255, .62);
}
.upgrade-card.can-buy {
  background:
    radial-gradient(ellipse at 13% 18%, rgba(121, 75, 28, .13) 0 2px, transparent 3px),
    repeating-linear-gradient(2deg, rgba(121, 75, 28, .035) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #fff9e2 0%, #f5e7c2 100%);
  box-shadow: 0 0 0 2px var(--ink), 4px 5px 0 var(--ink), 0 0 0 6px rgba(243, 200, 69, .78), inset 0 0 0 2px rgba(255, 255, 255, .62);
  animation: illustratedUpgradeReady 1.1s ease-in-out infinite;
}
.upgrade-card.can-buy::after {
  content: "READY!";
  top: -12px;
  right: 5px;
  padding: 3px 7px 2px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 1px 2px 0 var(--ink);
  font-size: .5rem;
  letter-spacing: .04em;
}
.upgrade-card:disabled {
  color: #718085;
  background: linear-gradient(180deg, #eee8d3, #d9dacb);
}

.card-bolts { position: absolute; inset: 0; pointer-events: none; }
.card-bolts i {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at 35% 35%, #eff2df 0 1px, #8a9691 2px 4px, #35484c 4.5px);
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.card-bolts i:nth-child(1) { left: 3px; top: 3px; }
.card-bolts i:nth-child(2) { right: 3px; top: 3px; }
.card-bolts i:nth-child(3) { left: 3px; bottom: 3px; }
.card-bolts i:nth-child(4) { right: 3px; bottom: 3px; }

.upgrade-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}
.gear-illustration {
  width: 40px;
  height: 58px;
  display: grid;
  place-items: center;
  transform: rotate(-3deg);
  filter: drop-shadow(1px 2px 0 rgba(23, 42, 49, .28));
}
.gear-illustration svg { width: 100%; height: 100%; overflow: visible; }
.gear-illustration path,
.gear-illustration circle { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rod-illustration .rod-pole { fill: none; stroke: #5f371e; stroke-width: 6; }
.rod-illustration .rod-grip { fill: #b66c2b; }
.rod-illustration .rod-line { fill: none; stroke-width: 2; }
.rod-illustration .reel-body { fill: #4e8ca0; }
.rod-illustration .reel-core { fill: #b7dde0; }
.rod-illustration .reel-handle { fill: none; stroke-width: 4; }
.hook-illustration .hook-eye { fill: #9da9a6; }
.hook-illustration .hook-body,
.hook-illustration .hook-barb { fill: none; stroke: #829096; stroke-width: 8; }
.hook-illustration .hook-barb { stroke-width: 6; }
.boat-illustration .mini-boat-rim { fill: #efaf28; }
.boat-illustration .mini-boat-hull { fill: #55a9b2; }
.boat-illustration .mini-boat-seat { fill: #f1c449; }
.boat-illustration .mini-boat-name { fill: #f7f1db; }
.boat-illustration circle { fill: #a5b0ab; stroke-width: 2; }

.upgrade-copy {
  min-width: 0;
  align-items: stretch;
  text-align: left;
}
.upgrade-title { display: block; }
.upgrade-title small {
  overflow: hidden;
  color: var(--teal-dark);
  font-size: .62rem;
  line-height: 1;
  letter-spacing: .025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.level-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  flex: none;
  padding: 3px 5px 2px;
  color: #fff6da;
  background: #a66532;
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 218, 144, .55);
  font-size: .56rem;
  font-weight: 1000;
  line-height: 1;
}
.upgrade-copy strong {
  min-height: 2.05em;
  margin-top: 5px;
  color: var(--tier-color, var(--ink));
  font-size: .75rem;
  line-height: 1.02;
}
.upgrade-card > em {
  min-height: 3em;
  margin: 2px 3px 4px;
  color: var(--ink-soft);
  font-size: .61rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.18;
  text-align: left;
  white-space: pre-line;
}

.upgrade-action {
  width: 100%;
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: auto;
  padding: 0 4px;
  color: #fffdf0;
  background: linear-gradient(180deg, #82e34c 0 18%, #54bd31 19% 100%);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 2px 0 #8c5527;
}
.upgrade-arrow {
  flex: none;
  font-size: .68rem;
  line-height: 1;
  text-shadow: 0 1px 0 var(--ink);
}
.upgrade-action > b {
  min-width: 0;
  font-size: clamp(.52rem, 2cqw, .68rem);
  font-weight: 1000;
  letter-spacing: -.015em;
  line-height: 1;
  text-shadow: -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink), 1px 1px 0 var(--ink);
}
.upgrade-cost {
  position: static;
  flex: none;
  width: auto;
  height: auto;
  display: inline-grid;
  place-items: center;
  padding: 3px 4px 2px;
  color: var(--money-green);
  background: #fff9df;
  border: 2px solid var(--ink);
  border-radius: 5px;
  font-size: clamp(.55rem, 2.15cqw, .72rem);
  line-height: 1;
}
.upgrade-card:disabled .upgrade-action { background: linear-gradient(#aebbb4, #8b9993); }
.upgrade-card:disabled .upgrade-cost { color: #627277; background: #d2d7cb; }

@keyframes illustratedUpgradeReady {
  0%, 100% { box-shadow: 0 0 0 2px var(--ink), 4px 5px 0 var(--ink), 0 0 0 4px rgba(243, 200, 69, .62), inset 0 0 0 2px rgba(255, 255, 255, .62); }
  50% { box-shadow: 0 0 0 2px var(--ink), 4px 5px 0 var(--ink), 0 0 0 7px rgba(243, 200, 69, .36), inset 0 0 0 2px rgba(255, 255, 255, .62); }
}

@container reel-rich (max-height: 720px) {
  .cast-button { height: 58px; bottom: 11px; }
  .cast-icon { width: 49px; height: 40px; }
  .cast-icon svg { width: 49px; height: 40px; }
  .dock { padding-top: 8px; }
  .dock-heading { margin-bottom: 8px; }
  .gear-banner { height: 43px; }
  .gear-bag { width: 43px; height: 51px; }
  .gear-progress { height: 34px; }
  .auto-quick-toggle,
  .collection-button { height: 36px; }
  .upgrade-card { min-height: 145px; padding-top: 7px; }
  .upgrade-main { grid-template-columns: 38px minmax(0, 1fr); }
  .gear-illustration { width: 38px; height: 48px; }
  .upgrade-card > em { min-height: 2.35em; font-size: .57rem; }
  .upgrade-action { height: 30px; }
}

@container reel-rich (max-width: 370px) {
  .bank-cash { width: 34px; }
  .money-card strong { font-size: 1.01rem; }
  .dock-heading { grid-template-columns: 110px minmax(25px, 1fr) auto; gap: 5px; }
  .gear-banner { padding-left: 32px; padding-right: 4px; }
  .gear-bag { left: -8px; width: 42px; }
  .gear-banner-copy > span { font-size: .58rem; }
  .dock-heading .gear-banner-copy > strong { font-size: .5rem; }
  .gear-progress { padding-inline: 4px; gap: 1px; }
  .auto-quick-toggle { min-width: 61px; padding-inline: 2px; gap: 2px; }
  .auto-quick-toggle.locked { min-width: 64px; }
  .auto-quick-label { font-size: .55rem; }
  .collection-button { gap: 2px; padding-inline: 3px; }
  .upgrade-grid { gap: 7px; }
  .upgrade-card { padding-inline: 5px; }
  .upgrade-main { grid-template-columns: 34px minmax(0, 1fr); gap: 2px; }
  .gear-illustration { width: 34px; height: 45px; }
  .upgrade-title small { font-size: .54rem; }
  .level-badge { padding-inline: 3px; font-size: .49rem; }
  .upgrade-copy strong { font-size: .65rem; }
  .upgrade-card > em { font-size: .52rem; }
  .upgrade-action { gap: 2px; padding-inline: 2px; }
  .upgrade-arrow { display: none; }
  .upgrade-action > b { font-size: .48rem; }
  .upgrade-cost { padding-inline: 3px; font-size: .54rem; }
}


/* Generated illustrated UI v51. The scene and gameplay geometry are unchanged. */
.bank-cash {
  width: 52px;
  height: 43px;
  display: block;
  background: url("./assets/ui/illustrated-icons-v1.webp") 0 0 / 300% 200% no-repeat;
  filter: drop-shadow(1px 2px 0 rgba(23, 42, 49, .24));
  transform: none;
}

.cast-button,
.cast-button:disabled,
.cast-button.bite {
  min-width: min(80%, 440px);
  height: clamp(78px, 10.2cqh, 94px);
  gap: clamp(8px, 2cqw, 16px);
  padding: 0 clamp(35px, 8cqw, 58px);
  color: #fffdf0;
  background: url("./assets/ui/cast-button-shell-v1.webp") center / 100% 100% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  font-size: clamp(1.34rem, 5.7cqw, 2.05rem);
  font-weight: 1000;
  letter-spacing: .015em;
  text-shadow:
    -2px -2px 0 var(--ink), 2px -2px 0 var(--ink),
    -2px 2px 0 var(--ink), 2px 2px 0 var(--ink),
    0 4px 0 rgba(23, 42, 49, .58);
}

.cast-button:disabled { filter: saturate(.72) brightness(.96); }
.cast-button.bite { filter: hue-rotate(126deg) saturate(1.2); }
.cast-button:active:not(:disabled) {
  transform: translate(-50%, 4px) rotate(-.3deg);
  box-shadow: none;
}
.cast-icon {
  flex: none;
  width: clamp(70px, 17cqw, 100px);
  height: clamp(54px, 7.6cqh, 74px);
  margin: 0;
  background: url("./assets/ui/illustrated-icons-v1.webp") 100% 0 / 300% 200% no-repeat;
  filter: drop-shadow(1px 2px 0 rgba(23, 42, 49, .28));
}

.dock {
  padding: 10px 10px max(10px, env(safe-area-inset-bottom));
}
.dock-heading {
  grid-template-columns: minmax(150px, 1.2fr) minmax(64px, .76fr) auto;
  gap: 7px;
  margin-bottom: 10px;
}
.gear-banner {
  height: 54px;
  padding: 5px 8px 5px 30%;
  background: url("./assets/ui/gear-banner-shell-v1.webp") center / 100% 100% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
.gear-banner::after,
.gear-bag { display: none; }
.gear-banner-copy > span {
  overflow: visible;
  color: #111c20;
  font-family: "Arial Narrow", "Trebuchet MS", sans-serif;
  font-size: clamp(.58rem, 2.4cqw, .78rem);
  letter-spacing: -.01em;
}
.dock-heading .gear-banner-copy > strong {
  margin-top: 3px;
  overflow: visible;
  color: #111c20;
  font-family: "Arial Narrow", "Trebuchet MS", sans-serif;
  font-size: clamp(.47rem, 1.95cqw, .66rem);
  letter-spacing: -.025em;
  text-overflow: clip;
}

.upgrade-grid { gap: 8px; }
.upgrade-card,
.upgrade-card.can-buy,
.upgrade-card:disabled {
  position: relative;
  min-height: clamp(158px, 21.5cqh, 184px);
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: url("./assets/ui/upgrade-card-shell-v1.webp") center / 100% 100% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}
.upgrade-card:disabled { filter: saturate(.72) brightness(.96); }
.upgrade-card:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: none;
}
.upgrade-card.can-buy {
  animation: generatedUpgradeReady 1.15s ease-in-out infinite;
}
.upgrade-card.can-buy::after,
.card-bolts { display: none; }

.upgrade-card[data-tier="1"] { --sprite-x: 0%; --sprite-y: 0%; }
.upgrade-card[data-tier="2"] { --sprite-x: 33.333%; --sprite-y: 0%; }
.upgrade-card[data-tier="3"] { --sprite-x: 66.667%; --sprite-y: 0%; }
.upgrade-card[data-tier="4"] { --sprite-x: 100%; --sprite-y: 0%; }
.upgrade-card[data-tier="5"] { --sprite-x: 0%; --sprite-y: 50%; }
.upgrade-card[data-tier="6"] { --sprite-x: 33.333%; --sprite-y: 50%; }
.upgrade-card[data-tier="7"] { --sprite-x: 66.667%; --sprite-y: 50%; }
.upgrade-card[data-tier="8"] { --sprite-x: 100%; --sprite-y: 50%; }
.upgrade-card[data-tier="9"] { --sprite-x: 0%; --sprite-y: 100%; }
.upgrade-card[data-tier="10"] { --sprite-x: 33.333%; --sprite-y: 100%; }
.upgrade-card[data-tier="11"] { --sprite-x: 66.667%; --sprite-y: 100%; }
.upgrade-card[data-tier="12"] { --sprite-x: 100%; --sprite-y: 100%; }

.upgrade-main { display: contents; }
.gear-illustration {
  position: absolute;
  z-index: 1;
  left: 4.5%;
  top: 11%;
  width: 40%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  background-position: var(--sprite-x) var(--sprite-y);
  background-repeat: no-repeat;
  background-size: 400% 300%;
  filter: drop-shadow(1px 3px 1px rgba(23, 42, 49, .22));
  transform: none;
}
.rod-illustration { background-image: url("./assets/ui/rod-tiers-v1.webp"); }
.hook-illustration { background-image: url("./assets/ui/angler-tiers-v1.webp"); }
.boat-illustration { background-image: url("./assets/ui/boat-tiers-v1.webp"); }

.upgrade-copy {
  position: absolute;
  z-index: 2;
  top: 12%;
  right: 6.5%;
  left: 43%;
  width: auto;
  display: block;
  color: var(--ink);
  text-align: left;
}
.upgrade-title { display: block; }
.upgrade-title small {
  display: block;
  overflow: visible;
  color: var(--ink);
  font-size: clamp(.62rem, 2.35cqw, .82rem);
  font-weight: 1000;
  letter-spacing: .02em;
  line-height: 1;
}
.level-badge {
  top: 8.5%;
  right: 7%;
  padding: 3px 6px 2px;
  color: #fff6da;
  background: #a66532;
  border: 2px solid #603a20;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 218, 144, .58);
  font-size: clamp(.55rem, 2cqw, .72rem);
}
.upgrade-copy strong {
  display: block;
  min-height: 0;
  margin-top: 8px;
  color: var(--tier-color, var(--ink));
  font-size: clamp(.72rem, 2.7cqw, .95rem);
  line-height: 1.04;
}
.upgrade-card > em {
  position: absolute;
  z-index: 2;
  top: 42%;
  right: 5.5%;
  left: 43%;
  min-height: 0;
  margin: 0;
  color: #25383d;
  font-size: clamp(.54rem, 2.03cqw, .72rem);
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  white-space: pre-line;
}
.upgrade-action {
  position: absolute;
  z-index: 3;
  right: 8.5%;
  bottom: 9.2%;
  left: 8.5%;
  width: auto;
  height: 20.5%;
  min-height: 30px;
  gap: clamp(2px, .8cqw, 6px);
  margin: 0;
  padding: 0 4%;
  color: #fffdf0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.upgrade-arrow {
  flex: none;
  width: clamp(20px, 5.5cqw, 34px);
  height: clamp(20px, 5.5cqw, 34px);
  display: block;
  background: url("./assets/ui/upgrade-arrow-v1.webp") center / contain no-repeat;
  filter: drop-shadow(1px 2px 0 var(--ink));
}
.upgrade-action > b,
.upgrade-cost {
  color: #fffdf0;
  font-family: "Arial Narrow", "Trebuchet MS", sans-serif;
  font-size: clamp(.59rem, 2.35cqw, .84rem);
  font-weight: 1000;
  letter-spacing: -.025em;
  line-height: 1;
  text-shadow:
    -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink),
    -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink),
    0 2px 0 var(--ink);
}
.upgrade-cost {
  position: static;
  flex: none;
  width: auto;
  height: auto;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.upgrade-card:disabled .upgrade-action { background: none; }
.upgrade-card:disabled .upgrade-cost { color: #eef1df; background: none; }

@keyframes generatedUpgradeReady {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 220, 69, 0)); }
  50% { filter: drop-shadow(0 0 7px rgba(255, 220, 69, .95)); }
}

@container reel-rich (max-height: 720px) {
  .cast-button,
  .cast-button:disabled,
  .cast-button.bite { height: 72px; }
  .cast-icon { width: 68px; height: 50px; }
  .gear-banner { height: 48px; }
  .upgrade-card,
  .upgrade-card.can-buy,
  .upgrade-card:disabled { min-height: 148px; }
}

@container reel-rich (max-width: 370px) {
  .bank-cash { width: 42px; height: 36px; }
  .dock-heading { grid-template-columns: minmax(126px, 1.2fr) minmax(45px, .7fr) auto; gap: 5px; }
  .gear-banner { padding-left: 29%; }
  .upgrade-grid { gap: 5px; }
  .upgrade-card,
  .upgrade-card.can-buy,
  .upgrade-card:disabled { min-height: 148px; }
  .gear-illustration { left: 3.5%; width: 42%; }
  .upgrade-copy,
  .upgrade-card > em { left: 43%; }
  .upgrade-action { right: 7.5%; left: 7.5%; padding-inline: 2%; }
  .upgrade-arrow { display: block; width: 19px; height: 19px; }
  .upgrade-action > b,
  .upgrade-cost { font-size: .55rem; }
}


/* Phone alignment and containment v54. */
.gear-banner {
  justify-content: center;
  padding-right: 5%;
  padding-left: 33%;
}
.gear-banner-copy {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-1px);
  text-align: center;
}
.gear-banner-copy > span,
.dock-heading .gear-banner-copy > strong {
  width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.upgrade-card,
.upgrade-card.can-buy,
.upgrade-card:disabled { overflow: hidden; }
.upgrade-copy {
  right: 6%;
  left: 41%;
  width: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  text-align: center;
}
.upgrade-title {
  width: 100%;
  padding-right: 30%;
}
.upgrade-title small {
  width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: clip;
  white-space: nowrap;
}
.level-badge {
  position: absolute;
  z-index: 4;
  top: 8.5%;
  right: 7%;
  white-space: nowrap;
}
.upgrade-copy strong {
  width: 100%;
  min-height: 2.08em;
  margin-top: 6px;
  display: block;
  overflow: hidden;
  overflow-wrap: normal;
  text-align: center;
  white-space: normal;
}
.upgrade-card > em {
  right: 5%;
  left: 41%;
  overflow: hidden;
  font-size: clamp(.5rem, 1.85cqw, .7rem);
  letter-spacing: -.018em;
  overflow-wrap: normal;
}
.upgrade-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: stretch;
  column-gap: clamp(2px, .7cqw, 5px);
  padding-inline: 4%;
  overflow: hidden;
}
.upgrade-action > b {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}
.upgrade-cost {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

@container reel-rich (max-width: 430px) {
  .dock-heading {
    grid-template-columns: minmax(136px, 1.35fr) minmax(58px, .64fr) auto;
    gap: 5px;
  }
  .gear-banner { padding-left: 34%; }
  .gear-banner-copy > span { font-size: .58rem; }
  .dock-heading .gear-banner-copy > strong { font-size: .47rem; letter-spacing: -.035em; }
  .upgrade-grid { gap: 5px; }
  .gear-illustration { left: 3.5%; width: 39%; }
  .upgrade-copy,
  .upgrade-card > em { left: 40%; }
  .upgrade-copy strong { font-size: clamp(.63rem, 2.75cqw, .72rem); }
  .upgrade-title small { font-size: clamp(.55rem, 2.25cqw, .64rem); }
  .level-badge { right: 6%; padding: 3px 4px 2px; font-size: .54rem; }
  .upgrade-action { right: 7.5%; left: 7.5%; padding-inline: 3%; }
  .upgrade-arrow { width: 21px; height: 21px; }
  .upgrade-action > b,
  .upgrade-cost { font-size: clamp(.54rem, 2.25cqw, .62rem); }
}

/* Fixed artwork content zones v55. */
.money-card {
  display: grid;
  grid-template-columns: 52px max-content;
  justify-content: center;
  align-items: center;
  column-gap: 5px;
  padding-inline: 6px;
  text-align: center;
}
.bank-copy {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cast-button > #castButtonText {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}
.cast-button.restoring .cast-icon { display: none; }

.gear-banner {
  padding-right: 4%;
  padding-left: 30%;
}

.card-kind {
  position: absolute;
  z-index: 4;
  top: 9%;
  right: 29%;
  left: 41%;
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(.6rem, 2.2cqw, .78rem);
  font-style: normal;
  font-weight: 1000;
  letter-spacing: .02em;
  line-height: 1;
  text-align: left;
  text-overflow: clip;
  white-space: nowrap;
}
.level-badge {
  top: 7%;
  right: 5.5%;
}
.upgrade-copy {
  top: 21.5%;
  right: 4.5%;
  left: 39.5%;
  justify-content: flex-start;
}
.upgrade-copy strong {
  min-height: 2.08em;
  margin-top: 0;
  line-height: 1.03;
}
.upgrade-card > em {
  top: 44%;
  right: 4.5%;
  left: 39.5%;
  text-align: center;
}
.upgrade-action {
  right: 10.5%;
  bottom: 12%;
  left: 10.5%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 3px;
  padding-inline: 2.5%;
  align-items: center;
}
.upgrade-arrow {
  width: clamp(18px, 4.7cqw, 29px);
  height: clamp(18px, 4.7cqw, 29px);
  transform: translateY(-2px);
}
.upgrade-action > b,
.upgrade-cost {
  transform: translateY(-2px);
}

@container reel-rich (max-width: 430px) {
  .gear-banner { padding-right: 3%; padding-left: 29%; }
  .card-kind {
    top: 8.5%;
    right: 29%;
    left: 40%;
    font-size: clamp(.54rem, 2.1cqw, .61rem);
  }
  .level-badge { top: 6.5%; right: 5%; }
  .upgrade-copy {
    top: 21.5%;
    right: 4%;
    left: 39%;
  }
  .upgrade-card > em {
    top: 43.5%;
    right: 4%;
    left: 39%;
  }
  .upgrade-action {
    right: 10%;
    bottom: 12%;
    left: 10%;
    padding-inline: 2%;
  }
  .upgrade-arrow { width: 19px; height: 19px; }
}

/* Reference-width illustrated layout v56. */
.dock {
  padding-right: 10px;
  padding-left: 10px;
}
.dock-heading {
  grid-template-columns: minmax(140px, 145px) minmax(100px, 110px) auto;
  gap: 4px;
}
.auto-quick-toggle,
.auto-quick-toggle.locked {
  width: 80px;
  min-width: 80px;
  padding-inline: 3px;
}
.gear-banner {
  padding-right: 2%;
  padding-left: 23%;
}
.gear-banner-copy {
  align-items: flex-start;
  text-align: left;
}
.gear-banner-copy > span,
.dock-heading .gear-banner-copy > strong { text-align: left; }

.cast-button,
.cast-button:disabled,
.cast-button.bite {
  width: min(66%, 440px);
  min-width: 0;
  gap: 8px;
  padding-inline: 24px;
}
.cast-icon {
  width: 54px;
  height: 50px;
}

.upgrade-grid { gap: 8px; }
.upgrade-card,
.upgrade-card.can-buy,
.upgrade-card:disabled {
  background-size: 110% 100%;
}
.card-kind {
  top: 13%;
  right: auto;
  left: 40%;
  width: max-content;
  max-width: none;
  overflow: visible;
}
.level-badge {
  top: 12%;
  right: 10%;
}
.upgrade-copy {
  top: 25%;
  right: 8%;
  left: 27%;
}
.upgrade-copy strong {
  font-size: clamp(.62rem, 2.15cqw, .78rem);
}
.upgrade-card[data-tier="1"] .upgrade-copy strong { color: var(--ink); }
.upgrade-card > em {
  right: 7%;
  left: 37%;
}
.upgrade-action {
  right: 8.5%;
  left: 10%;
  column-gap: 0;
}

@container reel-rich (max-width: 430px) {
  .dock {
    padding-right: 6px;
    padding-left: 6px;
  }
  .dock-heading {
    grid-template-columns: minmax(126px, 1.4fr) minmax(72px, .9fr) auto;
    gap: 4px;
  }
  .auto-quick-toggle,
  .auto-quick-toggle.locked {
    width: 70px;
    min-width: 70px;
  }
  .gear-banner { padding-right: 2%; padding-left: 23%; }
  .dock-heading .gear-banner-copy > strong {
    font-size: .45rem;
    letter-spacing: -.045em;
  }
  .cast-button,
  .cast-button:disabled,
  .cast-button.bite {
    width: 70%;
    padding-inline: 18px;
  }
  .cast-icon { width: 48px; height: 46px; }
  .upgrade-grid { gap: 4px; }
  .card-kind {
    top: 12%;
    right: auto;
    left: 40%;
    width: max-content;
    font-size: clamp(.55rem, 2.05cqw, .61rem);
  }
  .level-badge { top: 11%; right: 9%; }
  .upgrade-copy {
    top: 24%;
    right: 8%;
    left: 27%;
  }
  .upgrade-copy strong { font-size: clamp(.61rem, 2.2cqw, .68rem); }
  .upgrade-card > em {
    right: 7%;
    left: 37%;
  }
  .upgrade-action { right: 8.5%; left: 10%; column-gap: 0; }
}

/* Reference-locked composition v57. */
.cast-button,
.cast-button:disabled,
.cast-button.bite {
  width: min(66%, 440px);
  min-width: 0;
  height: 96px;
  display: block;
  padding: 0;
}
.cast-icon {
  position: absolute;
  left: 13.5%;
  top: 47%;
  width: 72px;
  height: 70px;
  margin: 0;
  transform: translateY(-50%);
}
.cast-button > #castButtonText {
  position: absolute;
  top: 48%;
  right: 10%;
  left: 28%;
  display: block;
  color: #fffdf0;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-size: clamp(1.58rem, 6.5cqw, 1.92rem);
  font-style: italic;
  font-weight: 1000;
  letter-spacing: -.045em;
  line-height: .92;
  text-align: center;
  -webkit-text-stroke: 1.2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 1px 3px 0 var(--ink);
  transform: translateY(-50%) skewX(-4deg);
}
.cast-button.restoring > #castButtonText {
  right: 9%;
  left: 9%;
  font-size: clamp(1.34rem, 5.6cqw, 1.7rem);
}

.gear-banner {
  padding-right: 2%;
  padding-left: 23%;
  background-image: url("./assets/ui/gear-banner-shell-v2.webp");
}
.gear-banner-copy > span,
.dock-heading .gear-banner-copy > strong {
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-weight: 1000;
}
.gear-banner-copy > span {
  font-size: clamp(.57rem, 2.25cqw, .73rem);
  letter-spacing: -.025em;
}
.dock-heading .gear-banner-copy > strong {
  font-size: clamp(.45rem, 1.78cqw, .59rem);
  letter-spacing: -.04em;
}

.auto-quick-toggle,
.auto-quick-toggle.locked {
  width: 80px;
  min-width: 80px;
  display: grid;
  grid-template-columns: auto auto 27px;
  gap: 2px;
  padding-inline: 3px;
}
.auto-quick-label { font-size: .55rem; letter-spacing: .015em; }
.auto-quick-state { font-size: .47rem; }
.auto-quick-track { width: 27px; height: 18px; }
.auto-quick-toggle[aria-checked="true"] .auto-quick-track > span { transform: translateX(9px); }
.auto-quick-toggle.locked .auto-quick-track > span { transform: translateX(4.5px); }

.rod-illustration { background-image: url("./assets/ui/rod-tiers-v1.webp"); }
.gear-illustration {
  left: 2.75%;
  top: 10%;
  width: 40%;
  height: auto;
  aspect-ratio: .82;
}
.card-kind {
  top: 16%;
  right: 38%;
  left: 36%;
  width: auto;
  max-width: none;
  overflow: visible;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-size: clamp(.56rem, 1.92cqw, .68rem);
  letter-spacing: .005em;
  text-align: center;
}
.boat-upgrade .card-kind {
  right: 31%;
  left: 42%;
}
.level-badge {
  top: 14.5%;
  right: 9%;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
}
.upgrade-copy {
  top: 27%;
  right: 7%;
  left: 31%;
  align-items: center;
  text-align: center;
}
.boat-upgrade .upgrade-copy {
  right: 4%;
  left: 37%;
}
.upgrade-copy strong {
  width: 100%;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-size: clamp(.67rem, 2.34cqw, .82rem);
  font-weight: 1000;
  line-height: 1.02;
  text-align: center;
}
.upgrade-card > em {
  top: 44%;
  right: 7%;
  left: 37%;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-size: clamp(.55rem, 1.96cqw, .68rem);
  line-height: 1.15;
  text-align: center;
}
.boat-upgrade > em {
  right: 4%;
  left: 39%;
}
.upgrade-action {
  right: 8.5%;
  left: 10%;
  display: block;
  padding: 0;
}
.upgrade-arrow {
  position: absolute;
  top: 50%;
  left: 2%;
  width: clamp(21px, 5.35cqw, 32px);
  height: clamp(21px, 5.35cqw, 32px);
  transform: translateY(-50%);
}
.upgrade-action > b,
.upgrade-cost {
  top: 50%;
  color: #fffdf0;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-size: clamp(.63rem, 2.42cqw, .84rem);
  font-weight: 1000;
  letter-spacing: -.045em;
  -webkit-text-stroke: .45px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 var(--ink);
}
.upgrade-action > b {
  position: absolute;
  right: 32%;
  left: 22%;
  text-align: center;
  transform: translateY(-50%);
}
.upgrade-cost {
  position: absolute;
  right: 2.5%;
  transform: translateY(-50%);
}

@container reel-rich (max-width: 370px) {
  .cast-button,
  .cast-button:disabled,
  .cast-button.bite { height: 86px; }
  .cast-icon { width: 64px; height: 62px; }
  .cast-button > #castButtonText { font-size: clamp(1.38rem, 6.5cqw, 1.62rem); }
  .gear-banner-copy > span { font-size: .54rem; }
  .dock-heading .gear-banner-copy > strong { font-size: .43rem; }
}


/* Angler tackle is the same authored tier art on the live fishing rig. */
.rod-tackle {
  --tackle-anchor-x: 62%;
  --tackle-anchor-x-neg: -62%;
  position: absolute;
  z-index: 4;
  left: 97%;
  top: 3%;
  width: clamp(34px, 9cqw, 48px);
  height: clamp(58px, 14cqw, 78px);
  opacity: 1;
  transform: translateX(var(--tackle-anchor-x-neg));
  transform-origin: var(--tackle-anchor-x) 0;
  pointer-events: none;
  /* The idle and moving hooks must switch in the same frame. */
  transition: none;
}
.rod-tackle::before {
  content: "";
  position: absolute;
  top: -1px;
  left: var(--tackle-anchor-x);
  width: 2px;
  height: 27px;
  background: #fffdf1;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(23, 42, 49, .92);
  transform: rotate(4deg);
  transform-origin: top center;
}
.rod-tackle > i {
  position: absolute;
  top: 24px;
  left: 0;
  width: 100%;
  aspect-ratio: 1;
  background-image: url("./assets/ui/angler-tiers-v1.webp");
  background-position: var(--tackle-x) var(--tackle-y);
  background-repeat: no-repeat;
  background-size: 400% 300%;
  filter: drop-shadow(1px 2px 0 rgba(23, 42, 49, .36));
  transform-origin: var(--tackle-anchor-x) 0;
  animation: idleTackleSway 2s ease-in-out infinite alternate;
}
.rod-tackle[data-tier="1"] { --tackle-x: 0%; --tackle-y: 0%; }
.rod-tackle[data-tier="2"] { --tackle-x: 33.333%; --tackle-y: 0%; }
.rod-tackle[data-tier="3"] { --tackle-x: 66.667%; --tackle-y: 0%; }
.rod-tackle[data-tier="4"] { --tackle-x: 100%; --tackle-y: 0%; }
.rod-tackle[data-tier="5"] { --tackle-x: 0%; --tackle-y: 50%; }
.rod-tackle[data-tier="6"] { --tackle-x: 33.333%; --tackle-y: 50%; }
.rod-tackle[data-tier="7"] { --tackle-x: 66.667%; --tackle-y: 50%; }
.rod-tackle[data-tier="8"] { --tackle-x: 100%; --tackle-y: 50%; }
.rod-tackle[data-tier="9"] { --tackle-x: 0%; --tackle-y: 100%; }
.rod-tackle[data-tier="10"] { --tackle-x: 33.333%; --tackle-y: 100%; }
.rod-tackle[data-tier="11"] { --tackle-x: 66.667%; --tackle-y: 100%; }
.rod-tackle[data-tier="12"] { --tackle-x: 100%; --tackle-y: 100%; }
.scene.casting-line .rod-tackle,
.scene.line-out .rod-tackle,
.scene.has-bite .rod-tackle,
.scene.reeling .rod-tackle { opacity: 0; }

@keyframes idleTackleSway {
  from { transform: rotate(-4deg); }
  to { transform: rotate(5deg); }
}

/* Mockup alignment pass v59. Keep each illustrated control internally centered. */
.cast-icon {
  left: 11%;
  top: 39%;
}
.cast-button > #castButtonText {
  right: 12.5%;
  left: 28%;
  transform: translateY(-50%) skewX(-4deg) scaleX(.93);
  transform-origin: center;
}
.cast-button.restoring > #castButtonText {
  right: 9%;
  left: 9%;
  transform: translateY(-50%) skewX(-4deg);
}

.gear-progress {
  height: 34px;
  grid-template-columns: repeat(10, 7px);
  justify-content: space-between;
  gap: 0;
  padding-inline: 5px;
  background: linear-gradient(180deg, #176f80 0%, #105d6e 100%);
  border-radius: 10px;
  box-shadow:
    2px 3px 0 var(--ink),
    inset 0 2px 0 rgba(255, 255, 255, .13),
    inset 0 -2px 0 rgba(4, 47, 57, .18);
}
.gear-progress i {
  width: 7px;
  height: 7px;
  min-width: 7px;
  max-width: none;
  aspect-ratio: auto;
  background: #2c7482;
  border: 1.5px solid #b9dadd;
  box-shadow: inset 0 0 0 1px rgba(17, 78, 89, .34);
}
.gear-progress i.filled {
  background: #79e24a;
  border-color: #55bb31;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .28),
    0 0 7px rgba(121, 226, 74, .55);
}

.upgrade-copy {
  right: 8%;
  left: 29%;
}
.upgrade-copy strong {
  font-size: clamp(.67rem, 2.22cqw, .8rem);
  transform: scaleX(.96);
  transform-origin: center;
}
#fisherUpgrade .card-kind {
  right: 40%;
  left: 34%;
  transform: scaleX(.84);
  transform-origin: center;
}
#fisherUpgrade .upgrade-copy {
  right: 11%;
  left: 25%;
}
#fisherUpgrade .upgrade-copy strong {
  transform: scaleX(.88);
}
.boat-upgrade .upgrade-copy {
  right: 4%;
  left: 37%;
}

.upgrade-action {
  display: grid;
  grid-template-columns: 28% 37% 35%;
  align-items: center;
  justify-content: stretch;
  padding: 0;
  overflow: visible;
}
.upgrade-arrow,
.upgrade-action > b,
.upgrade-cost {
  position: static;
  top: auto;
  right: auto;
  left: auto;
}
.upgrade-arrow {
  justify-self: center;
  width: clamp(19px, 4.6cqw, 29px);
  height: clamp(19px, 4.6cqw, 29px);
  transform: none;
}
.upgrade-action > b {
  width: 100%;
  justify-self: center;
  font-family: "Arial Narrow", "Trebuchet MS", sans-serif;
  font-size: clamp(.59rem, 2.15cqw, .76rem);
  letter-spacing: -.04em;
  text-align: center;
  transform: scaleX(.94);
  transform-origin: center;
}
.upgrade-cost {
  justify-self: center;
  font-size: clamp(.72rem, 2.9cqw, .94rem);
  letter-spacing: -.035em;
  text-align: center;
  transform: translateX(3px) scaleX(1.1);
  transform-origin: center;
}

@container reel-rich (max-width: 370px) {
  .cast-icon { left: 11%; top: 39%; }
  .gear-progress {
    grid-template-columns: repeat(10, 6px);
    padding-inline: 4px;
  }
  .gear-progress i {
    width: 6px;
    height: 6px;
    min-width: 6px;
  }
  .upgrade-action > b { font-size: clamp(.54rem, 2.15cqw, .68rem); }
  .upgrade-cost { font-size: clamp(.66rem, 2.9cqw, .84rem); }
}

/* Dock density pass v60. Give the saved space back to the playable water. */
.dock {
  padding-top: 5px;
  padding-bottom: 10px;
}
.dock-heading { margin-bottom: 4px; }

@media (display-mode: standalone) {
  .dock { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

/* Final card composition v61. Preserve the fishing scene and use the dock space well. */
.dock-heading {
  margin-bottom: 6px;
}

.gear-banner-copy {
  justify-content: center;
  transform: none;
}
.gear-banner-copy > span {
  font-size: clamp(.66rem, 2.35cqw, .82rem);
  line-height: 1;
}
.dock-heading .gear-banner-copy > strong {
  display: none;
}

.collection-button {
  gap: 3px;
  padding-inline: 6px;
}
.collection-button > span:not(.controller-button-hint) {
  width: clamp(25px, 6.7cqw, 31px);
  height: 28px;
}
.collection-button > span:not(.controller-button-hint) img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(1px 2px 0 rgba(23, 42, 49, .34));
}

.upgrade-grid {
  gap: clamp(5px, 1.45cqw, 8px);
}
.upgrade-card,
.upgrade-card.can-buy,
.upgrade-card:disabled {
  min-height: clamp(180px, 23.5cqh, 205px);
}
.gear-illustration {
  left: 4%;
  top: 14%;
  width: 36%;
}
.card-kind {
  top: 12.5%;
}
.level-badge {
  top: 10.5%;
  right: 8%;
}
.upgrade-copy {
  top: 25.5%;
  right: 7%;
  left: 34%;
}
.upgrade-copy strong {
  line-height: 1.08;
}
#fisherUpgrade .upgrade-copy {
  right: 7%;
  left: 32%;
}
.boat-upgrade .upgrade-copy {
  right: 5%;
  left: 36%;
}
.upgrade-card > em,
.boat-upgrade > em {
  top: 51%;
  right: 6%;
  left: 6%;
  font-size: clamp(.57rem, 2cqw, .72rem);
  line-height: 1.18;
  text-align: center;
}

.upgrade-action {
  right: 8.5%;
  bottom: 8.8%;
  left: 8.5%;
  height: 22%;
  display: grid;
  grid-template-columns: max-content max-content max-content;
  align-items: center;
  justify-content: center;
  column-gap: clamp(2px, .75cqw, 5px);
  overflow: visible;
}
.upgrade-arrow {
  justify-self: center;
  width: clamp(21px, 5cqw, 30px);
  height: clamp(21px, 5cqw, 30px);
  transform: translateY(-3px);
}
.upgrade-action > b {
  width: auto;
  font-size: clamp(.6rem, 2.12cqw, .75rem);
  letter-spacing: -.035em;
  transform: translateY(-3px) scaleX(.96);
}
.upgrade-cost {
  justify-self: center;
  font-size: clamp(.7rem, 2.65cqw, .9rem);
  letter-spacing: -.03em;
  transform: translateY(-3px) scaleX(1.04);
}

@container reel-rich (max-height: 720px) and (max-aspect-ratio: 1/1) {
  .upgrade-card,
  .upgrade-card.can-buy,
  .upgrade-card:disabled { min-height: 172px; }
}

@container reel-rich (max-width: 370px) {
  .dock-heading { margin-bottom: 5px; }
  .upgrade-card,
  .upgrade-card.can-buy,
  .upgrade-card:disabled { min-height: 162px; }
  .gear-illustration { left: 3.5%; width: 35%; }
  .upgrade-copy { left: 33%; }
  #fisherUpgrade .upgrade-copy { left: 30%; }
  .boat-upgrade .upgrade-copy { left: 35%; }
  .upgrade-card > em,
  .boat-upgrade > em { font-size: .54rem; }
  .upgrade-action { column-gap: 2px; }
  .upgrade-arrow { width: 20px; height: 20px; }
}


/* Optical alignment pass v62. */
.gear-banner {
  padding-right: 4%;
  padding-left: 24%;
}
.gear-banner-copy {
  align-items: center;
  text-align: center;
}
.gear-banner-copy > span {
  color: #fff4d2;
  font-family: "Arial Black", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(.62rem, 2.18cqw, .76rem);
  font-weight: 1000;
  letter-spacing: -.025em;
  text-align: center;
  -webkit-text-stroke: .75px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 rgba(23, 42, 49, .72);
  transform: scaleX(.96);
  transform-origin: center;
}

.upgrade-copy,
#fisherUpgrade .upgrade-copy,
.boat-upgrade .upgrade-copy {
  top: 21%;
  right: 5%;
  left: 34%;
  height: 25%;
  display: grid;
  align-items: center;
  justify-items: center;
}
.upgrade-copy strong,
#fisherUpgrade .upgrade-copy strong {
  min-height: 0;
  margin: 0;
  font-size: clamp(.66rem, 2.2cqw, .8rem);
  line-height: 1.02;
  text-align: center;
  white-space: pre-line;
  transform: scaleX(.96);
}
#fisherUpgrade .upgrade-copy strong {
  transform: scaleX(.92);
}

.upgrade-action {
  column-gap: 2px;
  transform: translateY(-5px);
}

@container reel-rich (max-width: 370px) {
  .gear-banner-copy > span { font-size: .58rem; }
  .upgrade-copy,
  #fisherUpgrade .upgrade-copy,
  .boat-upgrade .upgrade-copy { left: 32%; }
  .upgrade-copy strong,
  #fisherUpgrade .upgrade-copy strong { font-size: .62rem; }
  .upgrade-action { transform: translateY(-4px); }
}

/* Final spacing polish v63. */
.bank-cash,
.bank-copy {
  transform: translateX(-6px);
}

.upgrade-copy,
#fisherUpgrade .upgrade-copy,
.boat-upgrade .upgrade-copy {
  right: 4%;
  left: 42%;
}

.upgrade-action > b {
  transform: translate(-4px, -3px) scaleX(.96);
}

@container reel-rich (max-width: 370px) {
  .bank-cash,
  .bank-copy { transform: translateX(-4px); }
  .upgrade-copy,
  #fisherUpgrade .upgrade-copy,
  .boat-upgrade .upgrade-copy { left: 40%; }
  .upgrade-action > b { transform: translate(-3px, -3px) scaleX(.96); }
}

/* Icon-led upgrade-card hierarchy v64. */
.bank-cash,
.bank-copy {
  transform: translateX(-11px);
}

.gear-illustration {
  left: 2.5%;
  top: 12.5%;
  width: 41.5%;
}
.boat-illustration {
  left: 1.5%;
  top: 14%;
  width: 43%;
}

.upgrade-copy,
#fisherUpgrade .upgrade-copy,
.boat-upgrade .upgrade-copy {
  top: 24%;
  right: 5%;
  left: 43%;
  height: 25%;
}
.upgrade-copy strong,
#fisherUpgrade .upgrade-copy strong {
  font-size: clamp(.62rem, 2.05cqw, .74rem);
  font-weight: 900;
  letter-spacing: -.015em;
  line-height: 1.04;
  transform: scaleX(.94);
}
#fisherUpgrade .upgrade-copy strong {
  transform: scaleX(.9);
}

@container reel-rich (max-width: 370px) {
  .bank-cash,
  .bank-copy { transform: translateX(-8px); }
  .gear-illustration { left: 2%; width: 40%; }
  .boat-illustration { left: 1%; width: 42%; }
  .upgrade-copy,
  #fisherUpgrade .upgrade-copy,
  .boat-upgrade .upgrade-copy {
    right: 4%;
    left: 42%;
  }
  .upgrade-copy strong,
  #fisherUpgrade .upgrade-copy strong { font-size: .59rem; }
}

/* Captioned, artwork-first card composition v65. */
.upgrade-grid {
  margin-bottom: 6px;
}

.card-kind,
#fisherUpgrade .card-kind,
.boat-upgrade .card-kind {
  top: calc(100% + 3px);
  right: 0;
  left: 0;
  width: auto;
  max-width: none;
  overflow: visible;
  color: #fffdf0;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-size: clamp(.62rem, 2.2cqw, .78rem);
  font-style: italic;
  font-weight: 1000;
  letter-spacing: -.035em;
  line-height: 1;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
  -webkit-text-stroke: .8px var(--ink);
  paint-order: stroke fill;
  text-shadow: 1px 2px 0 var(--ink);
  transform: skewX(-4deg) scaleX(.94);
  transform-origin: center;
  pointer-events: none;
}

.level-badge {
  top: 8.5%;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

.gear-illustration,
.boat-illustration {
  left: 4%;
  top: 14%;
  width: 36%;
}

.upgrade-copy,
#fisherUpgrade .upgrade-copy,
.boat-upgrade .upgrade-copy {
  top: 21%;
  right: 6%;
  left: 52%;
  height: 28%;
  align-items: center;
  justify-items: end;
}
.upgrade-copy strong,
#fisherUpgrade .upgrade-copy strong {
  width: 100%;
  font-size: clamp(.62rem, 2.05cqw, .74rem);
  font-weight: 900;
  letter-spacing: -.015em;
  line-height: 1.04;
  text-align: right;
  white-space: pre-line;
  transform: none;
}

@container reel-rich (max-width: 370px) {
  .upgrade-grid { margin-bottom: 5px; }
  .card-kind,
  #fisherUpgrade .card-kind,
  .boat-upgrade .card-kind { font-size: .59rem; }
  .gear-illustration,
  .boat-illustration { left: 3.5%; width: 35%; }
  .upgrade-copy,
  #fisherUpgrade .upgrade-copy,
  .boat-upgrade .upgrade-copy {
    right: 5%;
    left: 51%;
  }
  .upgrade-copy strong,
  #fisherUpgrade .upgrade-copy strong { font-size: .59rem; }
}

/* True caption rows and separated identity columns v66. */
.upgrade-grid {
  align-items: start;
  margin-bottom: 0;
}
.upgrade-slot {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto;
  align-items: start;
}
.upgrade-slot > .upgrade-card {
  width: 100%;
}
.upgrade-slot > .card-kind {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: auto;
  display: grid;
  place-items: center;
  width: min(74%, 118px);
  height: clamp(23px, 5.4cqw, 27px);
  margin: 5px auto 0;
  padding: 0 13px;
  box-sizing: border-box;
  overflow: hidden;
  color: #fffdf0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, rgba(5, 50, 59, .045) 1px 3px),
    linear-gradient(180deg, #278b96 0%, #176b78 62%, #10525e 100%);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow:
    0 3px 0 #0d3b44,
    inset 0 0 0 2px #e2ad4f,
    inset 0 0 0 4px #72421f;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-size: clamp(.59rem, 2cqw, .73rem);
  font-style: italic;
  font-weight: 1000;
  letter-spacing: .01em;
  line-height: 1;
  text-align: center;
  -webkit-text-stroke: .65px var(--ink);
  paint-order: stroke fill;
  text-shadow: 1px 1.5px 0 var(--ink);
  transform: none;
  pointer-events: none;
}
.upgrade-slot > .card-kind::before,
.upgrade-slot > .card-kind::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid #5d3518;
  border-radius: 50%;
  background: #f0c75c;
  box-shadow: inset 0 1px 0 #fff2ae, 0 1px 0 rgba(23, 42, 49, .42);
  transform: translateY(-50%);
}
.upgrade-slot > .card-kind::before { left: 6px; }
.upgrade-slot > .card-kind::after { right: 6px; }

.gear-illustration,
.boat-illustration {
  left: 14%;
  width: 36%;
}
.rod-illustration {
  top: 18%;
}

.upgrade-copy,
#fisherUpgrade .upgrade-copy,
.boat-upgrade .upgrade-copy {
  right: 3%;
  left: 63%;
  justify-items: center;
}
.upgrade-copy strong,
#fisherUpgrade .upgrade-copy strong {
  text-align: center;
}

@container reel-rich (max-width: 370px) {
  .upgrade-slot > .card-kind {
    width: 78%;
    height: 23px;
    padding-inline: 11px;
    font-size: .56rem;
  }
  .gear-illustration,
  .boat-illustration { left: 13%; width: 35%; }
  .upgrade-copy,
  #fisherUpgrade .upgrade-copy,
  .boat-upgrade .upgrade-copy {
    right: 2%;
    left: 61%;
  }
}

/* Tier-one artwork optical balance v69. */
.hook-illustration {
  left: 14.75%;
  top: 17%;
  width: 34.5%;
}
.boat-illustration {
  left: 8%;
  top: 6.5%;
  width: 46%;
}

@container reel-rich (max-width: 370px) {
  .hook-illustration { left: 13.75%; top: 17%; width: 33.5%; }
  .boat-illustration { left: 8%; top: 7%; width: 45%; }
}

/* Once the tackle splashes down, it sits below the surface until the catch breaks water. */
.scene.line-out:not(.casting-line):not(.submerging) .bobber::before,
.scene.line-out.has-bite .bobber::before,
.scene.line-out.reeling:not(.surface-break) .bobber::before {
  opacity: 0;
}
.scene.line-out.reeling.surface-break .bobber::before {
  opacity: 1;
}

/* Compact lower stack and natural fishing states v70. */
.dock {
  padding-top: 1px;
  padding-bottom: 2px;
}
.dock-heading { margin-bottom: 2px; }
.upgrade-slot > .card-kind { margin-top: 2px; }

@media (display-mode: standalone) {
  .dock { padding-bottom: max(2px, env(safe-area-inset-bottom)); }
}

.bank-copy {
  align-items: flex-start;
  text-align: left;
}
.money-label,
.money-card strong {
  margin-left: 0;
  text-align: left;
}

.fishing-line .line-outline {
  stroke: #fff8dc;
  stroke-width: 2.5;
  opacity: .52;
}
.fishing-line .line-core {
  stroke: #29464c;
  stroke-width: 1.15;
  opacity: .9;
}

.hooked-fish {
  z-index: 1;
  left: var(--fish-attach-x, 20%);
  top: var(--fish-attach-y, 54%);
}
.scene.has-bite .hooked-fish,
.scene.reeling .hooked-fish {
  opacity: .56;
}

/* Visible-edge compaction v71.
   The illustrated shells include transparent gutters, so box-level 2px gaps
   still looked like broad blue bands. Overlap only those transparent gutters
   and return the recovered height to the flexible fishing scene. */
.dock {
  padding-top: 0;
  padding-bottom: 4px;
}
.dock-heading {
  margin-top: -9px;
  margin-bottom: -12px;
}
.upgrade-slot > .card-kind {
  margin-top: -11px;
}
@container reel-rich (max-height: 720px) and (max-aspect-ratio: 1/1) {
  .dock-heading {
    margin-top: -6px;
    margin-bottom: -8px;
  }
  .upgrade-slot > .card-kind {
    margin-top: -9px;
  }
}

@media (display-mode: standalone) {
  .dock { padding-bottom: max(4px, env(safe-area-inset-bottom)); }
}

/* Balanced BANK lockup v73: icon left, copy centered on the card. */
.money-card {
  grid-template-columns: 26% minmax(0, 1fr) 26%;
  justify-content: stretch;
  column-gap: 0;
  padding-inline: 4px;
  text-align: center;
}
.bank-cash {
  grid-column: 1;
  justify-self: start;
  width: min(52px, 100%);
  transform: none;
}
.bank-copy {
  grid-column: 2;
  width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: none;
}
.money-label,
.money-card strong {
  width: 100%;
  text-align: center;
}

/* Tablet/web artwork caps. Keep each icon centered in its existing left zone
   while preventing card width from making it collide with the stat copy. */
@container reel-rich (min-width: 560px) {
  .rod-illustration {
    left: 32%;
    top: 15%;
    width: min(36%, 56px);
    transform: translateX(-50%);
  }
  .hook-illustration {
    left: 32%;
    top: 13%;
    width: min(34.5%, 58px);
    transform: translateX(-50%);
  }
  .boat-illustration {
    left: 31%;
    top: 4%;
    width: min(46%, 72px);
    transform: translateX(-50%);
  }
}

/* Etched gear header v75. The title is baked into the wooden asset so it
   remains part of the illustration instead of floating above it as web text. */
.gear-banner {
  background-image: url("./assets/ui/gear-banner-etched-v1.webp");
}

.gear-banner-copy {
  visibility: hidden;
}

/* Gameplay clarity and HUD containment v76. */
.location-pin svg {
  transform: none;
}

.auto-quick-toggle,
.auto-quick-toggle.locked {
  grid-template-columns: minmax(0, 1fr) 27px;
  column-gap: 2px;
  overflow: hidden;
}

.auto-quick-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  line-height: 1;
}

.auto-quick-label,
.auto-quick-state {
  display: block;
  max-width: 100%;
  white-space: nowrap;
}

.auto-quick-state {
  margin-top: 2px;
  color: #a65f24;
  font-size: .44rem;
  letter-spacing: -.015em;
}

.auto-quick-toggle.locked .auto-quick-state {
  color: var(--muted);
}

.bobber-splash {
  left: 0;
  top: 0;
  bottom: auto;
  transform: translate(-50%, -50%);
}

/* Two-stage water impact v77. Entry stays compact; a hooked fish creates a
   broader crown and second wake while the effect remains locked to the water. */
.scene.line-out:not(.casting-line):not(.has-bite):not(.reeling) .bobber-splash.show.entry::before {
  animation: entrySplashRingNear .52s cubic-bezier(.12,.66,.22,1) both;
  border-width: 2px;
}
.scene.line-out:not(.casting-line):not(.has-bite):not(.reeling) .bobber-splash.show.entry::after {
  animation: entrySplashRingFar .64s .06s cubic-bezier(.12,.66,.22,1) both;
  border-width: 1.5px;
}
.bobber-splash.show.entry span {
  width: 4px;
  height: 5px;
  animation: entrySplashDrop .48s cubic-bezier(.2,.62,.28,1) both;
}
.bobber-splash.show.entry span:nth-child(1) { --splash-x: -13px; --splash-y: -13px; }
.bobber-splash.show.entry span:nth-child(2) { --splash-x: 0px; --splash-y: -21px; animation-delay: .025s; }
.bobber-splash.show.entry span:nth-child(3) { --splash-x: 13px; --splash-y: -13px; animation-delay: .05s; }
.bobber-splash.show.entry span:nth-child(n+4) { display: none; }

.bobber-splash.show.breach {
  z-index: 12;
}
.bobber-splash.show.breach::before {
  animation: breachSplashRing var(--breach-ring-duration, .8s) cubic-bezier(.1,.62,.2,1) both;
  border-width: 3px;
  box-shadow: 0 0 0 1px rgba(23, 42, 49, .2);
}
.bobber-splash.show.breach::after {
  animation: breachSplashRing var(--breach-ring-after-duration, .84s) .12s cubic-bezier(.1,.62,.2,1) both;
  border-width: 2px;
}
.bobber-splash.show.breach span {
  width: 6px;
  height: 7px;
  margin-left: -1px;
  border-width: 1.5px;
  box-shadow: 0 2px 0 rgba(23, 42, 49, .25);
  animation: breachSplashDrop var(--breach-drop-duration, .62s) cubic-bezier(.12,.6,.22,1) both;
}
.bobber-splash.show.breach span:nth-child(2) { animation-delay: .025s; }
.bobber-splash.show.breach span:nth-child(3) { animation-delay: .05s; }
.bobber-splash.show.breach span:nth-child(4) { animation-delay: .035s; }
.bobber-splash.show.breach span:nth-child(5) { animation-delay: .07s; }
.bobber-splash.show.breach span:nth-child(6) { animation-delay: .08s; }
.bobber-splash.show.breach span:nth-child(7) { animation-delay: .09s; }

@keyframes entrySplashRingNear {
  0% { opacity: .98; transform: scale(.34, .42); }
  100% { opacity: 0; transform: scale(3.8, 1.75); }
}

@keyframes entrySplashRingFar {
  0% { opacity: .82; transform: scale(.45, .48); }
  100% { opacity: 0; transform: scale(5.2, 2.35); }
}

@keyframes breachSplashRing {
  0% { opacity: 1; transform: scale(.45, .35); }
  70% { opacity: .42; }
  100% { opacity: 0; transform: scale(var(--breach-ring-x, 8.6), var(--breach-ring-y, 4.4)); }
}

@keyframes entrySplashDrop {
  0% { opacity: 0; transform: translate(0, 3px) scale(.42, .62); }
  22% { opacity: 1; }
  58% { opacity: 1; transform: translate(var(--splash-x), var(--splash-y)) scale(.78, 1); }
  100% { opacity: 0; transform: translate(var(--splash-x), 2px) scale(.42, .62); }
}

@keyframes breachSplashDrop {
  0% { opacity: 0; transform: translate(0, 7px) scale(.42, .8); }
  16% { opacity: 1; }
  64% { opacity: .95; }
  100% { opacity: 0; transform: translate(var(--splash-x), var(--splash-y)) scale(var(--breach-drop-scale, .72)); }
}

.upgrade-card:not(.can-buy):not(:disabled) .upgrade-action > b,
.upgrade-card:not(.can-buy):not(:disabled) .upgrade-cost {
  color: #e2e5d7;
  opacity: .78;
}

.upgrade-card.can-buy .upgrade-action > b,
.upgrade-card.can-buy .upgrade-cost {
  color: #ffe44f;
  animation: affordableUpgradeText .82s ease-in-out infinite;
}

@keyframes affordableUpgradeText {
  0%, 100% {
    color: #fff2a3;
    text-shadow:
      -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink),
      -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink),
      0 2px 0 var(--ink), 0 0 2px rgba(255, 228, 79, .2);
  }
  50% {
    color: #ffcf2f;
    text-shadow:
      -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink),
      -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink),
      0 2px 0 var(--ink), 0 0 9px rgba(255, 220, 69, .95);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene.casting-line .bobber,
  .scene.line-out:not(.casting-line):not(.submerging):not(.submerged):not(.has-bite):not(.reeling) .bobber,
  .scene.has-bite .bobber,
  .scene.reeling .bobber,
  .scene.reeling.surface-break .bobber,
  .scene.reeling.surface-break .hooked-fish,
  .scene.has-bite .hooked-fish img,
  .scene.reeling .hooked-fish img {
    animation-duration: .01ms;
    animation-iteration-count: 1;
  }
  .upgrade-card.can-buy .upgrade-action > b,
  .upgrade-card.can-buy .upgrade-cost {
    animation: none;
    color: #ffe44f;
  }
}

/* Water-impact and HUD alignment pass v79. */
.location-pin svg {
  display: block;
  transform: translateY(.5px);
}

.cast-button,
.cast-button:disabled,
.cast-button.bite {
  bottom: 6px;
}

@container reel-rich (max-height: 720px) {
  .cast-button,
  .cast-button:disabled,
  .cast-button.bite {
    bottom: 3px;
  }
}

/* One-clock water crossing v86. JavaScript moves the connected line and
   tackle together and drives the mask from that exact same position. */
.scene.line-out.submerging .bobber,
.scene.line-out.submerged:not(.reeling) .bobber {
  animation: none;
}

.scene.line-out.submerged:not(.reeling) .bobber {
  transform: translateY(var(--submerge-depth, 34px));
}

.scene.line-out.casting-line .bobber::before,
.scene.line-out.submerging .bobber::before,
.scene.line-out.submerged .bobber::before,
.scene.line-out.has-bite .bobber::before,
.scene.line-out.reeling:not(.surface-break) .bobber::before,
.scene.line-out.reeling .bobber::before,
.scene.line-out.reeling.surface-break .bobber::before {
  opacity: var(--tackle-alpha, 1);
  -webkit-clip-path: inset(0 0 var(--tackle-hide, 0%) 0);
  clip-path: inset(0 0 var(--tackle-hide, 0%) 0);
  animation: none;
  transition: none;
  will-change: opacity, clip-path;
}

@media (prefers-reduced-motion: reduce) {
  .scene.line-out.submerging .bobber,
  .scene.line-out.submerging .bobber::before {
    animation-duration: .01ms;
  }
}

/* Fluent fishing pass v88. The hook, line and fish share one motion clock;
   crossing the surface only starts the water effect and never stops travel. */
.hooked-fish {
  left: calc(var(--fish-attach-x, 20%) + 7px);
  top: calc(var(--fish-attach-y, 54%) - 1px);
  will-change: transform, filter, opacity;
}

.scene.has-bite .hooked-fish,
.scene.reeling .hooked-fish,
.scene.reeling.surface-break .hooked-fish {
  opacity: var(--fish-breach-opacity, .56);
  filter: brightness(var(--fish-breach-light, .05)) saturate(var(--fish-breach-saturation, .12));
  mix-blend-mode: normal;
}

.scene.reeling.surface-break .hooked-fish {
  animation: hookedFishLineSwing var(--breach-swing-duration, .62s) ease-in-out infinite alternate;
}

.scene[data-catch-tier="1"] { --breach-ring-x: 4.7; --breach-ring-y: 2.2; --breach-swing-a: -21deg; --breach-swing-b: -15deg; --breach-swing-duration: .68s; }
.scene[data-catch-tier="2"] { --breach-ring-x: 5.2; --breach-ring-y: 2.5; --breach-swing-a: -23deg; --breach-swing-b: -13deg; --breach-swing-duration: .59s; }
.scene[data-catch-tier="3"] { --breach-ring-x: 5.8; --breach-ring-y: 2.8; --breach-swing-a: -25deg; --breach-swing-b: -11deg; --breach-swing-duration: .51s; }
.scene[data-catch-tier="4"] { --breach-ring-x: 6.5; --breach-ring-y: 3.1; --breach-swing-a: -28deg; --breach-swing-b: -8deg; --breach-swing-duration: .44s; }
.scene[data-catch-tier="5"] { --breach-ring-x: 7.2; --breach-ring-y: 3.4; --breach-swing-a: -31deg; --breach-swing-b: -5deg; --breach-swing-duration: .38s; }
.scene[data-catch-tier="6"] { --breach-ring-x: 8; --breach-ring-y: 3.7; --breach-swing-a: -35deg; --breach-swing-b: -1deg; --breach-swing-duration: .33s; }
.scene[data-catch-tier="7"] { --breach-ring-x: 8.8; --breach-ring-y: 4; --breach-swing-a: -39deg; --breach-swing-b: 3deg; --breach-swing-duration: .28s; }

@keyframes hookedFishLineSwing {
  from {
    transform: translate(var(--fish-mouth-offset-x, -96%), var(--fish-mouth-offset-y, -56%)) rotate(var(--breach-swing-a, -21deg)) scale(.9);
  }
  to {
    transform: translate(var(--fish-mouth-offset-x, -96%), var(--fish-mouth-offset-y, -56%)) rotate(var(--breach-swing-b, -15deg)) scale(.9);
  }
}

/* Broken arcs read as disturbed water rather than expanding UI circles. */
.bobber-splash.show.entry::before,
.bobber-splash.show.entry::after,
.bobber-splash.show.breach::before,
.bobber-splash.show.breach::after {
  border-right-color: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

.bobber-splash.show.entry::after,
.bobber-splash.show.breach::after {
  border-left-color: transparent;
}

@keyframes entrySplashRingNear {
  0% { opacity: .9; transform: rotate(-5deg) scale(.3, .36); }
  42% { opacity: .72; transform: rotate(2deg) scale(1.65, .78); }
  100% { opacity: 0; transform: translateY(2px) rotate(4deg) scale(3.15, 1.28); }
}

@keyframes entrySplashRingFar {
  0% { opacity: .7; transform: rotate(6deg) scale(.38, .4); }
  100% { opacity: 0; transform: translateY(3px) rotate(-3deg) scale(4.05, 1.55); }
}

@keyframes breachSplashRing {
  0% { opacity: .94; transform: rotate(-5deg) scale(.4, .3); }
  58% { opacity: .44; }
  100% { opacity: 0; transform: translateY(4px) rotate(3deg) scale(var(--breach-ring-x, 5.8), var(--breach-ring-y, 2.8)); }
}

/* Stationary hull contact v88. Three small, asynchronous disturbances hug
   the hull; there is deliberately no continuous wake or directional trail. */
.boat-water-contact {
  z-index: 6;
  left: calc(var(--water-left) - 2%);
  bottom: calc(var(--water-bottom) - .35%);
  width: calc(var(--water-width) + 4%);
  height: 12%;
  overflow: visible;
  filter: none;
}

.boat-water-contact::before,
.boat-water-contact::after {
  content: "";
  position: absolute;
  z-index: 3;
  height: 9px;
  border-radius: 50%;
  transform-origin: center;
  will-change: transform, opacity;
}

.boat-water-contact::before {
  left: 5%;
  top: 38%;
  width: 28%;
  background:
    radial-gradient(ellipse at 13% 62%, rgba(253, 255, 242, .78) 0 3px, transparent 3.8px),
    radial-gradient(ellipse at 48% 42%, rgba(247, 255, 244, .62) 0 2.2px, transparent 3px),
    radial-gradient(ellipse at 84% 66%, rgba(253, 255, 242, .7) 0 2.8px, transparent 3.6px),
    linear-gradient(96deg, transparent 0 7%, rgba(247, 255, 244, .62) 14% 36%, transparent 43% 52%, rgba(253, 255, 242, .58) 60% 91%, transparent 97%);
  animation: sternFoamLap 2.35s -.8s ease-in-out infinite;
}

.boat-water-contact::after {
  right: 4%;
  top: 36%;
  width: 30%;
  background:
    radial-gradient(ellipse at 11% 64%, rgba(253, 255, 242, .64) 0 2.5px, transparent 3.3px),
    radial-gradient(ellipse at 57% 39%, rgba(247, 255, 244, .72) 0 2.8px, transparent 3.6px),
    radial-gradient(ellipse at 91% 63%, rgba(253, 255, 242, .8) 0 3.2px, transparent 4px),
    linear-gradient(84deg, transparent 0 5%, rgba(253, 255, 242, .62) 12% 39%, transparent 46% 57%, rgba(247, 255, 244, .68) 65% 94%, transparent 100%);
  animation: bowFoamLap 2.8s -1.65s ease-in-out infinite;
}

.boat-water-contact > i {
  position: absolute;
  display: block;
  background: transparent;
  box-shadow: none;
  filter: none;
  opacity: 0;
  will-change: transform, opacity;
}

.boat-water-contact > i::before,
.boat-water-contact > i::after {
  display: none;
}

.boat-water-contact > i:nth-child(1) {
  left: 39%;
  top: 45%;
  width: 22%;
  height: 5px;
  border: 0;
  border-top: 2px solid rgba(237, 252, 241, .42);
  border-radius: 50%;
  animation: keelContact 3.15s -1.1s ease-in-out infinite;
}

.boat-water-contact > i:nth-child(2),
.boat-water-contact > i:nth-child(3) {
  top: 57%;
  width: 23%;
  height: 9px;
  border: 0;
  border-top: 1.5px solid rgba(190, 235, 228, .58);
  border-radius: 50%;
}

.boat-water-contact > i:nth-child(2) {
  left: -1%;
  transform-origin: right center;
  animation: hullRippleLeft 3.25s -.45s ease-out infinite;
}

.boat-water-contact > i:nth-child(3) {
  right: -1%;
  transform-origin: left center;
  animation: hullRippleRight 3.6s -2.1s ease-out infinite;
}

@keyframes sternFoamLap {
  0%, 100% { opacity: .42; transform: translate(1px, 1px) scale(.93, .78); }
  38% { opacity: .76; transform: translate(-1px, -1px) scale(1.035, 1.02); }
  72% { opacity: .55; transform: translate(0, 0) scale(.98, .88); }
}

@keyframes bowFoamLap {
  0%, 100% { opacity: .48; transform: translate(-1px, 1px) scale(.95, .82); }
  47% { opacity: .82; transform: translate(1px, -1px) scale(1.04, 1.04); }
  78% { opacity: .58; transform: translate(0, 0) scale(.98, .9); }
}

@keyframes keelContact {
  0%, 100% { opacity: .16; transform: translateY(1px) scaleX(.78); }
  52% { opacity: .42; transform: translateY(0) scaleX(1.03); }
}

@keyframes hullRippleLeft {
  0% { opacity: 0; transform: translate(8px, -1px) scaleX(.52); }
  24% { opacity: .4; }
  100% { opacity: 0; transform: translate(-8px, 4px) scaleX(1.14); }
}

@keyframes hullRippleRight {
  0% { opacity: 0; transform: translate(-7px, -1px) scaleX(.5); }
  22% { opacity: .38; }
  100% { opacity: 0; transform: translate(9px, 4px) scaleX(1.16); }
}

/* True hull waterline v92. Artwork below the surface is removed, not tinted;
   the whitewater masks the cut and responds to the character of each area. */
.boat-wrap {
  --hull-waterline: calc(91% - var(--water-bottom));
  --hull-waterline-raised: calc(89.55% - var(--water-bottom));
  --foam-top: 20.1%;
  --foam-height: 50%;
  --foam-period: 2.7s;
  --foam-rest-opacity: .86;
  --foam-peak-opacity: 1;
  --foam-rest-y: .95;
  --foam-peak-x: 1.01;
  --foam-peak-y: 1.07;
  --foam-lift: -1px;
  --glint-period: 3.1s;
  --glint-peak-opacity: .76;
  --ripple-period: 3.4s;
  --ripple-lift: 2px;
  --ripple-grow: 1.08;
}

.rig-art {
  animation: hullSurfaceClip 2.6s ease-in-out infinite;
}

.app.area-1 .boat-wrap { --foam-top: 23.3%; --foam-height: 43%; --foam-period: 3.45s; --foam-peak-y: 1.045; --foam-lift: -.5px; --glint-period: 3.8s; --ripple-period: 4.2s; --ripple-lift: 1px; --ripple-grow: 1.035; }
.app.area-2 .boat-wrap { --foam-top: 19.6%; --foam-height: 51%; --foam-period: 2.45s; --foam-peak-y: 1.1; --foam-lift: -1.3px; --glint-period: 2.9s; --ripple-period: 3.05s; --ripple-lift: 2.5px; --ripple-grow: 1.1; }
.app.area-3 .boat-wrap { --foam-top: 15.5%; --foam-height: 60%; --foam-period: 1.75s; --foam-rest-y: .91; --foam-peak-x: 1.025; --foam-peak-y: 1.19; --foam-lift: -2.4px; --glint-period: 2.1s; --glint-peak-opacity: .9; --ripple-period: 2.2s; --ripple-lift: 4px; --ripple-grow: 1.18; }
.app.area-4 .boat-wrap { --foam-top: 13.7%; --foam-height: 64%; --foam-period: 1.55s; --foam-rest-y: .89; --foam-peak-x: 1.035; --foam-peak-y: 1.24; --foam-lift: -3px; --glint-period: 1.9s; --glint-peak-opacity: .94; --ripple-period: 1.95s; --ripple-lift: 5px; --ripple-grow: 1.22; }
.app.area-5 .boat-wrap { --foam-top: 21%; --foam-height: 48%; --foam-period: 2.65s; --foam-peak-y: 1.08; --foam-lift: -1.2px; --glint-period: 3.15s; --ripple-period: 3.25s; --ripple-lift: 2px; --ripple-grow: 1.08; }
.app.area-6 .boat-wrap { --foam-top: 22.9%; --foam-height: 44%; --foam-period: 3.15s; --foam-peak-y: 1.055; --foam-lift: -.8px; --glint-period: 3.5s; --ripple-period: 3.8s; --ripple-lift: 1.5px; --ripple-grow: 1.055; }
.app.area-7 .boat-wrap { --foam-top: 23.8%; --foam-height: 42%; --foam-period: 3.6s; --foam-rest-opacity: .78; --foam-peak-opacity: .94; --foam-peak-y: 1.04; --foam-lift: -.6px; --glint-period: 4s; --ripple-period: 4.4s; --ripple-lift: 1px; --ripple-grow: 1.04; }
.app.area-8 .boat-wrap { --foam-top: 18.2%; --foam-height: 54%; --foam-period: 2.15s; --foam-peak-y: 1.14; --foam-lift: -1.6px; --glint-period: 2.55s; --glint-peak-opacity: .88; --ripple-period: 2.65s; --ripple-lift: 3px; --ripple-grow: 1.13; }
.app.area-9 .boat-wrap { --foam-top: 16.4%; --foam-height: 58%; --foam-period: 1.7s; --foam-rest-y: .91; --foam-peak-x: 1.025; --foam-peak-y: 1.2; --foam-lift: -2.5px; --glint-period: 2s; --glint-peak-opacity: .92; --ripple-period: 2.05s; --ripple-lift: 4.5px; --ripple-grow: 1.2; }
.app.area-10 .boat-wrap { --foam-top: 12.7%; --foam-height: 66%; --foam-period: 1.4s; --foam-rest-y: .87; --foam-peak-x: 1.04; --foam-peak-y: 1.27; --foam-lift: -3.3px; --glint-period: 1.75s; --glint-peak-opacity: .98; --ripple-period: 1.8s; --ripple-lift: 5.5px; --ripple-grow: 1.25; }
.app.area-11 .boat-wrap { --foam-top: 15.5%; --foam-height: 60%; --foam-period: 1.65s; --foam-rest-y: .9; --foam-peak-x: 1.03; --foam-peak-y: 1.22; --foam-lift: -2.8px; --glint-period: 1.95s; --glint-peak-opacity: .9; --ripple-period: 2s; --ripple-lift: 5px; --ripple-grow: 1.22; }

@keyframes hullSurfaceClip {
  0%, 100% {
    -webkit-clip-path: polygon(0 0, 100% 0, 100% var(--hull-waterline), 95% calc(var(--hull-waterline) - 2.2%), 88% calc(var(--hull-waterline) - 2.5%), 80% calc(var(--hull-waterline) - .7%), 70% calc(var(--hull-waterline) + 1%), 60% calc(var(--hull-waterline) + .35%), 50% calc(var(--hull-waterline) - .7%), 40% calc(var(--hull-waterline) - .55%), 30% calc(var(--hull-waterline) + .9%), 20% calc(var(--hull-waterline) + .35%), 10% calc(var(--hull-waterline) - 2.3%), 5% calc(var(--hull-waterline) - 2.2%), 0 var(--hull-waterline));
    clip-path: polygon(0 0, 100% 0, 100% var(--hull-waterline), 95% calc(var(--hull-waterline) - 2.2%), 88% calc(var(--hull-waterline) - 2.5%), 80% calc(var(--hull-waterline) - .7%), 70% calc(var(--hull-waterline) + 1%), 60% calc(var(--hull-waterline) + .35%), 50% calc(var(--hull-waterline) - .7%), 40% calc(var(--hull-waterline) - .55%), 30% calc(var(--hull-waterline) + .9%), 20% calc(var(--hull-waterline) + .35%), 10% calc(var(--hull-waterline) - 2.3%), 5% calc(var(--hull-waterline) - 2.2%), 0 var(--hull-waterline));
  }
  50% {
    -webkit-clip-path: polygon(0 0, 100% 0, 100% var(--hull-waterline-raised), 95% calc(var(--hull-waterline-raised) - 2.2%), 88% calc(var(--hull-waterline-raised) - 2.5%), 80% calc(var(--hull-waterline-raised) - .7%), 70% calc(var(--hull-waterline-raised) + 1%), 60% calc(var(--hull-waterline-raised) + .35%), 50% calc(var(--hull-waterline-raised) - .7%), 40% calc(var(--hull-waterline-raised) - .55%), 30% calc(var(--hull-waterline-raised) + .9%), 20% calc(var(--hull-waterline-raised) + .35%), 10% calc(var(--hull-waterline-raised) - 2.3%), 5% calc(var(--hull-waterline-raised) - 2.2%), 0 var(--hull-waterline-raised));
    clip-path: polygon(0 0, 100% 0, 100% var(--hull-waterline-raised), 95% calc(var(--hull-waterline-raised) - 2.2%), 88% calc(var(--hull-waterline-raised) - 2.5%), 80% calc(var(--hull-waterline-raised) - .7%), 70% calc(var(--hull-waterline-raised) + 1%), 60% calc(var(--hull-waterline-raised) + .35%), 50% calc(var(--hull-waterline-raised) - .7%), 40% calc(var(--hull-waterline-raised) - .55%), 30% calc(var(--hull-waterline-raised) + .9%), 20% calc(var(--hull-waterline-raised) + .35%), 10% calc(var(--hull-waterline-raised) - 2.3%), 5% calc(var(--hull-waterline-raised) - 2.2%), 0 var(--hull-waterline-raised));
  }
}

.boat-water-contact {
  z-index: 7;
  left: calc(var(--water-left) - 3%);
  bottom: calc(var(--water-bottom) - 1.25%);
  width: calc(var(--water-width) + 6%);
  height: 18%;
  overflow: visible;
}

.boat-water-contact::before {
  right: auto;
  left: 0;
  top: var(--foam-top);
  width: 100%;
  height: var(--foam-height);
  border-radius: 0;
  background: url("./assets/ui/boat-waterline-v2.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 0 rgba(16, 67, 78, .25));
  animation: settledHullFoam var(--foam-period) ease-in-out infinite;
}

.boat-water-contact::after {
  right: auto;
  left: 8%;
  top: 60%;
  width: 84%;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(90deg,
    transparent 0 3%, rgba(202, 241, 238, .42) 8% 25%, transparent 31% 37%,
    rgba(244, 255, 246, .45) 43% 62%, transparent 68% 74%,
    rgba(202, 241, 238, .38) 80% 95%, transparent 100%);
  filter: none;
  animation: settledWaterGlint var(--glint-period) -.9s ease-in-out infinite;
}

.boat-water-contact > i,
.boat-water-contact > i:nth-child(1),
.boat-water-contact > i:nth-child(2),
.boat-water-contact > i:nth-child(3) {
  display: block;
  top: 66%;
  width: 27%;
  height: 7px;
  border: 0;
  border-top: 2px solid rgba(205, 242, 239, .56);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  opacity: .34;
  transform-origin: center;
}

.boat-water-contact > i:nth-child(1) {
  left: 1%;
  animation: settledRippleA var(--ripple-period) -.7s ease-in-out infinite;
}

.boat-water-contact > i:nth-child(2) {
  right: auto;
  left: 36.5%;
  top: 72%;
  animation: settledRippleB var(--ripple-period) -2.1s ease-in-out infinite;
}

.boat-water-contact > i:nth-child(3) {
  right: 1%;
  left: auto;
  animation: settledRippleA var(--ripple-period) -1.8s ease-in-out infinite reverse;
}

@keyframes settledHullFoam {
  0%, 100% { opacity: var(--foam-rest-opacity); transform: translateY(0) scale(1, var(--foam-rest-y)); }
  50% { opacity: var(--foam-peak-opacity); transform: translateY(var(--foam-lift)) scale(var(--foam-peak-x), var(--foam-peak-y)); }
}

@keyframes settledWaterGlint {
  0%, 100% { opacity: .45; transform: scaleX(.97); }
  50% { opacity: var(--glint-peak-opacity); transform: translateY(var(--ripple-lift)) scaleX(var(--ripple-grow)); }
}

@keyframes settledRippleA {
  0%, 100% { opacity: .18; transform: translateY(0) scaleX(.88); }
  50% { opacity: .52; transform: translateY(var(--ripple-lift)) scaleX(var(--ripple-grow)); }
}

@keyframes settledRippleB {
  0%, 100% { opacity: .14; transform: translateY(1px) scaleX(.82); }
  48% { opacity: .42; transform: translateY(var(--ripple-lift)) scaleX(var(--ripple-grow)); }
}

/* Hull contact v93. The old full-width stroke read as an outline pasted onto
   the boat. These five independent foam pockets leave most of the waterline
   visible, briefly gather at the stern/keel/bow, and never imply forward wake. */
.boat-wrap {
  --surface-lift: 1.48%;
  --surface-chop: .42%;
  --contact-speed: 3.25s;
  --contact-pop: .82;
  --contact-lift: -1px;
  --contact-lift-soft: -.65px;
  --contact-fold-drop: 1px;
  --contact-spread: 1.02;
  --contact-spread-soft: .94;
  --hull-waterline-raised: calc(var(--hull-waterline) - var(--surface-lift));
}

.app.area-1 .boat-wrap { --surface-lift: 1.45%; --surface-chop: .34%; --contact-speed: 3.55s; --contact-pop: .76; --contact-lift: -.5px; --contact-lift-soft: -.3px; --contact-fold-drop: .5px; --contact-spread: .98; --contact-spread-soft: .91; }
.app.area-2 .boat-wrap { --surface-lift: 1.62%; --surface-chop: .58%; --contact-speed: 2.75s; --contact-pop: .86; --contact-lift: -1.5px; --contact-lift-soft: -.9px; --contact-fold-drop: 1.5px; --contact-spread: 1.05; --contact-spread-soft: .97; }
.app.area-3 .boat-wrap { --surface-lift: 2.02%; --surface-chop: .88%; --contact-speed: 2.05s; --contact-pop: .94; --contact-lift: -2.6px; --contact-lift-soft: -1.6px; --contact-fold-drop: 2.6px; --contact-spread: 1.12; --contact-spread-soft: 1.02; }
.app.area-4 .boat-wrap { --surface-lift: 2.28%; --surface-chop: 1.08%; --contact-speed: 1.72s; --contact-pop: 1; --contact-lift: -3.4px; --contact-lift-soft: -2.1px; --contact-fold-drop: 3.4px; --contact-spread: 1.18; --contact-spread-soft: 1.07; }
.app.area-5 .boat-wrap { --surface-lift: 1.58%; --surface-chop: .52%; --contact-speed: 2.95s; --contact-pop: .84; --contact-lift: -1.2px; --contact-lift-soft: -.75px; --contact-fold-drop: 1.2px; --contact-spread: 1.03; --contact-spread-soft: .95; }
.app.area-6 .boat-wrap { --surface-lift: 1.5%; --surface-chop: .4%; --contact-speed: 3.3s; --contact-pop: .8; --contact-lift: -.8px; --contact-lift-soft: -.5px; --contact-fold-drop: .8px; --contact-spread: 1; --contact-spread-soft: .92; }
.app.area-7 .boat-wrap { --surface-lift: 1.45%; --surface-chop: .32%; --contact-speed: 3.7s; --contact-pop: .72; --contact-lift: -.5px; --contact-lift-soft: -.3px; --contact-fold-drop: .5px; --contact-spread: .97; --contact-spread-soft: .9; }
.app.area-8 .boat-wrap { --surface-lift: 1.78%; --surface-chop: .68%; --contact-speed: 2.45s; --contact-pop: .9; --contact-lift: -2px; --contact-lift-soft: -1.2px; --contact-fold-drop: 2px; --contact-spread: 1.08; --contact-spread-soft: .99; }
.app.area-9 .boat-wrap { --surface-lift: 2.12%; --surface-chop: .96%; --contact-speed: 1.9s; --contact-pop: .97; --contact-lift: -3px; --contact-lift-soft: -1.8px; --contact-fold-drop: 3px; --contact-spread: 1.15; --contact-spread-soft: 1.05; }
.app.area-10 .boat-wrap { --surface-lift: 2.48%; --surface-chop: 1.22%; --contact-speed: 1.52s; --contact-pop: 1; --contact-lift: -4px; --contact-lift-soft: -2.4px; --contact-fold-drop: 4px; --contact-spread: 1.22; --contact-spread-soft: 1.1; }
.app.area-11 .boat-wrap { --surface-lift: 2.2%; --surface-chop: 1.05%; --contact-speed: 1.78s; --contact-pop: .98; --contact-lift: -3.3px; --contact-lift-soft: -2px; --contact-fold-drop: 3.3px; --contact-spread: 1.17; --contact-spread-soft: 1.07; }

.rig-art {
  animation-name: hullSurfaceClipV93;
}

@keyframes hullSurfaceClipV93 {
  0%, 100% {
    -webkit-clip-path: polygon(
      0 0, 100% 0, 100% var(--hull-waterline),
      93% calc(var(--hull-waterline) - var(--surface-chop)),
      84% calc(var(--hull-waterline) + var(--surface-chop)),
      74% var(--hull-waterline),
      64% calc(var(--hull-waterline) - var(--surface-chop)),
      53% calc(var(--hull-waterline) + var(--surface-chop)),
      42% var(--hull-waterline),
      31% calc(var(--hull-waterline) - var(--surface-chop)),
      20% calc(var(--hull-waterline) + var(--surface-chop)),
      9% calc(var(--hull-waterline) - var(--surface-chop)),
      0 var(--hull-waterline)
    );
    clip-path: polygon(
      0 0, 100% 0, 100% var(--hull-waterline),
      93% calc(var(--hull-waterline) - var(--surface-chop)),
      84% calc(var(--hull-waterline) + var(--surface-chop)),
      74% var(--hull-waterline),
      64% calc(var(--hull-waterline) - var(--surface-chop)),
      53% calc(var(--hull-waterline) + var(--surface-chop)),
      42% var(--hull-waterline),
      31% calc(var(--hull-waterline) - var(--surface-chop)),
      20% calc(var(--hull-waterline) + var(--surface-chop)),
      9% calc(var(--hull-waterline) - var(--surface-chop)),
      0 var(--hull-waterline)
    );
  }
  50% {
    -webkit-clip-path: polygon(
      0 0, 100% 0, 100% var(--hull-waterline-raised),
      92% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      83% var(--hull-waterline-raised),
      73% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      62% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      51% var(--hull-waterline-raised),
      40% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      29% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      18% var(--hull-waterline-raised),
      8% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      0 var(--hull-waterline-raised)
    );
    clip-path: polygon(
      0 0, 100% 0, 100% var(--hull-waterline-raised),
      92% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      83% var(--hull-waterline-raised),
      73% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      62% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      51% var(--hull-waterline-raised),
      40% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      29% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      18% var(--hull-waterline-raised),
      8% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      0 var(--hull-waterline-raised)
    );
  }
}

.boat-water-contact {
  left: calc(var(--water-left) - 2%);
  bottom: calc(var(--water-bottom) - .8%);
  width: calc(var(--water-width) + 4%);
  height: 15%;
}

.boat-water-contact::before,
.boat-water-contact::after,
.boat-water-contact > i:nth-child(1),
.boat-water-contact > i:nth-child(2) {
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  filter: drop-shadow(0 1px 0 rgba(17, 77, 87, .22));
  opacity: 0;
  will-change: transform, opacity;
}

.boat-water-contact::before {
  left: -1%;
  right: auto;
  top: 34%;
  width: 31%;
  height: 15px;
  background:
    radial-gradient(ellipse at 8% 60%, rgba(251, 255, 244, .92) 0 2.4px, transparent 3.2px),
    radial-gradient(ellipse at 23% 42%, rgba(251, 255, 244, .76) 0 3px, transparent 3.9px),
    radial-gradient(ellipse at 41% 66%, rgba(219, 246, 241, .8) 0 2px, transparent 2.9px),
    radial-gradient(ellipse at 58% 48%, rgba(251, 255, 244, .86) 0 3.5px, transparent 4.4px),
    radial-gradient(ellipse at 78% 68%, rgba(218, 246, 242, .7) 0 2.2px, transparent 3.1px),
    radial-gradient(ellipse at 93% 49%, rgba(251, 255, 244, .84) 0 2.7px, transparent 3.6px),
    radial-gradient(ellipse at 50% 68%, rgba(240, 254, 245, .58) 0 27%, transparent 31%);
  animation: sternPocket var(--contact-speed) -.65s cubic-bezier(.45, .03, .3, 1) infinite;
}

.boat-water-contact::after {
  left: auto;
  right: -1%;
  top: 32%;
  width: 29%;
  height: 16px;
  background:
    radial-gradient(ellipse at 7% 54%, rgba(251, 255, 244, .84) 0 2.7px, transparent 3.6px),
    radial-gradient(ellipse at 25% 69%, rgba(214, 244, 241, .72) 0 2.1px, transparent 3px),
    radial-gradient(ellipse at 44% 43%, rgba(251, 255, 244, .9) 0 3.3px, transparent 4.2px),
    radial-gradient(ellipse at 63% 66%, rgba(251, 255, 244, .75) 0 2.5px, transparent 3.4px),
    radial-gradient(ellipse at 82% 43%, rgba(218, 246, 242, .82) 0 3.1px, transparent 4px),
    radial-gradient(ellipse at 96% 63%, rgba(251, 255, 244, .88) 0 2.3px, transparent 3.2px),
    radial-gradient(ellipse at 52% 67%, rgba(241, 254, 246, .6) 0 26%, transparent 30%);
  animation: bowPocket var(--contact-speed) -1.85s cubic-bezier(.36, .02, .34, 1) infinite;
}

.boat-water-contact > i:nth-child(1) {
  display: block;
  left: 26%;
  right: auto;
  top: 43%;
  width: 23%;
  height: 11px;
  background:
    radial-gradient(ellipse at 10% 60%, rgba(229, 250, 244, .66) 0 2.2px, transparent 3px),
    radial-gradient(ellipse at 31% 42%, rgba(252, 255, 246, .82) 0 2.7px, transparent 3.5px),
    radial-gradient(ellipse at 56% 66%, rgba(216, 245, 241, .7) 0 1.8px, transparent 2.6px),
    radial-gradient(ellipse at 78% 45%, rgba(252, 255, 246, .72) 0 2.5px, transparent 3.3px),
    radial-gradient(ellipse at 48% 70%, rgba(239, 253, 245, .46) 0 25%, transparent 30%);
  animation: keelPocketA var(--contact-speed) -2.05s ease-in-out infinite;
}

.boat-water-contact > i:nth-child(2) {
  display: block;
  left: 52%;
  right: auto;
  top: 45%;
  width: 20%;
  height: 10px;
  background:
    radial-gradient(ellipse at 9% 55%, rgba(252, 255, 246, .76) 0 2px, transparent 2.8px),
    radial-gradient(ellipse at 33% 68%, rgba(218, 246, 242, .64) 0 1.8px, transparent 2.6px),
    radial-gradient(ellipse at 59% 41%, rgba(252, 255, 246, .82) 0 2.5px, transparent 3.3px),
    radial-gradient(ellipse at 86% 64%, rgba(224, 248, 243, .7) 0 2.1px, transparent 2.9px),
    radial-gradient(ellipse at 51% 68%, rgba(240, 254, 246, .44) 0 24%, transparent 30%);
  animation: keelPocketB var(--contact-speed) -.2s ease-in-out infinite;
}

.boat-water-contact > i:nth-child(3) {
  display: block;
  left: 7%;
  right: auto;
  top: 71%;
  width: 86%;
  height: 7px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at center, rgba(201, 239, 236, .46) 0 39%, transparent 47%) 1% 2px / 16% 4px no-repeat,
    radial-gradient(ellipse at center, rgba(236, 252, 244, .4) 0 38%, transparent 47%) 29% 1px / 12% 3px no-repeat,
    radial-gradient(ellipse at center, rgba(201, 239, 236, .42) 0 40%, transparent 48%) 54% 3px / 18% 4px no-repeat,
    radial-gradient(ellipse at center, rgba(236, 252, 244, .38) 0 38%, transparent 47%) 88% 1px / 11% 3px no-repeat;
  box-shadow: none;
  filter: none;
  opacity: 0;
  animation: brokenSurfaceFold var(--contact-speed) -1.15s ease-in-out infinite;
}

@keyframes sternPocket {
  0%, 10%, 100% { opacity: .16; transform: translate(2px, 2px) scale(.82, .66); }
  37% { opacity: var(--contact-pop); transform: translate(-1px, var(--contact-lift)) scale(var(--contact-spread), .96); }
  67% { opacity: .38; transform: translate(0, 1px) scale(.94, .75); }
}

@keyframes bowPocket {
  0%, 14%, 100% { opacity: .18; transform: translate(-2px, 2px) scale(.8, .64); }
  46% { opacity: var(--contact-pop); transform: translate(1px, var(--contact-lift)) scale(var(--contact-spread), 1); }
  76% { opacity: .34; transform: translate(0, 1px) scale(.91, .72); }
}

@keyframes keelPocketA {
  0%, 18%, 100% { opacity: .08; transform: translateY(2px) scale(.68, .58); }
  53% { opacity: .57; transform: translateY(var(--contact-lift-soft)) scale(var(--contact-spread-soft), .9); }
  79% { opacity: .26; transform: translateY(1px) scale(.82, .7); }
}

@keyframes keelPocketB {
  0%, 22%, 100% { opacity: .07; transform: translateY(2px) scale(.65, .56); }
  49% { opacity: .52; transform: translateY(var(--contact-lift-soft)) scale(var(--contact-spread-soft), .86); }
  74% { opacity: .22; transform: translateY(1px) scale(.78, .66); }
}

@keyframes brokenSurfaceFold {
  0%, 100% { opacity: .16; transform: translateY(0) scaleX(.92); }
  48% { opacity: .48; transform: translateY(var(--contact-fold-drop)) scaleX(var(--contact-spread)); }
}

/* Keep the bobber clear of CASTING…, WAIT FOR IT…, and the other labels. */
.cast-icon {
  left: 6.5%;
}

@container reel-rich (max-width: 370px) {
  .cast-icon { left: 4.5%; }
}


/* Ad-matched hull contact v95. This intentionally replaces the older
   procedural dots and detached ripples with one illustrated water edge that
   overlaps the hull exactly like the share artwork. */
.boat-wrap {
  --hull-waterline: calc(94% - var(--water-bottom));
  --hull-waterline-raised: calc(var(--hull-waterline) - var(--surface-lift));
  --ad-foam-speed: 3.45s;
  --ad-foam-rest-y: .86;
  --ad-foam-peak-y: .91;
  --ad-foam-lift: -.45px;
}

.app.area-2 .boat-wrap { --ad-foam-speed: 2.8s; --ad-foam-peak-y: .94; --ad-foam-lift: -.8px; }
.app.area-3 .boat-wrap { --ad-foam-speed: 2.15s; --ad-foam-peak-y: .98; --ad-foam-lift: -1.25px; }
.app.area-4 .boat-wrap { --ad-foam-speed: 1.72s; --ad-foam-rest-y: .9; --ad-foam-peak-y: 1.04; --ad-foam-lift: -1.8px; }
.app.area-5 .boat-wrap { --ad-foam-speed: 2.65s; --ad-foam-peak-y: .95; --ad-foam-lift: -.9px; }
.app.area-6 .boat-wrap { --ad-foam-speed: 3.15s; --ad-foam-peak-y: .93; --ad-foam-lift: -.65px; }
.app.area-7 .boat-wrap { --ad-foam-speed: 3.6s; --ad-foam-peak-y: .91; --ad-foam-lift: -.45px; }
.app.area-8 .boat-wrap { --ad-foam-speed: 2.35s; --ad-foam-peak-y: .97; --ad-foam-lift: -1.1px; }
.app.area-9 .boat-wrap { --ad-foam-speed: 1.9s; --ad-foam-rest-y: .89; --ad-foam-peak-y: 1.02; --ad-foam-lift: -1.55px; }
.app.area-10 .boat-wrap { --ad-foam-speed: 1.52s; --ad-foam-rest-y: .91; --ad-foam-peak-y: 1.07; --ad-foam-lift: -2.1px; }
.app.area-11 .boat-wrap { --ad-foam-speed: 1.78s; --ad-foam-rest-y: .9; --ad-foam-peak-y: 1.04; --ad-foam-lift: -1.75px; }

.boat-water-contact {
  z-index: 7;
  left: calc(var(--water-left) - 2%);
  bottom: calc(var(--water-bottom) - .5%);
  width: calc(var(--water-width) + 4%);
  height: 34%;
  overflow: visible;
  filter: none;
}

.boat-water-contact::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/boat-water-contact-ad-v1.png") center bottom / 100% 100% no-repeat;
  filter: none;
  opacity: 1;
  transform-origin: 50% 100%;
  animation: adHullFoamV95 var(--ad-foam-speed) ease-in-out infinite;
}

.boat-water-contact::after,
.boat-water-contact > i,
.boat-water-contact > i:nth-child(1),
.boat-water-contact > i:nth-child(2),
.boat-water-contact > i:nth-child(3) {
  display: none;
  animation: none;
}

@keyframes adHullFoamV95 {
  0%, 100% { transform: translateY(0) scale(1, var(--ad-foam-rest-y)); }
  50% { transform: translateY(var(--ad-foam-lift)) scale(1.012, var(--ad-foam-peak-y)); }
}

.legal-panel {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 248, 223, .72);
  border: 2px solid rgba(16, 45, 53, .7);
  border-radius: 12px;
}

.legal-panel > strong {
  color: var(--teal-dark);
  font-size: .82rem;
  font-weight: 1000;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.legal-panel p {
  margin: 0;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.35;
}

.legal-panel nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.legal-panel a {
  color: var(--teal-dark);
  font-size: .72rem;
  font-weight: 1000;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Water contact v96. The lake remains the water: these transparent foam
   pockets only mark the hull intersection, so there is no colored strip
   sitting on top of the scene. Each pocket laps independently. */
.boat-wrap {
  --hull-waterline: calc(91.4% - var(--water-bottom));
  --hull-waterline-raised: calc(var(--hull-waterline) - var(--surface-lift));
  --contact-speed: 3.55s;
}

.boat-water-contact {
  z-index: 7;
  left: calc(var(--water-left) - 2.5%);
  bottom: calc(var(--water-bottom) - .15%);
  width: calc(var(--water-width) + 5%);
  height: 17%;
  overflow: visible;
}

.boat-water-contact::before,
.boat-water-contact::after,
.boat-water-contact > i {
  position: absolute;
  display: block;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  filter: none;
  box-shadow: none;
  opacity: 1;
  transform-origin: 50% 55%;
  will-change: transform, opacity;
}

.boat-water-contact::before {
  content: "";
  inset: auto;
  left: -1.5%;
  top: 20%;
  width: 43%;
  height: 62%;
  background-image: url("./assets/ui/boat-foam-stern-v96.svg");
  background-position: center;
  background-size: 100% 100%;
  animation: sternLapV96 var(--contact-speed) -.55s cubic-bezier(.45, .04, .3, 1) infinite;
}

.boat-water-contact::after {
  content: "";
  inset: auto;
  right: -1.5%;
  top: 18%;
  width: 43%;
  height: 64%;
  background-image: url("./assets/ui/boat-foam-bow-v96.svg");
  background-position: center;
  background-size: 100% 100%;
  animation: bowLapV96 var(--contact-speed) -2.05s cubic-bezier(.4, .03, .34, 1) infinite;
}

.boat-water-contact > i:nth-child(1) {
  display: block;
  left: 27%;
  top: 34%;
  width: 47%;
  height: 48%;
  background-image: url("./assets/ui/boat-foam-keel-v96.svg");
  background-position: center;
  background-size: 100% 100%;
  animation: keelLapV96 var(--contact-speed) -1.35s ease-in-out infinite;
}

.boat-water-contact > i:nth-child(2),
.boat-water-contact > i:nth-child(3) {
  display: block;
  top: 79%;
  width: 31%;
  height: 8px;
  border-top: 2px solid rgba(190, 231, 229, .48);
  border-radius: 50%;
  background: transparent;
  opacity: 0;
}

.boat-water-contact > i:nth-child(2) {
  left: 5%;
  animation: waterBlendLeftV96 var(--contact-speed) -1.6s ease-out infinite;
}

.boat-water-contact > i:nth-child(3) {
  right: 4%;
  left: auto;
  animation: waterBlendRightV96 var(--contact-speed) -.35s ease-out infinite;
}

@keyframes sternLapV96 {
  0%, 100% { opacity: .72; transform: translate(1px, 1px) scale(.97, .9); }
  42% { opacity: 1; transform: translate(-1px, -.6px) scale(1.015, 1.02); }
  73% { opacity: .82; transform: translate(0, .4px) scale(.99, .95); }
}

@keyframes bowLapV96 {
  0%, 100% { opacity: .76; transform: translate(-1px, .8px) scale(.965, .9); }
  48% { opacity: 1; transform: translate(1px, -.7px) scale(1.02, 1.025); }
  78% { opacity: .84; transform: translate(0, .4px) scale(.99, .95); }
}

@keyframes keelLapV96 {
  0%, 100% { opacity: .46; transform: translateY(1px) scale(.98, .88); }
  50% { opacity: .82; transform: translateY(-.4px) scale(1.01, 1); }
}

@keyframes waterBlendLeftV96 {
  0% { opacity: 0; transform: translate(18px, -1px) scaleX(.52); }
  28% { opacity: .42; }
  100% { opacity: 0; transform: translate(-11px, 2px) scaleX(1.18); }
}

@keyframes waterBlendRightV96 {
  0% { opacity: 0; transform: translate(-18px, -1px) scaleX(.52); }
  28% { opacity: .42; }
  100% { opacity: 0; transform: translate(11px, 2px) scaleX(1.18); }
}

.app.area-2 .boat-wrap { --contact-speed: 3.05s; }
.app.area-3 .boat-wrap { --contact-speed: 2.55s; }
.app.area-4 .boat-wrap { --contact-speed: 2.15s; }
.app.area-5 .boat-wrap { --contact-speed: 2.9s; }
.app.area-6 .boat-wrap { --contact-speed: 3.3s; }
.app.area-7 .boat-wrap { --contact-speed: 3.75s; }
.app.area-8 .boat-wrap { --contact-speed: 2.7s; }
.app.area-9 .boat-wrap { --contact-speed: 2.35s; }
.app.area-10 .boat-wrap { --contact-speed: 1.95s; }
.app.area-11 .boat-wrap { --contact-speed: 2.2s; }

/* Ad-reference water contact v99. The hull is cut off at the actual surface;
   one transparent illustrated contact layer overlaps that cut, with open lake
   showing through it. There is no separate water-colored plate. */
.boat-wrap {
  --hull-waterline: calc(89.2% - var(--water-bottom));
  --hull-waterline-raised: calc(var(--hull-waterline) - var(--surface-lift));
  --ad-contact-speed: 4.2s;
  --ad-contact-lift: -.45px;
}

.boat-water-contact {
  z-index: 7;
  left: calc(var(--water-left) - 2.5%);
  bottom: calc(var(--water-bottom) - 3.8%);
  width: calc(var(--water-width) + 5%);
  height: 32%;
  overflow: visible;
}

.boat-water-contact::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/boat-water-contact-ad-v2.png") center center / 100% 100% no-repeat;
  box-shadow: none;
  filter: none;
  opacity: .96;
  transform-origin: 50% 58%;
  animation: adWaterContactV98 var(--ad-contact-speed) ease-in-out infinite;
}

.boat-water-contact::after,
.boat-water-contact > i,
.boat-water-contact > i:nth-child(1),
.boat-water-contact > i:nth-child(2),
.boat-water-contact > i:nth-child(3) {
  display: none;
  animation: none;
}

@keyframes adWaterContactV98 {
  0%, 100% { opacity: .92; transform: translateY(.35px) scaleX(.997); }
  50% { opacity: 1; transform: translateY(var(--ad-contact-lift)) scaleX(1.006); }
}

.app.area-2 .boat-wrap { --ad-contact-speed: 3.65s; --ad-contact-lift: -.65px; }
.app.area-3 .boat-wrap { --ad-contact-speed: 3.05s; --ad-contact-lift: -.85px; }
.app.area-4 .boat-wrap { --ad-contact-speed: 2.55s; --ad-contact-lift: -1.05px; }
.app.area-5 .boat-wrap { --ad-contact-speed: 3.45s; --ad-contact-lift: -.7px; }
.app.area-6 .boat-wrap { --ad-contact-speed: 3.9s; --ad-contact-lift: -.55px; }
.app.area-7 .boat-wrap { --ad-contact-speed: 4.35s; --ad-contact-lift: -.4px; }
.app.area-8 .boat-wrap { --ad-contact-speed: 3.2s; --ad-contact-lift: -.8px; }
.app.area-9 .boat-wrap { --ad-contact-speed: 2.8s; --ad-contact-lift: -.95px; }
.app.area-10 .boat-wrap { --ad-contact-speed: 2.35s; --ad-contact-lift: -1.2px; }
.app.area-11 .boat-wrap { --ad-contact-speed: 2.65s; --ad-contact-lift: -1px; }

/* Constrain only the longest idle label; action labels retain their punch. */
.cast-button.auto-label > #castButtonText {
  right: 8%;
  left: 30%;
  font-size: clamp(1.15rem, 5.4cqw, 1.55rem);
  letter-spacing: -.06em;
}

/* CrazyGames tablet/desktop parity v107. The portal's embedded player can
   report a short landscape viewport even when it is rendering at tablet
   width. Do not let that breakpoint collapse the authored card zones: the
   illustration/name, two-line stat block, and action bar need the same
   vertical separation as the standalone web and tablet layouts. */

/* At the portal's shortest player height, keep the actual dialogue but omit
   its secondary heading so the bubble clears the fisherman's hat. */

/* Keep the identity badges clear of the card's lower edge and shadow. */
.upgrade-slot > .card-kind {
  margin-top: 10px;
}
.dock {
  padding-bottom: max(9px, env(safe-area-inset-bottom));
}
@container reel-rich (max-height: 650px) and (max-aspect-ratio: 1/1) {
  .upgrade-slot > .card-kind { margin-top: 8px; }
}


/* Complete icons are isolated from the irregular atlas, with transparent inset. */
.gear-illustration,
.rod-tackle > i { background-image: none; }
#rodUpgrade .rod-illustration { clip-path: none; }
.bobber::before {
  background-image: var(--tier-art, none);
  background-size: contain;
  background-position: center;
}
/* Connect the idle line to the actual eye of each complete lure. */
.rod-tackle > i {
  top: calc(26px - clamp(34px, 9cqw, 48px) * var(--tackle-anchor-y, .1));
}
.rod-tackle::before {
  left: var(--tackle-line-left, var(--tackle-anchor-x));
  height: var(--tackle-line-height, 27px);
  transform: rotate(var(--tackle-line-angle, 4deg));
}


/* Keep manual cast/reel feedback visible after the action disables the button. */
.cast-button:active:not(:disabled),
.cast-button.pressed {
  animation: none;
  transition: none;
  transform: translate(-50%, 4px) rotate(-.3deg);
  box-shadow: none;
}

/* Preserve the approved card geometry while showing every complete name. */
.fish-entry:not(.appearance-card) strong,
.location-card strong,
.daily-card > div > strong,
.travel-card-copy strong,
.catch-toast strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* Two full-size name lines and one stats line share the existing text space. */
.fish-entry:not(.appearance-card) strong { line-height: 1.15; }
.fish-entry:not(.appearance-card) small { width: 100%; white-space: nowrap; }
.fish-name-copy, .fish-stat-copy {
  display: block;
  transform-origin: left center;
}

/* The same milestones as the desktop edition, within the existing sheet layout. */
.achievement-summary { margin: 0 0 .3rem; color: #246f7b; font-weight: 900; }
.achievement-note { margin: 0 0 1rem; color: #627277; font-size: .8rem; }
.achievement-list { display: grid; gap: .65rem; }
.achievement-card { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: .7rem; align-items: center; padding: .7rem; border: 2px solid #19363d; border-radius: .7rem; background: #fffdf0; }
.achievement-card[data-earned="true"] { border-color: #b58b20; background: #fff7d6; }
/* The same rounded navy edge as the sheet close button, with a raised face. */
.achievement-badge { position: relative; width: 3.5rem; height: 3.5rem; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--button-corner-radius); background: #d4ddd4; box-shadow: 2px 2px 0 var(--ink), 0 3px 5px #19363d20; }
.achievement-badge::after { content: ""; position: absolute; inset: 0; border-radius: calc(var(--button-corner-radius) - 2px); box-shadow: inset 0 2px 0 #fff9df75, inset 2px 0 0 #fff9df38, inset 0 -2px 0 #102e3a60; pointer-events: none; }
.achievement-icon { display: block; width: 100%; height: 100%; object-fit: contain; }
.achievement-card[data-earned="false"] .achievement-icon { opacity: .6; filter: saturate(.35); }
.achievement-copy { min-width: 0; }
.achievement-copy h3 { margin: 0 0 .2rem; font-size: .95rem; line-height: 1.2; overflow-wrap: anywhere; }
.achievement-copy p { margin: 0 0 .35rem; color: #556870; font-size: .8rem; line-height: 1.3; }
.achievement-copy progress { display: block; width: 100%; height: .45rem; appearance: none; border: 0; border-radius: 1rem; overflow: hidden; background: #d5dfd5; }
.achievement-copy progress::-webkit-progress-bar { background: #d5dfd5; }
.achievement-copy progress::-webkit-progress-value { background: #328653; }
.achievement-copy progress::-moz-progress-bar { background: #328653; }
.achievement-copy small { display: block; margin-top: .3rem; color: #56696b; font-size: .75rem; font-weight: 700; }
.achievement-card[data-earned="true"] .achievement-copy small { color: #328653; }

/* ==== appearance ==== */
.appearance-open {
  min-height: 44px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 1000;
  cursor: pointer;
}
.appearance-back { margin-bottom: 5px; }
.appearance-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.appearance-controls button,
.appearance-categories button {
  min-height: 44px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 9px;
  font-size: .74rem;
  font-weight: 1000;
  cursor: pointer;
}
.appearance-controls button[aria-pressed="true"] { background: var(--green); }
.appearance-categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.appearance-categories button { padding-inline: 3px; }
.appearance-categories button[aria-pressed="true"] { background: var(--yellow); }
.appearance-categories button:disabled { color: #718085; background: #c9d1c7; opacity: .6; cursor: default; }
.appearance-status { margin: 0 0 12px; color: var(--teal-dark); font-size: .8rem; font-weight: 800; line-height: 1.4; }
.appearance-card { position: relative; min-height: 146px; gap: 2px; }
.appearance-card img { width: 100%; height: 84px; object-fit: contain; }
.appearance-card strong { overflow: visible; font-size: .74rem; line-height: 1.15; white-space: normal; }
.appearance-card.selected { background: #e9f6d9; border-color: #347333; box-shadow: 0 0 0 2px var(--green), 2px 2px 0 var(--ink); }
.appearance-check { display: none; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; color: white; background: #347333; border-radius: 50%; font-size: 16px; font-weight: 1000; line-height: 22px; }
.appearance-card.selected .appearance-check { display: block; }
.appearance-grid.complete-rigs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.appearance-grid.complete-rigs .appearance-card { min-height: 160px; }
.appearance-grid.complete-rigs img { height: 104px; }
.appearance-sheet button:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 3px; }
@container reel-rich (max-width: 360px) {
  .appearance-grid:not(.complete-rigs) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appearance-categories button { font-size: .68rem; }
}

/* ==== card-layout ==== */
/* The original illustrated card is the template for every equipment tier. */
.dock-heading {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.6fr);
  gap: 4px;
}
.dock-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}
.auto-quick-toggle,
.auto-quick-toggle.locked,
.collection-button {
  width: auto;
  min-width: 0;
  padding-inline: 2px;
}
.collection-button { justify-content: center; }
.collection-button > span:not(.controller-button-hint) { width: clamp(20px, 6cqw, 31px); }
html, .app { touch-action: manipulation; }
.app, .app * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.upgrade-main { display: contents; }
.upgrade-card,
.upgrade-card.can-buy,
.upgrade-card:disabled {
  --upgrade-card-width: 126px;
  --upgrade-name-left: 57%;
  --upgrade-name-right: 4%;
  min-height: 0;
  height: auto;
  aspect-ratio: 1136 / 1560;
}
.gear-illustration,
.rod-illustration,
.hook-illustration,
.boat-illustration {
  position: absolute;
  top: 18.5%;
  bottom: auto;
  right: auto;
  left: 14%;
  width: 36%;
  height: 30%;
  min-height: 0;
  aspect-ratio: auto;
  transform: none;
  background-size: contain;
  background-position: center;
}
.hook-illustration { left: 14.75%; width: 34.5%; }
.boat-illustration { left: 9%; width: 46%; top: 15.5%; height: 36%; }

/* Inset the requested names without changing the approved icon geometry. */
#fisherUpgrade[data-tier="3"],
#fisherUpgrade[data-tier="4"],
#fisherUpgrade[data-tier="7"],
#fisherUpgrade[data-tier="11"],
#fisherUpgrade[data-tier="12"],
#rodUpgrade[data-tier="10"],
#rodUpgrade[data-tier="11"],
#rodUpgrade[data-tier="12"] {
  --upgrade-name-left: 49%;
  --upgrade-name-right: 8%;
}
#boatUpgrade[data-tier="3"],
#boatUpgrade[data-tier="4"],
#boatUpgrade[data-tier="5"],
#boatUpgrade[data-tier="6"],
#boatUpgrade[data-tier="9"],
#boatUpgrade[data-tier="11"],
#boatUpgrade[data-tier="12"] {
  --upgrade-name-left: 53.5%;
  --upgrade-name-right: 6.5%;
}
.upgrade-card[data-tier="8"] { --tier-color: #bd4a31; }

.upgrade-copy,
#fisherUpgrade .upgrade-copy,
.boat-upgrade .upgrade-copy {
  position: absolute;
  top: 21%;
  right: var(--upgrade-name-right);
  bottom: auto;
  left: var(--upgrade-name-left);
  width: auto;
  height: 25%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  min-width: 0;
  overflow: visible;
}
.upgrade-copy strong,
#fisherUpgrade .upgrade-copy strong {
  width: max-content;
  min-height: 0;
  margin: 0;
  overflow: visible;
  overflow-wrap: normal;
  white-space: pre;
  text-align: center;
  font-size: calc(var(--upgrade-card-width) * .08);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.015em;
  transform: scaleX(var(--upgrade-title-fit, 1));
  transform-origin: center;
}
.upgrade-card > em,
.boat-upgrade > em {
  top: 51%;
  right: auto;
  left: 50%;
  width: max-content;
  min-height: 0;
  overflow: visible;
  font-size: calc(var(--upgrade-card-width) * .077);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.018em;
  white-space: pre;
  text-align: center;
  transform: translateX(-50%) scaleX(var(--upgrade-effect-fit, 1));
  transform-origin: center;
}
.upgrade-action {
  top: 68.6%;
  right: 10%;
  bottom: auto;
  left: 10%;
  height: 15.2%;
  min-height: 0;
  display: grid;
  grid-template-columns: 26% 37% 37%;
  grid-template-rows: 1fr;
  align-items: center;
  justify-content: stretch;
  justify-items: center;
  gap: 0;
  padding: 0;
  overflow: visible;
  transform: none;
}
.upgrade-arrow {
  width: calc(var(--upgrade-card-width) * .18);
  height: calc(var(--upgrade-card-width) * .18);
  flex: none;
  transform: none;
  grid-row: 1;
}
.upgrade-action > b,
.upgrade-cost {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  flex: none;
  white-space: nowrap;
  font-family: "Arial Narrow", "Trebuchet MS", sans-serif;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -.025em;
  text-align: center;
  grid-row: 1;
  transform-origin: center;
}
.upgrade-action > b {
  grid-column: 2;
  font-size: calc(var(--upgrade-card-width) * .07);
  transform: scaleX(var(--upgrade-label-fit, 1));
}
.upgrade-cost {
  grid-column: 3;
  font-size: calc(var(--upgrade-card-width) * .09);
  transform: scaleX(var(--upgrade-cost-fit, 1));
}
.upgrade-slot > .card-kind {
  margin-top: -3%;
  width: 74%;
  min-width: 0;
  height: calc(var(--upgrade-card-width, 126px) * .2);
  font-size: calc(var(--upgrade-card-width, 126px) * .077);
}

@container reel-rich (min-aspect-ratio: 1/1) and (max-height: 780px) {
  .app {
    grid-template-columns: minmax(0, 1fr) minmax(352px, 47%);
    grid-template-rows: auto minmax(0, 1fr);
    max-width: 1100px;
  }
  .hud { grid-column: 1 / -1; }
  .scene { grid-column: 1; grid-row: 2; min-height: 0; }
  .dock { grid-column: 2; grid-row: 2; align-self: center; }
  .gear-banner { height: 34px; }
  .dock-heading { margin: 0; }
}
/* Available upgrades reuse the exact illustrated controller-selection contour
   in every CrazyGames layout, including landscape mouse/keyboard play.
   can-buy is updated by the existing affordability logic after every catch,
   purchase and save restore; maxed cards and controller focus stay separate. */
  body:not(.controller-mode) .upgrade-card.can-buy:not(:disabled)::after {
    content: "";
    display: block;
    position: absolute;
    z-index: 9;
    inset: 5% 0;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: url("./assets/ui/desktop-card-selection.svg") center / 110% 100% no-repeat;
    opacity: 1;
    transform: none;
    animation: none;
    pointer-events: none;
  }


/* Grey card artwork signals that funds are short; equipment and prices stay legible. */
#app.app .upgrade-card:not(.can-buy) {
  isolation: isolate;
  background-image: none;
  filter: none;
  animation: none;
  cursor: default;
}
#app.app .upgrade-card:not(.can-buy)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("./assets/ui/upgrade-card-shell-v1.webp");
  background-position: inherit;
  background-size: inherit;
  background-repeat: no-repeat;
  filter: grayscale(1) brightness(.94);
  pointer-events: none;
}
#app.app .upgrade-card:not(.can-buy) .upgrade-cost,
#app.app .upgrade-card:not(.can-buy) .upgrade-action > b {
  color: #e2e5d7;
  opacity: 1;
  animation: none;
}

/* ==== portal-viewport ==== */
/* One vertical game stage, fitted uniformly to the portal's available space. */
.game-viewport {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 768px;
  height: 1024px;
  container-name: reel-rich;
  container-type: size;
  transform: translate(-50%, -50%) scale(var(--game-scale, 1));
  transform-origin: center;
}
.game-viewport > .app {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
}
/* CrazyGames places its controls above this frame and handles the top inset. */
.game-viewport .hud { padding-top: 10px; }
.game-viewport .collection-button { justify-content: center; }
body::before { display: block; }

/* ==== cast-label ==== */
/* Shared casting lettering. Responsive font sizes remain in their own layouts. */
.cast-button > #castButtonText,
#powerCastPanel :is(.power-cast-title, .power-cast-time),
#useBoostButton :is(.power-cast-title, .power-cast-time) {
  color: #fffdf0;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-style: italic;
  font-weight: 1000;
  -webkit-text-stroke: var(--cast-caption-outline, 1.2px) var(--ink);
  paint-order: stroke fill;
  text-shadow: var(--cast-caption-shadow-x, 1px) var(--cast-caption-shadow-y, 3px) 0 var(--ink);
}
/* Keep every main cast caption on one line inside the illustrated button. */
.cast-button > #castButtonText { white-space: nowrap; text-transform: uppercase; }

/* Match the available-upgrade gold contour while pointing out the first cast. */
.cast-button.cast-guide:not(:disabled)::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  background: url("./assets/ui/cast-start-glow.svg") center / 100% 100% no-repeat;
  pointer-events: none;
  filter: drop-shadow(0 0 4px #ffe68e) drop-shadow(0 0 10px #ffc33c);
  animation: castStartGlow 1.15s ease-in-out infinite;
}
@keyframes castStartGlow {
  0%, 100% { opacity: .9; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cast-button.cast-guide:not(:disabled)::after { animation: none; }
}

/* ==== controller ==== */
.controller-button-hint {
  display: none; position: absolute; z-index: 8; min-width: 23px; padding: 3px 5px;
  border: 2px solid #fff5ca; border-radius: 6px; background: #183c44; color: #fff5ca;
  font: 900 11px/1.1 system-ui,sans-serif; box-shadow: 0 1px 3px #001b26;
  pointer-events: none; text-align: center;
}
/* Hints belong to controller play; generic icon spans must never reveal them. */
body:not(.controller-mode) .controller-button-hint,
.controller-button-hint:empty { display: none !important; }
body.controller-mode .controller-button-hint { display: block; }
body.controller-mode .controller-selected {
  outline: 3px solid #ffe36b !important; outline-offset: 3px;
}
body.controller-mode .controller-selected:not(.gilded-caught) {
  box-shadow: 0 0 0 6px #12323e !important;
}
body.controller-mode .controller-selected:disabled { opacity: .9; }
/* The card shell has transparent gutters. Outline its visible face rather
   than the extra teal above and below the button's hit area. */
body.controller-mode .upgrade-card.controller-selected {
  outline: none !important;
  box-shadow: none !important;
}
body.controller-mode .upgrade-card.controller-selected::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 9;
  inset: 5% 0;
  width: auto;
  height: auto;
  border: 3px solid #ffe36b;
  border-radius: 0;
  box-shadow: 0 0 0 2px #12323e;
  background: none;
  opacity: 1;
  transform: none;
  animation: none;
  pointer-events: none;
}
body.controller-mode .location-card,
body.controller-mode .icon-button,
body.controller-mode .collection-button,
body.controller-mode .auto-quick-toggle { position: relative; }
/* Leave the right-hand bolt in the shared button artwork unobstructed. */
#castButton .controller-button-hint { right: max(12%, 32px); top: 50%; transform: translateY(-50%); }
body.controller-mode #castButton > #castButtonText { right: max(25%, 70px); }
#locationButton .controller-button-hint { right: 8px; top: -8px; padding: 2px 4px; font-size: 9px; }
/* Do not inherit the Fish Book image span's fixed dimensions. */
#collectionButton .controller-button-hint { right: 4px; top: -20px; width: auto; height: auto; }
body.controller-mode #autoQuickToggle { overflow: visible; }
#autoQuickToggle .controller-button-hint { left: 4px; top: -14px; padding: 2px 4px; font-size: 9px; }
#settingsButton .controller-button-hint { right: 2px; bottom: -9px; font-size: 8px; }
#powerCastPanel .controller-button-hint { right: 3px; top: 3px; padding: 1px 3px; min-width: 16px; font-size: 8px; border-width: 1px; }
body.controller-mode .sheet { scroll-padding: 12px; }


/* Light the illustrated wood contour, not the rectangular button hit area. */
body.controller-mode .upgrade-card.controller-selected {
  outline: none !important;
  box-shadow: none !important;
}
body.controller-mode .upgrade-card.controller-selected::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 9;
  inset: 5% 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: url("./assets/ui/desktop-card-selection.svg") center / 110% 100% no-repeat;
  opacity: 1;
  transform: none;
  animation: none;
  pointer-events: none;
}

body.controller-mode, body.controller-mode * { cursor: none !important; }
body.controller-mode .portal-window-actions button.controller-selected { outline: 2px solid #ffe36b !important; outline-offset: 1px; box-shadow: 0 0 8px #ffe36b66 !important; }

/* ==== reel-timing ==== */
/* Manual reel HUD: the existing illustrated CAST button stays in its place. */
.reel-timing {
  position: absolute;
  z-index: 32;
  left: 50%;
  transform: translateX(-50%);
  width: 68%;
  height: 34px;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(0 2px 0 rgba(23, 42, 49, .35));
}
.reel-timing[hidden] { display: none; }
.reel-timing__track {
  box-sizing: border-box;
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 15px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  overflow: hidden;
}
.reel-timing__green {
  position: absolute;
  z-index: 2;
  top: 4px;
  height: 27px;
  background: var(--green);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: inset 0 2px 0 rgba(255, 253, 241, .6);
}
.reel-timing::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 10px;
  height: 15px;
  left: calc(50% - 1px);
  width: 2px;
  background: var(--yellow);
}
.reel-timing__runner {
  position: absolute;
  top: 0;
  width: 0;
  height: 34px;
  will-change: width;
}
.reel-timing__runner::before {
  content: "";
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  top: 10px;
  height: 15px;
  width: 100%;
  background: var(--teal-bright);
  border: 2px solid var(--ink);
  border-radius: 5px;
  box-shadow: inset 0 2px 0 rgba(255, 253, 241, .55);
}
.reel-timing__runner::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
  z-index: 3;
  top: 7px;
  width: 4px;
  height: 21px;
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: 2px;
}
.reel-timing__left { left: 0; }
.reel-timing__right { right: 0; }
.reel-timing__left::before { left: 0; }
.reel-timing__right::before { right: 0; }
.reel-timing__left::after { right: -2px; }
.reel-timing__right::after { left: -2px; }
.reel-timing.resolved { opacity: .7; }
.cast-button[data-reel-grade] { filter: none; }
.cast-button[data-reel-grade="perfect"] { filter: hue-rotate(126deg) saturate(1.2); }
.cast-button[data-reel-grade] > #castButtonText { animation: reelGradePop .42s ease-out; text-transform: none; }
.cast-button[data-reel-grade="perfect"] > #castButtonText { color: var(--yellow); }
.cast-button[data-reel-grade="great"] > #castButtonText { color: var(--green); }
.cast-button[data-reel-grade="good"] > #castButtonText { color: var(--paper-bright); }
.cast-button[data-reel-grade="miss"] > #castButtonText { color: #ffd7bf; }
.catch-toast .catch-perfect-bonus {
  font-size: .7rem;
  font-weight: 1000;
  line-height: 1.3;
  color: var(--yellow);
  -webkit-text-stroke: .35px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 1px 0 rgba(23, 42, 49, .45);
  white-space: nowrap;
}
.catch-perfect-bonus[hidden] { display: none; }
.scene.line-snapped .hooked-fish { animation: fishSlipAway .45s ease-in forwards; }
.scene.line-snapped .bobber { animation: none; }
.scene.line-snapped .fishing-line { opacity: 1; }
@keyframes reelGradePop {
  0% { transform: translateY(-50%) skewX(-4deg) scale(.9); }
  55% { transform: translateY(-50%) skewX(-4deg) scale(1.09); }
  100% { transform: translateY(-50%) skewX(-4deg) scale(1); }
}
@keyframes fishSlipAway {
  0% { translate: 0 0; opacity: 1; }
  100% { translate: 45px 32px; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cast-button[data-reel-grade] > #castButtonText { animation: none; }
  .scene.line-snapped .hooked-fish { animation-duration: .15s; }
}

/* ==== rod-connections ==== */
/* The line pivots at its top center, on the actual guide of the rendered rod.
   Lure sway pivots at its eye, keeping both ends joined during recovery. */
.rod-tackle::before { top: 0; }
.rod-flex-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
.rod-flex-canvas[hidden] { display: none; }
.fishing-motion-canvas { position: absolute; left: -3.333333%; top: -5%; width: 106.666667%; height: 110%; pointer-events: none; z-index: 1; }
.fishing-motion-canvas[hidden] { display: none; }
.articulated-cast-canvas { position: absolute; left: -16.666667%; top: -75%; width: 133.333333%; height: 200%; pointer-events: none; z-index: 4; }
.articulated-cast-canvas[hidden] { display: none; }
.articulated-cast-active > :is(.angler-layer,.rod-layer,.rod-flex-canvas) { visibility: hidden !important; }

/* Keep the animated waterline below the boat, while allowing the rod to
   sweep above and beside the original static sprite rectangle. */
.rig-art.articulated-cast-active { animation-name: articulatedHullSurfaceClip; }
@keyframes articulatedHullSurfaceClip {
  0%, 100% {
    -webkit-clip-path: polygon(
      -20% -80%, 120% -80%, 120% var(--hull-waterline), 100% var(--hull-waterline),
      93% calc(var(--hull-waterline) - var(--surface-chop)),
      84% calc(var(--hull-waterline) + var(--surface-chop)),
      74% var(--hull-waterline),
      64% calc(var(--hull-waterline) - var(--surface-chop)),
      53% calc(var(--hull-waterline) + var(--surface-chop)),
      42% var(--hull-waterline),
      31% calc(var(--hull-waterline) - var(--surface-chop)),
      20% calc(var(--hull-waterline) + var(--surface-chop)),
      9% calc(var(--hull-waterline) - var(--surface-chop)),
      0 var(--hull-waterline), -20% var(--hull-waterline)
    );
    clip-path: polygon(
      -20% -80%, 120% -80%, 120% var(--hull-waterline), 100% var(--hull-waterline),
      93% calc(var(--hull-waterline) - var(--surface-chop)),
      84% calc(var(--hull-waterline) + var(--surface-chop)),
      74% var(--hull-waterline),
      64% calc(var(--hull-waterline) - var(--surface-chop)),
      53% calc(var(--hull-waterline) + var(--surface-chop)),
      42% var(--hull-waterline),
      31% calc(var(--hull-waterline) - var(--surface-chop)),
      20% calc(var(--hull-waterline) + var(--surface-chop)),
      9% calc(var(--hull-waterline) - var(--surface-chop)),
      0 var(--hull-waterline), -20% var(--hull-waterline)
    );
  }
  50% {
    -webkit-clip-path: polygon(
      -20% -80%, 120% -80%, 120% var(--hull-waterline-raised), 100% var(--hull-waterline-raised),
      92% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      83% var(--hull-waterline-raised),
      73% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      62% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      51% var(--hull-waterline-raised),
      40% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      29% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      18% var(--hull-waterline-raised),
      8% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      0 var(--hull-waterline-raised), -20% var(--hull-waterline-raised)
    );
    clip-path: polygon(
      -20% -80%, 120% -80%, 120% var(--hull-waterline-raised), 100% var(--hull-waterline-raised),
      92% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      83% var(--hull-waterline-raised),
      73% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      62% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      51% var(--hull-waterline-raised),
      40% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      29% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      18% var(--hull-waterline-raised),
      8% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      0 var(--hull-waterline-raised), -20% var(--hull-waterline-raised)
    );
  }
}

/* ==== portal-layout ==== */
/* Approved Test 6 artwork and proportions, responsive to the portal stage. */
:root {
  --desktop-panel-paper:
    radial-gradient(ellipse at 18% 24%, rgba(128, 82, 35, .1) 0 2px, transparent 3px),
    radial-gradient(ellipse at 81% 72%, rgba(128, 82, 35, .08) 0 3px, transparent 4px),
    repeating-linear-gradient(2deg, rgba(137, 92, 44, .045) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #fff8df 0%, #f5e6be 100%);
}
/* Share the location lettering while retaining each label's size and color. */
.app :is(.money-label, .location-label) { color: #000; }
.app :is(#bankValue, #offlineMoney, #locationName, .haul-heading .eyebrow, .haul-earnings-label, .haul-earnings p, #collectionTitle, #travelTitle, .money-label, .location-label, .travel-card-copy strong, .travel-card-copy small) {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  font-style: normal;
  letter-spacing: -.025em;
  paint-order: stroke fill;
}
.app :is(#bankValue, #offlineMoney, #locationName, .haul-heading .eyebrow, .haul-earnings-label, .haul-earnings p, #collectionTitle, #travelTitle) {
  color: #6a3817;
  -webkit-text-stroke: .02em #54260f;
  text-shadow: 0 -.035em 0 #341708, 0 .045em 0 #ffedb2, .025em .055em 0 #e7bc78;
}
.app :is(.money-label, .location-label, .travel-card-copy strong, .travel-card-copy small) {
  -webkit-text-stroke: .02em color-mix(in srgb, currentColor 70%, #000);
  text-shadow: 0 -.035em 0 color-mix(in srgb, currentColor 45%, #000),
    0 .045em 0 #ffedb2, .025em .055em 0 #e7bc78;
}
.app :is(#bankValue, #offlineMoney) {
  color: #287941;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-weight: 1000;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "onum" 0, "tnum" 1;
  -webkit-text-stroke: .02em #18462a;
  text-shadow: 0 -.04em 0 #123e25, 0 .045em 0 #fff2bd, .025em .055em 0 #d2ddb4;
}
/* Center each water name and travel action beneath its photo. */
.app .travel-card-copy { text-align: center; }
/* Frame each water's actual shoreline scenery in its map card. */
.app .travel-card img {
  height: clamp(84px, 12cqw, 140px);
  object-position: center 28%;
}
.app .travel-card[data-tier="3"] img { object-position: center 24%; }
.app .travel-card[data-tier="12"] img { object-position: center 18%; }
/* Each landmark shares its halo color with that water's Adventure Map name. */
.app .location-pin {
  --water-color: var(--tier-1);
  color: var(--water-color);
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--water-color) 28%, #fff5d4),
    color-mix(in srgb, var(--water-color) 68%, #174e59));
  box-shadow: inset 0 0 0 1px #fff5d488,
    0 0 0 1px var(--water-color),
    0 0 7px 1px color-mix(in srgb, var(--water-color) 65%, transparent);
}
.app .location-pin img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@container reel-rich (max-width: 370px) and (max-aspect-ratio: 1/1) {
  .app:not([data-layout="wide"]) .area-banner {
    top: 8px;
    width: min(72%, 270px);
    min-width: 0;
    padding: 4px 9px 5px;
    border-width: 2px;
    border-radius: 10px;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .app:not([data-layout="wide"]) .area-banner span {
    font-size: 8.5px;
    line-height: 1.1;
  }
  .app:not([data-layout="wide"]) .area-banner strong {
    font-size: 12px;
    line-height: 1.1;
  }
}
.desktop-dock-content { display: contents; }
.portal-window-actions { display: none; }
.app[data-layout="wide"] .dock { position: relative; padding: 0; }
.app[data-layout="wide"] .desktop-dock-content { position: relative; width: 100%; }
.app[data-layout="wide"] .portal-window-actions { display: flex; align-items: center; }
.portal-window-actions button { border-radius: 7px; font-weight: 800; }
.portal-window-actions button:hover { filter: brightness(1.12); }
.portal-window-actions button[hidden] { display: none; }
.auto-quick-label { width: max-content; max-width: none; white-space: nowrap; font-size: .48rem; letter-spacing: 0; }
.app[data-layout="wide"] .location-label { white-space: nowrap; }
.portal-control-guide { line-height: 1.4; }
.app :is(.money-card, .location-card, .icon-button, .auto-quick-toggle) {
  background: var(--desktop-panel-paper);
}
.app :is(.money-card strong, .catch-toast > b) {
  color: #287941;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  font-weight: 1000;
  letter-spacing: -.025em;
  -webkit-text-stroke: .65px #18462a;
  paint-order: stroke fill;
  text-shadow: 0 .7px 0 #123e25, 0 -.6px 0 #fff2bd;
}
.app .auto-quick-toggle.locked { opacity: 1; }
.app .auto-quick-label { font-size: 9px; letter-spacing: 0; }
/* Cut the existing Auto Fish lettering into the paper plaque. */
.app #autoQuickToggle :is(.auto-quick-label, .auto-quick-state) {
  -webkit-text-stroke: .018em currentColor;
  paint-order: stroke fill;
  text-shadow: 0 -.06em 0 #193235, 0 .085em 0 #fffcef, .035em .1em 0 #d5bf91;
}
/* Follow the rounded stat-card contour with the selection highlight's soft,
   warm light, tinted by the existing rarity palette. */
.app .catch-toast {
  --catch-glow-color: color-mix(in srgb, var(--tier-color, var(--tier-1)) 78%, #f7d490);
  box-shadow:
    4px 4px 0 var(--ink),
    0 0 0 1.25px color-mix(in srgb, var(--catch-glow-color) 94%, transparent),
    0 0 8px 2px color-mix(in srgb, var(--catch-glow-color) 42%, transparent);
}
.app .catch-toast::after { content: none; display: none; }
/* Two separate round thoughts replace the speech pointer. */
.app .area-banner::before,
.app .area-banner::after {
  content: "";
  position: absolute;
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 1px 1px 0 var(--ink);
  transform: none;
  pointer-events: none;
}
.app .area-banner::before {
  left: 79%;
  bottom: -9px;
  width: 7px;
  height: 7px;
}
.app .area-banner::after {
  left: calc(79% + 9px);
  bottom: -15px;
  width: 4px;
  height: 4px;
  border-width: 1px;
}
.app[data-layout="wide"] .area-banner.joke-pop,
.app[data-layout="wide"] .area-banner.traveling {
  animation: desktopWisdomPop .4s ease-out both;
}
@keyframes desktopWisdomPop {
  0% { opacity: .55; transform: scale(.96); }
  60% { opacity: 1; transform: scale(1.01); }
  100% { opacity: 1; transform: scale(1); }
}

/* Soft curved reflections replace the detached, horizontally drifting dashes. */
.app .water-surface { inset: 55% 0 8%; }
.app .water-surface > i { display: none; }
.app .water-surface::before,
.app .water-surface::after {
  content: "";
  position: absolute;
  inset: 4% 0 0;
  pointer-events: none;
  transform-origin: 50% 60%;
}
.app .water-surface::before {
  background:
    radial-gradient(ellipse 32% 18% at 23% 57%, #abedff12, transparent 75%),
    radial-gradient(ellipse 30% 15% at 79% 80%, #bdefff10, transparent 75%);
  animation: desktopWaterGlow 6.4s ease-in-out infinite alternate;
}
.app .water-surface::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 280'%3E%3Cdefs%3E%3ClinearGradient id='glow'%3E%3Cstop stop-color='%23c7f5ff' stop-opacity='0'/%3E%3Cstop offset='.45' stop-color='%23c7f5ff' stop-opacity='.26'/%3E%3Cstop offset='1' stop-color='%23c7f5ff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='url(%23glow)'%3E%3Cpath d='M18 46 Q57 28 99 47 Q57 38 18 46Z'/%3E%3Cpath d='M363 65 Q400 47 443 67 Q398 57 363 65Z'/%3E%3Cpath d='M52 155 Q107 127 164 155 Q107 142 52 155Z'/%3E%3Cpath d='M336 181 Q379 155 424 180 Q379 168 336 181Z'/%3E%3Cpath d='M208 225 Q252 206 292 226 Q250 216 208 225Z'/%3E%3Cpath d='M416 243 Q453 224 489 244 Q451 235 416 243Z'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
  animation: desktopWaterBreathe 5.8s -2.1s ease-in-out infinite alternate;
}
@keyframes desktopWaterGlow {
  from { opacity: .5; transform: scale(1); }
  to { opacity: .85; transform: scale(1.035, 1.02); }
}
@keyframes desktopWaterBreathe {
  from { opacity: .45; transform: translateY(1px) scaleX(.98); }
  to { opacity: .85; transform: translateY(-2px) scaleX(1.015); }
}
@media (prefers-reduced-motion: reduce) {
  .app .area-banner.joke-pop,
  .app .area-banner.traveling,
  .app .water-surface::before,
  .app .water-surface::after { animation: none; }
}

/* Approved widescreen placement: the original scene fills the upper 75%,
   with status/travel, proportional equipment, and casting below it. */
.desktop-hud-left, .desktop-hud-right, .desktop-hud-frame { display: none; }

body.portal-wide::before { display: none; }
.app[data-layout="wide"] {
  width: 100%;
  max-width: none;
  height: 100cqh;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 3fr) minmax(0, 1fr);
  border: 0;
  box-shadow: none;
}
.app[data-layout="wide"] .scene { grid-column: 1; grid-row: 1; }
/* Catch results have their own space away from the fisherman's thoughts. */
.app[data-layout="wide"] .catch-toast {
  top: 18px;
  left: auto;
  right: 22px;
  transform: translateY(-16px) rotate(.5deg);
}
.app[data-layout="wide"] .catch-toast.show { transform: translateY(0) rotate(.5deg); }
.app[data-layout="wide"] .scene-art {
  object-fit: cover;
  object-position: center 42%;
}
.app[data-layout="wide"] .boat-wrap {
  width: min(56cqw, 75cqh);
  bottom: 12%;
}
.app[data-layout="wide"] .area-banner {
  left: auto;
  right: 48%;
  top: 0;
  max-width: 48%;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 3px 3px 0 var(--ink);
}
.app[data-layout="wide"] .area-banner span { font-size: 7.5px; }
.app[data-layout="wide"] .area-banner strong { font-size: 16px; }
.app[data-layout="wide"] .boat-wrap:is(.boat-tier-7, .boat-tier-8, .boat-tier-9, .boat-tier-10, .boat-tier-11, .boat-tier-12) .area-banner { right: 62%; }
.app[data-layout="wide"] .area-banner::before { left: auto; right: 26px; }
.app[data-layout="wide"] .area-banner::after { left: auto; right: 13px; }
.app[data-layout="wide"] .reel-timing {
  bottom: calc(20px + var(--power-controls-height, 0px) + 8px) !important;
  width: min(36%, 420px) !important;
}
.app[data-layout="wide"] .dock {
  --desktop-dock-scale: 1;
  --desktop-card-width: min(calc((25cqh - 18px) * .644), calc((36cqw - 90px) / 3));
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
  height: auto;
  min-height: 0;
  border-top: 4px solid transparent;
  box-shadow: none;
}
.app[data-layout="wide"] .desktop-hud-frame {
  display: block;
  position: absolute;
  z-index: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.app[data-layout="wide"] .desktop-dock-content {
  z-index: 1;
  inset: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 30fr) minmax(0, 36fr) minmax(0, 34fr);
  align-items: center;
  padding: 6px 20px;
  transform: none;
}
.app[data-layout="wide"] .dock-heading { display: none; }
.app[data-layout="wide"] :is(.desktop-hud-left, .desktop-hud-right) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 100%;
  padding-inline: 22px;
}
.app[data-layout="wide"] .desktop-hud-left {
  border-right: 4px solid transparent;
  box-shadow: none;
}
.app[data-layout="wide"] .desktop-hud-right {
  border-left: 4px solid transparent;
  box-shadow: none;
}
.app[data-layout="wide"] .hud {
  width: min(100%, 250px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  grid-template-rows: 45px 38px;
  gap: 5px;
  padding: 0;
  background: none;
  border: 0;
  z-index: 1;
}
.app[data-layout="wide"] .money-card { grid-column: 1 / -1; }
.app[data-layout="wide"] :is(.money-card, .location-card, .icon-button) {
  min-height: 0;
  border-width: 2px;
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink);
}
.app[data-layout="wide"] .bank-cash { width: 34px; height: 34px; }
.app[data-layout="wide"] .money-label { font-size: 9px; text-align: center; }
.app[data-layout="wide"] .money-card strong { font-size: 21px; text-align: center; }
.app[data-layout="wide"] .location-card { gap: 6px; padding: 3px 7px; }
.app[data-layout="wide"] .location-pin { width: 27px; height: 27px; min-width: 27px; }
.app[data-layout="wide"] .location-label { font-size: 8px; }
.app[data-layout="wide"] .location-card strong { font-size: 12px; margin-top: 2px; }
.app[data-layout="wide"] .location-arrow { font-size: 20px; line-height: 1; }
.app[data-layout="wide"] #locationButton .controller-button-hint { top: -14px; }
.app[data-layout="wide"] #autoQuickToggle .controller-button-hint { top: -17px; }
.app[data-layout="wide"] .icon-button { padding: 5px 0 12px; }
.app[data-layout="wide"] .icon-button svg { width: 18px; height: 18px; }
.app[data-layout="wide"] #settingsButton .controller-button-hint {
  bottom: -5px;
  min-width: 18px;
  padding: 1px 2px;
  border-width: 1px;
  font-size: 7px;
}
.app[data-layout="wide"] .gear-banner {
  width: min(100%, 200px);
  height: 42px;
  min-height: 0;
  flex: none;
}
.app[data-layout="wide"] .gear-progress {
  width: 118px;
  height: 24px;
  min-height: 0;
  flex: none;
}
.app[data-layout="wide"] .upgrade-grid {
  width: calc(var(--desktop-card-width) * 3 + 32px);
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  justify-self: center;
  gap: 16px;
  margin: 0;
  padding: 0;
}
.app[data-layout="wide"] .upgrade-slot { min-width: 0; }
.app[data-layout="wide"] .cast-button {
  position: relative;
  left: auto;
  bottom: auto;
  width: min(100%, 330px);
  height: 76px;
  flex: none;
  transform: rotate(-.5deg);
}
.app[data-layout="wide"] .cast-button:active:not(:disabled),
.app[data-layout="wide"] .cast-button.pressed { transform: translateY(3px) rotate(-.5deg); }
.app[data-layout="wide"] .cast-button.bite { animation-name: desktopWideBitePulse; }
@keyframes desktopWideBitePulse {
  0%, 100% { transform: rotate(-.5deg) scale(1); }
  50% { transform: rotate(.5deg) scale(1.035); }
}
.app[data-layout="wide"] .cast-icon { width: 54px; height: 52px; }
.app[data-layout="wide"] .cast-button > #castButtonText { font-size: 28px; }
.app[data-layout="wide"] .dock-actions {
  width: min(90%, 270px);
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 8px;
  flex: none;
}
.app[data-layout="wide"] :is(.auto-quick-toggle, .collection-button) { height: 34px; }
.app[data-layout="wide"] .auto-quick-label { font-size: 10px; }
.app[data-layout="wide"] .auto-quick-state { font-size: 8px; }
.app[data-layout="wide"] .portal-window-actions {
  width: min(100%, 330px);
  justify-content: center;
  gap: 5px;
  margin-top: 5px;
  flex: none;
}
.app[data-layout="wide"] .portal-window-actions button {
  min-height: 27px;
  padding: 3px 9px;
  border: 2px solid #173b44;
  color: #f3c845;
  background: linear-gradient(#227db0, #13567b);
  box-shadow: inset 0 1px 0 #77bad580, 1px 2px 0 #173b44;
  font-size: 9px;
}
.app[data-layout="wide"] .portal-window-actions button[aria-pressed="true"] { color: #152c31; background: #f3c845; }
/* Equal side zones center the water copy on the whole card, like BANK. */
#app.app .location-card {
  display: grid;
  grid-template-columns: minmax(30px, 18%) minmax(0, 1fr) minmax(30px, 18%);
  column-gap: 0;
  text-align: center;
}
#app.app .location-card > .location-pin { grid-column: 1; justify-self: start; }
#app.app .location-card > div { grid-column: 2; text-align: center; }
#app.app .location-card > .location-arrow { grid-column: 3; justify-self: end; }
#app.app .location-card :is(.location-label, #locationName) { text-align: center; }
#app.app #settingsButton { display: grid; place-items: center; padding: 0; }
/* The animated surface overrides this same resting outline during play.
   Keep the hull clipped when animation is cancelled, paused or unavailable. */
.app .rig-art {
  -webkit-clip-path: polygon(
    0 0, 100% 0, 100% var(--hull-waterline),
    93% calc(var(--hull-waterline) - var(--surface-chop)),
    84% calc(var(--hull-waterline) + var(--surface-chop)),
    74% var(--hull-waterline),
    64% calc(var(--hull-waterline) - var(--surface-chop)),
    53% calc(var(--hull-waterline) + var(--surface-chop)),
    42% var(--hull-waterline),
    31% calc(var(--hull-waterline) - var(--surface-chop)),
    20% calc(var(--hull-waterline) + var(--surface-chop)),
    9% calc(var(--hull-waterline) - var(--surface-chop)),
    0 var(--hull-waterline)
  );
  clip-path: polygon(
    0 0, 100% 0, 100% var(--hull-waterline),
    93% calc(var(--hull-waterline) - var(--surface-chop)),
    84% calc(var(--hull-waterline) + var(--surface-chop)),
    74% var(--hull-waterline),
    64% calc(var(--hull-waterline) - var(--surface-chop)),
    53% calc(var(--hull-waterline) + var(--surface-chop)),
    42% var(--hull-waterline),
    31% calc(var(--hull-waterline) - var(--surface-chop)),
    20% calc(var(--hull-waterline) + var(--surface-chop)),
    9% calc(var(--hull-waterline) - var(--surface-chop)),
    0 var(--hull-waterline)
  );
}
.rod-flex-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
.rod-flex-canvas[hidden] { display: none; }

/* ==== power-cast ==== */
.power-cast-panel {
  --power-progress: 0;
  position: relative;
  z-index: 17;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  min-height: 69px;
  padding: 10px 13px;
  border: 3px solid #173b44;
  border-radius: 13px;
  color: #fffdf0;
  background: linear-gradient(180deg, #fff9e5, #f8e5ab);
  box-shadow: 3px 4px 0 #173b44, inset 0 1px 0 #fffdf0;
  font-family: "Trebuchet MS", sans-serif;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}
.power-cast-panel[hidden] { display: none; }
.power-cast-panel:disabled { opacity: 1; cursor: default; }
.power-cast-symbol { width: 31px; height: 37px; color: #ecb52d; filter: drop-shadow(1px 2px 0 #173b44); }
.power-cast-copy { min-width: 0; display: grid; justify-items: center; text-align: center; }
.power-cast-title { font-size: 13px; line-height: 1; font-weight: 1000; letter-spacing: .35px; white-space: nowrap; }
.power-cast-time { font-size: 25px; line-height: 1; font-weight: 1000; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.power-cast-progress { position: absolute; left: 11px; right: 11px; bottom: 5px; height: 4px; border-radius: 4px; background: #183d4430; overflow: hidden; }
.power-cast-progress::before { content: ""; display: block; height: 100%; background: #de9d20; transform: scaleX(var(--power-progress)); transform-origin: left; }
.power-cast-panel[data-state="ready"], .power-cast-panel[data-state="queued"], .power-cast-panel[data-state="active"] {
  background: linear-gradient(160deg, #fff6a9, #ffd154 53%, #edac2b);
  box-shadow: 3px 4px 0 #173b44, 0 0 0 3px #fff3a966, 0 0 28px #ffce5280;
}
.power-cast-panel:is([data-state="ready"], [data-state="active"]) .power-cast-title { font-size: 22px; letter-spacing: -.5px; }
.power-cast-panel[data-state="queued"] .power-cast-title { font-size: 14px; }
.power-cast-panel[data-state="ready"]::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 25%, #fff8d780 48%, transparent 67%);
  transform: translateX(-120%); animation: powerSheen 3s ease-in-out infinite;
}
.power-cast-panel:focus-visible { outline: 3px solid #fff9d7; outline-offset: 6px; }
.power-cast-panel:active:not(:disabled) { translate: 0 2px; }
.cast-button.power-active {
  filter: drop-shadow(0 0 7px #ffc849) drop-shadow(0 0 14px #ffd66e88);
}
.scene.power-cast-active .bobber { filter: drop-shadow(0 0 8px #ffcf58); }
.scene.power-cast-active .fishing-line { filter: drop-shadow(0 0 2px #ffdc69); }
.power-cast-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app[data-layout="wide"] .power-cast-panel { min-height: 78px; padding: 12px 15px; }
.app[data-layout="wide"] .power-cast-title { font-size: 15px; }
.app[data-layout="wide"] .power-cast-time { font-size: 31px; }
.app[data-layout="wide"] .power-cast-panel:is([data-state="ready"], [data-state="active"]) .power-cast-title { font-size: 27px; }
/* Cast stays central; the smaller side controls share its action row. */
.cast-action-row {
  position: absolute;
  z-index: 17;
  left: 10px;
  right: 10px;
  bottom: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 7px;
  pointer-events: none;
}
.power-cast-controls { display: contents; }
.power-cast-controls[hidden] { display: none; }
#castActionRow > .cast-button {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  left: auto;
  bottom: auto;
  width: 100%;
  min-width: 0;
  transform: rotate(-.5deg);
  pointer-events: auto;
}
#castActionRow > .cast-button:active:not(:disabled),
#castActionRow > .cast-button.pressed {
  transform: translateY(4px) rotate(-.3deg);
}
#castActionRow > .cast-button.bite { animation-name: castRowBitePulse; }
@keyframes castRowBitePulse {
  0%, 100% { transform: rotate(-.5deg) scale(1); }
  50% { transform: rotate(.5deg) scale(1.025); }
}
#castActionRow .cast-icon { width: 48px; height: 46px; left: 9%; }
#castActionRow #castButtonText { left: 27%; right: 8%; }
#castActionRow .power-cast-panel {
  grid-row: 1;
  width: 100%;
  height: 60px;
  min-height: 0;
  grid-template-columns: 16px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 3px;
  row-gap: 4px;
  padding: 6px 5px 9px;
  border-width: 2px;
  border-radius: 10px;
  text-align: center;
  pointer-events: auto;
}
#castActionRow #powerCastPanel { grid-column: 1; }
#castActionRow #useBoostButton { grid-column: 3; }
#castActionRow .power-cast-symbol { grid-column: 1; grid-row: 1 / 3; width: 16px; height: 22px; }
#castActionRow .power-cast-copy { grid-column: 2; grid-row: 1; }
#castActionRow .power-cast-time { grid-column: 2; grid-row: 2; font-size: 16px; letter-spacing: -.045em; }
#castActionRow .power-cast-title { font-size: 12px; line-height: 1.05; white-space: normal; }
#castActionRow .power-cast-progress { left: 5px; right: 5px; bottom: 3px; height: 3px; }
.boost-button:disabled { filter: grayscale(1); opacity: .65; cursor: default; }
.app[data-layout="wide"] .cast-action-row {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: min(100%, 390px);
  flex: none;
  column-gap: 6px;
}
.app[data-layout="wide"] #castActionRow > .cast-button { height: 76px; }
.app[data-layout="wide"] #castActionRow #castButtonText { font-size: 20px; }
.app[data-layout="wide"] #castActionRow .cast-icon { width: 36px; height: 34px; left: 7%; }
.app[data-layout="wide"] #castActionRow .power-cast-symbol { display: none; }
.app[data-layout="wide"] #castActionRow .power-cast-panel { grid-template-columns: minmax(0, 1fr); }
.app[data-layout="wide"] #castActionRow :is(.power-cast-copy, .power-cast-time) { grid-column: 1; }
@container reel-rich (max-width: 440px) {
  .app:not([data-layout="wide"]) .cast-action-row { bottom: 18px; column-gap: 6px; }
  .app:not([data-layout="wide"]) #castActionRow .power-cast-panel { height: 48px; grid-template-columns: minmax(0, 1fr); padding: 2px 3px 4px; row-gap: 2px; }
  .app:not([data-layout="wide"]) #castActionRow .power-cast-symbol { display: none; }
  .app:not([data-layout="wide"]) #castActionRow :is(.power-cast-copy, .power-cast-time) { grid-column: 1; }
  .app:not([data-layout="wide"]) #castActionRow .power-cast-title { font-size: 11px; }
  .app:not([data-layout="wide"]) #castActionRow .power-cast-time { font-size: 14px; }
  .app:not([data-layout="wide"]) #castActionRow .cast-icon { width: 38px; height: 36px; left: 6%; }
  .app:not([data-layout="wide"]) #castActionRow #castButtonText { left: 25%; font-size: clamp(18px, 5.2cqw, 23px); }
}
.power-cast-panel[data-state="ready"] {
  border-color: #ffd36a;
  box-shadow: 3px 4px 0 #173b44, 0 0 0 2px #fff0a7, 0 0 15px 4px #ffc33caf, 0 0 34px 10px #ffb92f65;
  animation: powerReadyGlow 1.6s ease-in-out infinite;
}
@keyframes powerReadyGlow {
  0%, 100% { box-shadow: 3px 4px 0 #173b44, 0 0 0 2px #fff0a7, 0 0 15px 4px #ffc33caf, 0 0 34px 10px #ffb92f65; }
  50% { box-shadow: 3px 4px 0 #173b44, 0 0 0 3px #fff4be, 0 0 21px 6px #ffd05ed9, 0 0 46px 13px #ffc33c85; }
}
@keyframes powerSheen { 0%, 30% { transform: translateX(-120%); } 75%, 100% { transform: translateX(120%); } }
/* Caption styling is shared with CAST LINE in cast-label.css in every state.
   Scale only outline/shadow to the existing badge type sizes. */
#powerCastPanel, #useBoostButton {
  --cast-caption-outline: .043em;
  --cast-caption-shadow-x: .036em;
  --cast-caption-shadow-y: .107em;
}
#powerCastPanel :is(.power-cast-title, .power-cast-time),
#useBoostButton :is(.power-cast-title, .power-cast-time) {
  letter-spacing: -.045em;
  line-height: .92;
  transform: skewX(-4deg) scaleX(.93);
  transform-origin: center;
}
/* Lining numerals keep every countdown digit on the same baseline. */
#castActionRow .power-cast-panel .power-cast-time {
  font-family: Arial, sans-serif;
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  letter-spacing: 0;
  line-height: 1;
  transform: none;
  -webkit-text-stroke: .65px var(--ink);
  text-shadow: 0 1px 0 var(--ink);
}
#castActionRow .power-cast-panel[data-state="ready"] {
  box-shadow: 2px 3px 0 #173b44, 0 0 0 1px #fff0a7, 0 0 12px 2px #ffc33c85;
  animation: none;
}
.power-cast-panel[data-state="active"] .power-cast-title {
  animation: powerCastLabelPop .28s cubic-bezier(.2, .8, .35, 1) both;
}
@keyframes powerCastLabelPop {
  0% { opacity: .65; transform: translateY(.14em) skewX(-4deg) scale(.93, .84); }
  60% { opacity: 1; transform: translateY(-.04em) skewX(-4deg) scale(.93, 1.06); }
  100% { opacity: 1; transform: skewX(-4deg) scaleX(.93); }
}
@media (prefers-reduced-motion: reduce) {
  .power-cast-panel, .power-cast-panel::after,
  .power-cast-title, .power-cast-time { animation: none !important; }
}

/* ==== auto-quick-layout ==== */
/* The label and switch always own separate columns, including native zoom. */
#autoQuickToggle { grid-template-columns: minmax(0, 1fr) max-content; }
#autoQuickToggle .auto-quick-copy { width: 100%; min-width: 0; max-width: 100%; grid-template-columns: minmax(0, 1fr); padding-block: 2px; container: auto-quick-copy / inline-size; }
#autoQuickToggle :is(.auto-quick-label, .auto-quick-state) { width: max-content; max-width: none; white-space: nowrap; transform-origin: center; }
#autoQuickToggle .auto-quick-track { justify-self: end; }
@container auto-quick-copy (max-width: 35px) {
  #autoQuickToggle .auto-quick-label { width: min-content; white-space: normal; font-size: 8px; line-height: 1; }
  #autoQuickToggle .auto-quick-state { font-size: 6px; line-height: 1; }
}

/* ==== daily-rewards ==== */
/* The return screen uses the game's painted plank and casting lettering. */
#offlineModal.daily-haul {
  width: min(calc(100% - 20px), 600px);
  height: min(calc(100% - 20px), 950px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url('./assets/ui/upgrade-card-shell-v1.webp') center / 100% 100% no-repeat;
  box-shadow: none;
  transform: translate(-50%, -50%);
  animation: none;
  color: #54371d;
  container-type: inline-size;
  overflow: visible;
  font-family: 'Arial Rounded MT Bold', 'Chalkboard SE', 'Trebuchet MS', sans-serif;
}
.daily-haul .haul-layout {
  position: absolute;
  inset: 9.8% 11% 34%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}
.daily-haul .haul-heading { flex: 0 0 auto; }
.daily-haul .eyebrow { font-size: clamp(10px, 3cqw, 18px); line-height: 1.1; font-weight: 1000; letter-spacing: .045em; color: #6d4727; text-shadow: 0 1px #fff2c7; }
.daily-haul #offlineTitle,
.daily-haul .haul-track strong,
.daily-haul .haul-claim {
  font-family: 'Arial Rounded MT Bold', 'Chalkboard SE', 'Trebuchet MS', sans-serif;
  font-weight: 1000;
  font-style: italic;
  color: #fffdf0;
  -webkit-text-stroke: 1.5px #172a31;
  paint-order: stroke fill;
  text-shadow: 0 2px #172a31, 1px 0 #172a31, -1px 0 #172a31;
  letter-spacing: 0;
}
.daily-haul #offlineTitle { margin: 0; font-size: clamp(18px, 6.5cqw, 39px); line-height: 1.1; }
.daily-haul .haul-content { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.daily-haul .haul-track { padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(3px, 1.16cqw, 7px); list-style: none; text-align: left; }
.daily-haul .haul-track li { position: relative; min-width: 0; }
.daily-haul .haul-reward-inner { min-height: clamp(43px, 14cqw, 84px); padding: clamp(3px, 1cqw, 6px); display: flex; gap: clamp(2px, 1cqw, 6px); align-items: center; background: #fff0c766; border: 2px solid #b78545; border-radius: 8px; }
.daily-haul .haul-day-icon { flex: 0 0 23%; min-width: 0; height: clamp(26px, 8.33cqw, 50px); display: grid; place-items: center; }
.daily-haul .haul-day-icon img { width: 100%; height: 100%; object-fit: contain; }
.daily-haul .haul-day-icon svg { width: clamp(20px, 6.33cqw, 38px); height: clamp(26px, 8cqw, 48px); color: #f3c845; }
.daily-haul .haul-day-copy { min-width: 0; display: grid; gap: 2px; }
.daily-haul .haul-day-copy > span { color: #79502b; font-size: clamp(10px, 2.16cqw, 13px); line-height: 1.05; font-weight: 1000; }
.daily-haul .haul-track strong { font-size: clamp(11px, 3cqw, 18px); line-height: 1.1; -webkit-text-stroke-width: .9px; }
.daily-haul .haul-day-copy small { color: #52391f; font-size: clamp(11px, 2.5cqw, 15px); font-weight: 900; line-height: 1.15; }
.daily-haul .haul-day-copy .haul-day-lock { font-size: clamp(10px, 2.16cqw, 13px); color: #6c4d2c; }
.daily-haul .haul-track li[data-state='today'] .haul-reward-inner { background: #ffe997; border-color: #b5741f; box-shadow: inset 0 0 0 1px #ffcf4f; }
.daily-haul .haul-track li[data-state='claimed'] .haul-reward-inner { filter: grayscale(1); opacity: .5; }
.daily-haul .haul-claimed-check { position: absolute; top: 2px; right: 2px; width: clamp(18px, 4.8cqw, 29px); height: clamp(18px, 4.8cqw, 29px); display: grid; place-items: center; border-radius: 50%; color: #fffdf0; background: #368c36; font-size: clamp(14px, 3.83cqw, 23px); font-weight: 1000; line-height: 1; }
.daily-haul .haul-earnings { font-size: clamp(10px, 2.66cqw, 16px); line-height: 1.1; margin-top: clamp(4px, 1.33cqw, 8px); text-align: center; }
.daily-haul .haul-earnings-label { color: #694728; font-size: clamp(10px, 2.66cqw, 16px); font-weight: 1000; }
.daily-haul #offlineMoney { display: block; margin-top: 2px; font-size: clamp(20px, 5.33cqw, 32px); line-height: 1.1; }
.daily-haul .haul-earnings p { margin: 3px 0 0; color: #694728; font: 800 clamp(10px, 2.66cqw, 16px) 'Trebuchet MS', sans-serif; }
#offlineModal .haul-claim { position: absolute; inset: 67.5% 11% auto; width: 78%; height: 17%; padding: 0 5px; background: transparent; border: 0; border-radius: 0; box-shadow: none; font-size: clamp(20px, 6.5cqw, 39px); cursor: pointer; line-height: 1.05; }
#offlineModal .haul-claim:focus-visible { outline: 3px solid #fffdf0; outline-offset: -10px; }
.appearance-categories { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.appearance-grid.complete-rigs .reward-gear-card { grid-column: 1 / -1; min-height: 160px; opacity: 1; }
.reward-gear-card img { height: 120px; }
.reward-gear-card.locked img { filter: none; }
.reward-gear-card small { white-space: normal; }
.reward-gear-card.locked { cursor: default; }
.reward-gear-lock { font-weight: 900; color: #785529; }
#app[data-layout='wide'] #offlineModal.daily-haul { width: min(calc(100% - 20px), 900px); height: min(calc(100% - 20px), 700px); }
#app[data-layout='wide'] .daily-haul .haul-track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#app[data-layout='wide'] .daily-haul .haul-track strong { font-size: 18px; }
#app[data-layout='wide'] .daily-haul .haul-day-icon { flex-basis: 23%; }
#app[data-layout='wide'] .daily-haul .haul-reward-inner { min-height: 104px; }
@container (max-width: 420px) {
  .daily-haul .haul-day-copy { gap: 1px; }
  .daily-haul .haul-track li:last-child { grid-column: 1 / -1; }
  .daily-haul .haul-track li:last-child .haul-day-icon { flex-basis: 22%; }
}
.daily-haul .haul-day-compact { display: none; }
@container (max-width: 360px) {
  .daily-haul .haul-track { grid-template-columns: 1fr; gap: 2px; }
  .daily-haul .haul-reward-inner { min-height: 31px; padding: 2px 4px; gap: 5px; border-width: 1px; }
  .daily-haul .haul-day-icon,
  .daily-haul .haul-track li:last-child .haul-day-icon { flex: 0 0 30px; height: 25px; }
  .daily-haul .haul-day-icon svg { width: 19px; height: 25px; }
  .daily-haul .haul-day-copy { display: grid; grid-template-columns: max-content 1fr; gap: 0 6px; font-size: 11px; line-height: 1.05; }
  .daily-haul .haul-day-copy > span { font-size: 11px; }
  .daily-haul .haul-track strong { font-size: 11px; }
  .daily-haul .haul-day-copy small:not(.haul-day-compact) { display: none !important; }
  .daily-haul .haul-day-compact { display: block; grid-column: 1 / -1; font-size: 11px; line-height: 1.05; }
  .daily-haul .haul-earnings { margin-top: 4px; font-size: 10px; line-height: 1.1; }
  .daily-haul .haul-earnings p { display: none; }
  .daily-haul .haul-earnings-label { font-size: 10px; }
  .daily-haul #offlineMoney { font-size: 20px; }
}
#app[data-layout='wide'] .daily-haul .haul-day-copy { font-size: 13px; line-height: 1.1; }
#app[data-layout='wide'] .daily-haul .haul-day-copy > span { font-size: 12px; }
#app[data-layout='wide'] .daily-haul .haul-track strong { font-size: 14px; }
#app[data-layout='wide'] .daily-haul .haul-day-copy small { font-size: 13px; }
#app[data-layout='wide'] .daily-haul .haul-day-copy .haul-day-lock { font-size: 12px; }
#app[data-layout='wide'] .daily-haul .haul-day-icon { height: 50px; }
@container reel-rich (max-width: 480px) {
  #offlineModal.daily-haul { height: min(calc(100% - 20px), 760px); }
}

/* ==== fish-book ==== */
/* Collection marks remain independent: gold outside, ice blue inside. */
#collectionGrid .fish-entry { position: relative; }
#collectionGrid .fish-entry.gilded-caught {
  box-shadow:
    inset 0 0 0 1px #ffe59b,
    inset 0 0 8px #f3c84588,
    2px 2px 0 var(--ink),
    0 0 3px #ffe59bee,
    0 0 9px #f3c845aa;
}
#collectionGrid .fish-entry.albino-caught { overflow: visible; }
#collectionGrid .fish-entry.albino-caught::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid #8ce3f1;
  border-radius: 9px;
  box-shadow:
    0 0 2px #d9fbffee,
    0 0 7px #8ce3f1cc,
    inset 0 0 2px #d9fbffee,
    inset 0 0 8px #8ce3f199;
  pointer-events: none;
}
.fish-name-trophy { white-space: nowrap; }
#collectionGrid .fish-name-copy .fish-trophy-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  margin-left: .18em;
  vertical-align: -.12em;
  object-fit: contain;
  transform: none;
}
.detail-fish-gallery { min-width: 0; }
.detail-variant-controls {
  display: grid;
  grid-template-columns: repeat(2, 44px);
  justify-content: center;
  gap: 4px 10px;
}
.detail-variant-controls button {
  width: 44px;
  height: 44px;
  padding: 0 0 4px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  color: #fffdf0;
  background: linear-gradient(180deg, #74ce47, #55b936);
  box-shadow: 2px 3px 0 var(--ink), inset 0 0 0 1px #fffdf066;
  font: 1000 38px/1 'Trebuchet MS', sans-serif;
  -webkit-text-stroke: .6px var(--ink);
  paint-order: stroke fill;
  cursor: pointer;
}
.detail-variant-controls button:active { transform: translate(1px, 2px); box-shadow: 1px 1px 0 var(--ink); }
#detailVariantLabel {
  grid-column: 1 / -1;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  color: var(--teal-dark);
  font-size: .68rem;
  font-weight: 1000;
  text-align: center;
}

/* ==== game-lettering ==== */
/* Shared carved lettering. Sizes and fill colors stay with their existing
   component rules. White reward and casting/claim faces remain untouched. */
#app.app :is(#portalAchievements, #settingsSheet, #settingsSheet *, #achievementSheet, #achievementSheet *),
#app.app :where(*):not(:where(
  #castButton, #castButton *, #powerCastPanel, #powerCastPanel *, #useBoostButton, #useBoostButton *, #reelTiming, #reelTiming *,
  #collectOfflineButton, #collectOfflineButton *, #dailyClaim, #dailyClaim *,
  #offlineTitle, .haul-track strong, .haul-track strong *, .haul-claimed-check
)):not(:has(:where(#castButton, #powerCastPanel, #useBoostButton, #reelTiming, #collectOfflineButton, #dailyClaim,
  #offlineTitle, .haul-track strong, .haul-claimed-check))) {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  font-style: normal;
  letter-spacing: -.025em;
  -webkit-text-stroke: .02em color-mix(in srgb, currentColor 70%, #000);
  paint-order: stroke fill;
  text-shadow: 0 -.035em 0 color-mix(in srgb, currentColor 45%, #000),
    0 .045em 0 #ffedb2, .025em .055em 0 #e7bc78;
}
#app.app .upgrade-action { display: flex; justify-content: center; gap: 0; }
#app.app .upgrade-action .upgrade-cost {
  flex: 0 1 auto;
  margin-inline: auto;
  font-size: calc(var(--upgrade-card-width, 100px) * .12);
  line-height: 1;
  text-align: center;
  transform: none;
}
#app.app .upgrade-card.can-buy::after { content: none; }

/* ==== ambient-birds ==== */
.ambient-bird-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  contain: strict;
}
.ambient-bird-perches {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}
.ambient-perched-bird {
  position: absolute;
  pointer-events: none;
}
.ambient-landing-bird {
  position: absolute;
  z-index: 6;
  transform-origin: 0 0;
  isolation: isolate;
  pointer-events: none;
}
.ambient-landing-bird > canvas {
  position: absolute;
  pointer-events: none;
}
.app.area-11 .ambient-bird-layer { filter: brightness(.72) saturate(.88); }
@media (prefers-reduced-motion: reduce) {
  .ambient-bird-layer, .ambient-bird-perches, .ambient-landing-bird { display: none; }
}

/* ==== rig-motion ==== */
/* Live rig canvas. It covers extra room above and beside the boat so the rod can
   sweep overhead on a back cast; the hull is still cut at the same waterline. */
.rig-motion-canvas {
  position: absolute;
  z-index: 4;
  left: -10%;
  top: -45%;
  width: 120%;
  height: 150%;
  pointer-events: none;
}
.rig-motion-canvas[hidden] { display: none; }
.rig-art.rig-motion > :is(.angler-layer, .rod-layer, .rod-flex-canvas),
.rig-art.rig-motion-master > :is(.master-rig-layer, .rod-flex-canvas) { visibility: hidden !important; }
/* The same waterline cut as before, with room above and beside the box for the
   rod. Applied from the first frame so the cut stays in step with the boat bob. */
.app .rig-art {
  -webkit-clip-path: polygon(
    -12% -48%, 112% -48%, 112% var(--hull-waterline), 100% var(--hull-waterline),
    93% calc(var(--hull-waterline) - var(--surface-chop)),
    84% calc(var(--hull-waterline) + var(--surface-chop)),
    74% var(--hull-waterline),
    64% calc(var(--hull-waterline) - var(--surface-chop)),
    53% calc(var(--hull-waterline) + var(--surface-chop)),
    42% var(--hull-waterline),
    31% calc(var(--hull-waterline) - var(--surface-chop)),
    20% calc(var(--hull-waterline) + var(--surface-chop)),
    9% calc(var(--hull-waterline) - var(--surface-chop)),
    0 var(--hull-waterline), -12% var(--hull-waterline)
  );
  clip-path: polygon(
    -12% -48%, 112% -48%, 112% var(--hull-waterline), 100% var(--hull-waterline),
    93% calc(var(--hull-waterline) - var(--surface-chop)),
    84% calc(var(--hull-waterline) + var(--surface-chop)),
    74% var(--hull-waterline),
    64% calc(var(--hull-waterline) - var(--surface-chop)),
    53% calc(var(--hull-waterline) + var(--surface-chop)),
    42% var(--hull-waterline),
    31% calc(var(--hull-waterline) - var(--surface-chop)),
    20% calc(var(--hull-waterline) + var(--surface-chop)),
    9% calc(var(--hull-waterline) - var(--surface-chop)),
    0 var(--hull-waterline), -12% var(--hull-waterline)
  );
  animation-name: rigMotionHullClip;
}
@keyframes rigMotionHullClip {
  0%, 100% {
    -webkit-clip-path: polygon(
      -12% -48%, 112% -48%, 112% var(--hull-waterline), 100% var(--hull-waterline),
      93% calc(var(--hull-waterline) - var(--surface-chop)),
      84% calc(var(--hull-waterline) + var(--surface-chop)),
      74% var(--hull-waterline),
      64% calc(var(--hull-waterline) - var(--surface-chop)),
      53% calc(var(--hull-waterline) + var(--surface-chop)),
      42% var(--hull-waterline),
      31% calc(var(--hull-waterline) - var(--surface-chop)),
      20% calc(var(--hull-waterline) + var(--surface-chop)),
      9% calc(var(--hull-waterline) - var(--surface-chop)),
      0 var(--hull-waterline), -12% var(--hull-waterline)
    );
    clip-path: polygon(
      -12% -48%, 112% -48%, 112% var(--hull-waterline), 100% var(--hull-waterline),
      93% calc(var(--hull-waterline) - var(--surface-chop)),
      84% calc(var(--hull-waterline) + var(--surface-chop)),
      74% var(--hull-waterline),
      64% calc(var(--hull-waterline) - var(--surface-chop)),
      53% calc(var(--hull-waterline) + var(--surface-chop)),
      42% var(--hull-waterline),
      31% calc(var(--hull-waterline) - var(--surface-chop)),
      20% calc(var(--hull-waterline) + var(--surface-chop)),
      9% calc(var(--hull-waterline) - var(--surface-chop)),
      0 var(--hull-waterline), -12% var(--hull-waterline)
    );
  }
  50% {
    -webkit-clip-path: polygon(
      -12% -48%, 112% -48%, 112% var(--hull-waterline-raised), 100% var(--hull-waterline-raised),
      92% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      83% var(--hull-waterline-raised),
      73% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      62% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      51% var(--hull-waterline-raised),
      40% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      29% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      18% var(--hull-waterline-raised),
      8% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      0 var(--hull-waterline-raised), -12% var(--hull-waterline-raised)
    );
    clip-path: polygon(
      -12% -48%, 112% -48%, 112% var(--hull-waterline-raised), 100% var(--hull-waterline-raised),
      92% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      83% var(--hull-waterline-raised),
      73% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      62% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      51% var(--hull-waterline-raised),
      40% calc(var(--hull-waterline-raised) - var(--surface-chop)),
      29% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      18% var(--hull-waterline-raised),
      8% calc(var(--hull-waterline-raised) + var(--surface-chop)),
      0 var(--hull-waterline-raised), -12% var(--hull-waterline-raised)
    );
  }
}

/* ==== logbook ==== */
/* Angler's Logbook: the long-term goals card at the top of the Fish Book. It uses
   the same paper, ink and button language as the Daily Trophy Hunt card. */
.logbook-card {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  background: #e7eee0;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
}
.logbook-head { display: flex; flex-direction: column; min-width: 0; }
.logbook-head > span { color: var(--teal-dark); font-size: .63rem; font-weight: 1000; letter-spacing: .06em; }
.logbook-head > strong { font-size: .95rem; line-height: 1.15; }
.logbook-head > small { margin-top: 2px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.logbook-meter {
  position: relative;
  height: 12px;
  overflow: hidden;
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.logbook-meter > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(180deg, #9be06a, var(--green) 55%, var(--green-dark));
  border-right: 2px solid var(--ink);
  transition: width .5s cubic-bezier(.2, .8, .3, 1);
}
.logbook-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}
.logbook-stats > div {
  min-width: 0;
  padding: 4px 3px;
  text-align: center;
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 8px;
}
.logbook-stats dt { color: var(--teal-dark); font-size: .55rem; font-weight: 1000; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.logbook-stats dd { margin: 1px 0 0; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 7px 6px 9px;
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 9px;
}
.task > div { display: flex; flex-direction: column; min-width: 0; }
.task strong { font-size: .76rem; line-height: 1.15; }
.task small { margin-top: 1px; color: var(--muted); font-size: .64rem; font-weight: 800; }
.task.done:not(.claimed) { background: #e9f6d9; box-shadow: 0 0 0 2px var(--green); }
.task.claimed { opacity: .66; }
.task-claim {
  min-width: 64px;
  min-height: 32px;
  padding: 5px 8px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: .64rem;
  font-weight: 1000;
  cursor: pointer;
}
.task-claim:disabled { color: var(--muted); background: #c9d1c7; box-shadow: none; cursor: default; }
.task-claim:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.logbook-bonus { color: var(--teal-dark); font-size: .62rem; font-weight: 900; text-align: center; }

/* Something to claim: a small ink-ringed dot on the Fish Book button. */
.collection-button { position: relative; }
.collection-button.has-claim::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  background: var(--coral);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 1px 1px 0 var(--ink);
  animation: claimPing 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes claimPing {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .collection-button.has-claim::after { animation: none; }
}

/* ==== ads ==== */
/* Video ad offers reuse the game's own dialog card and button. Both choices share
   one size, font and colour, so saying no is as easy as watching. */
.ad-offer { padding: 18px 18px 14px; }
.ad-offer .modal-icon { margin-bottom: 6px; }
.ad-offer-art {
  display: block;
  width: 118px;
  height: 66px;
  margin: 0 auto 6px;
  object-fit: contain;
  transform: scale(calc(var(--fish-art-scale, 1) * var(--fish-fit-scale, 1)));
}
.ad-offer h2 { font-size: 1.12rem; line-height: 1.15; }
.ad-offer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ad-offer-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  font-size: .86rem;
  cursor: pointer;
}
.ad-offer-actions button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.ad-offer-actions button:disabled { opacity: .6; cursor: progress; }
.video-icon { flex: 0 0 auto; width: 21px; height: 16px; color: var(--coral); }
.ad-offer-note { display: block; margin-top: 9px; color: var(--muted); font-size: .68rem; font-weight: 800; }
/* Shown only if a requested video takes a moment to start. */
.ad-wait {
  position: absolute;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  background: rgba(16, 34, 40, .42);
  cursor: progress;
  animation: adWaitIn .2s .35s both;
}
.ad-wait[hidden] { display: none; }
.ad-wait span {
  padding: 9px 14px;
  color: var(--ink);
  background: var(--paper-bright);
  border: var(--outline);
  border-radius: 12px;
  box-shadow: var(--hard-shadow);
  font-weight: 1000;
}
@keyframes adWaitIn { from { opacity: 0; } to { opacity: 1; } }
/* The return-screen doubler borrows the "today" reward tile's colours. */
.daily-haul .haul-double {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 7px auto 0;
  min-height: 34px;
  padding: 4px 12px;
  color: #54371d;
  background: #ffe997;
  border: 2px solid #b5741f;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px #ffcf4f, 0 2px 0 #8d5a1f;
  font: 1000 clamp(11px, 2.9cqw, 16px)/1.1 'Arial Rounded MT Bold', 'Chalkboard SE', 'Trebuchet MS', sans-serif;
  cursor: pointer;
}
.daily-haul .haul-double[hidden] { display: none; }
.daily-haul .haul-double b { color: var(--money-green); }
.daily-haul .haul-double:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 0 0 1px #ffcf4f; }
.daily-haul .haul-double:disabled { opacity: .6; cursor: progress; }
.daily-haul .haul-double-note { display: block; margin-top: 5px; color: #6c4d2c; font: 800 clamp(10px, 2.3cqw, 13px)/1.2 'Trebuchet MS', sans-serif; }
/* An empty boost slot with a boost on offer turns the game's Epic purple; tapping
   it opens the offer card, which is where the video is explained and requested. */
#app.app #castActionRow #useBoostButton[data-state="offer"] {
  color: #fffdf1;
  background: linear-gradient(180deg, #b184d8 0%, var(--tier-4) 52%, var(--tier-12) 100%);
  box-shadow: 3px 4px 0 #173b44, inset 0 1px 0 #e3cff5;
  filter: none;
  opacity: 1;
  cursor: pointer;
}
#app.app #castActionRow #useBoostButton[data-state="offer"] .power-cast-title {
  color: #fffdf1;
  -webkit-text-stroke: 0;
  text-shadow: 0 1px 0 #3b2463, 0 0 1px #3b2463;
}
#app.app #castActionRow #useBoostButton[data-state="offer"] .power-cast-time { display: none; }
@media (prefers-reduced-motion: reduce) { .ad-wait { animation-duration: .01s; } }
.ad-offer [hidden], .daily-haul .haul-double-note[hidden] { display: none !important; }
/* The game's own confirm card (voyage, reset, save codes). */
.choice-modal { z-index: 110; }
.choice-modal[data-single="true"] .ad-offer-actions { grid-template-columns: 1fr; }
.choice-field {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 7px 8px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 9px;
  font: 700 .72rem/1.25 ui-monospace, Menlo, Consolas, monospace;
  resize: none;
  word-break: break-all;
  -webkit-user-select: text;
  user-select: text;
}

/* ==== readable ==== */
/* Readable text (CrazyGames Full Launch feedback: "increase the overall UI text…
   readable on small screens such as Chromebook"). The desktop dock gets a fixed
   minimum height, so on small frames the scene gives up the space instead of
   every label shrinking with the artwork. Then the smallest labels are raised. */
#app.app[data-layout="wide"] {
  --dock-height: max(208px, 25cqh);
  grid-template-rows: minmax(0, 1fr) var(--dock-height);
}
#app.app[data-layout="wide"] .boat-wrap { width: min(56cqw, 75cqh, calc((100cqh - var(--dock-height)) * 1.05)); }
#app.app[data-layout="wide"] .dock {
  --desktop-card-width: min(calc((var(--dock-height) - 44px) * .644), calc((39cqw - 56px) / 3));
}
#app.app[data-layout="wide"] .desktop-dock-content { grid-template-columns: minmax(0, 27fr) minmax(0, 39fr) minmax(0, 34fr); }
#app.app[data-layout="wide"] :is(.desktop-hud-left, .desktop-hud-right) { padding-inline: 14px; }
#app.app[data-layout="wide"] #castActionRow { grid-template-columns: minmax(0, 1.15fr) minmax(0, 2.7fr) minmax(0, 1.15fr); }
/* Status and travel */
#app.app[data-layout="wide"] .money-label { font-size: 13px; }
#app.app[data-layout="wide"] .money-card strong { font-size: 24px; }
#app.app[data-layout="wide"] .location-label { font-size: 12px; }
#app.app[data-layout="wide"] .location-card strong { font-size: 15px; }
#app.app[data-layout="wide"] .area-banner span { font-size: 12px; }
#app.app[data-layout="wide"] .area-banner strong { font-size: 17px; }
/* Upgrade cards keep their painted proportions; only the lettering grows. */
#app.app[data-layout="wide"] .upgrade-card > em { font-size: calc(var(--upgrade-card-width) * .104); line-height: 1.1; }
#app.app[data-layout="wide"] .upgrade-copy strong { font-size: calc(var(--upgrade-card-width) * .095); }
#app.app[data-layout="wide"] .upgrade-slot > .card-kind { font-size: calc(var(--upgrade-card-width) * .11); }
#app.app[data-layout="wide"] .level-badge { font-size: calc(var(--upgrade-card-width) * .125); }
#app.app[data-layout="wide"] .upgrade-action .upgrade-cost { font-size: calc(var(--upgrade-card-width) * .135); }
/* Casting controls */
#app.app[data-layout="wide"] #castActionRow .power-cast-title { font-size: 14px; }
#app.app[data-layout="wide"] #castActionRow .power-cast-time { font-size: 18px; }
#app.app[data-layout="wide"] .auto-quick-label { font-size: 13px; }
#app.app[data-layout="wide"] .auto-quick-state { font-size: 12px; }
#app.app[data-layout="wide"] .collection-button { font-size: 14px; }
#app.app[data-layout="wide"] .portal-window-actions button { min-height: 30px; padding: 3px 11px; font-size: 12px; }
#app.app[data-layout="wide"] .controller-button-hint { font-size: 9px; }
/* Logbook figures, every layout. */
.logbook-head > span { font-size: .7rem; }
.logbook-head > small, .task small { font-size: .72rem; }
.logbook-stats dt { font-size: .64rem; }
.logbook-stats dd { font-size: .82rem; }
.task strong { font-size: .82rem; }
.task-claim { font-size: .7rem; }
.logbook-bonus { font-size: .7rem; }
/* Room for the larger lettering: nothing may spill out of its plaque. */
#app.app[data-layout="wide"] .hud { grid-template-rows: 54px 40px; }
#app.app[data-layout="wide"] .money-label { line-height: 1.05; }
#app.app[data-layout="wide"] .money-card strong { line-height: 1.08; }
#app.app[data-layout="wide"] :is(.auto-quick-toggle, .collection-button) { height: 40px; }
.logbook-stats dt { white-space: normal; line-height: 1.05; }
#app.app[data-layout="wide"] .upgrade-card > em { top: 49%; }
/* Return screen: the same plank art, sliced so the frame stretches around the
   rewards while the painted claim button keeps a modest, fixed height. */
#offlineModal.daily-haul {
  --haul-edge-bottom: 92px;
  --haul-edge-side: calc(var(--haul-edge-bottom) * .4375);
  --haul-edge-top: calc(var(--haul-edge-side) * 1.024);
  height: min(calc(100% - 20px), 700px);
  background: none;
  border-style: solid;
  border-color: transparent;
  border-width: var(--haul-edge-top) var(--haul-edge-side) var(--haul-edge-bottom);
  border-image-source: url('./assets/ui/upgrade-card-shell-v1.webp');
  border-image-slice: 215 210 480 fill;
  border-image-repeat: stretch;
}
#offlineModal.daily-haul .haul-layout { inset: 2px 4px 8px; }
#offlineModal .haul-claim {
  inset: auto calc(var(--haul-edge-side) * -.5) calc(var(--haul-edge-bottom) * -.635);
  width: auto;
  height: calc(var(--haul-edge-bottom) * .604);
}
#app[data-layout='wide'] #offlineModal.daily-haul { --haul-edge-bottom: 104px; width: min(calc(100% - 20px), 900px); height: min(calc(100% - 20px), 640px); }
#app[data-layout='wide'] .daily-haul .haul-reward-inner { min-height: 78px; }
#offlineModal.daily-haul { height: min(calc(100% - 20px), 560px); }
#app[data-layout='wide'] #offlineModal.daily-haul { height: min(calc(100% - 20px), 640px); }
.daily-haul .haul-double { width: fit-content; max-width: 100%; align-self: center; }

/* ==== polish ==== */
/* CrazyGames review fixes. */

/* Power Cast while charging, and an empty boost slot, sit on light paper: their
   lettering is dark ink there so it never blends into the panel. */
#app.app #castActionRow .power-cast-panel:is([data-state="charging"], [data-state="empty"]) :is(.power-cast-title, .power-cast-time) {
  color: #173b44;
  -webkit-text-stroke: 0;
  text-shadow: 0 1px 0 #fffdf0;
}

/* Scrollbars in the game's own paint: a teal handle on a paper track. */
@supports selector(::-webkit-scrollbar) {
  #app.app * { scrollbar-width: auto; scrollbar-color: auto; }
  #app.app ::-webkit-scrollbar { width: 12px; height: 12px; }
  #app.app ::-webkit-scrollbar-track { background: #efe3c2; border-radius: 8px; box-shadow: inset 0 0 0 2px #d9c79c; }
  #app.app ::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #27bfd0, #137181); border: 2px solid #173b44; border-radius: 8px; }
  #app.app ::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #4fd4e1, #1f9eb1); }
  #app.app ::-webkit-scrollbar-corner { background: transparent; }
}
@supports not selector(::-webkit-scrollbar) {
  #app.app * { scrollbar-width: thin; scrollbar-color: #137181 #efe3c2; }
}

/* First-time tutorial pointers, in the catch-card paper and ink. */
.tutorial-tip {
  --tail-x: 50%;
  position: absolute;
  z-index: 70;
  width: max-content;
  max-width: min(280px, calc(100% - 16px));
  display: grid;
  gap: 4px;
  padding: 10px 13px 9px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink);
  pointer-events: none;
  text-align: center;
  animation: tutorialIn .32s cubic-bezier(.2, .8, .3, 1.2) both, tutorialBob 1.8s .4s ease-in-out infinite;
}
.tutorial-tip[hidden] { display: none; }
.tutorial-tip strong { font-size: 16px; line-height: 1.1; color: var(--teal-dark); }
.tutorial-tip span { font-size: 13.5px; line-height: 1.25; font-weight: 800; }
.tutorial-tip ul { margin: 2px 0 4px; padding: 0; list-style: none; display: grid; gap: 6px; text-align: left; }
.tutorial-tip li { font-size: 13.5px; line-height: 1.25; font-weight: 700; }
.tutorial-tip li b { color: var(--teal-dark); }
.tutorial-tip::after {
  content: "";
  position: absolute;
  left: var(--tail-x);
  width: 14px;
  height: 14px;
  margin-left: -8px;
  background: var(--paper-bright);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.tutorial-tip[data-side="above"]::after { bottom: -10px; transform: rotate(45deg); }
.tutorial-tip[data-side="below"]::after { top: -10px; transform: rotate(-135deg); }
.tutorial-tip[data-side="none"]::after { display: none; }
.tutorial-tip button { pointer-events: auto; cursor: pointer; }
.tutorial-skip {
  justify-self: center;
  margin-top: 2px;
  padding: 2px 6px;
  color: var(--muted);
  background: none;
  border: 0;
  font-size: 11.5px;
  font-weight: 800;
  text-decoration: underline;
}
.tutorial-done {
  justify-self: stretch;
  min-height: 40px;
  color: var(--ink);
  background: var(--green);
  border: 3px solid var(--ink);
  border-radius: 11px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: .04em;
}
.tutorial-card { max-width: min(320px, calc(100% - 24px)); padding: 14px 16px 12px; animation: tutorialIn .32s cubic-bezier(.2, .8, .3, 1.2) both; }
.app[data-layout="wide"] .tutorial-tip strong { font-size: 17px; }
.app[data-layout="wide"] .tutorial-tip :is(span, li) { font-size: 14.5px; }
@keyframes tutorialIn { from { opacity: 0; transform: translateY(6px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes tutorialBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .tutorial-tip { animation: none; } }

/* The tutorial pointer steps aside while a menu, card or video is open. */
:root:has(.sheet:not([hidden]), .modal:not([hidden]), .ad-wait:not([hidden])) .tutorial-tip { visibility: hidden; }

/* The catch card sits above the reel timing bar, which stays up after a catch
   (short portrait screens stacked the bar over the card text). */
#app.app .catch-toast { z-index: 33; }

/* Level-complete card: a picture of the new water above the title. */
.choice-art {
  display: block;
  width: 100%;
  height: clamp(70px, 19cqh, 150px);
  margin: 0 0 10px;
  object-fit: cover;
  object-position: center 28%;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 3px 0 rgba(23, 59, 68, .22);
}
.choice-art[hidden] { display: none; }
/* Same crops as the Adventure Map cards, so each water shows its shore and landmark. */
.choice-art[data-tier="3"] { object-position: center 24%; }
.choice-art[data-tier="12"] { object-position: center 18%; }
.choice-modal[data-kind="level"] .eyebrow { color: var(--money-green); }

/* Desktop jokes may use two balanced lines rather than shrinking to fit one. */
#app.app[data-layout="wide"] .area-banner strong { text-wrap: balance; }
#app.app[data-layout="wide"] .area-banner { translate: 0 calc(-1 * var(--wisdom-lift, 0px)); }


/* 1.1.8: a staged first catch and one clearly named automation goal. */
#app[data-onboarding="catch"] .upgrade-grid,
#app[data-onboarding]:not([data-onboarding=""]) :is(#collectionButton, #portalAchievements, #gearProgress, #areaBanner) {
  visibility: hidden;
  pointer-events: none;
}
#app[data-onboarding]:not([data-onboarding=""]) #powerCastHint { display: none; }
#app[data-onboarding="upgrade"] .upgrade-slot:has(#fisherUpgrade) > .card-kind { color: #ffe289; }
#app .tutorial-focus { outline: 3px solid #ffe289; outline-offset: 3px; }
#app[data-tutorial-step="upgrade"]:not([data-fishing-phase="ready"]) .tutorial-tip { visibility: hidden; }
#app[data-tutorial-step="power"] #powerCastHint { visibility: hidden; }
#castActionRow .power-cast-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 5px);
  padding: 4px 6px;
  border: 2px solid #173b44;
  border-radius: 8px;
  background: #fff1b7;
  color: #173b44;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}
#castActionRow .power-cast-hint[hidden] { display: none; }
#app.app #castActionRow .power-cast-panel .power-cast-time {
  font-size: 11px;
  line-height: 1.05;
  white-space: nowrap;
}
#app.app[data-layout="wide"] #castActionRow .power-cast-panel .power-cast-time { font-size: 12px; }
.fishing-guide small + small { margin-top: 8px; }
/* Keep the opening dock compact until there are upgrades to buy. */
#app[data-onboarding="catch"] .upgrade-grid { display: none; }
#app.app[data-layout="wide"][data-onboarding="catch"] .desktop-dock-content { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#app.app[data-layout="wide"][data-onboarding="catch"] { --dock-height: 188px; }
/* The old goal text was hidden behind baked-in artwork. This readable plaque
   gives both touch and desktop players the same current objective. */
#app.app .gear-banner {
  padding: 4px 7px;
  background: #f8edcf;
  border: 2px solid #173b44;
  border-radius: 9px;
  box-shadow: 2px 2px 0 #173b44;
}
#app.app .gear-banner-copy { visibility: visible; width: 100%; display: grid; gap: 3px; }
#app.app .gear-banner-copy > span,
#app.app .gear-banner-copy > strong {
  display: block;
  color: #173b44;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  transform: none;
  white-space: normal;
  overflow: visible;
}
#app.app .gear-banner-copy > span { font-size: 9px; color: #18626d; }
#app.app[data-layout="wide"] .gear-banner { width: min(100%, 240px); }
#app.app[data-layout="wide"] .gear-banner-copy > strong { font-size: 12px; }
#app.app[data-layout="wide"] .gear-banner-copy > span { font-size: 10px; }
#app .tutorial-focus { border-radius: 14px; }
#app.app:not([data-layout="wide"]) .dock-heading { margin-top: 3px; margin-bottom: 2px; }

/* One instruction at a time: transient notices must not cover a guide. */
#app[data-tutorial-step]:not([data-tutorial-step=""]) #notice { visibility: hidden; }
