/* ==========================================================================
   Tug Harbor — 「海岛手账 · 暖木珐琅风」 × 「极简减负布局」
   Tactile Warm Linen + Sculpted Honey Teak + Brushed Brass + Lagoon Enamel
   Full 3-Mode Atmospheric Adaptation: Sunlit Day / Golden Dusk / Lantern Night
   ========================================================================== */

:root {
  /* Core Tactile Material Palette (Day: Sunlit Sea-Salt Ivory Linen) */
  --paper: #fbf4e4;
  --paper-hi: #fffaf0;
  --paper-warm: #f2e4c8;
  --paper-deep: #e8d4b0;
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.042'/%3E%3C/svg%3E");

  --teak-border: #c5945b;
  --teak-lip: #8e6030;
  --teak-soft: rgba(197, 148, 91, 0.36);

  --brass: #dfa840;
  --brass-hi: #f5d27b;
  --brass-lip: #9d6d1c;

  --ink: #3a2618;
  --ink-soft: rgba(58, 38, 24, 0.66);
  --icon-stroke: #3a2618;

  --lagoon: #1f8e8b;
  --lagoon-hi: #34b6b0;
  --lagoon-lip: #125d5b;

  --coral: #e05a47;
  --coral-hi: #f17c68;
  --coral-lip: #9d3526;

  --navy: #335478;
  --navy-hi: #4b739c;
  --navy-lip: #1e3752;

  /* Floating HUD Surface Tokens (Adapt automatically across Day / Dusk / Night!) */
  --hud-bg: linear-gradient(180deg, #fffcf3 0%, #f6ebd4 100%);
  --hud-bg-hover: linear-gradient(180deg, #ffffff 0%, #fbf1dc 100%);
  --hud-border: #c5945b;
  --hud-lip: #8e6030;
  --hud-ink: #3a2618;
  --hud-ink-soft: rgba(58, 38, 24, 0.66);
  --hud-rail-bg: rgba(251, 244, 228, 0.72);
  --hud-rail-border: rgba(197, 148, 91, 0.80);
  --hud-chip-bg: rgba(31, 142, 139, 0.14);
  --hud-chip-ink: #166e6c;
  --hud-depth-bg: linear-gradient(180deg, #fff4d2, #f5df9c);
  --hud-depth-border: #d59d3b;
  --hud-depth-ink: #6e450a;
  --hud-glow: none;

  /* Modal Parchment Tokens (Stay warm lantern-lit parchment even at Night so 40 stickers pop!) */
  --modal-paper: #fbf4e4;
  --modal-paper-hi: #fffaf0;
  --modal-paper-warm: #f2e4c8;
  --modal-border: #b8844c;
  --modal-lip: #7e5326;

  /* Legacy alias safety for any inline var() references */
  --cream: var(--modal-paper);
  --cream-soft: rgba(251, 244, 228, 0.96);
  --cream-warm: var(--modal-paper-warm);
  --border-wood: var(--teak-border);
  --lip-wood: var(--teak-lip);
  --teal: var(--lagoon-hi);
  --teal-deep: var(--lagoon);
  --teal-lip: var(--lagoon-lip);
  --orange: #e67832;
  --orange-deep: #c7571a;
  --orange-lip: #8e390c;

  --shadow-ambient: 0 8px 22px rgba(24, 38, 44, 0.20);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sans: "Fredoka", "Nunito", "SF Pro Rounded", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

/* Golden Hour Dusk Adaptation */
body.is-dusk {
  --paper: #fcecd6;
  --paper-hi: #fff6e8;
  --paper-warm: #f3d8b8;
  --teak-border: #b46b3c;
  --teak-lip: #7a4220;
  --brass: #e4a13a;

  --hud-bg: linear-gradient(180deg, #fff5e6 0%, #f6dec0 100%);
  --hud-bg-hover: linear-gradient(180deg, #fffbf2 0%, #fbe8ce 100%);
  --hud-border: #b46b3c;
  --hud-lip: #7a4220;
  --hud-rail-bg: rgba(252, 236, 214, 0.76);
  --hud-rail-border: rgba(180, 107, 60, 0.82);
  --hud-depth-bg: linear-gradient(180deg, #ffefc8, #f3cd87);
  --hud-depth-border: #c98632;

  --modal-paper: #fcecd6;
  --modal-paper-hi: #fff6e8;
  --modal-paper-warm: #f3d9b8;
  --modal-border: #b46b3c;
  --modal-lip: #7a4220;
  --shadow-ambient: 0 10px 26px rgba(54, 24, 14, 0.30);
}

/* Lantern-Lit Midnight Teak/Indigo HUD Adaptation (Modals stay warm lantern parchment!) */
body.is-night {
  --hud-bg: linear-gradient(180deg, rgba(28, 44, 62, 0.88) 0%, rgba(18, 30, 44, 0.86) 100%);
  --hud-bg-hover: linear-gradient(180deg, rgba(38, 58, 80, 0.94) 0%, rgba(24, 39, 56, 0.92) 100%);
  --hud-border: rgba(228, 178, 98, 0.54);
  --hud-lip: rgba(8, 14, 24, 0.86);
  --hud-ink: #fff3dc;
  --hud-ink-soft: rgba(255, 243, 220, 0.72);
  --hud-rail-bg: rgba(14, 24, 36, 0.80);
  --hud-rail-border: rgba(228, 178, 98, 0.52);
  --hud-chip-bg: rgba(70, 214, 206, 0.18);
  --hud-chip-ink: #84efe8;
  --hud-depth-bg: linear-gradient(180deg, rgba(228, 178, 98, 0.24), rgba(186, 134, 52, 0.22));
  --hud-depth-border: rgba(228, 178, 98, 0.52);
  --hud-depth-ink: #ffe3a3;
  --hud-glow: 0 0 16px rgba(235, 184, 96, 0.12);
  --icon-stroke: #f6ddb0;

  --modal-paper: #f7ebce;
  --modal-paper-hi: #fff6e2;
  --modal-paper-warm: #ecdab2;
  --modal-border: #c29150;
  --modal-lip: #744c22;
  --shadow-ambient: 0 10px 28px rgba(3, 8, 18, 0.58);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #286a72;
  font-family: var(--sans);
  color: var(--ink);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.svg-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

/* Tabular numerals across ALL live counters & records */
.coin-num,
#shop-coin-val,
.depth-tag,
.creel-badge,
.dex-chip,
.size-pill,
.val-pill,
.dex-stat-v,
.item-price,
.bait-stock-num,
.rod-stat-val,
.dex-prog-num {
  font-variant-numeric: tabular-nums;
}

/* Tactile Sculpted Teak-Enamel Surface Utility */
.squishy {
  background-image: var(--paper-grain), var(--hud-bg);
  background-color: var(--paper);
  border: 2px solid var(--hud-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 3px 0 var(--hud-lip),
    var(--hud-glow),
    var(--shadow-ambient);
  color: var(--hud-ink);
  transition: transform 0.16s var(--bounce), box-shadow 0.16s var(--bounce), background 0.2s ease, border-color 0.2s ease;
}

body.is-night .squishy {
  background-image: var(--hud-bg);
  background-color: rgba(20, 32, 46, 0.84);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 184, 0.16),
    0 3px 0 var(--hud-lip),
    var(--hud-glow),
    var(--shadow-ambient);
}

button.squishy:hover,
.zone-strip.squishy:hover {
  background-image: var(--paper-grain), var(--hud-bg-hover);
  transform: translateY(-1.5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 4.5px 0 var(--hud-lip),
    0 12px 24px rgba(18, 34, 42, 0.24);
}

body.is-night button.squishy:hover,
body.is-night .zone-strip.squishy:hover {
  background-image: var(--hud-bg-hover);
  border-color: rgba(242, 198, 120, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 184, 0.24),
    0 4.5px 0 var(--hud-lip),
    0 0 18px rgba(235, 184, 96, 0.18),
    0 12px 28px rgba(3, 8, 18, 0.62);
}

button.squishy:active,
.zone-strip.squishy:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 1px 0 var(--hud-lip),
    0 4px 10px rgba(18, 34, 42, 0.18);
}

/* ==========================================================================
   1. TOP-LEFT CUTE & RETRO HAND-PAINTED ENAMEL SQUIRCLE APP DOCK
   NookPhone × Ghibli Storybook Warmth (Compass / Journal / Shop / Outfit)
   ========================================================================== */
.hud-top-left,
.hud-icon-dock {
  position: fixed;
  top: 16px;
  left: 18px;
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 22px;
  background: rgba(255, 249, 236, 0.42);
  backdrop-filter: blur(10px) saturate(135%);
  -webkit-backdrop-filter: blur(10px) saturate(135%);
  border: 1.5px solid rgba(255, 248, 232, 0.72);
  box-shadow:
    0 8px 24px rgba(32, 24, 16, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

body.is-dusk .hud-top-left,
body.is-dusk .hud-icon-dock {
  background: rgba(255, 236, 212, 0.44);
  border-color: rgba(255, 224, 190, 0.68);
}

body.is-night .hud-top-left,
body.is-night .hud-icon-dock {
  background: rgba(20, 30, 42, 0.50);
  border-color: rgba(228, 184, 114, 0.36);
  box-shadow:
    0 10px 26px rgba(4, 10, 18, 0.48),
    inset 0 1px 0 rgba(255, 236, 198, 0.14);
}

.retro-app-btn {
  appearance: none;
  position: relative;
  width: 50px;
  height: 50px;
  padding: 0;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.22s var(--bounce), filter 0.18s ease;
}

.retro-app-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(32, 24, 16, 0.26));
  transition: filter 0.2s ease;
}

.retro-app-btn:hover {
  transform: translateY(-3px) scale(1.08);
}

.retro-app-btn:hover .retro-app-icon {
  filter: drop-shadow(0 7px 12px rgba(32, 24, 16, 0.32)) brightness(1.03);
}

.retro-app-btn:active {
  transform: translateY(1px) scale(0.92);
}

/* Cute Retro Warm-Berry Enamel Notification Dot on Shop (ONLY when creel > 0!) */
.retro-notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e54b3c;
  border: 2px solid #fff8eb;
  color: #fffef9;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  box-shadow: 0 2.5px 6px rgba(140, 34, 24, 0.42);
  pointer-events: none;
  z-index: 4;
}

/* Warm Cream-Espresso Retro Hover Tooltip (First Icon Pinned to left: 0 — ZERO Clipping!) */
.retro-app-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 5px 11px;
  border-radius: 999px;
  background-image: var(--paper-grain), linear-gradient(180deg, #fffdf6, #f6e7c9);
  background-color: #fbf4e4;
  border: 1.8px solid #c5945b;
  color: #3a2618;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  box-shadow: 0 2.5px 0 #8e6030, 0 8px 18px rgba(32, 24, 16, 0.24);
  transition: opacity 0.16s ease, transform 0.18s var(--bounce);
}

body.is-night .retro-app-btn[data-tip]::after {
  background-image: linear-gradient(180deg, rgba(30, 44, 60, 0.94), rgba(18, 30, 44, 0.94));
  border-color: rgba(228, 178, 98, 0.62);
  color: #fff4de;
  box-shadow: 0 2.5px 0 rgba(8, 14, 24, 0.85), 0 8px 20px rgba(4, 10, 20, 0.50);
}

.retro-app-btn[data-tip]:hover::after,
.retro-app-btn[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Pin first icon's tooltip cleanly to left: 0 so "海港海图 (N)" NEVER clips off-screen! */
.retro-app-btn:first-child[data-tip]::after {
  left: 0;
  transform: translateY(-4px);
}

.retro-app-btn:first-child[data-tip]:hover::after,
.retro-app-btn:first-child[data-tip]:focus-visible::after {
  transform: translateY(0);
}

/* ==========================================================================
   2. TOP-CENTER RIBBON TOAST & TOP-RIGHT UNIFIED NAUTICAL INSTRUMENT RAIL
   ========================================================================== */
.toast-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-14px);
  z-index: 55;
  max-width: min(560px, 68vw);
  padding: 7px 17px;
  border-radius: 999px;
  background-image: var(--paper-grain), var(--hud-bg);
  background-color: var(--paper);
  border: 2px solid var(--hud-border);
  box-shadow: 0 3px 0 var(--hud-lip), var(--shadow-ambient);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--hud-ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.42s var(--bounce);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.is-night .toast-banner {
  background-image: var(--hud-bg);
  background-color: rgba(20, 32, 46, 0.88);
  backdrop-filter: blur(10px);
}

.toast-banner::before,
.toast-banner::after {
  content: "✦";
  color: var(--brass);
  font-size: 10px;
  margin: 0 6px;
}

.toast-banner.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Unified Recessed Translucent Teak-Glass Instrument Capsule Rail */
.hud-top-right {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 999px;
  background: var(--hud-rail-bg);
  backdrop-filter: blur(10px);
  border: 2px solid var(--hud-rail-border);
  box-shadow:
    inset 0 2px 4px rgba(58, 38, 24, 0.14),
    0 3.5px 0 var(--hud-lip),
    var(--shadow-ambient);
}

body.is-night .hud-top-right {
  box-shadow:
    inset 0 2px 6px rgba(4, 10, 18, 0.55),
    0 3.5px 0 rgba(8, 14, 24, 0.86),
    0 0 18px rgba(235, 184, 96, 0.14);
}

.icon-circle {
  appearance: none;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--hud-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 2.5px 0 var(--hud-lip),
    0 4px 10px rgba(20, 34, 42, 0.14);
}

.icon-circle svg {
  width: 19px;
  height: 19px;
}

body.is-night .hud-top-right .svg-slot,
body.is-night .hud-top-left .svg-slot {
  filter: drop-shadow(0 0 3px rgba(255, 238, 198, 0.25));
}

.icon-circle::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  width: 9px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.68);
  transform: rotate(-28deg);
  pointer-events: none;
}

body.is-night .icon-circle::before {
  background: rgba(255, 236, 192, 0.24);
}

.icon-circle.active {
  border-color: var(--brass);
  background-image: var(--paper-grain), linear-gradient(180deg, #fff9e5, #f6e0aa);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 2.5px 0 var(--brass-lip),
    0 0 12px rgba(223, 168, 64, 0.36);
}

body.is-night .icon-circle.active {
  background-image: linear-gradient(180deg, rgba(64, 86, 108, 0.95), rgba(38, 56, 74, 0.94));
  border-color: #f4c66c;
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 176, 0.32),
    0 2.5px 0 rgba(10, 16, 24, 0.88),
    0 0 14px rgba(244, 198, 108, 0.34);
}

.icon-circle.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lagoon);
  box-shadow: 0 0 5px var(--lagoon-hi);
}

body.is-night .icon-circle.active::after {
  background: #6ee8de;
  box-shadow: 0 0 7px #6ee8de;
}

/* ==========================================================================
   3. COLLECTIBLE POSTAGE-STAMP CATCH CARD, BITE ALERT & AAA FIGHT DECK
   ========================================================================== */

/* Coastal Postage-Stamp Catch Celebration Banner */
.catch-card {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%) translateY(-18px) scale(0.86);
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 22px 13px 15px;
  border-radius: 16px;
  background-image: var(--paper-grain), linear-gradient(180deg, #fffdf6 0%, #f8ebd0 100%);
  background-color: var(--modal-paper);
  border: 2.5px solid var(--brass);
  outline: 4px dashed rgba(251, 244, 228, 0.88);
  outline-offset: -1.5px;
  box-shadow:
    inset 0 0 0 3px #fffaf0,
    inset 0 0 0 4.5px rgba(212, 160, 66, 0.42),
    0 6px 0 var(--brass-lip),
    0 18px 40px rgba(16, 30, 38, 0.34);
  opacity: 0;
  pointer-events: none;
  color: var(--ink);
  transition: opacity 0.28s ease, transform 0.44s var(--bounce);
}

.catch-card.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.catch-sticker-wrap {
  position: relative;
  width: 68px;
  height: 64px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 48%, #fffef9 0%, #fae7be 100%);
  border: 2px solid #ddb164;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
  box-shadow: inset 0 -2px 0 rgba(182, 134, 62, 0.32);
}

/* Warm Spinning Sunburst Glow Behind Sticker! */
.catch-sticker-wrap::before {
  content: "";
  position: absolute;
  inset: -26px;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(247, 198, 86, 0.36) 0deg 15deg,
    rgba(255, 250, 232, 0.0) 15deg 30deg
  );
  animation: sunburstSpin 12s linear infinite;
  pointer-events: none;
}

.catch-sticker-wrap > * {
  position: relative;
  z-index: 1;
}

@keyframes sunburstSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.catch-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.catch-top strong {
  font-size: 17.5px;
  font-weight: 800;
  color: var(--ink);
}

.catch-badge {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: linear-gradient(135deg, #f5b942 0%, #e06a2e 100%);
  color: #fffdf8;
  border: 1px solid rgba(255, 246, 218, 0.7);
  box-shadow: 0 2px 0 #a34114;
}

.catch-badge.release {
  background: linear-gradient(135deg, #3bc49b 0%, #1d8a75 100%);
  box-shadow: 0 2px 0 #115c4e;
}

.catch-badge.crown {
  background: linear-gradient(135deg, #ffe788 0%, #e59e1e 100%);
  color: #5b3104;
  border-color: rgba(255, 250, 224, 0.9);
  box-shadow: 0 2px 0 #9b630b;
}

.catch-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.catch-stars {
  color: #d98a14;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.size-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(58, 38, 24, 0.09);
  color: var(--ink);
  font-weight: 700;
}

.val-pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff2c2, #f9d878);
  border: 1.3px solid #d49622;
  color: #6b3f06;
  font-weight: 800;
}

/* Unmistakable Bouncing Coral-Gold Bite Alert with Expanding Ripple Ring */
.bite-alert {
  appearance: none;
  position: fixed;
  bottom: 112px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  padding: 10px 22px 10px 14px;
  border-radius: 999px;
  border: 2.5px solid #fff3cf;
  background: linear-gradient(180deg, #ffa844 0%, #e45c30 100%);
  color: #fffdf8;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 5px 0 #9f3312,
    0 14px 32px rgba(174, 52, 16, 0.48);
  cursor: pointer;
  animation: biteBounce 0.44s var(--bounce) infinite alternate;
}

.bite-bobber-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 248, 224, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bite-ripple {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2.5px solid #fff2c4;
  animation: biteRippleRing 0.9s ease-out infinite;
  pointer-events: none;
}

@keyframes biteRippleRing {
  0%   { transform: scale(0.75); opacity: 0.95; }
  100% { transform: scale(1.75); opacity: 0; }
}

@keyframes biteBounce {
  from { transform: translateX(-50%) translateY(0) scale(0.98); }
  to   { transform: translateX(-50%) translateY(-6px) scale(1.045); }
}

/* Sculpted Teak-and-Brass Fishing Fight Gauge Deck (Clears Centered Bottom 2-Icon Dock!) */
.fish-fight-hud {
  position: fixed;
  bottom: 102px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  width: 374px;
  padding: 12px 15px 13px;
  border-radius: 20px;
  background-image: var(--paper-grain), var(--hud-bg);
  background-color: var(--paper);
  border: 2.5px solid var(--hud-border);
  box-shadow:
    inset 0 0 0 2.5px rgba(255, 250, 236, 0.55),
    inset 0 0 0 4px rgba(197, 148, 91, 0.26),
    0 5px 0 var(--hud-lip),
    0 16px 34px rgba(14, 28, 36, 0.34);
  color: var(--hud-ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

body.is-night .fish-fight-hud {
  background-image: var(--hud-bg);
  background-color: rgba(18, 30, 44, 0.92);
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 232, 184, 0.14),
    0 5px 0 rgba(8, 14, 24, 0.88),
    0 0 24px rgba(235, 184, 96, 0.16);
}

.fish-fight-hud.thrashing,
.fish-fight-hud.is-thrashing {
  border-color: var(--coral);
  box-shadow:
    inset 0 0 0 2.5px rgba(255, 226, 220, 0.45),
    0 5px 0 var(--coral-lip),
    0 0 24px rgba(224, 90, 71, 0.45);
  animation: fightShake 0.14s ease-in-out infinite alternate;
}

@keyframes fightShake {
  from { transform: translateX(calc(-50% - 1.5px)) rotate(-0.55deg); }
  to   { transform: translateX(calc(-50% + 1.5px)) rotate(0.55deg); }
}

.fight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.fight-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3.5px 10px;
  border-radius: 999px;
  background: rgba(31, 142, 139, 0.15);
  border: 1.4px solid rgba(31, 142, 139, 0.42);
  color: #166a68;
  font-size: 11.8px;
  font-weight: 800;
  line-height: 1.25;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.is-night .fight-status-pill {
  background: rgba(52, 182, 176, 0.20);
  border-color: rgba(114, 232, 224, 0.46);
  color: #9bf7f0;
}

.fish-fight-hud.thrashing .fight-status-pill,
.fish-fight-hud.is-thrashing .fight-status-pill {
  background: linear-gradient(180deg, #f36b57, #d63d2c);
  border-color: #ffd7cf;
  color: #fffef9;
  animation: thrashPulse 0.45s ease-in-out infinite alternate;
}

@keyframes thrashPulse {
  from { box-shadow: 0 0 0 rgba(224, 72, 54, 0.0); }
  to   { box-shadow: 0 0 12px rgba(224, 72, 54, 0.65); }
}

.mini-pill-btn {
  appearance: none;
  border: 1.8px solid var(--teak-border);
  background: linear-gradient(180deg, #fffdf8, #f7ead0);
  color: var(--ink);
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2.5px 0 var(--teak-lip);
  transition: transform 0.14s var(--bounce), box-shadow 0.14s ease, background 0.16s ease;
}

.mini-pill-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 0 var(--teak-lip);
}

.mini-pill-btn:active {
  transform: translateY(1.5px);
  box-shadow: 0 1px 0 var(--teak-lip);
}

.reel-hold-btn {
  background: linear-gradient(180deg, var(--lagoon-hi), var(--lagoon));
  color: #fffef9;
  border-color: #b7efea;
  box-shadow: 0 3px 0 var(--lagoon-lip);
  padding: 4.5px 12px;
  flex-shrink: 0;
}

.reel-hold-btn:hover {
  background: linear-gradient(180deg, #43c6bf, #239c98);
  box-shadow: 0 4px 0 var(--lagoon-lip);
}

.fight-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.fight-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fight-tag {
  width: 28px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--hud-ink-soft);
}

.fight-track {
  position: relative;
  flex: 1;
  height: 13px;
  border-radius: 99px;
  border: 1.6px solid var(--brass);
  box-shadow: inset 0 2px 4px rgba(10, 22, 30, 0.34);
}

/* Recessed Deep-Ocean Pull Channel */
.prog-track {
  overflow: visible;
  background: linear-gradient(180deg, #123442 0%, #1d4e5e 100%);
}

/* Segmented Brass-Framed Tension Channel */
.tension-track {
  overflow: hidden;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 23px,
      rgba(58, 38, 24, 0.16) 23px,
      rgba(58, 38, 24, 0.16) 25px
    ),
    linear-gradient(180deg, #e7d7ba 0%, #f2e5cd 100%);
}

body.is-night .tension-track {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 23px,
      rgba(255, 240, 204, 0.12) 23px,
      rgba(255, 240, 204, 0.12) 25px
    ),
    linear-gradient(180deg, #162636 0%, #1e3346 100%);
}

.fight-prog-fill {
  height: 100%;
  width: 24%;
  border-radius: 99px;
  background-image:
    repeating-linear-gradient(
      -55deg,
      rgba(255, 255, 255, 0.24) 0px,
      rgba(255, 255, 255, 0.24) 7px,
      transparent 7px,
      transparent 16px
    ),
    linear-gradient(90deg, #27b5ab 0%, #57d6c6 55%, #f5c953 100%);
  background-size: 28px 100%, 100% 100%;
  animation: waterShimmer 0.9s linear infinite;
  transition: width 0.06s linear;
}

@keyframes waterShimmer {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 28px 0, 0 0; }
}

.fight-fish-marker {
  position: absolute;
  top: 50%;
  left: 24%;
  transform: translate(-50%, -52%);
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(10, 24, 32, 0.45));
  transition: left 0.06s linear;
}

.fight-tens-fill {
  height: 100%;
  width: 20%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2eb876 0%, #55d694 100%);
  transition: width 0.05s linear, background 0.16s ease;
}

.fight-tens-fill.warn {
  background: repeating-linear-gradient(
    -45deg,
    #eca132 0px,
    #eca132 7px,
    #ffbe52 7px,
    #ffbe52 14px
  );
}

.fight-tens-fill.danger {
  background: repeating-linear-gradient(
    -45deg,
    #d63729 0px,
    #d63729 7px,
    #ff6959 7px,
    #ff6959 14px
  );
  background-size: 20px 20px;
  animation: dangerStripe 0.45s linear infinite;
}

@keyframes dangerStripe {
  from { background-position: 0 0; }
  to   { background-position: 20px 0; }
}

/* Brushed Brass Tension Limit Tick Pin */
.tension-tick {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffe7a3, #c4841c);
  box-shadow: 0 0 0 1px rgba(58, 38, 24, 0.45);
}

.fight-end-tug {
  width: 22px;
}

/* ==========================================================================
   4. PURE BOTTOM OCEAN: PIER PROMPT & CENTERED CUTE-RETRO 2-ICON DOCK
   ========================================================================== */

/* Floating Coral-Awning Teak Pier Proximity Badge (Clears Centered Bottom Dock!) */
.pier-shop-prompt {
  appearance: none;
  position: fixed;
  left: 50%;
  bottom: 102px;
  transform: translateX(-50%);
  z-index: 23;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px 7px 11px;
  border-radius: 999px;
  overflow: hidden;
  background-image: var(--paper-grain), linear-gradient(180deg, #fffaf0, #ffe9d6);
  border: 2.2px solid #df755d;
  box-shadow: 0 3.5px 0 #a84732, 0 12px 24px rgba(124, 44, 28, 0.30);
  color: #5b2517;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  animation: pierPromptBob 1.9s ease-in-out infinite;
}

.pier-shop-prompt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--coral) 0 10px, #fff7e6 10px 20px);
}

.pier-shop-prompt .key-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  margin-left: 2px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--coral-hi), var(--coral));
  color: #fffaf2;
  font-size: 11px;
  box-shadow: 0 1.5px 0 var(--coral-lip);
}

@keyframes pierPromptBob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, -4px); }
}

/* Bottom-Center Cute & Retro 2-Icon Capsule Dock (Matches Top-Left Retro Dock 1:1!) */
.bottom-center-dock {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 22px;
  background: rgba(255, 249, 236, 0.42);
  backdrop-filter: blur(10px) saturate(135%);
  -webkit-backdrop-filter: blur(10px) saturate(135%);
  border: 1.5px solid rgba(255, 248, 232, 0.72);
  box-shadow:
    0 8px 24px rgba(32, 24, 16, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

body.is-dusk .bottom-center-dock {
  background: rgba(255, 236, 212, 0.44);
  border-color: rgba(255, 224, 190, 0.68);
}

body.is-night .bottom-center-dock {
  background: rgba(20, 30, 42, 0.50);
  border-color: rgba(228, 184, 114, 0.36);
  box-shadow:
    0 10px 26px rgba(4, 10, 18, 0.48),
    inset 0 1px 0 rgba(255, 236, 198, 0.14);
}

.retro-hook-btn {
  width: 54px;
  height: 54px;
}

.retro-rod-btn {
  width: 58px;
  height: 58px;
}

/* Upward-popping warm cream-espresso hover tooltips on Bottom-Center Dock */
.bottom-center-dock .retro-app-btn[data-tip]::after {
  top: auto;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
}

.bottom-center-dock .retro-app-btn[data-tip]:hover::after,
.bottom-center-dock .retro-app-btn[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Compact Retro Enamel Quantity Badge on Fish Hook Bait Button (e.g. ×4) */
.retro-bait-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 24px;
  height: 20px;
  padding: 0 5.5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f3a634, #d67618);
  border: 2px solid #fff8eb;
  color: #fffef9;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  box-shadow: 0 2.5px 6px rgba(124, 62, 10, 0.40);
  pointer-events: none;
  z-index: 4;
}

.retro-hook-btn.is-rare .retro-app-icon {
  filter: drop-shadow(0 0 10px rgba(248, 198, 66, 0.85)) drop-shadow(0 4px 8px rgba(32, 24, 16, 0.28));
  animation: rareHookGlow 2.2s ease-in-out infinite alternate;
}

@keyframes rareHookGlow {
  from { filter: drop-shadow(0 0 6px rgba(248, 198, 66, 0.65)) drop-shadow(0 4px 8px rgba(32, 24, 16, 0.26)); }
  to   { filter: drop-shadow(0 0 14px rgba(255, 214, 88, 0.95)) drop-shadow(0 4px 8px rgba(32, 24, 16, 0.28)); }
}

.retro-rod-btn.active .retro-app-icon {
  filter: drop-shadow(0 0 8px rgba(242, 174, 68, 0.65)) drop-shadow(0 4px 8px rgba(32, 24, 16, 0.28));
}

.retro-rod-btn.is-bite {
  animation: rodBitePulse 0.42s var(--bounce) infinite alternate;
}

.retro-rod-btn.is-bite .retro-app-icon {
  filter: drop-shadow(0 0 14px rgba(244, 102, 54, 0.92)) drop-shadow(0 4px 8px rgba(140, 34, 16, 0.42));
}

@keyframes rodBitePulse {
  from { transform: scale(1); }
  to   { transform: translateY(-3px) scale(1.09); }
}

/* Floating Mini Coral-Gold "提竿!" Pill on Rod Icon During BITE */
.cast-bite-chip {
  position: absolute;
  top: -10px;
  right: -12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff9d3b, #e24e2b);
  border: 2px solid #fff8eb;
  color: #fffef9;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2.5px 0 #9b2c12, 0 6px 14px rgba(176, 48, 16, 0.45);
  pointer-events: none;
  z-index: 5;
}

/* ==========================================================================
   5. HANDCRAFTED BOOK-CRAFT MODALS (#tackle-modal & #shop-modal)
   ========================================================================== */
.tackle-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(14, 28, 36, 0.50);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tackle-panel {
  position: relative;
  width: min(650px, 94vw);
  max-height: min(680px, 89vh);
  border-radius: 24px;
  background-image: var(--paper-grain), linear-gradient(180deg, var(--modal-paper-hi) 0%, var(--modal-paper) 100%);
  background-color: var(--modal-paper);
  border: 3.5px solid var(--modal-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 8px 0 var(--modal-lip),
    0 28px 68px rgba(10, 22, 30, 0.46);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  --icon-stroke: #3a2618;
  animation: modalPop 0.28s var(--bounce);
}

/* Subtle Brushed-Brass Corner Rivets tucked cleanly into the margins of the Field Journal! */
.journal-panel::before,
.journal-panel::after {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  z-index: 6;
  background:
    radial-gradient(circle at 5px 5px, #f7d884 0 2.3px, #9d6d1c 2.4px 3.8px, transparent 4.1px),
    radial-gradient(circle at calc(100% - 5px) 5px, #f7d884 0 2.3px, #9d6d1c 2.4px 3.8px, transparent 4.1px),
    radial-gradient(circle at 5px calc(100% - 5px), #f7d884 0 2.3px, #9d6d1c 2.4px 3.8px, transparent 4.1px),
    radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #f7d884 0 2.3px, #9d6d1c 2.4px 3.8px, transparent 4.1px);
}

.journal-panel::after {
  display: none;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.93) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Field Journal Teak & Brass Book-Binding Spine Header Trim */
.tackle-awning.journal-binding {
  position: relative;
  height: 16px;
  flex-shrink: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 240, 204, 0.14) 0px,
      rgba(255, 240, 204, 0.14) 18px,
      rgba(74, 42, 16, 0.10) 18px,
      rgba(74, 42, 16, 0.10) 36px
    ),
    linear-gradient(180deg, #b88148 0%, #8f5d2c 100%);
  border-bottom: 2px solid #dfa840;
  box-shadow: inset 0 1px 0 rgba(255, 238, 198, 0.35), 0 2px 6px rgba(58, 38, 24, 0.22);
}

.awning-scallops.journal-clasp {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 58px;
  height: 10px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #f3cd74, #c58a24);
  border: 1.5px solid #8a5b14;
  border-top: none;
  box-shadow: 0 2px 4px rgba(58, 38, 24, 0.28);
  pointer-events: none;
}

.tackle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 24px 12px;
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.85), rgba(246, 234, 208, 0.55));
  border-bottom: 1.5px dashed rgba(182, 134, 74, 0.42);
}

.journal-book-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 99px;
  background: rgba(31, 142, 139, 0.14);
  border: 1.4px solid rgba(31, 142, 139, 0.36);
  color: #166a68;
  font-size: 10.5px;
  font-weight: 800;
}

.tab-creel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--coral-hi), var(--coral));
  color: #fffaf2;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1.5px 0 var(--coral-lip);
}

.tackle-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-book-badge,
.modal-compass-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: radial-gradient(circle at 38% 30%, #fffdf6, #f4dfba);
  border: 2.2px solid var(--brass);
  box-shadow: 0 2.5px 0 var(--brass-lip);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-book-badge svg,
.modal-compass-badge svg {
  width: 28px;
  height: 28px;
}

.tackle-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.tackle-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 2px;
}

.small-close {
  width: 34px;
  height: 34px;
  background-image: var(--paper-grain), linear-gradient(180deg, #fffdf8, #f3e4c6) !important;
  border-color: var(--teak-border) !important;
  box-shadow: 0 2.5px 0 var(--teak-lip) !important;
  color: var(--ink) !important;
}

.small-close:hover {
  background-image: linear-gradient(180deg, #ffffff, #faeed7) !important;
}

/* Tactile Paper-Bookmark Tabs Rising Cleanly from the Top Divider! */
.tackle-tabs.journal-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 9px 20px 0;
  background: linear-gradient(180deg, #eddcb9 0%, #e6d1a8 100%);
  border-bottom: 2px solid var(--modal-border);
  flex-wrap: nowrap;
}

.tackle-tab {
  appearance: none;
  position: relative;
  bottom: -2px;
  flex: 1;
  border: 2px solid rgba(182, 134, 74, 0.55);
  border-bottom: 2px solid var(--modal-border);
  background: linear-gradient(180deg, #f3e5c7, #e8d5b0);
  color: var(--ink-soft);
  padding: 8px 10px 7px;
  border-radius: 13px 13px 0 0;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.14s var(--bounce), background 0.16s ease, color 0.16s ease;
}

.tackle-tab:hover:not(.active) {
  background: linear-gradient(180deg, #faf0da, #f1e0bd);
  color: var(--ink);
  transform: translateY(-2px);
}

.tackle-tab.active {
  background-image: var(--paper-grain), linear-gradient(180deg, #fffdf8 0%, var(--modal-paper) 100%);
  background-color: var(--modal-paper);
  color: var(--ink);
  border-color: var(--modal-border);
  border-bottom-color: var(--modal-paper);
  box-shadow: inset 0 3px 0 var(--lagoon);
  padding-top: 10px;
}

/* Warm Custom Scrollbar inside Modal Pages */
.tackle-body {
  padding: 15px 20px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-image: var(--paper-grain);
  background-color: var(--modal-paper);
  scrollbar-width: thin;
  scrollbar-color: #c5945b rgba(197, 148, 91, 0.16);
}

.tackle-body::-webkit-scrollbar {
  width: 8px;
}

.tackle-body::-webkit-scrollbar-track {
  background: rgba(197, 148, 91, 0.14);
  border-radius: 99px;
}

.tackle-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cfa167, #b27d42);
  border-radius: 99px;
  border: 2px solid var(--modal-paper);
}

.tackle-body::-webkit-scrollbar-thumb:hover {
  background: #a46e34;
}

.tackle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* Stamp-Framed Specimen & Creel Cards */
.tackle-item {
  position: relative;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fffdf8;
  border: 2px solid #e1caa4;
  box-shadow:
    inset 0 0 0 2px rgba(255, 250, 240, 0.9),
    inset 0 0 0 3px rgba(197, 148, 91, 0.16),
    0 3px 0 #cfa976;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tackle-item.is-featured-row {
  background: linear-gradient(180deg, #fffdf4, #fff4d6);
  border-color: #e0a83e;
  box-shadow: 0 3px 0 #b88122;
}

.tackle-item.clickable {
  cursor: pointer;
  transition: transform 0.14s var(--bounce), box-shadow 0.14s ease, border-color 0.16s ease;
}

.tackle-item.clickable:hover {
  transform: translateY(-2px);
  border-color: var(--brass);
  box-shadow: 0 5px 0 #bd8f4a;
}

.tackle-item.locked {
  background: #f2e6cf;
  border: 1.8px dashed #cbb187;
  box-shadow: inset 0 1px 4px rgba(88, 60, 28, 0.08);
}

/* Rarity Corner Seal & Stamps */
.rarity-corner-seal {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #fffaf0;
  box-shadow: 0 1px 3px rgba(58, 38, 24, 0.25);
  z-index: 2;
}

.get-stamp {
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 1.5px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f18372, #d85242);
  color: #fffef9;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  transform: rotate(5deg);
  box-shadow: 0 1.5px 0 #9d3225;
}

.get-stamp.crown {
  background: linear-gradient(135deg, #ffe27a, #e29e1e);
  color: #5c3305;
  box-shadow: 0 1.5px 0 #9b640b;
}

.get-stamp.protected {
  background: linear-gradient(135deg, #3ac49a, #1d8974);
  box-shadow: 0 1.5px 0 #125c4d;
  transform: none;
}

.item-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.sticker-frame {
  width: 54px;
  height: 52px;
  border-radius: 13px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  background: radial-gradient(circle at 35% 30%, #fffef9, #f3e4c5);
  border: 1.6px solid #dec193;
  box-shadow: inset 0 -2px 0 rgba(182, 140, 82, 0.24);
}

.tackle-item.locked .sticker-frame {
  background: #e9dac0;
  border-color: #cab089;
}

.fish-sticker-img {
  display: block;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 1.5px 1.5px rgba(58, 38, 24, 0.16));
}

.fish-sticker-silhouette {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Crisp Deep-Navy Ink Silhouette on Warm Parchment */
.fish-sticker-img.is-silhouette {
  filter: brightness(0) saturate(100%) invert(24%) sepia(26%) saturate(680%) hue-rotate(174deg) brightness(88%) contrast(92%);
  opacity: 0.42;
}

.fish-silhouette-q {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #fffaf0;
  text-shadow: 0 1px 3px rgba(32, 54, 78, 0.72);
  pointer-events: none;
}

.item-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.item-desc {
  font-size: 11.3px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 2px;
  line-height: 1.4;
}

.item-price {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 142, 139, 0.13);
  border: 1.3px solid rgba(31, 142, 139, 0.28);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--lagoon);
  white-space: nowrap;
}

.tackle-footer {
  padding: 11px 24px 14px;
  background: linear-gradient(180deg, #f3e4c6, #ebd8b4);
  border-top: 1.5px dashed rgba(182, 134, 74, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.primary-action-btn {
  appearance: none;
  border: 2px solid #96ded9;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 12.8px;
  font-weight: 800;
  color: #fffef9;
  background: linear-gradient(180deg, var(--lagoon-hi), var(--lagoon));
  cursor: pointer;
  box-shadow: 0 3.5px 0 var(--lagoon-lip);
  transition: transform 0.14s var(--bounce), box-shadow 0.14s ease, opacity 0.14s ease;
  white-space: nowrap;
}

.primary-action-btn:hover:not(:disabled) {
  transform: translateY(-1.5px);
  box-shadow: 0 5px 0 var(--lagoon-lip);
}

.primary-action-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1.5px 0 var(--lagoon-lip);
}

.primary-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-action-btn.gold-sell-btn {
  border-color: #ffe8a8;
  background: linear-gradient(180deg, #f2a43b, #d86526);
  box-shadow: 0 3.5px 0 #963c10;
}

.primary-action-btn.gold-sell-btn:hover:not(:disabled) {
  box-shadow: 0 5px 0 #963c10;
}

/* Encyclopedia Filter Bar & Sleek Progress Bar */
.dex-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 15px;
  background: rgba(242, 228, 200, 0.65);
  border: 1.5px solid rgba(197, 148, 91, 0.42);
  margin-bottom: 2px;
}

.dex-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.dex-filters {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.dex-filter-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-right: 2px;
}

.dex-filter-btn {
  appearance: none;
  border: 1.6px solid #d5b282;
  background: #fffdf8;
  color: var(--ink-soft);
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}

.dex-filter-btn:hover:not(.active) {
  color: var(--ink);
  border-color: var(--teak-border);
}

.dex-filter-btn.active {
  background: linear-gradient(180deg, var(--lagoon-hi), var(--lagoon));
  color: #fffef9;
  border-color: var(--lagoon);
  box-shadow: 0 2px 0 var(--lagoon-lip);
}

.dex-filter-btn.time-btn.active {
  background: linear-gradient(180deg, #f3ab45, #d66e22);
  color: #fffef9;
  border-color: #b85814;
  box-shadow: 0 2px 0 #8d3f0a;
}

.dex-prog-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink);
}

.dex-prog-track {
  width: 114px;
  height: 9px;
  border-radius: 99px;
  background: #e5d2b1;
  overflow: hidden;
  border: 1.4px solid #c59b62;
  box-shadow: inset 0 1.5px 2px rgba(58, 38, 24, 0.15);
}

.dex-prog-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--lagoon) 0%, #3ac4b7 60%, var(--brass) 100%);
  transition: width 0.35s ease;
}

/* Illustrated Specimen Detail Page */
.dex-detail-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: #fffdf8;
  border: 2.2px solid #dbb67d;
  box-shadow:
    inset 0 0 0 3px #fffdf8,
    inset 0 0 0 4.5px rgba(197, 148, 91, 0.25),
    0 4px 0 #c1975e;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.dex-detail-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dex-medallion {
  width: 108px;
  height: 102px;
  border-radius: 20px;
  background: radial-gradient(circle at 38% 30%, #fffef9, #f3e0bb);
  border: 2.2px solid var(--brass);
  box-shadow: inset 0 -3px 0 rgba(182, 134, 62, 0.28), 0 3px 0 rgba(164, 118, 44, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
}

.dex-detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dex-detail-en {
  font-size: 12.2px;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 2px 0 8px;
}

.dex-latin {
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  color: #6c513a;
  font-weight: 600;
}

.dex-habitat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dex-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(197, 148, 91, 0.16);
  border: 1.2px solid rgba(197, 148, 91, 0.42);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.dex-detail-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.65;
  padding: 10px 13px;
  border-radius: 13px;
  background: #fbf3e3;
  border: 1.5px dashed rgba(182, 134, 74, 0.52);
}

.dex-detail-note {
  font-size: 12px;
  font-weight: 700;
  color: #195e5c;
  line-height: 1.58;
  padding: 9px 13px;
  border-radius: 13px;
  background: linear-gradient(180deg, #effaf8, #e4f5f2);
  border: 1.5px solid rgba(31, 142, 139, 0.36);
  border-left: 4px solid var(--lagoon);
}

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

.dex-stat-box {
  padding: 9px 10px;
  border-radius: 13px;
  background: #fbf4e4;
  border: 1.6px solid #e1c79c;
  text-align: center;
}

.dex-stat-k {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.dex-stat-v {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 2px;
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1.5px 8px;
  border-radius: 999px;
  background: rgba(31, 142, 139, 0.14);
  border: 1.4px solid rgba(31, 142, 139, 0.42);
  color: #176e6c;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}

.crown-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1.5px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff1b8, #ffd159);
  border: 1.5px solid #d4921c;
  color: #7c4806;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}

/* 4-Tier Rod Workshop Cards with Visual Horizontal Stat Meters */
.rod-card {
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 12px 14px;
}

.rod-card.is-equipped {
  border-color: var(--lagoon);
  background: linear-gradient(180deg, #f3fcfb, #fffdf8);
  box-shadow: 0 3px 0 rgba(31, 142, 139, 0.35);
}

.rod-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rod-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(242, 228, 200, 0.54);
  border: 1.2px solid rgba(197, 148, 91, 0.30);
}

.rod-stat-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
}

.rod-stat-label {
  width: 28px;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.rod-stat-track {
  flex: 1;
  height: 7px;
  border-radius: 99px;
  background: rgba(162, 126, 80, 0.22);
  overflow: hidden;
}

.rod-stat-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--lagoon) 0%, #3ac4ba 100%);
}

.rod-stat-fill.gold {
  background: linear-gradient(90deg, #e29d2c 0%, #f7cb56 100%);
}

.rod-stat-val {
  min-width: 36px;
  text-align: right;
  color: var(--ink);
  font-size: 11px;
}

/* 6-Outfit Fishing Boy Boutique Wardrobe Grid (3x2: 3 Free Classics + 3 10,000 G Collector Editions) */
.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  padding-bottom: 4px;
}

.outfit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 28px 10px 11px;
  border-radius: 18px;
  background: #fffdf8;
  border: 2px solid #e1caa4;
  box-shadow: 0 4px 0 #cfa976;
  cursor: pointer;
  transition: transform 0.16s var(--bounce), box-shadow 0.16s ease, border-color 0.16s ease;
}

.outfit-card:hover {
  transform: translateY(-3px);
  border-color: var(--brass);
  box-shadow: 0 6px 0 #bd8f4a;
}

.outfit-card.active {
  background: linear-gradient(180deg, #fffef9, #effaf8);
  border-color: var(--lagoon);
  box-shadow: inset 0 0 0 2px rgba(31, 142, 139, 0.16), 0 4px 0 var(--lagoon-lip);
}

.outfit-card.is-luxury:not(.active) {
  background: linear-gradient(180deg, #fffef9 0%, #fdf5df 100%);
  border-color: #d9aa4d;
  box-shadow: inset 0 0 0 1.5px rgba(223, 168, 64, 0.22), 0 4px 0 #c4974d;
}

.outfit-card.is-locked:not(.can-unlock) {
  cursor: default;
}

.outfit-card.is-locked:not(.can-unlock):hover {
  transform: none;
  border-color: #d9aa4d;
  box-shadow: inset 0 0 0 1.5px rgba(223, 168, 64, 0.22), 0 4px 0 #c4974d;
}

.outfit-card.is-locked.can-unlock {
  border-color: #df9c22;
  box-shadow: inset 0 0 0 2px rgba(245, 184, 50, 0.24), 0 4px 0 #b57612;
}

.outfit-card.is-locked.can-unlock:hover {
  transform: translateY(-3px);
  border-color: #e6a322;
  box-shadow: inset 0 0 0 2px rgba(245, 184, 50, 0.34), 0 6px 0 #a3650a, 0 10px 18px rgba(214, 142, 26, 0.22);
}

.outfit-portrait-wrap {
  width: 102px;
  height: 102px;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  border: 2.2px solid #dbb883;
  background: #f4f6f8;
  box-shadow: inset 0 -2px 0 rgba(182, 140, 82, 0.14);
}

.outfit-card.is-luxury .outfit-portrait-wrap {
  border-color: #dba63e;
  box-shadow: inset 0 -2px 0 rgba(214, 152, 34, 0.22), 0 2px 6px rgba(184, 130, 32, 0.14);
}

.outfit-card.active .outfit-portrait-wrap {
  border-color: var(--lagoon);
}

.outfit-portrait {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.outfit-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: #fffef9;
}

.outfit-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.outfit-desc {
  font-size: 10.8px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.4;
  flex: 1;
}

.outfit-wear-stamp {
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lagoon-hi), var(--lagoon));
  color: #fffef9;
  font-size: 9.8px;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--lagoon-lip);
}

.outfit-luxury-stamp {
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe79a 0%, #e5a32a 100%);
  border: 1.2px solid #c58214;
  color: #5c3305;
  font-size: 9.6px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  box-shadow: 0 1.8px 0 #9b610c;
}

.outfit-collected-stamp {
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff3c7, #f2c45a);
  border: 1.2px solid #ca962c;
  color: #6b3f06;
  font-size: 9.6px;
  font-weight: 800;
  box-shadow: 0 1.5px 0 #a17018;
}

.outfit-action-row {
  width: 100%;
  margin-top: auto;
  padding-top: 4px;
}

.outfit-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.outfit-status-pill.is-wearing {
  background: rgba(31, 142, 139, 0.14);
  border: 1.5px solid rgba(31, 142, 139, 0.36);
  color: #166a68;
}

.outfit-status-pill.is-equip {
  background: linear-gradient(180deg, #fffdf8, #f3e4c6);
  border: 1.5px solid #cfa56d;
  color: var(--ink);
  box-shadow: 0 2px 0 #c1965b;
}

.outfit-card:hover .outfit-status-pill.is-equip {
  background: linear-gradient(180deg, var(--lagoon-hi), var(--lagoon));
  border-color: var(--lagoon);
  color: #fffef9;
  box-shadow: 0 2px 0 var(--lagoon-lip);
}

.outfit-buy-btn {
  appearance: none;
  width: 100%;
  padding: 5.5px 8px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: transform 0.14s var(--bounce), box-shadow 0.14s ease, filter 0.14s ease;
}

.outfit-buy-btn.can-afford {
  border: 1.6px solid #fff0b8;
  background: linear-gradient(180deg, #f6ba3e 0%, #d87a1c 100%);
  color: #fffef9;
  text-shadow: 0 1px 1px rgba(102, 46, 4, 0.35);
  box-shadow: 0 3px 0 #944d0a;
  cursor: pointer;
}

.outfit-buy-btn.can-afford:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 4px 0 #944d0a;
}

.outfit-buy-btn.can-afford:active {
  transform: translateY(1.5px);
  box-shadow: 0 1px 0 #944d0a;
}

.outfit-buy-btn:disabled {
  border: 1.5px dashed #ccb084;
  background: #f3e7cf;
  color: #8b6c4a;
  box-shadow: none;
  cursor: not-allowed;
}

/* ==========================================================================
   6. SEASIDE PIER TACKLE & BAIT SHOP MODAL (Coral Canvas Awning + Cedar Shelves)
   ========================================================================== */
.shop-panel {
  width: min(670px, 95vw);
  max-height: min(690px, 90vh);
}

/* Authentic Coral & Cream Striped Canvas Awning with Realistic Scalloped Shadow! */
.shop-awning {
  position: relative;
  height: 26px;
  flex-shrink: 0;
  z-index: 4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(70, 22, 14, 0.12) 100%),
    repeating-linear-gradient(
      90deg,
      #e05a47 0px,
      #e05a47 30px,
      #fbf4e4 30px,
      #fbf4e4 60px
    );
}

.shop-awning-scallops {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 12px;
  background:
    radial-gradient(circle at 15px 0, #dc5643 12px, transparent 13px) 0 0 / 60px 12px repeat-x,
    radial-gradient(circle at 45px 0, #f7edd6 12px, transparent 13px) 0 0 / 60px 12px repeat-x;
  filter: drop-shadow(0 4px 3px rgba(82, 46, 22, 0.28));
  pointer-events: none;
}

/* Warm Honey-Teak Shop Fascia Header */
.shop-header {
  padding-top: 22px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(168, 114, 54, 0.04) 0px,
      rgba(168, 114, 54, 0.04) 2px,
      transparent 2px,
      transparent 7px
    ),
    linear-gradient(180deg, #f5e2bf 0%, #edd3a8 100%);
  border-bottom: 2px solid #cfa066;
}

.shop-sign-badge {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(180deg, #fffaf0, #fce1cf);
  border: 2.2px solid #d87a5e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2.5px 0 #a9523b;
}

.shop-sign-badge svg {
  width: 26px;
  height: 26px;
}

.shop-direct-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 99px;
  background: linear-gradient(180deg, #fff1e8, #ffdfd2);
  border: 1.4px solid #de7f63;
  color: #a43723;
  font-size: 10.5px;
  font-weight: 800;
}

.shop-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4.5px 12px 4.5px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffbef, #fae2a3);
  border: 2px solid var(--brass);
  box-shadow: 0 2.5px 0 var(--brass-lip);
  color: #5e3807;
  font-size: 14px;
  font-weight: 800;
}

.shop-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(180deg, #f8ebd2, #f1dfc0);
  border-bottom: 1.5px solid rgba(182, 134, 74, 0.36);
}

.shop-featured-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff5cc, #fce28b);
  border: 1.5px solid #d69624;
  color: #744106;
  font-size: 12px;
  font-weight: 800;
}

.shop-featured-chip .hot-dot {
  color: #d94a2b;
  font-size: 12px;
}

.shop-eta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #e7f6f4;
  border: 1.5px solid #59b4ae;
  color: #16615f;
  font-size: 11.5px;
  font-weight: 800;
}

.shop-eta-chip.unloading {
  background: #ffefe4;
  border-color: #e67452;
  color: #a6371e;
}

.tackle-tabs.shop-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 20px 0;
  background: linear-gradient(180deg, #ecd8b4, #e4cca2);
  border-bottom: 2px solid var(--modal-border);
}

.shop-tab {
  appearance: none;
  position: relative;
  bottom: -2px;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px 7px;
  border-radius: 13px 13px 0 0;
  border: 2px solid rgba(182, 134, 74, 0.55);
  border-bottom: 2px solid var(--modal-border);
  background: linear-gradient(180deg, #f3e4c4, #e7d3ad);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12.8px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.14s var(--bounce);
}

.shop-tab:hover:not(.active) {
  background: linear-gradient(180deg, #faf0db, #f0dfb9);
  color: var(--ink);
  transform: translateY(-2px);
}

.shop-tab.active {
  background-image: var(--paper-grain), linear-gradient(180deg, #fffdf8 0%, var(--modal-paper) 100%);
  background-color: var(--modal-paper);
  color: #9e3522;
  border-color: var(--modal-border);
  border-bottom-color: var(--modal-paper);
  box-shadow: inset 0 3px 0 var(--coral);
  padding-top: 10px;
}

/* Cedar Wooden-Shelf Bait Counter */
.bait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bait-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 13px 11px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf7 0%, #f8edd8 100%);
  border: 2.2px solid #cca06a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 0 #a3743f,
    0 8px 18px rgba(58, 38, 24, 0.10);
  transition: border-color 0.18s ease, transform 0.16s var(--bounce);
}

.bait-card:hover {
  transform: translateY(-1.5px);
}

.bait-card.is-equipped {
  border-color: var(--lagoon);
  background: linear-gradient(180deg, #f2fcfa 0%, #fbf7eb 100%);
  box-shadow: 0 4px 0 var(--lagoon-lip);
}

.bait-card.is-special {
  border-color: var(--brass);
  background: linear-gradient(180deg, #fffcf0 0%, #fcecc4 100%);
  box-shadow: 0 4px 0 var(--brass-lip);
}

.bait-card.is-soldout {
  opacity: 0.76;
}

.bait-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Full-Bleed Hand-Painted Cute & Retro Bait Squircle Slot */
.bait-icon-box {
  width: 54px;
  height: 54px;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bait-card-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(48, 30, 18, 0.18));
}

.bait-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bait-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.bait-tag-pill {
  padding: 1.5px 7px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  color: #fffdf8;
}

.bait-desc {
  font-size: 11.4px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.44;
  margin-top: 2px;
}

/* Tactile Cedar Shelf Bar with Stock Pips (● ● ● ○ ○) */
.bait-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.3px;
  font-weight: 800;
  color: var(--ink-soft);
  padding: 5px 9px;
  border-radius: 10px;
  background: linear-gradient(180deg, #efe0c2, #e7d3ad);
  border: 1px solid rgba(182, 134, 74, 0.34);
}

.bait-stock-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bait-pips {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.bait-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(126, 86, 42, 0.24);
  border: 1px solid rgba(126, 86, 42, 0.42);
}

.bait-pip.filled {
  background: var(--lagoon);
  border-color: var(--lagoon-lip);
  box-shadow: 0 0 0 1px rgba(255, 250, 236, 0.55);
}

.bait-card.is-special .bait-pip.filled {
  background: #e29d22;
  border-color: #9e670e;
}

.bait-stock-low {
  color: #be3b29;
}

.bait-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
}

.bait-buy-btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
}

.bait-equip-btn {
  appearance: none;
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px solid #8bc2bd;
  background: #ebf8f6;
  color: #176662;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2.5px 0 #5f9d98;
  transition: transform 0.14s var(--bounce), background 0.15s ease;
}

.bait-equip-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #daf2ef;
}

.bait-equip-btn.active {
  background: linear-gradient(180deg, var(--lagoon-hi), var(--lagoon));
  border-color: var(--lagoon);
  box-shadow: 0 2.5px 0 var(--lagoon-lip);
  color: #fffef9;
}

.bait-equip-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.featured-sell-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1.5px 7px;
  border-radius: 99px;
  background: linear-gradient(180deg, #ffe996, #f7c74a);
  border: 1.3px solid #c98618;
  color: #6d3a04;
  font-size: 10px;
  font-weight: 800;
}

.item-sell-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-sell-btn {
  appearance: none;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1.8px solid #d6983e;
  background: linear-gradient(180deg, #fff6dc, #fbe3a8);
  box-shadow: 0 2px 0 #a97324;
  color: #6b3d07;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s var(--bounce);
}

.mini-sell-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #fffaf0, #ffdfa0);
}

.empty-hint {
  text-align: center;
  padding: 28px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* Floating Micro-Particle FX Layer */
.ui-fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}

.ui-pop-particle {
  position: fixed;
  font-family: var(--sans);
  font-weight: 900;
  user-select: none;
  pointer-events: none;
  text-shadow: 0 2px 0 rgba(58, 38, 24, 0.30);
  animation: particleFloat 1.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx) * 0.25), calc(-50% + var(--dy) * 0.25)) scale(1.15) rotate(var(--rot));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.75) rotate(calc(var(--rot) * 1.8));
  }
}

/* Optional QA bar (?qa=1) */
.qa-hud {
  position: fixed;
  left: 18px;
  bottom: 16px;
  z-index: 30;
  padding: 8px 10px;
  border-radius: 14px;
  background-image: var(--hud-bg);
  background-color: var(--paper);
  border: 2px solid var(--hud-border);
  box-shadow: 0 3px 0 var(--hud-lip), var(--shadow-ambient);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: var(--hud-ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qa-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.qa-row button {
  border: 1.5px solid var(--teak-border);
  background: #fffdf8;
  color: var(--ink);
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.qa-row button:hover {
  border-color: var(--coral);
  color: var(--coral);
}

/* ==========================================================================
   7. INTERACTIVE LIVE NAUTICAL CHART & HYDROGRAPHIC TELEMETRY MODAL (#map-modal)
   ========================================================================== */
.map-panel {
  width: min(768px, 95vw);
  max-height: min(640px, 90vh);
}

.map-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(240px, 0.92fr);
  gap: 15px;
  padding: 16px 22px 20px;
  background-image: var(--paper-grain);
  background-color: var(--modal-paper);
  overflow-y: auto;
  flex: 1;
}

.map-chart-pane {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.map-canvas-frame {
  position: relative;
  border-radius: 16px;
  padding: 6px;
  background: linear-gradient(180deg, #cda064, #a4743c);
  border: 2px solid #8a5c28;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 204, 0.45),
    0 4px 0 #744a1d,
    0 10px 22px rgba(58, 38, 24, 0.18);
}

#harbor-map-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 11px;
  background: #2c6f8c;
  box-shadow: inset 0 0 0 1.5px rgba(255, 244, 214, 0.45);
}

.map-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(242, 228, 200, 0.72);
  border: 1.4px solid rgba(197, 148, 91, 0.42);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
}

.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.leg-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1.2px solid rgba(58, 38, 24, 0.35);
}

.leg-swatch.shallow { background: #8edcd2; }
.leg-swatch.mid     { background: #4cb3b0; }
.leg-swatch.deep    { background: #2c6f8c; }
.leg-swatch.boat    { background: #e05a47; border-radius: 50%; border-color: #fff6d6; }

.map-telemetry-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-zone-card {
  padding: 11px 13px;
  border-radius: 16px;
  background: #fffdf8;
  border: 2px solid #dfc59a;
  box-shadow: 0 3px 0 #c6a16d;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-zone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.map-zone-kicker {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--lagoon);
}

.map-time-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff3c4, #f7d982);
  border: 1.3px solid #d49622;
  color: #6b3f06;
  font-size: 10.5px;
  font-weight: 800;
}

.map-zone-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.map-zone-headline strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.map-depth-readout {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(31, 142, 139, 0.14);
  border: 1.4px solid rgba(31, 142, 139, 0.36);
  color: #166a68;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.map-coords-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.map-species-card {
  padding: 11px 13px;
  border-radius: 16px;
  background: #fffdf8;
  border: 2px solid #dfc59a;
  box-shadow: 0 3px 0 #c6a16d;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.map-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink);
}

.map-species-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--lagoon);
}

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

.map-species-tile {
  appearance: none;
  border: 1.6px solid #e1c89e;
  background: radial-gradient(circle at 38% 30%, #fffef9, #f5e6c8);
  border-radius: 12px;
  padding: 5px 4px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.14s var(--bounce), border-color 0.16s ease, box-shadow 0.16s ease;
}

.map-species-tile:hover {
  transform: translateY(-2px);
  border-color: var(--brass);
  box-shadow: 0 3px 0 rgba(189, 143, 74, 0.55);
}

.map-species-tile.is-locked {
  background: #efe2c8;
  border-style: dashed;
  border-color: #c9ae84;
}

.map-species-name {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--ink);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-species-tile.is-locked .map-species-name {
  color: var(--ink-soft);
}

.map-status-card {
  padding: 9px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f6ead2, #eedcb9);
  border: 1.6px solid #cfa56d;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 800;
  color: #16615f;
}

.map-status-row.muted {
  color: var(--ink-soft);
}

/* ==========================================================================
   8. DUAL-HARBOR FIELD JOURNAL TABS, VOYAGE SELECTOR BAR & WAVE TRANSITION
   ========================================================================== */
.journal-harbor-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 9px 20px 8px;
  background: linear-gradient(180deg, #f5e6c8 0%, #edd9b4 100%);
  border-bottom: 1.5px solid rgba(182, 134, 74, 0.36);
}

.journal-harbor-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 13px;
  border: 1.8px solid #d4b07e;
  background: rgba(255, 253, 246, 0.80);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12.2px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(182, 134, 74, 0.32);
  transition: transform 0.14s var(--bounce), background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.journal-harbor-tab:hover:not(.active) {
  transform: translateY(-1px);
  border-color: var(--brass);
  color: var(--ink);
  background: #fffdf8;
}

.journal-harbor-tab.active {
  background: linear-gradient(180deg, var(--lagoon-hi), var(--lagoon));
  border-color: var(--lagoon);
  color: #fffef9;
  box-shadow: 0 2.5px 0 var(--lagoon-lip);
}

.journal-harbor-tab[data-dex-harbor="harbor2"].active {
  background: linear-gradient(180deg, #2d7fa8, #1d577c);
  border-color: #194c6c;
  box-shadow: 0 2.5px 0 #10334a;
}

.jht-count {
  padding: 1.5px 7px;
  border-radius: 999px;
  background: rgba(58, 38, 24, 0.10);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.journal-harbor-tab.active .jht-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fffef9;
}

/* 2-Harbor Voyage Selector Bar inside Nautical Compass Modal (#map-modal) */
.harbor-voyage-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 20px 9px;
  background: linear-gradient(180deg, #f6e8cc 0%, #eee0bf 100%);
  border-bottom: 1.5px dashed rgba(182, 134, 74, 0.44);
}

.voyage-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 15px;
  background: #fffdf8;
  border: 2px solid #dec396;
  box-shadow: 0 3px 0 #c6a16d;
  transition: transform 0.15s var(--bounce), border-color 0.16s ease, box-shadow 0.16s ease;
}

.voyage-card.is-current {
  background: linear-gradient(180deg, #fffef9, #edf9f7);
  border-color: var(--lagoon);
  box-shadow: inset 0 0 0 1.5px rgba(31, 142, 139, 0.14), 0 3px 0 var(--lagoon-lip);
}

.voyage-card.is-fjord.is-current {
  background: linear-gradient(180deg, #f7fbff, #e6f2fa);
  border-color: #256e96;
  box-shadow: inset 0 0 0 1.5px rgba(37, 110, 150, 0.16), 0 3px 0 #154561;
}

.voyage-card:not(.is-current):hover {
  transform: translateY(-1.5px);
  border-color: var(--brass);
}

.voyage-card-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.voyage-card-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  flex-wrap: wrap;
}

.voyage-card-sub {
  font-size: 10.6px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voyage-diff-chip {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
}

.voyage-diff-chip.is-easy {
  background: rgba(31, 142, 139, 0.14);
  color: #166a68;
  border: 1px solid rgba(31, 142, 139, 0.34);
}

.voyage-diff-chip.is-tier2 {
  background: linear-gradient(135deg, #ffe7a4, #f5b947);
  color: #663806;
  border: 1px solid #cd8c1c;
}

.voyage-sail-btn {
  appearance: none;
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1.8px solid #fff0be;
  background: linear-gradient(180deg, #f3a93d, #d86e22);
  color: #fffef9;
  font-family: var(--sans);
  font-size: 11.2px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2.5px 0 #94440d;
  transition: transform 0.14s var(--bounce), box-shadow 0.14s ease, filter 0.14s ease;
}

.voyage-sail-btn:hover:not(.is-current) {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 3.5px 0 #94440d;
}

.voyage-sail-btn:active:not(.is-current) {
  transform: translateY(1.5px);
  box-shadow: 0 1px 0 #94440d;
}

.voyage-sail-btn.is-current {
  background: rgba(31, 142, 139, 0.14);
  border-color: rgba(31, 142, 139, 0.36);
  color: #166a68;
  box-shadow: none;
  cursor: default;
}

.voyage-card.is-fjord .voyage-sail-btn.is-current {
  background: rgba(37, 110, 150, 0.14);
  border-color: rgba(37, 110, 150, 0.36);
  color: #195172;
}

/* Silky Watercolor Wave Multi-Harbor Voyage Transition Curtain */
.voyage-curtain {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 42%, rgba(44, 132, 156, 0.94) 0%, rgba(18, 56, 82, 0.98) 100%);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.36s ease;
}

.voyage-curtain.visible {
  opacity: 1;
}

.voyage-curtain-card {
  position: relative;
  padding: 24px 36px;
  border-radius: 26px;
  background-image: var(--paper-grain), linear-gradient(180deg, #fffdf6 0%, #f5e5c4 100%);
  border: 3px solid var(--brass);
  box-shadow: 0 8px 0 var(--brass-lip), 0 26px 64px rgba(6, 18, 28, 0.55);
  text-align: center;
  max-width: min(480px, 88vw);
  animation: modalPop 0.32s var(--bounce);
}

.voyage-curtain-wave {
  height: 10px;
  width: 140px;
  margin: 0 auto 12px;
  border-radius: 99px;
  background: linear-gradient(90deg, #27b5ab, #4aa0d4, #f2b84b, #27b5ab);
  background-size: 200% 100%;
  animation: waterShimmer 1.1s linear infinite;
}

.voyage-curtain-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

.voyage-curtain-sub {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* ==========================================================================
   8. FULL MOBILE & TABLET TOUCH ADAPTATION (Portrait + Landscape + Safe Area)
   ========================================================================== */
html,
body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#stage {
  touch-action: none;
}

.tackle-body,
.map-content-grid {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* Cozy Nautical Parchment First-Load Splash Curtain (4G/5G Instant Visual Feedback) */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 42%, #298693 0%, #195d68 65%, #11434d 100%);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.boot-splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-splash-card {
  width: min(320px, calc(100vw - 36px));
  padding: 22px 22px 20px;
  border-radius: 24px;
  background-image: var(--paper-grain), linear-gradient(180deg, #fffdf5 0%, #f5e7cb 100%);
  background-color: #fbf4e4;
  border: 2.5px solid #c5945b;
  box-shadow: 0 6px 0 #8e6030, 0 18px 42px rgba(8, 22, 30, 0.42);
  text-align: center;
  color: #3a2618;
}

.boot-compass-ring {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bootCompassSpin 3.6s ease-in-out infinite;
}

@keyframes bootCompassSpin {
  0%   { transform: rotate(-16deg); }
  50%  { transform: rotate(22deg); }
  100% { transform: rotate(-16deg); }
}

.boot-splash-title {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 5px;
}

.boot-splash-sub {
  font-size: 12px;
  font-weight: 700;
  color: rgba(58, 38, 24, 0.72);
  margin-bottom: 14px;
}

.boot-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(142, 96, 48, 0.18);
  border: 1.5px solid rgba(197, 148, 91, 0.55);
  overflow: hidden;
}

.boot-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f8e8b 0%, #34b6b0 55%, #dfa840 100%);
  transition: width 0.35s ease-out;
}

/* Prevent simultaneous toast + catch-card overlap, and keep modals cleanly above toasts */
body:has(.catch-card.visible) .toast-banner {
  opacity: 0 !important;
  pointer-events: none;
}

.tackle-backdrop {
  z-index: 65;
}

/* Vintage Brass & Linen Virtual Steering Joystick + Horn (Touch/Mobile Only!) */
.mobile-nav-cluster {
  position: fixed;
  left: calc(env(safe-area-inset-left, 0px) + 18px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 23;
  display: none;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

body.is-touch .mobile-nav-cluster {
  display: flex;
}

@media (pointer: coarse), (max-width: 820px) {
  .mobile-nav-cluster {
    display: flex;
  }
}

body.is-fishing-live .mobile-nav-cluster {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.92);
}

.mobile-joystick {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 249, 236, 0.36);
  backdrop-filter: blur(10px) saturate(135%);
  -webkit-backdrop-filter: blur(10px) saturate(135%);
  border: 2px solid rgba(255, 248, 232, 0.72);
  box-shadow:
    0 8px 24px rgba(32, 24, 16, 0.20),
    inset 0 2px 6px rgba(58, 38, 24, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  pointer-events: auto;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.mobile-joystick.is-active {
  background: rgba(255, 249, 236, 0.50);
  border-color: var(--brass-hi);
}

body.is-dusk .mobile-joystick {
  background: rgba(255, 236, 212, 0.38);
  border-color: rgba(255, 224, 190, 0.68);
}

body.is-night .mobile-joystick {
  background: rgba(18, 30, 44, 0.52);
  border-color: rgba(228, 184, 114, 0.42);
  box-shadow:
    0 10px 26px rgba(4, 10, 18, 0.50),
    inset 0 2px 6px rgba(4, 10, 18, 0.55);
}

.mobile-joy-ring {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1.5px dashed rgba(142, 96, 48, 0.42);
  pointer-events: none;
}

body.is-night .mobile-joy-ring {
  border-color: rgba(228, 184, 114, 0.34);
}

.joy-tick {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(142, 96, 48, 0.48);
}

body.is-night .joy-tick {
  background: rgba(245, 210, 123, 0.48);
}

.joy-tick.joy-n { top: -3.5px; left: 50%; transform: translateX(-50%); }
.joy-tick.joy-s { bottom: -3.5px; left: 50%; transform: translateX(-50%); }
.joy-tick.joy-w { left: -3.5px; top: 50%; transform: translateY(-50%); }
.joy-tick.joy-e { right: -3.5px; top: 50%; transform: translateY(-50%); }

.mobile-joy-knob {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff9ea 0%, #f1d494 55%, #cf983c 100%);
  border: 2.5px solid #fff8e8;
  box-shadow:
    0 4px 0 #8e6030,
    0 8px 16px rgba(32, 24, 16, 0.32),
    inset 0 2px 3px rgba(255, 255, 255, 0.72);
  pointer-events: none;
  will-change: transform;
  transition: transform 0.08s ease-out;
}

.mobile-joystick.is-active .mobile-joy-knob {
  transition: none;
  background: radial-gradient(circle at 35% 30%, #fffdf5 0%, #f8dc96 50%, #dfa032 100%);
}

body.is-night .mobile-joy-knob {
  background: radial-gradient(circle at 35% 30%, #ffeec6 0%, #d8a245 58%, #8f6019 100%);
  border-color: rgba(255, 242, 208, 0.85);
}

.mobile-horn-btn {
  appearance: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--hud-border);
  background: var(--hud-bg);
  color: var(--hud-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--hud-lip), 0 8px 18px rgba(32, 24, 16, 0.22);
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

body.is-night .mobile-horn-btn {
  background: rgba(22, 34, 48, 0.86);
  border-color: rgba(228, 184, 114, 0.56);
  color: #ffeec8;
}

.mobile-horn-btn.honking {
  transform: scale(0.90);
}

/* Disable stuck hover tooltips & desktop keycaps on touch screens */
@media (hover: none), (pointer: coarse) {
  .retro-app-btn[data-tip]::after,
  .pier-shop-prompt .key-chip {
    display: none !important;
  }
}

body.is-touch .retro-app-btn[data-tip]::after,
body.is-touch .pier-shop-prompt .key-chip {
  display: none !important;
}

/* Safe-Area Insets on All Fixed Floating HUD Rails */
.hud-top-left,
.hud-icon-dock {
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: calc(env(safe-area-inset-left, 0px) + 14px);
}

.hud-top-right {
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: calc(env(safe-area-inset-right, 0px) + 14px);
}

.bottom-center-dock {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
}

/* Responsive Tablet & Phone Portrait (<= 740px) */
@media (max-width: 740px) {
  .tackle-grid,
  .bait-grid,
  .wardrobe-grid,
  .rod-stats-grid,
  .map-content-grid,
  .harbor-voyage-bar,
  .journal-harbor-tabs {
    grid-template-columns: 1fr;
  }

  .tackle-backdrop {
    padding:
      calc(env(safe-area-inset-top, 0px) + 8px)
      calc(env(safe-area-inset-right, 0px) + 8px)
      calc(env(safe-area-inset-bottom, 0px) + 8px)
      calc(env(safe-area-inset-left, 0px) + 8px);
  }

  .tackle-panel {
    width: calc(100vw - 16px);
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 20px;
  }

  .tackle-header {
    padding: 12px 14px 10px;
    gap: 8px;
  }

  .tackle-title {
    font-size: 16px;
  }

  .tackle-sub {
    font-size: 11px;
  }

  .shop-status-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 12px;
  }

  .shop-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 6px 12px;
  }

  .shop-tab {
    justify-content: center;
    padding: 8px 8px;
    font-size: 12px;
  }

  .tackle-body {
    padding: 10px 12px 14px;
  }

  #harbor-map-canvas {
    width: 100%;
    height: auto;
  }
}

/* Compact Phone Portrait Ergonomics (<= 600px: Zero Top-Bar Collision + Dual-Thumb Bottom Split!) */
@media (max-width: 600px) {
  .hud-top-left,
  .hud-icon-dock {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: calc(env(safe-area-inset-left, 0px) + 10px);
    gap: 4px;
    padding: 4px 6px;
    border-radius: 18px;
  }

  .hud-top-left .retro-app-btn {
    width: 40px;
    height: 40px;
  }

  .hud-top-right {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: calc(env(safe-area-inset-right, 0px) + 10px);
    gap: 4px;
    padding: 4px 5px;
  }

  .hud-top-right .icon-circle {
    width: 34px;
    height: 34px;
  }

  /* Drop Toast & Catch Card cleanly below top docks so they NEVER overlap top icons! */
  .toast-banner {
    top: calc(env(safe-area-inset-top, 0px) + 64px);
    max-width: calc(100vw - 20px);
    padding: 6px 12px;
    font-size: 11.5px;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }

  .catch-card {
    top: calc(env(safe-area-inset-top, 0px) + 64px);
    width: min(336px, calc(100vw - 20px));
    padding: 10px 12px;
  }

  /* Dual-Thumb Bottom Split: Left Thumb = Joystick + Horn, Right Thumb = Bait + Cast Rod! */
  .mobile-nav-cluster {
    left: calc(env(safe-area-inset-left, 0px) + 14px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    gap: 8px;
  }

  .mobile-joystick {
    width: 104px;
    height: 104px;
  }

  .mobile-joy-knob {
    width: 42px;
    height: 42px;
  }

  .bottom-center-dock {
    left: auto;
    right: calc(env(safe-area-inset-right, 0px) + 14px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
    transform: none;
    gap: 8px;
    padding: 6px 8px;
  }

  .bottom-center-dock .retro-app-btn {
    width: 54px;
    height: 54px;
  }

  .bite-alert {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 106px);
    max-width: calc(100vw - 24px);
    padding: 10px 18px 10px 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  .pier-shop-prompt {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 132px);
    font-size: 13px;
  }

  .fish-fight-hud {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 98px);
    width: min(360px, calc(100vw - 18px));
    padding: 11px 12px 12px;
  }

  .reel-hold-btn {
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
  }

  .tackle-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* Compact Phone Landscape Ergonomics (e.g. 844x390 / 667x375) */
@media (max-height: 500px) and (pointer: coarse) {
  .hud-top-left,
  .hud-icon-dock {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: calc(env(safe-area-inset-left, 0px) + 10px);
    gap: 5px;
    padding: 4px 6px;
  }

  .hud-top-left .retro-app-btn {
    width: 38px;
    height: 38px;
  }

  .hud-top-right {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: calc(env(safe-area-inset-right, 0px) + 10px);
    gap: 4px;
    padding: 4px 5px;
  }

  .hud-top-right .icon-circle {
    width: 34px;
    height: 34px;
  }

  .toast-banner {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    max-width: 48vw;
    padding: 5px 12px;
    font-size: 11px;
  }

  .mobile-nav-cluster {
    left: calc(env(safe-area-inset-left, 0px) + 14px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  }

  .mobile-joystick {
    width: 92px;
    height: 92px;
  }

  .mobile-joy-knob {
    width: 38px;
    height: 38px;
  }

  .bottom-center-dock {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    padding: 5px 7px;
  }

  .bottom-center-dock .retro-app-btn {
    width: 48px;
    height: 48px;
  }

  .fish-fight-hud {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 74px);
    width: min(350px, 76vw);
    padding: 8px 12px;
  }

  .bite-alert {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
    padding: 8px 16px 8px 10px;
    font-size: 13.5px;
  }
}
