:root {
  --bg-deep: #071525;
  --bg-mid: #0c2238;
  --panel: rgba(14, 36, 58, 0.82);
  --panel-solid: #0e243a;
  --panel-border: rgba(94, 168, 220, 0.22);
  --panel-glow: rgba(56, 189, 248, 0.08);
  --water-deep: #0d4f7a;
  --water-mid: #1a7ab5;
  --water-light: #3db5e8;
  --sand: #d4a574;
  --gold: #ffd24a;
  --gold-dark: #c9a227;
  --gold-glow: rgba(255, 210, 74, 0.35);
  --text: #eef7ff;
  --muted: #8eb8d4;
  --text-muted: #8eb8d4;
  --success: #4ade80;
  --danger: #f87171;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --rarity-common: #94a3b8;
  --rarity-uncommon: #4ade80;
  --rarity-rare: #60a5fa;
  --rarity-epic: #c084fc;
  --rarity-legendary: #facc15;
  --glass-blur: blur(14px);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-lift: 0 14px 40px rgba(0, 0, 0, 0.38);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.12, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: "DM Sans", "Fredoka", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(30, 90, 140, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(20, 60, 100, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, #0a1e32 0%, var(--bg-deep) 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

#app {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.5rem;
}

/* —— Contract bar —— */
.ca-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding: 0.5rem 0.9rem;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-panel);
}

.ca-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ca-address {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.76rem;
  color: var(--accent);
  background: rgba(8, 20, 40, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-address:hover {
  border-color: var(--accent);
  background: rgba(22, 58, 92, 0.7);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.ca-address.copied {
  color: var(--success);
  border-color: var(--success);
}

.header-wallet-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding: 0.5rem 0.9rem;
  background: rgba(16, 185, 129, 0.1);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-panel);
}

.header-wallet-bar.hidden {
  display: none;
}

.header-wallet-label {
  color: #6ee7b7;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-wallet-address {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.76rem;
  color: #a7f3d0;
  background: rgba(8, 20, 40, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  max-width: min(100%, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-wallet-address:hover {
  border-color: #6ee7b7;
  background: rgba(8, 20, 40, 0.8);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.header-wallet-address.copied {
  color: var(--success);
  border-color: var(--success);
}

/* —— Header —— */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(180deg, rgba(18, 42, 68, 0.88) 0%, rgba(14, 36, 58, 0.82) 100%);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  transition: border-color 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

.brand h1 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  display: flex;
  gap: 0.45rem;
  align-items: center;
  transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), transform 0.25s var(--ease-out);
}

.balance-pill {
  border-color: rgba(201, 162, 39, 0.45);
  background: linear-gradient(135deg, rgba(42, 34, 8, 0.85), rgba(14, 36, 58, 0.7));
  box-shadow: 0 0 20px var(--gold-glow);
}

.stat-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold);
}

/* —— Buttons —— */
.btn {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.25s var(--ease-smooth),
    filter 0.2s ease,
    border-color 0.25s var(--ease-smooth),
    background 0.25s var(--ease-smooth);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn-wallet {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: white;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.4);
}

.btn-wallet.connected {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
}

.btn-account {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  box-shadow: 0 4px 18px rgba(5, 150, 105, 0.35);
}

.btn-account.connected {
  background: linear-gradient(135deg, #10b981, #065f46);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
}

.account-user-pill {
  font-size: 0.82rem;
  font-weight: 700;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-user-pill.hidden {
  display: none;
}

.btn-sign-out {
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
  box-shadow: none;
}

.btn-sign-out:hover:not(:disabled) {
  border-color: #f87171;
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}

.btn-sign-out.hidden {
  display: none;
}

.btn-mute {
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid var(--panel-border);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.45rem 0.65rem;
  min-width: 44px;
  min-height: 44px;
  box-shadow: none;
}

.btn-mute:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(22, 58, 92, 0.65);
}

.btn-mute.is-muted {
  color: var(--muted);
  border-color: rgba(142, 184, 212, 0.25);
}

.btn-reel {
  background: linear-gradient(135deg, var(--success), #16a34a);
  color: #052e16;
  font-family: "Fredoka", sans-serif;
  font-size: 1.15rem;
  padding: 0.75rem 1.6rem;
  animation: reel-pulse 0.9s ease-in-out infinite alternate;
  box-shadow: 0 4px 24px rgba(74, 222, 128, 0.45);
}

@keyframes reel-pulse {
  from { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55), 0 4px 20px rgba(74, 222, 128, 0.3); }
  to { box-shadow: 0 0 22px 6px rgba(74, 222, 128, 0.35), 0 6px 28px rgba(74, 222, 128, 0.4); }
}

/* —— Layout —— */
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
  align-items: start;
}

.game-column {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

@media (max-width: 980px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
}

/* —— Lake / game canvas —— */
.lake-panel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(94, 168, 220, 0.42);
  box-shadow:
    var(--shadow-lift),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 48px rgba(56, 189, 248, 0.08);
  background: linear-gradient(180deg, rgba(14, 36, 58, 0.35) 0%, rgba(7, 21, 37, 0.15) 100%);
  transition: border-color 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth), filter 0.45s var(--ease-smooth);
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 480;
  background: linear-gradient(180deg, var(--water-light) 0%, var(--water-deep) 55%, #031a2e 100%);
  cursor: crosshair;
  touch-action: none;
  position: relative;
  z-index: 0;
  image-rendering: auto;
}

.lake-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(61, 181, 232, 0.12), transparent 70%);
  z-index: 1;
}

.lake-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.overlay-hint {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 20, 40, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  pointer-events: none;
  z-index: 4;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.32);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  animation: hint-fade 0.42s var(--ease-out);
  transition: border-color 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth);
}

@keyframes hint-fade {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.overlay-hint.cast-hint-coach {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 24px rgba(56, 189, 248, 0.25);
  animation: cast-coach-pulse 2s var(--ease-smooth) infinite;
}

@keyframes cast-coach-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 18px rgba(56, 189, 248, 0.2); }
  50% { transform: translateX(-50%) scale(1.03); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 30px rgba(56, 189, 248, 0.35); }
}

/* —— Bite alert —— */
.bite-alert {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: radial-gradient(ellipse at center, rgba(6, 20, 34, 0.35) 0%, rgba(6, 20, 34, 0.78) 100%);
  backdrop-filter: blur(2px);
  z-index: 5;
  animation: bite-in 0.45s var(--ease-out);
  pointer-events: none;
}

@keyframes bite-in {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.bite-alert::before,
.bite-alert::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(74, 222, 128, 0.35);
  border-radius: 50%;
  animation: splash-ring 1.4s ease-out infinite;
  pointer-events: none;
}

.bite-alert::after {
  animation-delay: 0.45s;
}

@keyframes splash-ring {
  0% { transform: scale(0.4); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

.bite-alert p {
  font-family: "Fredoka", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--success);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5), 0 0 30px rgba(74, 222, 128, 0.4);
  letter-spacing: 0.04em;
  z-index: 1;
}

.bite-alert .btn-reel {
  z-index: 1;
}

/* —— Catch burst overlay —— */
.catch-burst {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 7;
  opacity: 0;
}

.catch-burst.is-active {
  animation: catch-burst-in 0.35s ease forwards;
}

@keyframes catch-burst-in {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

.catch-burst-ring {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid rgba(74, 222, 128, 0.5);
  animation: catch-ring-expand 1.2s ease-out forwards;
}

.catch-burst.rarity-rare .catch-burst-ring {
  border-color: rgba(251, 146, 60, 0.55);
}

.catch-burst.rarity-epic .catch-burst-ring {
  border-color: rgba(96, 165, 250, 0.6);
  width: 220px;
  height: 220px;
}

.catch-burst.rarity-legendary .catch-burst-ring {
  border-color: rgba(250, 204, 21, 0.75);
  width: 280px;
  height: 280px;
  box-shadow: 0 0 40px rgba(250, 204, 21, 0.35);
}

@keyframes catch-ring-expand {
  0% { transform: scale(0.3); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

.catch-burst-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  animation: catch-content-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes catch-content-pop {
  from { transform: scale(0.6) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.catch-burst-icon {
  font-size: 2rem;
}

.catch-burst-name {
  font-family: "Fredoka", sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.catch-burst-reward {
  font-family: "Fredoka", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.reel-combo {
  display: block;
  min-height: 1.1rem;
  font-family: "Fredoka", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--success);
  text-shadow: 0 0 12px rgba(74, 222, 128, 0.35);
  animation: combo-pop 0.25s ease;
}

@keyframes combo-pop {
  from { transform: scale(0.85); opacity: 0.5; }
  to { transform: scale(1); opacity: 1; }
}

.reel-zone-icon {
  margin-right: 0.15rem;
}

/* —— Catch reveal modal —— */
.catch-reveal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.catch-reveal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.catch-reveal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 24, 0);
  backdrop-filter: blur(0);
  transition: background 0.38s ease, backdrop-filter 0.38s ease;
}

.catch-reveal.is-open .catch-reveal-backdrop {
  background: rgba(4, 12, 24, 0.78);
  backdrop-filter: blur(8px);
}

.catch-reveal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 360px);
  padding: 1.5rem 1.35rem 1.25rem;
  text-align: center;
  background: rgba(8, 20, 40, 0.96);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.82) translateY(28px);
  opacity: 0;
  transition:
    transform 0.48s cubic-bezier(0.22, 1.15, 0.36, 1),
    opacity 0.32s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.catch-reveal.is-open .catch-reveal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.catch-reveal.is-open .catch-reveal-new,
.catch-reveal.is-open .catch-reveal-icon,
.catch-reveal.is-open .catch-reveal-name,
.catch-reveal.is-open .catch-reveal-rarity,
.catch-reveal.is-open .catch-reveal-reward,
.catch-reveal.is-open .catch-reveal-streak,
.catch-reveal.is-open .catch-reveal-pb,
.catch-reveal.is-open .catch-reveal-actions {
  animation: catch-item-rise 0.5s cubic-bezier(0.22, 1.1, 0.36, 1) both;
}

.catch-reveal.is-open .catch-reveal-icon { animation-delay: 0.06s; }
.catch-reveal.is-open .catch-reveal-name { animation-delay: 0.12s; }
.catch-reveal.is-open .catch-reveal-rarity { animation-delay: 0.18s; }
.catch-reveal.is-open .catch-reveal-reward { animation-delay: 0.24s; }
.catch-reveal.is-open .catch-reveal-streak { animation-delay: 0.3s; }
.catch-reveal.is-open .catch-reveal-pb { animation-delay: 0.3s; }
.catch-reveal.is-open .catch-reveal-actions { animation-delay: 0.36s; }

@keyframes catch-item-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.catch-reveal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(8, 20, 40, 0.85);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.catch-reveal-close:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(15, 32, 58, 0.95);
}

.catch-reveal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.catch-reveal-card.rarity-rare {
  border-color: rgba(251, 146, 60, 0.45);
}

.catch-reveal-card.rarity-epic {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 32px rgba(96, 165, 250, 0.15);
}

.catch-reveal-card.rarity-legendary {
  border-color: rgba(250, 204, 21, 0.6);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55), 0 0 40px rgba(250, 204, 21, 0.2);
}

.catch-reveal-new {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--success);
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.catch-reveal-icon {
  display: flex;
  justify-content: center;
  margin: 0.35rem 0 0.75rem;
}

.catch-reveal-icon canvas {
  width: 160px;
  height: 80px;
}

.catch-reveal-name {
  display: block;
  font-family: "Fredoka", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.catch-reveal-rarity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: capitalize;
  margin-bottom: 0.55rem;
}

.catch-reveal-reward {
  display: block;
  font-family: "Fredoka", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.45rem;
}

.catch-reveal-streak {
  display: block;
  font-family: "Fredoka", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fb923c;
  margin-bottom: 0.85rem;
  text-shadow: 0 0 12px rgba(251, 146, 60, 0.35);
}

.catch-reveal-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.catch-reveal-actions .btn {
  flex: 1;
  min-height: 44px;
}

.btn-share {
  background: rgba(8, 20, 40, 0.65);
  border-color: var(--panel-border);
  font-weight: 600;
}

.btn-reveal {
  width: 100%;
  min-height: 44px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(74, 222, 128, 0.2));
  border-color: rgba(74, 222, 128, 0.45);
  font-weight: 700;
}

/* —— Reel mini-game —— */
.reel-bar-wrap {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  width: min(92%, 440px);
  background: rgba(8, 20, 40, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  text-align: center;
  z-index: 6;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.reel-bar-wrap.is-active {
  animation: reel-bar-in 0.34s cubic-bezier(0.22, 1.12, 0.36, 1);
}

.reel-bar-wrap.reel-bar-exit {
  animation: reel-bar-out 0.32s cubic-bezier(0.4, 0, 0.68, 0.2) forwards;
  pointer-events: none;
}

@keyframes reel-bar-in {
  from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes reel-bar-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  to { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.94); }
}

.reel-bar-wrap > p:first-child {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
}

.reel-track {
  position: relative;
  height: 32px;
  background: #0a1828;
  border-radius: 999px;
  margin: 0.65rem 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.reel-zone-danger {
  position: absolute;
  top: 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.5), rgba(185, 28, 28, 0.65));
  z-index: 0;
}

.reel-zone-danger--left {
  left: 0;
  width: var(--reel-zone-left, 35%);
  border-right: 1px solid rgba(248, 113, 113, 0.4);
}

.reel-zone-danger--right {
  right: 0;
  width: calc(100% - var(--reel-zone-left, 35%) - var(--reel-zone-width, 30%));
  border-left: 1px solid rgba(248, 113, 113, 0.4);
}

.reel-zone {
  position: absolute;
  left: var(--reel-zone-left, 35%);
  width: var(--reel-zone-width, 30%);
  height: 100%;
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.5), rgba(34, 197, 94, 0.7));
  border-left: 2px solid var(--success);
  border-right: 2px solid var(--success);
  z-index: 1;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.25);
}

.reel-green-label {
  color: var(--success);
  font-weight: 700;
}

.reel-marker {
  position: absolute;
  top: 3px;
  left: 0;
  width: 14px;
  height: 26px;
  margin-left: 0;
  background: linear-gradient(180deg, #ffe566, var(--gold));
  border-radius: 5px;
  box-shadow: 0 0 10px var(--gold-glow);
  z-index: 2;
  transition: background 0.1s ease, box-shadow 0.1s ease;
  transform: translate3d(var(--marker-x, 7px), 0, 0) translateX(-50%);
  will-change: transform;
  backface-visibility: hidden;
}

.reel-marker.tap-good {
  background: linear-gradient(180deg, #86efac, #4ade80);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.95);
  animation: marker-pop-good 0.22s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.reel-marker.tap-bad {
  background: linear-gradient(180deg, #fca5a5, #ef4444);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.85);
  animation: marker-pop-bad 0.2s ease;
}

@keyframes marker-pop-good {
  0%, 100% { box-shadow: 0 0 14px rgba(74, 222, 128, 0.9); filter: brightness(1); }
  50% { box-shadow: 0 0 22px rgba(74, 222, 128, 1); filter: brightness(1.15); }
}

@keyframes marker-pop-bad {
  0%, 100% { box-shadow: 0 0 14px rgba(239, 68, 68, 0.85); filter: brightness(1); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 1); filter: brightness(0.92); }
}

.reel-bar-wrap.is-active .reel-zone {
  animation: reel-zone-breathe 1.6s ease-in-out infinite;
}

@keyframes reel-zone-breathe {
  0%, 100% { box-shadow: 0 0 12px rgba(74, 222, 128, 0.25); }
  50% { box-shadow: 0 0 18px rgba(74, 222, 128, 0.42); }
}

.reel-marker.in-zone {
  background: linear-gradient(180deg, #86efac, #4ade80);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.9);
}

.reel-marker.danger-zone {
  background: linear-gradient(180deg, #fca5a5, #ef4444);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.85);
}

.reel-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

kbd {
  background: rgba(30, 68, 102, 0.8);
  border: 1px solid var(--panel-border);
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  font-size: 0.72rem;
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* —— Panels —— */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.panel-card {
  background: linear-gradient(180deg, rgba(16, 40, 64, 0.88) 0%, rgba(14, 36, 58, 0.82) 100%);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow-panel);
  transition: border-color 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), transform 0.3s var(--ease-out);
}

.panel-card h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.panel-icon {
  font-size: 1.05rem;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.shop-sub,
.wallet-note,
.wallet-status {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* —— Latest catch —— */
.catch-log {
  background: linear-gradient(135deg, rgba(14, 36, 58, 0.9), rgba(10, 28, 48, 0.85));
}

.latest-catch {
  min-height: 80px;
  display: flex;
  align-items: center;
}

.latest-catch.empty {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

.latest-catch-body {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.35rem 0;
}

.latest-catch-icon {
  flex-shrink: 0;
  width: 72px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
}

.latest-catch-icon canvas {
  display: block;
}

.latest-catch-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fish-name {
  font-family: "Fredoka", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.fish-rarity {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.fish-reward {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.95rem;
}

/* —— Fish collection —— */
.fish-collection h2 .panel-icon {
  filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.35));
}

.fishdex-progress-wrap {
  margin-bottom: 0.65rem;
}

.fishdex-progress {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fishdex-progress strong {
  color: var(--accent);
  font-family: "Fredoka", sans-serif;
}

.fishdex-progress-bar {
  height: 6px;
  background: rgba(8, 20, 40, 0.7);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
}

.fishdex-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--water-mid), var(--accent));
  border-radius: inherit;
  transition: width 0.4s ease;
}

.fishdex-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.5rem;
}

.fishdex-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid #1a3a55;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.45rem 0.5rem;
  text-align: center;
  transition: transform 0.28s var(--ease-out), border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth);
}

.fishdex-row.is-caught {
  border-color: rgba(94, 168, 220, 0.35);
}

.fishdex-row.is-caught:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.fishdex-row.is-unknown {
  opacity: 0.55;
  filter: saturate(0.4);
}

.fishdex-row[data-rarity="common"].is-caught { border-left: 3px solid var(--rarity-common); }
.fishdex-row[data-rarity="uncommon"].is-caught { border-left: 3px solid var(--rarity-uncommon); }
.fishdex-row[data-rarity="rare"].is-caught { border-left: 3px solid var(--rarity-rare); }
.fishdex-row[data-rarity="epic"].is-caught { border-left: 3px solid var(--rarity-epic); }
.fishdex-row[data-rarity="legendary"].is-caught {
  border-left: 3px solid var(--rarity-legendary);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.12);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.06), rgba(8, 20, 40, 0.55));
}

.fishdex-row.is-new {
  animation: dex-new-flash 1.2s ease 2;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.12), rgba(8, 20, 40, 0.55));
}

@keyframes dex-new-flash {
  0%, 100% { box-shadow: 0 0 0 rgba(74, 222, 128, 0); }
  50% { box-shadow: 0 0 20px rgba(74, 222, 128, 0.35); }
}

.fishdex-icon {
  width: 64px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fishdex-icon canvas {
  display: block;
  width: 64px;
  height: 32px;
}

.fishdex-info {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  width: 100%;
}

.fishdex-name {
  font-family: "Fredoka", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fishdex-row.is-unknown .fishdex-name,
.fishdex-row.is-unknown .fishdex-reward {
  color: var(--muted);
}

.fishdex-reward {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

/* —— Shop —— */
.shop h2 .panel-icon {
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.55rem;
}

.shop-item {
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid #1a3a55;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), transform 0.25s var(--ease-out), background 0.3s var(--ease-smooth);
}

.shop-item:hover {
  border-color: rgba(94, 168, 220, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.shop-item.is-recommended {
  border-color: rgba(255, 210, 74, 0.45);
  box-shadow: 0 0 20px rgba(255, 210, 74, 0.1);
}

.shop-item.is-recommended.is-ready {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.15);
  animation: shop-ready-glow 1.8s ease-in-out infinite alternate;
}

@keyframes shop-ready-glow {
  from { box-shadow: 0 0 16px rgba(74, 222, 128, 0.12); }
  to { box-shadow: 0 0 28px rgba(74, 222, 128, 0.28); }
}

.shop-recommend-chip {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255, 210, 74, 0.14);
  border: 1px solid rgba(255, 210, 74, 0.35);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}

.shop-recommend-chip--save {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(56, 189, 248, 0.35);
}

.shop-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.shop-item-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.shop-item-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.shop-item-name {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.shop-item-level {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.shop-item-level.is-maxed {
  color: var(--gold);
  background: rgba(255, 210, 74, 0.12);
}

.shop-item-desc {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.shop-level-bar {
  height: 4px;
  background: rgba(8, 20, 40, 0.8);
  border-radius: 999px;
  margin: 0.4rem 0 0.5rem;
  overflow: hidden;
}

.shop-level-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--water-light));
  border-radius: inherit;
  transition: width 0.3s ease;
}

.shop-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.upgrade-cost {
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 700;
}

.btn-upgrade {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #3b2f07;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.38rem 0.85rem;
  box-shadow: 0 2px 10px var(--gold-glow);
}

.btn-upgrade:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

/* —— Wallet panel —— */
.wallet-info {
  display: flex;
  flex-direction: column;
}

.wallet-info h2 .panel-icon {
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.35));
}

/* —— Withdraw —— */
.withdraw-section {
  margin: 0.75rem 0;
  padding: 0.85rem 0.9rem;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: var(--radius-sm);
}

.withdraw-section.hidden {
  display: none;
}

.withdraw-title {
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #6ee7b7;
  margin-bottom: 0.25rem;
}

.withdraw-sub,
.withdraw-balance {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0.55rem;
}

.withdraw-balance strong {
  color: var(--gold);
  font-family: "Fredoka", sans-serif;
}

.withdraw-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.withdraw-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.withdraw-field input {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  border: 1px solid var(--panel-border);
  background: rgba(8, 20, 40, 0.65);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

.withdraw-field input:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.withdraw-amount-row {
  display: flex;
  gap: 0.45rem;
}

.withdraw-amount-row input {
  flex: 1;
  min-width: 0;
}

.btn-withdraw-max {
  flex-shrink: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid var(--panel-border);
  color: var(--accent);
  box-shadow: none;
}

.btn-withdraw-max:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn-withdraw {
  width: 100%;
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
}

.btn-withdraw:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.withdraw-error {
  margin: 0;
  font-size: 0.8rem;
  color: #f87171;
}

.withdraw-error.hidden {
  display: none;
}

.wallet-status {
  padding: 0.5rem 0.65rem;
  background: rgba(8, 20, 40, 0.45);
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  margin-bottom: 0.5rem;
}

.current-wallet-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
}

.current-wallet-wrap.hidden {
  display: none;
}

.current-wallet-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6ee7b7;
}

.current-wallet-address {
  width: 100%;
  text-align: left;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  word-break: break-all;
  color: var(--text);
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.current-wallet-address:hover {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(8, 20, 40, 0.75);
}

.current-wallet-address.copied {
  border-color: #6ee7b7;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* —— Wallet private key export —— */
.wallet-secret-section {
  margin-top: auto;
  align-self: flex-end;
  width: 100%;
  padding: 0.85rem 0.9rem;
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
  text-align: right;
}

.wallet-secret-section.hidden {
  display: none;
}

.wallet-secret-title {
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 0.35rem;
  text-align: right;
}

.wallet-secret-warning {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0.65rem;
  text-align: left;
}

.wallet-secret-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: stretch;
}

.wallet-secret-form.hidden {
  display: none;
}

.wallet-secret-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
}

.wallet-secret-field input {
  font-family: inherit;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  border: 1px solid var(--panel-border);
  background: rgba(8, 20, 40, 0.65);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

.wallet-secret-field input:focus {
  outline: none;
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.btn-wallet-secret {
  align-self: flex-end;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  box-shadow: none;
}

.btn-wallet-secret:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.25);
  border-color: rgba(248, 113, 113, 0.65);
}

.btn-wallet-secret:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wallet-secret-display {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-end;
}

.wallet-secret-display.hidden {
  display: none;
}

.wallet-secret-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fca5a5;
  align-self: flex-start;
}

.wallet-secret-key {
  display: block;
  width: 100%;
  text-align: left;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.5;
  word-break: break-all;
  color: var(--text);
  background: rgba(8, 20, 40, 0.65);
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
}

.wallet-secret-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-wallet-secret-copy,
.btn-wallet-secret-hide {
  padding: 0.4rem 0.7rem;
  font-size: 0.72rem;
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid var(--panel-border);
  color: var(--accent);
  box-shadow: none;
}

.btn-wallet-secret-copy:hover,
.btn-wallet-secret-hide:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.wallet-secret-error {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: #f87171;
  text-align: left;
}

.wallet-secret-error.hidden {
  display: none;
}

/* —— Toast —— */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 20, 40, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
  font-size: 0.88rem;
  font-weight: 500;
  animation: toast-in 0.38s var(--ease-spring);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.94); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.toast.toast-out {
  animation: toast-out 0.28s var(--ease-smooth) forwards;
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  to { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.96); }
}

.toast.success {
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(74, 222, 128, 0.15);
}

.toast-link {
  color: var(--accent);
  margin-left: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(248, 113, 113, 0.12);
}

.toast.epic {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(96, 165, 250, 0.2);
}

.toast.legendary {
  border-color: rgba(250, 204, 21, 0.65);
  background: linear-gradient(135deg, rgba(20, 30, 50, 0.97), rgba(40, 28, 8, 0.95));
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45), 0 0 32px rgba(250, 204, 21, 0.25);
  font-weight: 700;
}

code {
  background: rgba(8, 20, 40, 0.7);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.76rem;
}

/* —— Ambient background —— */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(124, 58, 237, 0.06) 0%, transparent 40%);
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}

/* —— Lake state glows —— */
.lake-panel {
  transition: box-shadow 0.45s ease, border-color 0.45s ease, filter 0.35s ease;
}

.lake-panel.lake-biting {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: var(--shadow-lift), 0 0 32px rgba(74, 222, 128, 0.22);
}

.lake-panel.lake-reeling {
  border-color: rgba(255, 210, 74, 0.45);
  box-shadow: var(--shadow-lift), 0 0 28px rgba(255, 210, 74, 0.15);
}

.lake-panel.lake-casting {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: var(--shadow-lift), 0 0 24px rgba(56, 189, 248, 0.18);
}

.lake-panel.lake-caught {
  border-color: rgba(255, 210, 74, 0.65);
  box-shadow: var(--shadow-lift), 0 0 40px rgba(255, 210, 74, 0.28);
  animation: catch-glow 0.8s ease;
}

@keyframes catch-glow {
  0% { box-shadow: var(--shadow-lift), 0 0 0 rgba(255, 210, 74, 0); }
  50% { box-shadow: var(--shadow-lift), 0 0 48px rgba(255, 210, 74, 0.4); }
  100% { box-shadow: var(--shadow-lift), 0 0 40px rgba(255, 210, 74, 0.28); }
}

.lake-panel.lake-catch-flash {
  filter: brightness(1.14);
  transition: filter 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* —— Stat pop on catch —— */
.stat-pop {
  animation: stat-pop 0.45s ease;
}

@keyframes stat-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); color: #fff; }
  100% { transform: scale(1); }
}

/* —— Latest catch highlight —— */
.latest-catch.has-catch {
  animation: catch-card-in 0.48s var(--ease-out);
}

@keyframes catch-card-in {
  from { opacity: 0.5; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.catch-log {
  transition: border-color 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}

.catch-log:has(.has-catch) {
  border-color: rgba(255, 210, 74, 0.25);
}

/* —— Shop rod swatch —— */
.shop-rod-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.shop-item-title {
  flex-wrap: wrap;
}

/* —— Gear strip —— */
.gear-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.upgrade-goal {
  margin-bottom: 0.9rem;
}

.upgrade-goal-inner {
  padding: 0.55rem 0.75rem;
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
}

.upgrade-goal-inner.is-ready {
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.12);
}

.upgrade-goal-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.upgrade-goal-bar {
  height: 6px;
  background: rgba(8, 20, 40, 0.8);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
}

.upgrade-goal-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: inherit;
  transition: width 0.5s var(--ease-out);
}

.upgrade-goal-inner.is-ready .upgrade-goal-fill {
  background: linear-gradient(90deg, var(--success), #86efac);
}

.upgrade-goal-gap {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.upgrade-goal-btn {
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease;
}

.upgrade-goal-btn:hover {
  transform: translateY(-1px);
}

.upgrade-goal-btn.is-ready .upgrade-goal-inner {
  cursor: pointer;
}

.streak-badge {
  font-family: "Fredoka", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fb923c;
  padding: 0.3rem 0.55rem;
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 999px;
  white-space: nowrap;
}

.session-earned {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--success);
  margin-top: 0.1rem;
  line-height: 1.2;
}

.balance-pill {
  position: relative;
  overflow: visible;
}

.balance-flyup {
  position: absolute;
  right: 0.5rem;
  top: 0.15rem;
  font-family: "Fredoka", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  pointer-events: none;
  animation: balance-flyup 1.1s ease forwards;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

@keyframes balance-flyup {
  0% { opacity: 0; transform: translateY(8px) scale(0.85); }
  18% { opacity: 1; transform: translateY(0) scale(1.05); }
  100% { opacity: 0; transform: translateY(-22px) scale(1); }
}

.catch-reveal-pb {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255, 210, 74, 0.12);
  border: 1px solid rgba(255, 210, 74, 0.4);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.reel-fish-preview {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.55rem;
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  text-align: left;
}

.reel-fish-icon canvas {
  width: 64px;
  height: 32px;
  display: block;
}

.reel-fish-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.reel-fish-name {
  font-family: "Fredoka", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reel-fish-fight {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.reel-fish-fight.fight-rare { color: #fb923c; }
.reel-fish-fight.fight-epic { color: #60a5fa; }
.reel-fish-fight.fight-legendary { color: #facc15; }

.reel-bar-wrap.reel-bar-coach {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 24px rgba(74, 222, 128, 0.2);
  animation: reel-coach-pulse 1.4s ease-in-out infinite;
}

@keyframes reel-coach-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 16px rgba(74, 222, 128, 0.15); }
  50% { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 30px rgba(74, 222, 128, 0.35); }
}

@media (max-width: 640px) {
  .gear-strip {
    grid-template-columns: 1fr;
  }
}

.gear-chip {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.15rem 0.45rem;
  padding: 0.55rem 0.7rem;
  background: linear-gradient(180deg, rgba(16, 40, 64, 0.88) 0%, rgba(14, 36, 58, 0.82) 100%);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-panel);
  transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), transform 0.25s var(--ease-out);
}

.gear-chip.is-maxed {
  border-color: rgba(255, 210, 74, 0.3);
}

.gear-chip-icon {
  grid-row: span 2;
  font-size: 1.25rem;
}

.gear-chip-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.gear-chip-level {
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.gear-chip.is-maxed .gear-chip-level {
  color: var(--gold);
}

.gear-chip-swatch {
  grid-row: span 2;
  width: 12px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.gear-chip-bar {
  grid-column: 2 / -1;
  height: 4px;
  background: rgba(8, 20, 40, 0.7);
  border-radius: 999px;
  overflow: hidden;
}

.gear-chip-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--water-light));
  border-radius: inherit;
  transition: width 0.45s var(--ease-out);
}

.gear-chip.gear-chip-pop {
  animation: gear-chip-pop 0.55s ease;
  border-color: rgba(74, 222, 128, 0.55);
}

@keyframes gear-chip-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* —— Collection badge —— */
.collection-badge {
  display: flex;
}

.collection-badge-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.collection-badge-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.12);
}

.collection-ring {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.collection-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.collection-ring-bg {
  fill: none;
  stroke: rgba(8, 20, 40, 0.8);
  stroke-width: 3;
}

.collection-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 97.4;
  stroke-dashoffset: calc(97.4 - (97.4 * var(--pct) / 100));
  transition: stroke-dashoffset 0.5s ease;
}

.collection-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fredoka", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent);
}

.collection-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.collection-badge-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.collection-badge-count {
  font-family: "Fredoka", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

/* —— Game status pill —— */
.game-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  padding: 0.4rem 0.75rem;
  background: rgba(8, 20, 40, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.game-status.status-pop {
  animation: status-pop 0.2s ease-out;
}

@keyframes status-pop {
  0% { transform: scale(0.94); opacity: 0.75; }
  100% { transform: scale(1); opacity: 1; }
}

.game-status.status-casting {
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent);
}

.game-status.status-biting {
  border-color: rgba(74, 222, 128, 0.5);
  color: var(--success);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.25);
  animation: status-bite-pulse 1.2s ease-in-out infinite;
}

@keyframes status-bite-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(74, 222, 128, 0.2); }
  50% { box-shadow: 0 0 22px rgba(74, 222, 128, 0.38); }
}

.game-status.status-reeling {
  border-color: rgba(255, 210, 74, 0.45);
  color: var(--gold);
}

.game-status.status-caught {
  border-color: rgba(255, 210, 74, 0.6);
  color: var(--gold);
}

.game-status.status-waiting {
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent);
}

.lake-panel.lake-waiting {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12), var(--panel-shadow);
}

/* —— Reel progress header —— */
.reel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.reel-header p {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.reel-percent {
  font-family: "Fredoka", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 2.5rem;
  text-align: right;
}

.reel-progress-outer {
  height: 6px;
  background: rgba(8, 20, 40, 0.8);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.reel-progress-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--success), #86efac);
  border-radius: inherit;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.35);
  will-change: transform;
}

.reel-bar-wrap.reel-tap-good .reel-zone {
  box-shadow: inset 0 0 14px rgba(74, 222, 128, 0.45);
}

.reel-bar-wrap.reel-tap-bad .reel-track {
  animation: reel-shake 0.12s ease-in-out infinite alternate;
}

.reel-bar-wrap.reel-holding-good .reel-zone {
  box-shadow: inset 0 0 12px rgba(74, 222, 128, 0.35);
}

.reel-bar-wrap.reel-holding-bad .reel-track {
  animation: reel-shake 0.12s ease-in-out infinite alternate;
}

@keyframes reel-shake {
  from { transform: translateX(-1px); }
  to { transform: translateX(1px); }
}

.btn-tips {
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  background: rgba(8, 20, 40, 0.55);
  border-color: var(--panel-border);
  color: var(--muted);
}

.btn-tips:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.35);
}

/* —— Rarity badges —— */
.rarity-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--rarity-color) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--rarity-color) 55%, transparent);
  color: var(--rarity-color);
}

.rarity-badge.is-hidden {
  background: rgba(8, 20, 40, 0.5);
  border-color: var(--panel-border);
  color: var(--muted);
}

.rarity-common { --rarity-color: var(--rarity-common); }
.rarity-uncommon { --rarity-color: var(--rarity-uncommon); }
.rarity-rare { --rarity-color: var(--rarity-rare); }
.rarity-epic { --rarity-color: var(--rarity-epic); }
.rarity-legendary { --rarity-color: var(--rarity-legendary); }

.fishdex-badge-wrap {
  display: flex;
  justify-content: center;
}

.fish-rarity-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* —— Shop stat chips —— */
.shop-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.shop-stat-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #b8e6ff;
}

/* —— Footer —— */
.site-footer {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid rgba(94, 168, 220, 0.12);
}

.site-footer strong {
  color: var(--gold);
  font-weight: 700;
}

/* —— Mobile polish —— */
@media (max-width: 640px) {
  .top-bar {
    padding: 0.7rem 0.85rem;
  }

  .brand h1 {
    font-size: 1.5rem;
  }

  .collection-badge {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .header-stats {
    width: 100%;
    justify-content: center;
  }

  .game-status {
    font-size: 0.72rem;
    top: 8px;
    right: 8px;
  }

  .fishdex-list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .how-to-steps {
    grid-template-columns: 1fr;
  }

  .fishdex-filters {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* —— How to play onboarding —— */
.how-to-play {
  margin-bottom: 0.9rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(14, 36, 58, 0.92), rgba(10, 28, 48, 0.88));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel), 0 0 24px rgba(56, 189, 248, 0.06);
  transition: max-height 0.45s var(--ease-smooth), opacity 0.35s var(--ease-smooth), padding 0.35s var(--ease-smooth), margin 0.35s var(--ease-smooth);
  overflow: hidden;
}

.how-to-play.is-collapsed {
  display: none;
}

.how-to-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.how-to-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.how-to-title-wrap h3 {
  font-family: "Fredoka", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.how-to-icon {
  font-size: 1.1rem;
}

.how-to-dismiss {
  border: 1px solid var(--panel-border);
  background: rgba(8, 20, 40, 0.5);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.how-to-dismiss:hover {
  color: var(--text);
  border-color: var(--accent);
}

.how-to-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

.how-to-step {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.55rem 0.55rem;
  background: rgba(8, 20, 40, 0.45);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
}

.how-to-step-num {
  font-family: "Fredoka", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-to-step-icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.how-to-step-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.how-to-step-text strong {
  font-size: 0.78rem;
  font-weight: 700;
}

.how-to-step-text span {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.35;
}

/* —— Empty states —— */
.empty-state,
.latest-catch.empty-state {
  min-height: 88px;
  display: flex;
  align-items: center;
}

.empty-state-body {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.35rem 0;
}

.empty-state-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
  flex-shrink: 0;
}

.empty-state-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.empty-state-text strong {
  font-family: "Fredoka", sans-serif;
  font-size: 1rem;
  color: var(--text);
}

.empty-state-text span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.empty-state-text em {
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
}

.dex-empty-tip {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
  padding: 0.45rem 0.6rem;
  background: rgba(8, 20, 40, 0.4);
  border-radius: 8px;
  border: 1px dashed var(--panel-border);
  line-height: 1.45;
}

.fishdex-filter-empty {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  padding: 1rem;
  font-style: italic;
}

/* —— Fish collection filters —— */
.fish-collection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.fish-collection-head h2 {
  margin-bottom: 0;
}

.fishdex-filters {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.fishdex-filter {
  border: 1px solid var(--panel-border);
  background: rgba(8, 20, 40, 0.55);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  min-height: 44px;
}

.fishdex-filter:hover {
  color: var(--text);
  border-color: rgba(94, 168, 220, 0.4);
}

.fishdex-filter.is-active {
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.45);
  background: var(--accent-soft);
}

.fishdex-filter[data-filter="legendary"].is-active {
  color: var(--rarity-legendary);
  border-color: rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.1);
}

.fishdex-filter[data-filter="epic"].is-active {
  color: var(--rarity-epic);
  border-color: rgba(192, 132, 252, 0.45);
  background: rgba(192, 132, 252, 0.1);
}

/* —— Bite alert polish —— */
.bite-splash-icon {
  font-size: 2.5rem;
  animation: bite-splash-bounce 0.6s ease infinite alternate;
  z-index: 1;
}

@keyframes bite-splash-bounce {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-6px) scale(1.08); }
}

.bite-sub {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  z-index: 1;
  margin-top: -0.35rem;
}

/* —— Focus accessibility —— */
.btn:focus-visible,
.ca-address:focus-visible,
.how-to-dismiss:focus-visible,
.fishdex-filter:focus-visible,
.btn-mute:focus-visible,
.btn-tips:focus-visible,
.btn-upgrade:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#game-canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* —— Button min touch target —— */
.btn,
.ca-address,
.fishdex-filter {
  min-height: 36px;
}

.btn-reel {
  min-height: 44px;
}

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

  .bite-splash-icon,
  .game-status.status-biting,
  .reel-bar-wrap.reel-holding-bad .reel-track {
    animation: none !important;
  }
}

/* —— Mode badge —— */
.mode-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
}

.mode-badge.mode-guest {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(56, 189, 248, 0.35);
}

.mode-badge.mode-wallet {
  color: var(--gold);
  background: rgba(255, 210, 74, 0.12);
  border-color: rgba(255, 210, 74, 0.35);
}

.mode-badge.mode-account {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

/* —— Auth modal —— */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-modal.hidden {
  display: none;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 24, 0.72);
  backdrop-filter: blur(6px);
}

.auth-modal-card {
  position: relative;
  width: min(100%, 420px);
  background: linear-gradient(180deg, rgba(14, 36, 58, 0.98) 0%, rgba(7, 21, 37, 0.98) 100%);
  border: 1px solid rgba(94, 168, 220, 0.42);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.35rem 1.15rem;
  box-shadow: var(--shadow-lift);
}

.auth-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.auth-modal-sub,
.auth-modal-foot {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-modal-foot {
  margin: 0.85rem 0 0;
  text-align: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.auth-tab {
  border: 1px solid var(--panel-border);
  background: rgba(8, 20, 40, 0.45);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.is-active {
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.45);
  background: var(--accent-soft);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-field input {
  border: 1px solid var(--panel-border);
  background: rgba(8, 20, 40, 0.65);
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-import {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-import input {
  margin-top: 0.15rem;
}

.auth-error {
  margin: 0;
  color: #f87171;
  font-size: 0.84rem;
}

.auth-error.hidden {
  display: none;
}

.btn-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  box-shadow: 0 4px 18px rgba(5, 150, 105, 0.35);
}

/* —— Button juice —— */
.btn:active:not(:disabled) {
  transform: scale(0.96);
}

.btn {
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* —— Fishdex scroll —— */
.fish-collection-list {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
}

.fish-collection-list::-webkit-scrollbar {
  width: 6px;
}

.fish-collection-list::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 999px;
}

/* —— Waiting tension glow —— */
.lake-panel.lake-waiting.lake-tension {
  box-shadow: var(--shadow-lift), 0 0 24px rgba(56, 189, 248, 0.22);
}

.lake-panel.lake-waiting.lake-tension-high {
  animation: lake-tension-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes lake-tension-pulse {
  from { box-shadow: var(--shadow-lift), 0 0 16px rgba(56, 189, 248, 0.18); }
  to { box-shadow: var(--shadow-lift), 0 0 32px rgba(74, 222, 128, 0.28); }
}

/* —— Mobile section nav —— */
.mobile-nav {
  display: none;
}

@media (max-width: 980px) {
  #app {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: rgba(8, 20, 40, 0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--panel-border);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
  }

  .mobile-nav-btn {
    flex: 1;
    min-height: 44px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    background: rgba(14, 36, 58, 0.65);
    color: var(--muted);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), transform 0.2s var(--ease-out);
  }

  .mobile-nav-btn.is-active {
    color: var(--text);
    border-color: rgba(56, 189, 248, 0.45);
    background: var(--accent-soft);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
    transform: translateY(-1px);
  }

  .mobile-nav-btn.nav-bite-pulse {
    border-color: rgba(74, 222, 128, 0.65);
    color: var(--success);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.35);
    animation: nav-bite-pulse 0.6s ease-in-out 2;
  }

  @keyframes nav-bite-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
  }

  body[data-mobile-panel="play"] [data-panel]:not([data-panel="play"]) {
    display: none !important;
  }

  body[data-mobile-panel="shop"] [data-panel]:not([data-panel="shop"]) {
    display: none !important;
  }

  body[data-mobile-panel="dex"] [data-panel]:not([data-panel="dex"]) {
    display: none !important;
  }

  .lake-panel {
    position: sticky;
    top: 0.5rem;
    z-index: 3;
  }

  .fish-collection-list {
    max-height: none;
  }

  body[data-mobile-panel="dex"] .fish-collection-list {
    max-height: calc(100vh - 11rem);
  }

  .toast {
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 120;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lake-panel.lake-waiting.lake-tension-high {
    animation: none !important;
  }

  .overlay-hint.cast-hint-coach {
    animation: none !important;
  }

  .catch-burst.is-active,
  .fishdex-row.is-new,
  .gear-chip.gear-chip-pop,
  .shop-item.is-recommended.is-ready {
    animation: none !important;
  }

  .reel-bar-wrap.reel-bar-coach {
    animation: none !important;
  }

  .balance-flyup {
    animation: none !important;
    opacity: 0;
  }
}

