:root {
  color-scheme: light;
  --bg: #edf5f8;
  --text: #102033;
  --muted: #6a7c8d;
  --hairline: rgba(255,255,255,.56);
  --hairline-soft: rgba(18,47,70,.10);
  --glass-bg: linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,.38));
  --glass-strong: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.52));
  --glass-soft: rgba(255,255,255,.34);
  --specular: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,0) 48%);
  --shadow: 0 24px 70px rgba(23, 63, 91, .16);
  --shadow-soft: 0 12px 32px rgba(23, 63, 91, .10);
  --accent: #0a84ff;
  --accent-soft: rgba(10,132,255,.14);
  --aqua: #24c7c2;
  --gold: #f4b740;
  --danger: #ff4f67;
  --radius: 22px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08101b;
  --text: #eef6fb;
  --muted: #90a4b7;
  --hairline: rgba(255,255,255,.16);
  --hairline-soft: rgba(255,255,255,.08);
  --glass-bg: linear-gradient(180deg, rgba(31,44,61,.72), rgba(13,22,34,.44));
  --glass-strong: linear-gradient(180deg, rgba(43,58,78,.82), rgba(18,28,43,.62));
  --glass-soft: rgba(17,29,44,.38);
  --specular: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 48%);
  --shadow: 0 28px 90px rgba(0, 0, 0, .42);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, .28);
  --accent: #66b9ff;
  --accent-soft: rgba(102,185,255,.16);
  --aqua: #52ded4;
  --gold: #ffd166;
  --danger: #ff7d91;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; touch-action: manipulation; }
body {
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  background:
    linear-gradient(180deg, rgba(255,255,255,.56), rgba(255,255,255,0) 34%),
    radial-gradient(circle at 14% 7%, rgba(10,132,255,.18), transparent 31%),
    radial-gradient(circle at 86% 4%, rgba(36,199,194,.14), transparent 29%),
    linear-gradient(155deg, #edf5f8 0%, #dfeef3 48%, #f7fbfd 100%);
  background-attachment: fixed;
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 16% 8%, rgba(102,185,255,.16), transparent 34%),
    radial-gradient(circle at 84% 4%, rgba(82,222,212,.10), transparent 30%),
    linear-gradient(155deg, #08101b 0%, #0e1b2a 54%, #07101b 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.24) 0 1px, transparent 1px 100%),
    linear-gradient(rgba(255,255,255,.20) 0 1px, transparent 1px 100%);
  background-size: 78px 78px;
  opacity: .24;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 56%);
  mask-image: linear-gradient(180deg, #000, transparent 56%);
}

button, input, select, textarea { font: inherit; }
button {
  min-height: 44px;
  cursor: pointer;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:disabled { cursor: not-allowed; opacity: .52; filter: saturate(.72); }

.app-shell {
  width: min(548px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 12px calc(132px + env(safe-area-inset-bottom));
}
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.topbar h1 {
  margin: 0;
  font-size: clamp(18px, 4.5vw, 26px);
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0;
  font-weight: 950;
}
.top-actions { display: flex; align-items: center; gap: 8px; }

.online-badge,
.icon-button,
.stat-card,
.bait-strip,
.quiet-panel,
.bottom-tabs,
.dialog-card,
.encyclopedia-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--hairline);
  -webkit-backdrop-filter: saturate(210%) blur(26px);
  backdrop-filter: saturate(210%) blur(26px);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.48);
}
.online-badge::before,
.icon-button::before,
.stat-card::before,
.quiet-panel::before,
.bottom-tabs::before,
.dialog-card::before,
.encyclopedia-card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 45%;
  border-radius: inherit;
  background: var(--specular);
  pointer-events: none;
}
.online-badge {
  height: 36px;
  min-width: 58px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  font-weight: 850;
}
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fd36d;
  box-shadow: 0 0 0 5px rgba(47,211,109,.12);
}
.icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
}
.theme-toggle img {
  width: 42px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(7, 31, 48, .16));
  transition: transform .22s ease, filter .22s ease;
}
:root[data-theme="dark"] .theme-toggle img {
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, .26)) saturate(1.08);
}

.view { display: none; }
.view { padding-bottom: 18px; }
.view.active { display: block; animation: viewIn .22s cubic-bezier(.2,.8,.2,1) both; }

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-card {
  min-height: 84px;
  border-radius: 18px;
  padding: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,.08)),
    url("/static/assets/stat-card.webp"),
    var(--glass-bg);
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center;
  border-color: rgba(255,255,255,.64);
}
.stat-card:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255,255,255,.36), rgba(255,255,255,.08)),
    url("/static/assets/stat-card-kill.webp"),
    var(--glass-bg);
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center;
}
:root[data-theme="dark"] .stat-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)),
    url("/static/assets/stat-card-dark.webp"),
    var(--glass-bg);
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center;
}
:root[data-theme="dark"] .stat-card:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)),
    url("/static/assets/stat-card-kill-dark.webp"),
    var(--glass-bg);
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center;
}
.stat-card strong {
  position: relative;
  z-index: 1;
  font-size: 14px;
  letter-spacing: 0;
}
.stat-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.stat-actions button,
.quiet-panel button,
.market-grid button,
.dialog-choice,
.bait-buy-panel button,
.sell-fish-row button,
.image-action-button,
.account-actions button {
  border: 1px solid rgba(255,255,255,.54);
  border-radius: 999px;
  padding: 8px 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.54), rgba(255,255,255,.24)),
    url("/static/assets/button-glass.webp");
  background-size: 100% 100%, 100% 100%;
  background-position: center;
  -webkit-backdrop-filter: saturate(190%) blur(18px);
  backdrop-filter: saturate(190%) blur(18px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.56), 0 8px 20px rgba(23,63,91,.08);
  color: var(--text);
  font-weight: 850;
}
:root[data-theme="dark"] .stat-actions button,
:root[data-theme="dark"] .quiet-panel button,
:root[data-theme="dark"] .market-grid button,
:root[data-theme="dark"] .dialog-choice,
:root[data-theme="dark"] .bait-buy-panel button,
:root[data-theme="dark"] .sell-fish-row button,
:root[data-theme="dark"] .image-action-button,
:root[data-theme="dark"] .account-actions button {
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.05)),
    url("/static/assets/button-glass-dark.webp");
  background-size: 100% 100%, 100% 100%;
  color: #eef6fb;
}
.stat-actions button:active,
.quiet-panel button:active,
.bottom-tabs button:active,
.cast-button:active,
.dialog-choice:active,
.image-action-button:active { transform: scale(.975); }

.announcement-marquee {
  position: relative;
  margin: 10px 0 0;
  height: 36px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.50);
  background:
    linear-gradient(180deg, rgba(255,255,255,.36), rgba(255,255,255,.08)),
    url("/static/assets/announcement-banner.webp"),
    linear-gradient(180deg, rgba(255,255,255,.54), rgba(255,255,255,.25));
  background-size: 100% 100%, cover, cover;
  background-position: center;
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  backdrop-filter: blur(20px) saturate(190%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.45);
}
:root[data-theme="dark"] .announcement-marquee {
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)),
    url("/static/assets/announcement-banner-dark.webp"),
    linear-gradient(180deg, rgba(16,38,56,.70), rgba(8,17,28,.40));
  background-size: 100% 100%, cover, cover;
  background-position: center;
}
.announcement-marquee::before,
.announcement-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34px;
  z-index: 2;
  pointer-events: none;
}
.announcement-marquee::before { left: 0; background: linear-gradient(90deg, rgba(246,251,253,.92), transparent); }
.announcement-marquee::after { right: 0; background: linear-gradient(270deg, rgba(246,251,253,.92), transparent); }
:root[data-theme="dark"] .announcement-marquee::before { background: linear-gradient(90deg, rgba(13,23,35,.92), transparent); }
:root[data-theme="dark"] .announcement-marquee::after { background: linear-gradient(270deg, rgba(13,23,35,.92), transparent); }
#announcementMarquee {
  position: absolute;
  left: 0;
  top: 0;
  width: max-content;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 42px;
  padding-left: 100%;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  animation: announcementSlide 36s linear infinite;
}
#announcementMarquee .ticker-track {
  display: inline-flex;
  min-width: max-content;
  padding-right: 42px;
}

.bait-strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  border-radius: 18px;
  padding: 8px;
  margin: 10px 0;
  scrollbar-width: none;
}
.bait-strip::-webkit-scrollbar { display: none; }
.bait-strip span {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.30);
  border: 1px solid rgba(255,255,255,.34);
  font-size: 13px;
  font-weight: 760;
}
:root[data-theme="dark"] .bait-strip span {
  background: rgba(11,24,38,.54);
  border-color: rgba(255,255,255,.16);
}
.bait-strip img, .market-grid img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.10));
  border: 0;
}

.fishing-scene {
  position: relative;
  height: min(50vh, 470px);
  min-height: 330px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.74);
  background: #7ec8d5;
  box-shadow: 0 24px 70px rgba(16, 72, 99, .20);
  isolation: isolate;
}
.fishing-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 30%),
    linear-gradient(0deg, rgba(2,12,22,.12), rgba(2,12,22,0) 38%);
}
:root[data-theme="dark"] .fishing-scene::after {
  background:
    radial-gradient(circle at 78% 13%, rgba(185,225,255,.28), transparent 0 6%, transparent 18%),
    linear-gradient(180deg, rgba(1,7,18,.58), rgba(3,14,28,.34) 42%, rgba(0,8,18,.40)),
    linear-gradient(0deg, rgba(0,6,15,.56), rgba(1,10,24,.10) 44%);
}
.scene-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
}
.player-layer { position: absolute; inset: 0; z-index: 3; }
.scene-player {
  position: absolute;
  width: clamp(72px, 17vw, 126px);
  transform: translate(-50%, -100%);
  transition: left .4s ease, top .4s ease;
  text-align: center;
}
.scene-player img.avatar {
  width: 100%;
  filter: drop-shadow(0 16px 16px rgba(0,0,0,.26));
  transform-origin: 50% 100%;
}
.scene-player .nameplate {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(8,17,28,.48);
  color: white;
  -webkit-backdrop-filter: saturate(190%) blur(14px);
  backdrop-filter: saturate(190%) blur(14px);
  border: 1px solid rgba(255,255,255,.22);
  font-size: 11px;
  white-space: nowrap;
  transform: translateY(-5px);
}
.scene-player .nameplate img { width: 14px; height: 14px; }
.scene-player .effect {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 12px 14px rgba(0,0,0,.20));
}
.scene-player.action-casting img.avatar { animation: castSwing 760ms ease-in-out infinite alternate; }
.scene-player.action-bite .effect { background-image: url("/static/assets/bite-splash.webp"); opacity: 1; animation: pulse .8s infinite; }
.scene-player.action-reeling img.avatar { animation: reeling .24s infinite alternate; }
.scene-player.action-landed .effect { opacity: 1; animation: fishUp 1.2s ease-out infinite; }
.scene-player.action-landed .landed-icon {
  width: 70px;
  height: 70px;
}
.scene-player.action-rod_broken .effect { background-image: url("/static/assets/rod-broken.webp"); opacity: 1; animation: shake .4s infinite; }
.scene-player.female img.avatar { filter: drop-shadow(0 16px 16px rgba(0,0,0,.26)) hue-rotate(8deg); }

.cast-stage-overlay {
  position: absolute;
  left: 50%;
  bottom: 88px;
  z-index: 5;
  width: min(76%, 360px);
  height: 158px;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.05)),
    url("/static/assets/cast-stage-panel.webp"),
    rgba(214,241,251,.42);
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center;
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 18px 42px rgba(0,58,94,.20), inset 0 1px 0 rgba(255,255,255,.30);
  pointer-events: none;
  overflow: hidden;
}
:root[data-theme="dark"] .cast-stage-overlay,
:root[data-theme="dark"] .reel-challenge-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)),
    url("/static/assets/cast-stage-panel-dark.webp"),
    rgba(8,24,40,.72);
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center;
}
:root[data-theme="dark"] .cast-stage-overlay strong,
:root[data-theme="dark"] .reel-challenge-card strong {
  color: #eef6fb;
}
:root[data-theme="dark"] .cast-stage-overlay strong {
  background: rgba(12,29,45,.62);
  border-color: rgba(255,255,255,.18);
}
.cast-stage-overlay::before {
  content: "";
  position: absolute;
  inset: 42% -12% -40%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(202,249,255,.52), transparent 52%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 18px, rgba(255,255,255,.06) 18px 36px);
  animation: waterDrift 2.8s linear infinite;
}
.cast-stage-overlay strong {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.52);
  color: #0a2a45;
  border: 1px solid rgba(255,255,255,.58);
  font-size: 13px;
  font-weight: 920;
  text-align: center;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.hook-line {
  position: absolute;
  left: 40px;
  top: -2px;
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.24));
  animation: bobberDrop .9s cubic-bezier(.22,1,.36,1) both, bobberFloat 1.6s ease-in-out .9s infinite;
}
.bite-fish {
  position: absolute;
  right: 28px;
  top: 30px;
  width: 118px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.22));
  opacity: 0;
  transform: translateX(42px) scale(.82);
}
.cast-ripple {
  position: absolute;
  left: 104px;
  top: 92px;
  width: 24px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(174,246,255,.74);
  animation: rippleRing 1.1s ease-out infinite;
}
.cast-stage-overlay.stage-approach .bite-fish { opacity: .82; animation: fish-approach 1.8s ease-out both; }
.cast-stage-overlay.stage-bite .bite-fish { opacity: 1; animation: fish-bite .44s ease-in-out infinite alternate; }
.cast-stage-overlay.stage-bite .cast-ripple { border-color: rgba(255,255,255,.95); animation-duration: .48s; }

.bottle-button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  width: 64px;
  height: 64px;
  min-height: 64px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 22%, rgba(255,255,255,.56), rgba(255,255,255,.18) 52%, rgba(255,255,255,.10));
  -webkit-backdrop-filter: saturate(210%) blur(20px);
  backdrop-filter: saturate(210%) blur(20px);
  box-shadow: 0 14px 32px rgba(6,35,54,.18), inset 0 1px 0 rgba(255,255,255,.48);
  padding: 9px;
}
.bottle-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 7px 12px rgba(7,36,55,.18));
}
.fish-king-panel {
  position: absolute;
  right: 12px;
  top: 58px;
  z-index: 5;
  width: 160px;
  max-height: 240px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(7,18,29,.46);
  border: 1px solid rgba(255,255,255,.22);
  color: white;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  overflow: auto;
}
.hidden { display: none !important; }

.cast-button,
.primary {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 20px;
  padding: 15px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.04) 42%),
    url("/static/assets/cast-button.webp"),
    linear-gradient(135deg, rgba(82,222,212,.92), rgba(79,156,255,.90));
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 36px rgba(39,128,178,.18), inset 0 1px 0 rgba(255,255,255,.52);
  color: #041b2a;
  font-weight: 930;
  letter-spacing: 0;
}
.cast-button {
  position: relative;
  min-height: 76px;
  overflow: hidden;
  color: transparent;
  text-shadow: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,.03) 42%),
    url("/static/assets/cast-button.webp"),
    linear-gradient(135deg, rgba(82,222,212,.92), rgba(79,156,255,.90));
  background-size: cover;
  background-position: center;
}
:root[data-theme="dark"] .cast-button {
  border-color: rgba(255,255,255,.26);
  background:
    linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.02) 48%),
    url("/static/assets/cast-button-dark.webp"),
    linear-gradient(135deg, rgba(22,68,94,.92), rgba(12,34,56,.94));
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center;
  box-shadow: 0 18px 42px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.18);
}
.cast-button::after {
  content: "";
  position: absolute;
  inset: 3px 18px;
  background: url("/static/assets/cast-button-text.webp") center / contain no-repeat;
  pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(2, 48, 78, .22));
}
:root[data-theme="dark"] .cast-button::after {
  display: none;
}
.cast-button:disabled {
  color: rgba(255,255,255,.96);
  text-shadow: 0 2px 8px rgba(5, 30, 45, .48);
}
.cast-button:disabled::after {
  opacity: .14;
}
.cast-button-label {
  position: relative;
  z-index: 1;
}
.market-grid,
.mine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.quiet-panel {
  overflow: hidden;
  border-radius: var(--radius);
  padding: 14px;
}
.panel-copy { position: relative; z-index: 1; }
.quiet-panel h2 { position: relative; z-index: 1; margin: 0 0 10px; font-size: 18px; letter-spacing: 0; }
.quiet-panel p { position: relative; z-index: 1; color: var(--muted); line-height: 1.6; }
.rank-line { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; }
.rank-line img { width: 36px; height: 36px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.14)); }
.rank-progress {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin: 10px 0 2px;
}
.rank-progress-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.58);
  background: rgba(255,255,255,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.58), inset 0 -6px 14px rgba(66,150,205,.08);
}
:root[data-theme="dark"] .rank-progress-bar {
  background: rgba(8,21,35,.68);
  border-color: rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -6px 14px rgba(0,0,0,.18);
}
.rank-progress-bar i {
  display: block;
  width: var(--rank-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #73dfff, #0a84ff);
  box-shadow: 0 0 16px rgba(10,132,255,.24);
  transition: width .3s ease;
}
.rank-progress small {
  color: var(--muted);
  font-weight: 820;
}

.fish-market-scene {
  position: relative;
  min-height: 430px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  background: #d3eff1;
  box-shadow: var(--shadow);
  isolation: isolate;
}
:root[data-theme="dark"] .fish-market-scene {
  border-color: rgba(255,255,255,.18);
  background: #07111f;
  box-shadow: 0 28px 76px rgba(0,0,0,.42);
}
.market-logo-art {
  width: min(82%, 380px);
  max-height: 154px;
  object-fit: contain;
  display: block;
  margin: 0 auto -6px;
  filter: drop-shadow(0 18px 28px rgba(13, 53, 76, .22));
}
.fish-market-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), transparent 38%),
    linear-gradient(0deg, rgba(6,21,33,.34), transparent 45%);
  z-index: 1;
}
:root[data-theme="dark"] .fish-market-scene::after {
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), transparent 34%),
    linear-gradient(0deg, rgba(1,9,18,.56), transparent 52%);
}
.market-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
:root[data-theme="dark"] .market-bg,
:root[data-theme="dark"] .scene-bg {
  filter: saturate(.82) brightness(.48) contrast(1.08) hue-rotate(5deg);
}
.market-fishmonger {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  width: 150px;
  min-height: 188px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: end center;
  padding: 0;
}
.market-fishmonger img {
  width: 138px;
  height: 158px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(0,0,0,.32));
  transition: transform .18s ease;
}
.market-fishmonger span {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  margin-top: -8px;
  border-radius: 999px;
  background: rgba(7,18,29,.58);
  color: white;
  border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-weight: 920;
}
.market-fishmonger:active img { transform: translateY(2px) scale(.98); }

.task-logo-art,
.encyclopedia-logo-art {
  width: min(78%, 370px);
  max-height: 142px;
  object-fit: contain;
  display: block;
  margin: 0 auto -2px;
  filter: drop-shadow(0 18px 28px rgba(13, 53, 76, .20));
}
:root[data-theme="dark"] .market-logo-art,
:root[data-theme="dark"] .task-logo-art,
:root[data-theme="dark"] .encyclopedia-logo-art {
  filter: drop-shadow(0 18px 32px rgba(0,0,0,.34));
}
.task-panel,
.mine-profile-card,
.backpack-panel {
  min-height: 180px;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  align-items: center;
}
.mine-hero-art,
.backpack-hero-art {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(18,49,71,.18));
}
:root[data-theme="dark"] .mine-hero-art,
:root[data-theme="dark"] .dialog-hero-art {
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.34));
}
.task-panel { grid-template-columns: minmax(0, 1fr); }
.today-task-list { display: grid; gap: 10px; }
.task-card {
  position: relative;
  overflow: hidden;
  min-height: 78px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.40);
  border: 1px solid rgba(255,255,255,.38);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
:root[data-theme="dark"] .task-card,
:root[data-theme="dark"] .backpack-catch-card,
:root[data-theme="dark"] .sell-fish-row {
  background: rgba(9,23,36,.52);
  border-color: rgba(255,255,255,.14);
}
.task-card span,
.task-card strong { position: relative; z-index: 1; }
.task-card b,
.task-card small { display: block; }
.task-card small { margin-top: 4px; color: var(--muted); font-weight: 800; }
.task-card strong {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(244,183,64,.20);
  color: #9b6500;
}
:root[data-theme="dark"] .task-card strong {
  background: rgba(255,209,102,.16);
  color: #ffd166;
}
.task-card i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: var(--task-progress, 0%);
  background: linear-gradient(90deg, var(--aqua), var(--gold));
}

.backpack-panel {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  align-items: stretch;
}
:root[data-theme="dark"] .backpack-panel::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 112px;
  height: 128px;
  background: url("/static/assets/backpack-panel-dark.webp") center / contain no-repeat;
  opacity: .16;
  pointer-events: none;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.30));
}
.backpack-layout {
  display: grid;
  gap: 16px;
}
.backpack-layout section {
  display: grid;
  gap: 8px;
}
.backpack-layout h3 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.backpack-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 10px;
}
.backpack-item {
  width: 100%;
  min-height: 66px;
  border-radius: 20px !important;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px !important;
  overflow: hidden;
}
.backpack-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.12));
}
.backpack-item span,
.backpack-item b,
.backpack-item small { display: block; text-align: left; }
.backpack-item span { min-width: 0; }
.backpack-item b {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.15;
}
.backpack-item small { margin-top: 2px; color: var(--muted); }
.backpack-catch-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.backpack-catch-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255,255,255,.38);
  border: 1px solid rgba(255,255,255,.36);
}
.backpack-catch-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 9px 10px rgba(0,0,0,.12));
}
.backpack-catch-card b,
.backpack-catch-card small { display: block; }
.backpack-catch-card small {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.account-actions button { min-width: 76px; }

.encyclopedia-shell {
  padding: 4px 8px 14px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.54), rgba(255,255,255,.18)),
    url("/static/assets/encyclopedia-bg.webp");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.52);
}
:root[data-theme="dark"] .encyclopedia-shell {
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)),
    url("/static/assets/encyclopedia-bg-dark.webp");
  background-size: cover;
  background-position: center;
  border-color: rgba(255,255,255,.18);
}
.encyclopedia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 2px;
}
.encyclopedia-card {
  min-height: 132px;
  border-radius: 20px;
  padding: 10px;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,.10)),
    url("/static/assets/encyclopedia-card.webp");
  background-size: 100% 100%, 100% 100%;
  background-position: center;
}
:root[data-theme="dark"] .encyclopedia-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)),
    url("/static/assets/encyclopedia-card-dark.webp");
  background-size: 100% 100%, 100% 100%;
  background-position: center;
}
.encyclopedia-card img {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.13));
}
.encyclopedia-card strong,
.encyclopedia-card small { position: relative; z-index: 1; display: block; }

.bottom-tabs {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 22px));
  height: 62px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding: 7px;
  z-index: 20;
  overflow: hidden;
}
.bottom-tabs button {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 17px;
  background: transparent;
  display: grid;
  place-items: center;
  transition: transform .16s ease, background .16s ease, color .16s ease;
  min-height: 46px;
}
.bottom-tabs button.active {
  background: rgba(255,255,255,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.46), 0 8px 18px rgba(23,63,91,.08);
  color: var(--accent);
}
:root.qq-webview .app-shell {
  padding-bottom: calc(198px + env(safe-area-inset-bottom));
}
:root.qq-webview .bottom-tabs {
  bottom: calc(78px + env(safe-area-inset-bottom));
}
:root.qq-webview .danmaku-button {
  bottom: calc(154px + env(safe-area-inset-bottom));
}
:root[data-theme="dark"] .bottom-tabs button.active { background: rgba(255,255,255,.12); }
.tab-label {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.reel-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: auto;
  --reel-time: 100%;
  background: rgba(210,241,252,.22);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  padding: 18px;
}
.reel-challenge-card {
  width: min(92vw, 360px);
  min-height: 250px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 22px 18px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.62);
  background:
    linear-gradient(180deg, rgba(255,255,255,.58), rgba(255,255,255,.22)),
    url("/static/assets/cast-stage-panel.webp");
  background-size: 100% 100%, 100% 100%;
  background-position: center;
  box-shadow: 0 22px 58px rgba(27, 102, 143, .22), inset 0 1px 0 rgba(255,255,255,.72);
  -webkit-backdrop-filter: saturate(190%) blur(20px);
  backdrop-filter: saturate(190%) blur(20px);
}
.reel-challenge-card strong {
  font-size: 22px;
  font-weight: 980;
  color: #0a2a45;
}
.reel-challenge-card small {
  color: #2d6c91;
  font-weight: 880;
}
.reel-charge-bar {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.66);
  background: rgba(255,255,255,.44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.66), inset 0 -7px 16px rgba(61,150,205,.10);
}
.reel-charge-bar i {
  display: block;
  width: var(--reel-progress, 4%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #70e5ff, #0a84ff);
  box-shadow: 0 0 18px rgba(10,132,255,.28);
  transition: width .08s linear;
}
.reel-challenge-card::after {
  content: "";
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #74eaff var(--reel-time), rgba(255,255,255,.40) 0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.64);
}
:root[data-theme="dark"] .reel-challenge-card small {
  color: #a9d9f3;
}
.reel-button {
  position: relative;
  left: auto;
  top: auto;
  --reel-progress: 4%;
  width: 112px;
  height: 112px;
  min-height: 112px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(8,20,31,.18) 0 55%, transparent 56%),
    conic-gradient(from -90deg, #34f1ff var(--reel-progress), rgba(255,255,255,.25) 0);
  color: white;
  font-weight: 900;
  pointer-events: auto;
  display: grid;
  place-items: center;
  padding: 8px;
  box-shadow: 0 18px 42px rgba(255,72,90,.28), 0 0 0 8px rgba(255,255,255,.14);
  transform: none;
  transition: left .24s ease, top .24s ease, transform .08s ease;
}
.reel-button:active { transform: scale(.94); }
.reel-button img {
  position: absolute;
  inset: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.18));
}
.reel-button span {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  min-height: 26px;
  display: grid;
  place-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(8,20,31,.70);
  color: white;
  border: 1px solid rgba(255,255,255,.24);
  font-size: 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.reel-button i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #fff var(--reel-progress), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  pointer-events: none;
}

dialog { border: 0; background: transparent; width: min(92vw, 440px); }
dialog::backdrop {
  background: rgba(7,13,21,.34);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.dialog-card {
  border-radius: 26px;
  padding: 18px;
  color: var(--text);
  overflow: hidden;
}
.dialog-card [data-close] {
  float: right;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  background: rgba(255,255,255,.34);
}
.dialog-card input,
.dialog-card textarea,
.dialog-card select,
#genderSelect {
  width: 100%;
  margin: 7px 0;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.48);
  background: rgba(255,255,255,.52);
  color: #10232f;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
:root[data-theme="dark"] .dialog-card input,
:root[data-theme="dark"] .dialog-card textarea,
:root[data-theme="dark"] .dialog-card select,
:root[data-theme="dark"] #genderSelect {
  color: var(--text);
  background: rgba(18,29,44,.66);
}
.dialog-card textarea { min-height: 112px; resize: vertical; }
.scroll-list, .encyclopedia-detail { max-height: min(70vh, 560px); overflow-y: auto; }
.encyclopedia-detail {
  background:
    linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.14)),
    url("/static/assets/encyclopedia-detail.webp");
  background-size: 100% 100%, 100% 100%;
  background-position: center;
}
:root[data-theme="dark"] .encyclopedia-detail {
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)),
    url("/static/assets/encyclopedia-detail-dark.webp");
  background-size: 100% 100%, 100% 100%;
  background-position: center;
}
.code-row, .leader-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border-bottom: 1px solid var(--hairline-soft);
  padding: 10px 0;
}
.catch-card img,
.encyclopedia-detail img {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}
.bottle-dialog-card {
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,255,255,.44)),
    radial-gradient(circle at 50% 0%, rgba(82,222,212,.22), transparent 52%);
}
:root[data-theme="dark"] .bottle-dialog-card {
  background:
    linear-gradient(180deg, rgba(25,42,61,.86), rgba(8,18,30,.66)),
    radial-gradient(circle at 50% 0%, rgba(102,185,255,.18), transparent 56%);
  border-color: rgba(255,255,255,.16);
}
.bottle-dialog-hero {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 4px;
  margin: 0 0 10px;
}
.bottle-dialog-hero img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(18,65,84,.18));
}
.bottle-dialog-hero span,
.art-title {
  font-size: 25px;
  font-weight: 980;
  line-height: 1.05;
  color: #0a2a45;
  text-shadow: 0 1px 0 rgba(255,255,255,.8), 0 10px 24px rgba(10,132,255,.16);
}
:root[data-theme="dark"] .bottle-dialog-hero span,
:root[data-theme="dark"] .art-title {
  color: #eef6fb;
  text-shadow: 0 0 18px rgba(102,185,255,.24);
}
.art-title.small {
  margin: 12px 0 8px;
  font-size: 18px;
}
.throw-bottle-action {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  border: 0;
  border-radius: 18px;
  color: #041b2a;
  background:
    linear-gradient(180deg, rgba(255,255,255,.50), rgba(255,255,255,.10)),
    url("/static/assets/button-glass.webp"),
    linear-gradient(135deg, #eafdff, #bfeaff);
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center;
  box-shadow: 0 18px 38px rgba(35,127,164,.22), inset 0 1px 0 rgba(255,255,255,.62);
  font-weight: 980;
}
:root[data-theme="dark"] .throw-bottle-action {
  color: #eef6fb;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.05)),
    url("/static/assets/button-glass-dark.webp"),
    linear-gradient(135deg, rgba(31,74,99,.92), rgba(11,29,48,.94));
  background-size: 100% 100%, 100% 100%, cover;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 38px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.18);
}
.dialog-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dialog-title-row img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0,0,0,.16));
}
.dialog-choice {
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
}
.fishmonger-mode-buy .fishmonger-menu-actions { display: none; }
.fishmonger-mode-buy .bait-buy-panel { margin-top: 4px; }
.bait-buy-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.bait-buy-panel button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bait-buy-panel img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.sell-fish-list { display: grid; gap: 8px; }
.sell-fish-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 18px;
  background: rgba(255,255,255,.38);
  border: 1px solid rgba(255,255,255,.36);
}
.sell-fish-row img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 9px 12px rgba(0,0,0,.14));
}
.sell-fish-row b,
.sell-fish-row small { display: block; }
.sell-fish-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.sell-fish-row button { min-width: 68px; }
.account-dialog-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.44)),
    radial-gradient(circle at 50% 0%, rgba(10,132,255,.18), transparent 58%);
}
:root[data-theme="dark"] .account-dialog-card {
  background:
    linear-gradient(180deg, rgba(25,42,61,.88), rgba(8,18,30,.68)),
    radial-gradient(circle at 50% 0%, rgba(102,185,255,.18), transparent 58%);
  border-color: rgba(255,255,255,.16);
}
.dialog-hero-art {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 104px;
  object-fit: contain;
  display: block;
  margin: -4px auto 6px;
  filter: drop-shadow(0 16px 22px rgba(18,49,71,.18));
}
.image-action-button {
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
}
.toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 80;
  min-width: 172px;
  max-width: min(86vw, 420px);
  padding: 14px 22px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.48), rgba(255,255,255,.18)),
    url("/static/assets/toast-panel.webp");
  background-size: 100% 100%, 100% 100%;
  color: #0a2a45;
  text-align: center;
  font-weight: 920;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 36px rgba(35,127,164,.20), inset 0 1px 0 rgba(255,255,255,.58);
}
:root[data-theme="dark"] .toast {
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04)),
    url("/static/assets/toast-panel-dark.webp");
  background-size: 100% 100%, 100% 100%;
  color: #eef6fb;
}

@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes castSwing { from { transform: rotate(-2deg); } to { transform: rotate(4deg); } }
@keyframes reeling { from { transform: translateX(-2px) rotate(-1deg); } to { transform: translateX(2px) rotate(1deg); } }
@keyframes pulse { 50% { transform: translate(-50%, -50%) scale(1.2); } }
@keyframes fishUp { from { transform: translate(-50%, -20%) scale(.7); } to { transform: translate(-50%, -92%) scale(1.1); } }
@keyframes shake { 30% { transform: translate(-55%, -50%) rotate(-12deg); } 70% { transform: translate(-45%, -50%) rotate(12deg); } }
@keyframes waterDrift { from { transform: translateX(0); } to { transform: translateX(36px); } }
@keyframes bobberDrop { from { opacity: 0; transform: translateY(-46px) rotate(-8deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }
@keyframes bobberFloat { 50% { transform: translateY(7px) rotate(2deg); } }
@keyframes rippleRing { from { opacity: .95; transform: scale(.7); } to { opacity: 0; transform: scale(3.4); } }
@keyframes fish-approach { from { transform: translateX(42px) scale(.82); } to { transform: translateX(-10px) scale(1); } }
@keyframes fish-bite { from { transform: translateX(-12px) translateY(2px) scale(1.02) rotate(-1deg); } to { transform: translateX(-20px) translateY(-5px) scale(1.08) rotate(2deg); } }
@keyframes announcementSlide { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 100vw)); } }

@media (max-width: 420px) {
  .app-shell { padding-left: 8px; padding-right: 8px; }
  .topbar h1 { font-size: 17px; }
  .online-badge { min-width: 48px; padding: 0 8px; }
  .stats-row { gap: 8px; }
  .stat-card { border-radius: 16px; padding: 11px; }
  .fishing-scene { min-height: 300px; height: min(44vh, 360px); border-radius: 24px; }
  .fish-king-panel { width: 124px; font-size: 12px; }
  .cast-stage-overlay { bottom: 86px; width: calc(100% - 96px); min-width: 270px; height: 142px; border-radius: 24px; }
  .hook-line { left: 20px; width: 96px; height: 96px; }
  .bite-fish { right: 10px; top: 24px; width: 104px; }
  .reel-button { width: 86px; height: 86px; min-height: 86px; }
  .tab-label { font-size: 12px; }
  .bait-strip { justify-content: flex-start; }
  .fish-market-scene { min-height: 370px; border-radius: 24px; }
  .market-fishmonger { width: 130px; min-height: 168px; }
  .market-fishmonger img { width: 124px; height: 142px; }
  .task-panel,
  .mine-profile-card,
  .backpack-panel { grid-template-columns: 1fr; }
  .mine-hero-art,
  .backpack-hero-art { width: 104px; height: 104px; margin: 0 auto; }
  .backpack-item-grid,
  .backpack-catch-list { grid-template-columns: 1fr; }
  .sell-fish-row { grid-template-columns: 50px 1fr; }
  .sell-fish-row button { grid-column: 1 / -1; width: 100%; }
}

/* Image2 S10 polish pass: light and dark share the same layout, only the skin changes. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.theme-toggle {
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.theme-toggle::before { display: none; }
.theme-toggle img {
  width: 42px;
  height: 42px;
  transition: transform .18s ease;
}
.theme-toggle:active img { transform: scale(.94); }

.stats-hud {
  position: relative;
  aspect-ratio: 980 / 260;
  width: 100%;
  margin: 0 auto;
  background: url("/static/assets/stats-hud-light.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 18px 28px rgba(16, 76, 120, .18));
}
:root[data-theme="dark"] .stats-hud {
  background-image: url("/static/assets/stats-hud-dark.webp");
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .34));
}
.hud-value {
  position: absolute;
  top: 43.5%;
  transform: translate(-50%, -50%);
  width: 21%;
  text-align: center;
  font-size: clamp(13px, 3.8vw, 21px);
  line-height: 1;
  color: #f6fbff;
  text-shadow: 0 2px 0 rgba(1, 42, 78, .55), 0 0 12px rgba(74, 198, 255, .28);
  letter-spacing: 0;
  font-weight: 980;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.hud-coin-value { left: 27%; }
.hud-kill-value { left: 73.5%; }
.hud-hotspot {
  position: absolute;
  min-height: 0;
  height: 15.5%;
  top: 65.5%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  padding: 0;
}
.hud-hotspot span { display: none; }
.hud-hotspot:active { transform: translateY(1px) scale(.97); }
.hud-coin-withdraw { left: 17.7%; width: 12.2%; }
.hud-coin-code { left: 32.2%; width: 12.2%; }
.hud-kill-withdraw { left: 64%; width: 12.2%; }
.hud-kill-code { left: 78.3%; width: 12.2%; }

.announcement-marquee {
  height: 40px;
  border: 0;
  border-radius: 20px;
  background:
    url("/static/assets/announcement-banner.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(234,249,255,.72), rgba(202,234,249,.46));
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 14px 28px rgba(24, 93, 139, .12);
}
:root[data-theme="dark"] .announcement-marquee {
  background:
    url("/static/assets/announcement-banner-dark.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(14,35,58,.82), rgba(6,15,27,.72));
}
#announcementMarquee {
  gap: 92px;
  animation: announcementSlide 36s linear infinite;
  font-size: 13px;
}
#announcementMarquee > .ticker-track {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  gap: 0;
  padding-right: 92px;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}
.ticker-item b {
  display: inline;
  min-width: 0;
  padding: 0;
  font-style: normal;
  font-weight: 900;
}
.ticker-player,
.ticker-fish {
  font-style: normal;
  font-weight: 980;
  text-shadow: 0 1px 0 rgba(255,255,255,.74);
}
.ticker-player { color: #056fcb; }
.ticker-fish { color: #009e9a; }
:root[data-theme="dark"] .ticker-player {
  color: #8ecbff;
  text-shadow: 0 0 10px rgba(102,185,255,.28);
}
:root[data-theme="dark"] .ticker-fish {
  color: #64f4e7;
  text-shadow: 0 0 10px rgba(82,222,212,.24);
}
.ticker-separator {
  display: inline-block;
  width: 92px;
  height: 1px;
}

.cast-stage-overlay {
  left: 54%;
  bottom: 54px;
  width: min(44%, 210px);
  min-width: 156px;
  height: 182px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overflow: visible;
}
:root[data-theme="dark"] .cast-stage-overlay {
  background: transparent;
}
.cast-stage-overlay::before { display: none; }
.hook-line {
  left: 34px;
  top: 10px;
  width: 118px;
  height: 136px;
  object-fit: contain;
  animation: bobberDrop .9s cubic-bezier(.22,1,.36,1) both, bobberFloat 2.1s ease-in-out .9s infinite;
}
.cast-ripple {
  left: 90px;
  top: 116px;
  width: 28px;
  height: 10px;
  border-color: rgba(173,247,255,.86);
  box-shadow: 0 0 18px rgba(92, 216, 255, .26);
}
.bite-fish {
  right: -8px;
  top: 52px;
  width: 116px;
  height: 82px;
}

.cast-float-button,
.bottle-button {
  position: absolute;
  bottom: 14px;
  z-index: 6;
  width: 72px;
  height: 72px;
  min-height: 72px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  padding: 0;
}
.cast-float-button { left: 14px; }
.bottle-button { right: 14px; }
.cast-float-button img,
.bottle-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(4, 36, 58, .24));
}
:root[data-theme="dark"] .cast-float-button img,
:root[data-theme="dark"] .bottle-button img {
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.36));
}
.cast-float-button.is-busy img {
  animation: pulseFloat 1.1s ease-in-out infinite;
}
.cast-float-button:active,
.bottle-button:active { transform: scale(.94); }

.reel-overlay {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
  display: block;
  padding: 0;
}
.reel-target-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 31;
}
.reel-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  --reel-progress: 4%;
  width: clamp(84px, 22vw, 116px);
  height: clamp(84px, 22vw, 116px);
  min-height: clamp(84px, 22vw, 116px);
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(4,32,56,.20) 0 54%, transparent 55%),
    conic-gradient(from -90deg, #47e7ff var(--reel-progress), rgba(255,255,255,.28) 0);
  color: white;
  pointer-events: auto;
  display: grid;
  place-items: center;
  padding: 8px;
  box-shadow: 0 18px 42px rgba(0, 132, 255, .24), 0 0 0 7px rgba(255,255,255,.15);
  transition: left .44s cubic-bezier(.2,.8,.2,1), top .44s cubic-bezier(.2,.8,.2,1), transform .08s ease;
}
:root[data-theme="dark"] .reel-button {
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42), 0 0 0 7px rgba(102,185,255,.12);
}
.reel-button:active { transform: translate(-50%, -50%) scale(.92); }
.reel-button img {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.20));
}
.reel-button i {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #ffffff var(--reel-progress), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  pointer-events: none;
}

dialog { padding: 0; max-width: calc(100vw - 24px); overflow-x: hidden; }
dialog { width: min(92vw, 440px); }
.dialog-card {
  width: 100%;
  position: relative;
  min-height: 280px;
  border: 0;
  border-radius: 26px;
  padding: 22px 22px 24px;
  background:
    linear-gradient(180deg, rgba(248,253,255,.98), rgba(218,242,252,.94));
  box-shadow: 0 28px 70px rgba(9, 69, 116, .22);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.scroll-list { overflow-x: hidden; }
.dialog-card::after {
  content: "";
  position: absolute;
  inset: 8px 18px auto;
  height: 70px;
  background: url("/static/assets/modal-panel-light.webp") top center / contain no-repeat;
  opacity: .10;
  pointer-events: none;
  z-index: 0;
}
:root[data-theme="dark"] .dialog-card {
  background:
    linear-gradient(180deg, rgba(13,31,52,.98), rgba(4,13,24,.94));
  box-shadow: 0 30px 78px rgba(0,0,0,.48);
  border: 0;
}
:root[data-theme="dark"] .dialog-card::after {
  background-image: url("/static/assets/modal-panel-dark.webp");
  opacity: .16;
}
.dialog-card > * {
  position: relative;
  z-index: 1;
}
.dialog-card::before,
.bottle-dialog-card::before,
.account-dialog-card::before,
.encyclopedia-detail::before,
.encyclopedia-detail::after { display: none; }
.dialog-title-art {
  width: min(74%, 280px);
  max-height: 96px;
  object-fit: contain;
  display: block;
  margin: -8px auto 8px;
  filter: drop-shadow(0 15px 22px rgba(6, 59, 105, .18));
}
:root[data-theme="dark"] .dialog-title-art {
  filter: drop-shadow(0 16px 24px rgba(0,0,0,.40));
}
.dialog-card [data-close] {
  position: relative;
  z-index: 2;
  float: right;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.56);
  color: #0f3859;
  box-shadow: 0 8px 16px rgba(24, 93, 139, .10);
}
:root[data-theme="dark"] .dialog-card [data-close] {
  background: rgba(12,30,48,.84);
  color: #eaf6ff;
}
.bottle-dialog-card,
.account-dialog-card {
  background:
    linear-gradient(180deg, rgba(248,253,255,.98), rgba(218,242,252,.94));
}
:root[data-theme="dark"] .bottle-dialog-card,
:root[data-theme="dark"] .account-dialog-card {
  background:
    linear-gradient(180deg, rgba(13,31,52,.98), rgba(4,13,24,.94));
}
.bottle-dialog-hero { display: none; }
.dialog-choice,
.image-action-button,
.throw-bottle-action,
.bait-buy-panel button,
.sell-fish-row button,
.account-actions button,
.quiet-panel button,
.primary {
  border: 0;
  border-radius: 999px;
  background:
    url("/static/assets/button-glass.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, #f7fdff, #bfeaff);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 12px 24px rgba(35, 127, 164, .14);
  color: #06385d;
}
:root[data-theme="dark"] .dialog-choice,
:root[data-theme="dark"] .image-action-button,
:root[data-theme="dark"] .throw-bottle-action,
:root[data-theme="dark"] .bait-buy-panel button,
:root[data-theme="dark"] .sell-fish-row button,
:root[data-theme="dark"] .account-actions button,
:root[data-theme="dark"] .quiet-panel button,
:root[data-theme="dark"] .primary {
  background:
    url("/static/assets/button-glass-dark.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, #19405f, #071b2d);
  color: #eef8ff;
  box-shadow: 0 13px 26px rgba(0,0,0,.26);
}
.fishmonger-mode-buy .dialog-title-art {
  content: url("/static/assets/title-fishmonger.webp");
}
.sell-fish-dialog .dialog-title-art,
.catch-card .dialog-title-art {
  margin-bottom: 0;
}

.quiet-panel:not(.bait-strip),
.encyclopedia-card {
  border: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 18px 34px rgba(22, 86, 130, .12);
}
.quiet-panel:not(.bait-strip)::before,
.encyclopedia-card::before {
  display: none;
}
.task-panel,
.mine-profile-card,
.backpack-panel,
.mine-grid > .quiet-panel:not(.mine-profile-card):not(.backpack-panel) {
  background:
    linear-gradient(180deg, rgba(248,253,255,.88), rgba(216,242,252,.76));
}
:root[data-theme="dark"] .task-panel,
:root[data-theme="dark"] .mine-profile-card,
:root[data-theme="dark"] .backpack-panel,
:root[data-theme="dark"] .mine-grid > .quiet-panel:not(.mine-profile-card):not(.backpack-panel) {
  background:
    linear-gradient(180deg, rgba(13,31,52,.88), rgba(5,16,29,.82));
  box-shadow: 0 20px 38px rgba(0,0,0,.28);
}
.task-card,
.backpack-catch-card,
.sell-fish-row,
.backpack-item {
  background: rgba(255,255,255,.46);
  border: 1px solid rgba(255,255,255,.36);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
:root[data-theme="dark"] .task-card,
:root[data-theme="dark"] .backpack-catch-card,
:root[data-theme="dark"] .sell-fish-row,
:root[data-theme="dark"] .backpack-item {
  background: rgba(6,19,33,.56);
  border-color: rgba(255,255,255,.12);
}

.task-panel,
.mine-profile-card,
.mine-grid > .quiet-panel:not(.mine-profile-card):not(.backpack-panel),
.backpack-panel {
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 20px;
}
.task-panel {
  min-height: 0;
  grid-template-columns: 96px 1fr;
  align-items: center;
}
.task-panel .panel-copy,
.mine-profile-card .panel-copy,
.backpack-panel .panel-copy {
  min-width: 0;
}
.mine-profile-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 0;
}
.mine-hero-art {
  width: 88px;
  height: 112px;
  align-self: center;
  pointer-events: none;
}
.mine-profile-card h2,
.mine-profile-card p,
.rank-line,
.rank-progress,
.backpack-layout,
.backpack-layout section,
.backpack-item,
.backpack-catch-card,
.task-card {
  min-width: 0;
}
.rank-line {
  flex-wrap: wrap;
}
.rank-line span,
.rank-line b,
#nextTierText,
.rank-progress small,
.task-card b,
.task-card small,
.backpack-item b,
.backpack-item small,
.backpack-catch-card b,
.backpack-catch-card small {
  overflow-wrap: anywhere;
}
.mine-grid {
  grid-template-columns: 1fr;
}
.mine-profile-card { grid-template-columns: 92px minmax(0, 1fr); }
.mine-profile-card h2 { font-size: 16px; margin-bottom: 7px; }
.mine-profile-card .primary {
  max-width: 220px;
  min-height: 42px;
  margin-top: 8px;
}
.rank-line {
  gap: 6px;
  font-size: 13px;
  line-height: 1.25;
}
.rank-line img {
  width: 32px;
  height: 32px;
}
.rank-progress { margin: 8px 0 2px; }
#nextTierText {
  margin: 8px 0 0;
  line-height: 1.45;
}
.backpack-panel {
  overflow: visible;
}
.backpack-panel::after { display: none; }
.backpack-panel .panel-copy {
  display: grid;
  gap: 10px;
}
.backpack-item-grid {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
}
.backpack-catch-list {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.backpack-item {
  min-height: 58px;
  border-radius: 18px !important;
  padding: 8px 10px !important;
  gap: 8px;
}
.backpack-item img {
  width: 36px;
  height: 36px;
}
.backpack-item b {
  font-size: 13px;
}
.backpack-item small {
  font-size: 11px;
}
.backpack-layout {
  gap: 13px;
  padding-bottom: 18px;
}
.task-panel {
  grid-template-columns: minmax(0, 1fr);
}
.task-card {
  grid-template-columns: minmax(0, 1fr) auto;
}
.catch-card {
  width: min(92vw, 420px);
  padding: 20px;
}
.catch-card .dialog-title-art {
  margin-bottom: 8px;
}
.catch-card #catchDetail {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 6px 10px 12px;
}
.catch-card #catchDetail img {
  max-width: min(46vw, 180px);
  max-height: 180px;
  margin: 0 auto 4px;
}
.catch-card #catchDetail h2,
.catch-card #catchDetail p {
  width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}

@keyframes pulseFloat {
  50% { transform: translateY(-2px) scale(1.04); filter: drop-shadow(0 15px 22px rgba(40, 183, 255, .36)); }
}

@media (max-width: 420px) {
  .stats-hud { margin-top: -2px; }
  .hud-value { font-size: 13px; }
  .cast-stage-overlay {
    bottom: 48px;
    width: 162px;
    min-width: 162px;
    height: 170px;
  }
  .hook-line {
    left: 26px;
    width: 112px;
    height: 130px;
  }
  .bite-fish {
    right: -12px;
    top: 54px;
    width: 104px;
  }
  .cast-float-button,
  .bottle-button {
    width: 64px;
    height: 64px;
    min-height: 64px;
  }
  .dialog-card {
    padding: 20px 18px 22px;
  }
  .dialog-title-art {
    width: min(78%, 252px);
  }
  .mine-profile-card {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .mine-hero-art {
    justify-self: center;
    width: 92px;
    height: 96px;
  }
  .mine-profile-card .primary {
    max-width: none;
  }
  .task-panel {
    grid-template-columns: 1fr;
  }
  .backpack-item-grid {
    grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  }
}

/* Fixed night-ocean S10 layout: readable, dark by default, no theme switch. */
:root {
  color-scheme: dark;
  --bg: #071421;
  --text: #eef7ff;
  --muted: #9fb4c9;
  --hairline: rgba(167, 220, 255, .18);
  --hairline-soft: rgba(167, 220, 255, .10);
  --glass-bg: linear-gradient(180deg, rgba(18,45,69,.78), rgba(6,18,31,.64));
  --glass-strong: linear-gradient(180deg, rgba(30,68,99,.86), rgba(7,23,39,.74));
  --glass-soft: rgba(8,24,40,.58);
  --specular: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 48%);
  --shadow: 0 28px 86px rgba(0, 0, 0, .44);
  --shadow-soft: 0 16px 36px rgba(0, 0, 0, .28);
  --accent: #7cc8ff;
  --accent-soft: rgba(124,200,255,.16);
  --aqua: #66efe4;
  --gold: #ffd166;
  --danger: #ff7d91;
}

html,
body {
  user-select: none;
  -webkit-user-select: none;
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(71,163,229,.18), transparent 34%),
    radial-gradient(circle at 86% 6%, rgba(80,232,210,.10), transparent 28%),
    linear-gradient(155deg, #06111d 0%, #0a1d30 48%, #06101c 100%);
}

.theme-toggle { display: none !important; }

.announcement-marquee {
  height: 40px;
  border-radius: 20px;
  border: 1px solid rgba(173, 225, 255, .17);
  background: linear-gradient(180deg, rgba(18,45,69,.74), rgba(8,25,43,.62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 28px rgba(0,0,0,.20);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.announcement-marquee,
:root[data-theme="dark"] .announcement-marquee {
  background-image: linear-gradient(180deg, rgba(18,45,69,.74), rgba(8,25,43,.62));
}

.announcement-marquee::before { background: linear-gradient(90deg, rgba(8,25,43,.96), transparent); }
.announcement-marquee::after { background: linear-gradient(270deg, rgba(8,25,43,.96), transparent); }

#announcementMarquee {
  animation: announcementSlide 36s linear infinite;
  color: #d8ecff;
  gap: 128px;
}

#announcementMarquee > .ticker-track { padding-right: 128px; }
.ticker-separator { width: 128px; }
.ticker-player { color: #93d0ff; text-shadow: 0 0 12px rgba(124,200,255,.28); }
.ticker-fish { color: #6af4e7; text-shadow: 0 0 12px rgba(102,239,228,.24); }

.bait-strip {
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border-color: rgba(173, 225, 255, .17);
  background: linear-gradient(180deg, rgba(18,45,69,.74), rgba(8,25,43,.62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 28px rgba(0,0,0,.20);
}

.bait-strip span {
  min-height: 38px;
  padding: 5px 12px 5px 8px;
  background: rgba(12,34,55,.62);
  border-color: rgba(176,226,255,.18);
}

.bait-strip img,
.bait-buy-panel img {
  width: 30px;
  height: 30px;
  padding: 2px;
  object-fit: contain;
  overflow: visible;
}

.fishing-scene {
  border-color: rgba(181,229,255,.36);
  background: #061522;
  box-shadow: 0 28px 76px rgba(0,0,0,.44);
}

.fishing-scene::after {
  background:
    radial-gradient(circle at 78% 12%, rgba(206,230,255,.24), transparent 0 7%, transparent 18%),
    linear-gradient(180deg, rgba(1,8,18,.16), rgba(2,13,26,.12) 40%, rgba(0,8,18,.18));
}

.scene-bg {
  transform: scale(1.005);
  filter: saturate(1.08) brightness(.9) contrast(1.06);
}

.fishing-scene[data-current-sea-area="1"] { background-image: url("/static/assets/sea-area-1-night.webp"); }
.fishing-scene[data-current-sea-area="2"] { background-image: url("/static/assets/sea-area-2-night.webp"); }
.fishing-scene[data-current-sea-area="3"] { background-image: url("/static/assets/sea-area-3-night.webp"); }

.sea-area-selector {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 7px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(181,229,255,.24);
  background: rgba(5,18,32,.56);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 12px 24px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.10);
}

.sea-area-selector button {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 11px;
  background: transparent;
  color: #cfe8fb;
  font-size: 12px;
  font-weight: 900;
}

.sea-area-selector button.active {
  background: linear-gradient(180deg, rgba(112,203,255,.32), rgba(38,107,156,.25));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 16px rgba(0,0,0,.18);
}

.scene-player.action-idle img.avatar {
  animation: none !important;
}

.cast-stage-overlay {
  width: min(44%, 210px);
  min-width: 156px;
  pointer-events: none;
}

.cast-float-button,
.bottle-button {
  z-index: 9;
}

.fish-market-scene {
  margin-top: 10px;
  border: 1px solid rgba(181,229,255,.28);
  background: #07111f;
}

.market-bg {
  filter: saturate(1.08) brightness(.88) contrast(1.06);
}

.fish-market-scene::after {
  background:
    radial-gradient(circle at 18% 16%, rgba(255,210,126,.20), transparent 26%),
    radial-gradient(circle at 78% 22%, rgba(113,210,255,.16), transparent 30%),
    linear-gradient(0deg, rgba(1,9,18,.24), transparent 48%);
}

.market-logo-art,
.task-logo-art,
.encyclopedia-logo-art {
  margin: 6px auto 16px;
  padding: 8px 14px;
  border-radius: 22px;
  border: 1px solid rgba(181,229,255,.18);
  background: rgba(5,18,32,.32);
  filter: drop-shadow(0 18px 32px rgba(0,0,0,.38));
}

.task-panel,
.mine-profile-card,
.backpack-panel,
.mine-grid > .quiet-panel:not(.mine-profile-card):not(.backpack-panel) {
  border: 1px solid rgba(181,229,255,.16);
  background: linear-gradient(180deg, rgba(13,34,55,.88), rgba(5,16,29,.84));
  box-shadow: 0 20px 42px rgba(0,0,0,.30);
}

.task-card {
  border: 1px solid rgba(181,229,255,.22);
  background: linear-gradient(180deg, rgba(12,34,55,.72), rgba(5,18,31,.62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.dialog-card {
  border: 1px solid rgba(181,229,255,.18);
  background: linear-gradient(180deg, rgba(13,31,52,.98), rgba(4,13,24,.95));
  color: var(--text);
}

.dialog-card input,
.dialog-card textarea,
.dialog-card select {
  width: 100%;
  border: 1px solid rgba(181,229,255,.18);
  border-radius: 16px;
  background: rgba(4,15,27,.72);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.bait-quantity-dialog h2,
.danmaku-dialog h2 {
  margin: 6px 0 12px;
  text-align: center;
  font-size: 20px;
}

.bait-quantity-dialog p {
  text-align: center;
  color: #d8ecff;
  font-weight: 900;
}

.danmaku-layer {
  position: fixed;
  left: 50%;
  top: max(10px, env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 90;
  width: min(560px, calc(100vw - 22px));
  display: grid;
  gap: 6px;
  pointer-events: none;
}

.danmaku-layer span {
  justify-self: center;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(181,229,255,.22);
  background: rgba(4,17,31,.70);
  color: #eaf7ff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  word-break: keep-all;
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 12px 24px rgba(0,0,0,.28);
  animation: danmakuIn 520ms cubic-bezier(.2,.8,.2,1) both;
}

.danmaku-button {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 28;
  min-height: 44px;
  border: 1px solid rgba(181,229,255,.26);
  border-radius: 999px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(40,92,126,.86), rgba(9,29,48,.82));
  color: #eef7ff;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.14);
}

.reel-overlay,
.reel-target-layer,
.reel-button {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.reel-button {
  touch-action: manipulation;
  transition: left .62s cubic-bezier(.2,.8,.2,1), top .62s cubic-bezier(.2,.8,.2,1), transform .08s ease;
}

.bottom-tabs {
  border-color: rgba(181,229,255,.18);
  background: linear-gradient(180deg, rgba(15,40,64,.86), rgba(6,20,34,.82));
}

.bottom-tabs button.active {
  background: rgba(124,200,255,.16);
  color: #97d6ff;
}

@keyframes danmakuIn {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 420px) {
  .sea-area-selector {
    top: 9px;
    gap: 4px;
    padding: 5px;
  }

  .sea-area-selector button {
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  .bait-strip {
    justify-content: flex-start;
  }

  .danmaku-button {
    right: 10px;
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

/* July 2 polish: brighter fixed night ocean, video-style danmaku, centered game toasts. */
.scene-bg {
  filter: saturate(1.2) brightness(1.16) contrast(1.04) !important;
}

.fishing-scene::after {
  background:
    radial-gradient(circle at 78% 12%, rgba(220,238,255,.18), transparent 0 7%, transparent 18%),
    linear-gradient(180deg, rgba(2,12,24,.06), rgba(2,13,26,.02) 40%, rgba(0,8,18,.08)) !important;
}

.market-bg {
  filter: saturate(1.12) brightness(1.08) contrast(1.04) !important;
}

.announcement-marquee {
  background: linear-gradient(180deg, rgba(18,45,69,.76), rgba(8,25,43,.64)) !important;
}

#announcementMarquee {
  animation: announcementSlide 36s linear infinite;
}

#announcementMarquee,
#announcementMarquee > .ticker-track {
  gap: 0;
  min-width: max-content;
  white-space: nowrap;
}

.ticker-item {
  column-gap: 4px;
}

#announcementMarquee > .ticker-track,
.ticker-item {
  padding-right: 56px;
}

.ticker-separator {
  width: 56px;
}

.task-signin-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(181,229,255,.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14,38,62,.78), rgba(5,18,31,.68));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 14px 30px rgba(0,0,0,.22);
}

.task-signin-bar button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  background:
    url("/static/assets/button-glass-dark.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(93,185,255,.46), rgba(12,56,90,.76));
  color: #eef8ff;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
}

.task-signin-bar button:disabled {
  opacity: .7;
}

.task-signin-bar span {
  min-width: 0;
  color: #d9edff;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.today-task-list {
  gap: 14px;
}

.task-group {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(181,229,255,.16);
  border-radius: 22px;
  background: rgba(4,15,27,.24);
}

.task-group h3 {
  margin: 0 2px 1px;
  color: #a9d9ff;
  font-size: 14px;
  font-weight: 980;
}

.task-card {
  border-color: rgba(181,229,255,.28) !important;
  background:
    linear-gradient(180deg, rgba(19,52,79,.78), rgba(5,18,31,.66)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 10px 22px rgba(0,0,0,.18);
}

.task-card.is-complete {
  border-color: rgba(102,239,228,.34) !important;
}

.danmaku-layer {
  position: fixed;
  inset: 0;
  left: 0;
  top: 0;
  transform: none;
  z-index: 90;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: block;
  pointer-events: none;
}

.danmaku-layer .danmaku-bullet {
  position: absolute;
  left: 100vw;
  top: var(--danmaku-y);
  max-width: min(94vw, 760px);
  min-width: max-content;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(181,229,255,.18);
  background: rgba(3,13,24,.42);
  color: #f2fbff;
  font-size: clamp(13px, 3.5vw, 17px);
  font-weight: 950;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  word-break: keep-all;
  overflow-wrap: normal;
  text-shadow: 0 2px 6px rgba(0,0,0,.62);
  -webkit-backdrop-filter: saturate(150%) blur(6px);
  backdrop-filter: saturate(150%) blur(6px);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  animation: danmakuFly var(--danmaku-duration, 11s) linear var(--danmaku-delay, 0s) forwards;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

.danmaku-layer .danmaku-text {
  overflow: visible;
  text-overflow: clip;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.danmaku-layer .danmaku-quick {
  flex: 0 0 auto;
  pointer-events: auto;
  min-height: 28px;
  border: 1px solid rgba(166,232,255,.46);
  border-radius: 999px;
  padding: 2px 10px;
  background: linear-gradient(180deg, rgba(106,244,231,.9), rgba(48,143,210,.86));
  color: #052033;
  font-size: 13px;
  font-weight: 1000;
  box-shadow: 0 4px 12px rgba(82,203,238,.28), inset 0 1px 0 rgba(255,255,255,.34);
  touch-action: manipulation;
}

.danmaku-layer .danmaku-quick:disabled {
  opacity: .62;
}

.danmaku-button {
  width: 54px;
  height: 54px;
  min-height: 54px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.danmaku-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(0,0,0,.34));
}

.toast {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999 !important;
  pointer-events: none;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04)),
    url("/static/assets/toast-panel-dark.webp") center / 100% 100% no-repeat !important;
  box-shadow: 0 22px 48px rgba(0,0,0,.42), 0 0 0 1px rgba(181,229,255,.16);
}

.catch-card #catchDetail {
  pointer-events: none;
}

.catch-card [data-close] {
  pointer-events: auto;
}

.encyclopedia-detail #encyclopediaDetail > img {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

@keyframes danmakuFly {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100vw - 120%)); }
}

@media (max-width: 420px) {
  .task-signin-bar {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .task-signin-bar button {
    width: 100%;
  }

  .danmaku-button {
    width: 48px;
    height: 48px;
    min-height: 48px;
  }
}

/* Final mobile fishing pass: keep the active fishing screen inside one viewport and keep reel taps above overlays. */
:root.fishing-view-active,
:root.reeling-active {
  overscroll-behavior: none;
}

:root.fishing-view-active body,
:root.reeling-active body {
  height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
}

:root.fishing-view-active .app-shell {
  height: 100svh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
  padding-top: max(6px, env(safe-area-inset-top));
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

:root.qq-webview.fishing-view-active .app-shell {
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
}

:root.fishing-view-active .topbar {
  flex: 0 0 auto;
  min-height: 32px;
  margin-bottom: 0;
}

:root.fishing-view-active .topbar h1 {
  font-size: clamp(17px, 4vw, 22px);
}

:root.fishing-view-active .online-badge {
  height: 32px;
  min-width: 52px;
}

:root.fishing-view-active #viewFishing.active {
  display: flex;
}

:root.fishing-view-active #viewFishing {
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
  padding-bottom: 0;
  touch-action: none;
  overscroll-behavior: none;
}

:root.fishing-view-active .stats-hud {
  flex: 0 0 auto;
  width: min(100%, 500px);
  margin: -2px auto -3px;
}

:root.fishing-view-active .announcement-marquee {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 17px;
}

:root.fishing-view-active #announcementMarquee {
  min-height: 34px;
  font-size: 12px;
}

:root.fishing-view-active .bait-strip {
  flex: 0 0 auto;
  min-height: 46px;
  margin: 0;
  padding: 6px 8px;
}

:root.fishing-view-active .bait-strip span {
  min-height: 34px;
  padding: 4px 10px 4px 7px;
  font-size: 12px;
}

:root.fishing-view-active .bait-strip img {
  width: 27px;
  height: 27px;
}

:root.fishing-view-active .fishing-scene {
  flex: 1 1 auto;
  min-height: 300px;
  height: auto;
  border-radius: 24px;
  touch-action: none;
}

:root.qq-webview.fishing-view-active .fishing-scene {
  min-height: 260px;
}

:root.fishing-view-active .sea-area-selector {
  top: 9px;
}

:root.fishing-view-active .cast-float-button,
:root.fishing-view-active .bottle-button {
  width: 66px;
  height: 66px;
  min-height: 66px;
  bottom: 12px;
}

:root.fishing-view-active .danmaku-button {
  bottom: calc(82px + env(safe-area-inset-bottom));
}

:root.qq-webview.fishing-view-active .danmaku-button {
  bottom: calc(142px + env(safe-area-inset-bottom));
}

:root.fishing-view-active .bottom-tabs {
  height: 58px;
  padding: 6px;
}

:root.reeling-active .danmaku-layer,
:root.reeling-active .danmaku-button {
  pointer-events: none !important;
}

.reel-overlay {
  z-index: 130;
  touch-action: none;
}

.reel-target-layer {
  z-index: 131;
  touch-action: none;
}

.reel-button {
  z-index: 132;
  touch-action: none;
}

@media (max-width: 420px) {
  :root.fishing-view-active .app-shell {
    padding-left: 7px;
    padding-right: 7px;
    gap: 6px;
  }

  :root.fishing-view-active .topbar {
    min-height: 30px;
  }

  :root.fishing-view-active .topbar h1 {
    font-size: 16px;
  }

  :root.fishing-view-active .online-badge {
    height: 30px;
    min-width: 48px;
  }

  :root.fishing-view-active .bait-strip {
    min-height: 44px;
    justify-content: center;
  }

  :root.fishing-view-active .bait-strip span {
    padding-inline: 7px;
    gap: 4px;
  }

  :root.fishing-view-active .fishing-scene {
    min-height: 260px;
    border-radius: 22px;
  }

  :root.fishing-view-active .cast-float-button,
  :root.fishing-view-active .bottle-button {
    width: 60px;
    height: 60px;
    min-height: 60px;
  }
}

