/* Рыбалка — миниапп. Тёмная «глубокая вода», стекло, бирюза и золото. */

:root {
  --bg: #03101c;
  --bg-2: #0F2123;
  --ink: #eaf6ff;
  --ink-2: #b7cfe0;
  --muted: #7f9db4;
  --glass: rgba(10, 20, 22, 0.5);
  --glass-2: rgba(12, 26, 28, 0.72);
  --glass-3: rgba(20, 45, 49, 0.86);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-2: rgba(255, 255, 255, 0.16);
  --aqua: #A9E4D0;
  --blue: #9CCBE8;
  --gold: #F3D28B;
  --gold-2: #ff9f1c;
  --green: #9FE3B6;
  --red: #ff5a6e;
  --violet: #C9B6FF;
  --t-common: #9fb6cb;
  --t-good: #A9E4D0;
  --t-rare: #C9B6FF;
  --t-legendary: #ffc24a;
  --t-loot: #ffb46b;
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --f-display: "Sofia Sans Extra Condensed", "Arial Narrow", "Segoe UI", system-ui, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Emoji Fill", sans-serif;
  --f-text: "Sofia Sans", "Segoe UI", system-ui, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Emoji Fill", sans-serif;
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1.15);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
  font-family: var(--f-text); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none;
  overscroll-behavior: none; touch-action: manipulation;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
img { -webkit-user-drag: none; user-select: none; }
.hidden { display: none !important; }
.num { font-family: var(--f-display); font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }

#app { position: fixed; inset: 0; overflow: hidden; }

/* ── загрузка ───────────────────────────────────────────── */
#boot {
  position: absolute; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(120% 80% at 50% 110%, #0c4a5e 0%, #12292C 45%, #03101c 80%);
  transition: opacity .6s var(--ease), visibility .6s;
}
#boot.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.boot-logo { position: relative; width: 132px; height: 132px; }
.boot-water {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #1f8fb0, #0b3f5c 60%, #11272A);
  box-shadow: 0 0 60px rgba(169, 228, 208, .25), inset 0 -10px 30px rgba(0, 0, 0, .4);
}
.boot-water::before, .boot-water::after {
  content: ""; position: absolute; left: 50%; top: 56%; width: 30px; height: 10px; margin: -5px 0 0 -15px;
  border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%; animation: ring 2.4s ease-out infinite;
}
.boot-water::after { animation-delay: 1.2s; }
@keyframes ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(3.6); opacity: 0; } }
.boot-float {
  position: absolute; left: 50%; top: 56%; width: 22px; height: 22px; margin: -18px 0 0 -11px; border-radius: 50%;
  background: linear-gradient(180deg, #ff4b5c 0 50%, #f4f7fb 50% 100%);
  box-shadow: inset -3px -3px 6px rgba(0, 0, 0, .25), 0 3px 8px rgba(0, 0, 0, .35);
  animation: bob 2.4s ease-in-out infinite;
}
.boot-float::before { content: ""; position: absolute; left: 50%; top: -12px; width: 2px; height: 13px; margin-left: -1px; background: #1a2530; border-radius: 2px; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(4px) rotate(3deg); } }
.boot-title { font-family: var(--f-display); font-weight: 800; font-size: 30px; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff, #9fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot-sub { color: var(--muted); font-size: 13px; margin-top: -14px; }
.boot-bar { width: 180px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--aqua), var(--blue)); transition: width .35s var(--ease); }
.boot-error { max-width: 280px; text-align: center; color: var(--ink-2); font-size: 14px; }

/* ── экраны ─────────────────────────────────────────────── */
.screen { position: absolute; inset: 0; visibility: hidden; opacity: 0; transition: opacity .45s var(--ease), visibility .45s; }
.screen.active { visibility: visible; opacity: 1; }

/* ── стекло, кнопки, плашки ─────────────────────────────── */
.glass {
  background: var(--glass); border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 16px; font-weight: 800; font-size: 15px; letter-spacing: .01em;
  transition: transform .18s var(--spring), filter .2s, opacity .2s; overflow: hidden; white-space: nowrap;
}
.btn:active { transform: scale(.955); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%); }
.btn-primary { color: #03222b; background: linear-gradient(135deg, #A9E4D0, #9CCBE8); box-shadow: 0 8px 24px rgba(156, 203, 232, .35); }
.btn-success { color: #042414; background: linear-gradient(135deg, #6ff0a8, #22c47a); box-shadow: 0 8px 24px rgba(34, 196, 122, .35); }
.btn-gold { color: #3a2300; background: linear-gradient(135deg, #FFE6A0, #E8B55C); box-shadow: 0 8px 24px rgba(232, 181, 92, .35); }
.btn-ghost { color: var(--ink); background: rgba(255, 255, 255, .08); border: 1px solid var(--stroke-2); }
.btn-ghost::after { display: none; }
.btn-danger { color: #fff; background: linear-gradient(135deg, #F29A8E, #E07A6E); }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn .shine { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 8px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
}
.pill .ico { width: 24px; height: 24px; display: grid; place-items: center; }
.coin {
  width: 22px; height: 22px; border-radius: 50%; display: inline-block; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff6c4 0 12%, #ffd84d 30%, #f0a212 75%, #b86b00);
  box-shadow: inset 0 -2px 3px rgba(120, 60, 0, .45), 0 0 10px rgba(255, 196, 64, .35);
  position: relative;
}
.coin::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1.5px solid rgba(160, 90, 0, .45); }
.coin.sm { width: 16px; height: 16px; }
.coin.sm::after { inset: 3.5px; border-width: 1px; }
.pill.bump { animation: bump .5s var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 100% { transform: scale(1); } }

.icon { width: 22px; height: 22px; display: inline-block; flex: none; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ── главный экран ──────────────────────────────────────── */
#home { background: var(--bg); }
.home-bg { position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(26px) saturate(1.25) brightness(.55); transform: scale(1.1); transition: background-image .6s; }
.home-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3, 16, 28, .55), rgba(3, 16, 28, .82) 45%, #03101c 92%); }
.home-rays { position: absolute; inset: 0; pointer-events: none; overflow: hidden; opacity: .35; mix-blend-mode: screen; }
.home-rays i { position: absolute; top: -20%; width: 90px; height: 140%; background: linear-gradient(180deg, rgba(160, 240, 255, .35), transparent 70%);
  transform-origin: top center; filter: blur(12px); animation: ray 9s ease-in-out infinite; }
@keyframes ray { 0%, 100% { transform: rotate(18deg) translateX(0); opacity: .5; } 50% { transform: rotate(24deg) translateX(30px); opacity: 1; } }

.home-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + 14px) 16px calc(var(--safe-bottom) + 110px); scrollbar-width: none; }
.home-scroll::-webkit-scrollbar { display: none; }
.tabpane { display: none; animation: paneIn .45s var(--ease); }
.tabpane.active { display: block; }
@keyframes paneIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.player-card { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; border-radius: var(--r-l); }
.avatar-wrap { position: relative; width: 58px; height: 58px; flex: none; }
.avatar-wrap svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.avatar { position: absolute; inset: 5px; border-radius: 50%; background: rgba(255, 255, 255, .1);
  display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 18px; color: #0D1D1F; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.lvl-badge { position: absolute; right: -4px; bottom: -3px; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: linear-gradient(135deg, #FFE6A0, #E8B55C); color: #3a2300; font-family: var(--f-display); font-weight: 800; font-size: 11px;
  display: grid; place-items: center; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); border: 2px solid #0E1D20; }
.player-meta { flex: 1; min-width: 0; }
.player-name { font-family: var(--f-display); font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-rank { color: var(--aqua); font-size: 12.5px; font-weight: 700; margin-top: 1px; }
.xp-line { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.xp-bar { flex: 1; height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .08); overflow: hidden; position: relative; }
.xp-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit;
  background: var(--accent); box-shadow: 0 0 12px rgba(169, 228, 208, .6); transition: width .9s var(--ease); }
.xp-text { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }

.weather-card { margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-m); }
.weather-ico { font-size: 30px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.weather-name { font-weight: 800; }
.weather-desc { color: var(--ink-2); font-size: 12.5px; }
.weather-time { margin-left: auto; font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }

.section-title { font-family: var(--f-display); font-weight: 700; font-size: 18px; margin: 22px 4px 12px; display: flex; align-items: baseline; gap: 8px; }
.section-title small { font-family: var(--f-text); font-weight: 600; font-size: 12.5px; color: var(--muted); }

.loc-list { display: flex; flex-direction: column; gap: 14px; }
.loc-card {
  position: relative; height: 158px; border-radius: 24px; overflow: hidden; cursor: pointer; isolation: isolate;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4); transform: translateZ(0); transition: transform .25s var(--spring);
  animation: cardIn .6s var(--ease) both;
}
.loc-card:active { transform: scale(.975); }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.loc-card .img { position: absolute; inset: -12% 0; background-size: cover; background-position: center 62%; z-index: -2; will-change: transform; }
.loc-card::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 10, 20, 0) 25%, rgba(0, 10, 20, .8) 100%), linear-gradient(90deg, rgba(0, 10, 20, .5), transparent 60%); }
.loc-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(255, 255, 255, .14); pointer-events: none; }
.loc-info { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; align-items: flex-end; gap: 10px; }
.loc-name { font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.15; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.loc-sub { font-size: 12.5px; color: rgba(234, 246, 255, .8); margin-top: 4px; display: flex; gap: 10px; align-items: center; }
.loc-fishes { display: flex; margin-left: auto; }
.loc-fishes span { position: relative; width: 34px; height: 34px; border-radius: 50%; margin-left: -10px; background: rgba(12, 27, 30, .78);
  border: 1.5px solid rgba(255, 255, 255, .18); box-shadow: 0 4px 10px rgba(0, 0, 0, .35); }
.loc-fishes span i { position: absolute; inset: 3px; background: center / contain no-repeat; }
.loc-fishes span.unknown i { filter: brightness(0) invert(1); opacity: .3; }
.loc-tag { position: absolute; top: 12px; left: 12px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 11.5px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 5px; background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.loc-tag.sea { color: #9fe9ff; }
.loc-card.locked .img { filter: grayscale(.85) brightness(.55); }
.loc-card.locked .loc-name { color: rgba(234, 246, 255, .75); }
.loc-lock { position: absolute; top: 12px; right: 12px; height: 28px; padding: 0 12px 0 9px; border-radius: 14px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; background: rgba(0, 0, 0, .5); color: #F3D28B; }
.loc-card .go { position: absolute; right: 14px; bottom: 14px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #A9E4D0, #9CCBE8); color: #03222b; box-shadow: 0 6px 18px rgba(156, 203, 232, .45); }
.loc-card .go svg { width: 20px; height: 20px; }
.loc-card .new-dot { position: absolute; top: 12px; right: 12px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 11.5px; font-weight: 800;
  display: inline-flex; align-items: center; background: linear-gradient(135deg, #FFE6A0, #E8B55C); color: #3a2300; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* нижнее меню */
.tabbar { position: absolute; left: 16px; right: 16px; bottom: calc(var(--safe-bottom) + 12px); height: 66px; border-radius: 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px; z-index: 5; }
.tabbar .indicator { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 3); border-radius: 18px;
  background: linear-gradient(135deg, rgba(169, 228, 208, .2), rgba(156, 203, 232, .2)); border: 1px solid rgba(169, 228, 208, .3);
  transition: transform .45s var(--spring); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 800; color: var(--muted); transition: color .3s; }
.tab .icon { width: 24px; height: 24px; transition: transform .35s var(--spring); }
.tab.active { color: var(--ink); }
.tab.active .icon { transform: translateY(-1px) scale(1.08); color: var(--aqua); }
.tab .badge { position: absolute; top: 4px; left: 54%; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 10.5px;
  display: grid; place-items: center; background: var(--gold); color: #3a2300; font-family: var(--f-display); font-weight: 800; }

/* ── рыбалка ────────────────────────────────────────────── */
#fishing { background: #000; touch-action: none; }
#fishing canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#scene-fallback { position: absolute; inset: 0; background-size: cover; background-position: center 70%; }
#rod { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; transform-origin: 86% 93%;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); transition: opacity .4s; }
.scene-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(255, 60, 80, 0); transition: box-shadow .25s; }
.scene-vignette.danger { box-shadow: inset 0 0 110px rgba(255, 60, 80, .55); }
.scene-vignette.bite { box-shadow: inset 0 0 110px rgba(169, 228, 208, .5); }

.hud-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--safe-top) + 10px) 12px 0; display: flex; align-items: flex-start; gap: 10px;
  pointer-events: none; z-index: 4; }
.hud-top > * { pointer-events: auto; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: transform .2s var(--spring); }
.round-btn:active { transform: scale(.9); }
.round-btn .icon { width: 22px; height: 22px; }
.hud-title { flex: 1; min-width: 0; padding: 7px 14px 8px; border-radius: 18px; }
.hud-title .name { font-family: var(--f-display); font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-title .sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 11.5px; color: var(--ink-2); font-weight: 700; }
.hud-title .xp-bar { height: 5px; max-width: 110px; }
.hud-side { position: absolute; right: 12px; top: calc(var(--safe-top) + 66px); display: flex; flex-direction: column; gap: 10px; z-index: 4; }
.bucket-btn { width: 58px; height: 58px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 11px; font-weight: 800; transition: transform .2s var(--spring); }
.bucket-btn:active { transform: scale(.92); }
.bucket-btn .icon { width: 26px; height: 26px; }
.bucket-btn.full { color: var(--gold); border-color: rgba(243, 210, 139, .5); animation: pulse 1.4s ease-in-out infinite; }
.bucket-btn.bump { animation: bump .55s var(--spring); }
.sound-btn { width: 44px; height: 44px; border-radius: 16px; display: grid; place-items: center; }
.sound-btn .icon { width: 20px; height: 20px; }

.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 60px 14px calc(var(--safe-bottom) + 14px);
  background: linear-gradient(180deg, rgba(2, 10, 18, 0), rgba(2, 10, 18, .55) 45%, rgba(2, 10, 18, .78)); pointer-events: none; }
.hud-bottom > * { pointer-events: auto; }
.hint { text-align: center; font-weight: 700; font-size: 14px; min-height: 40px; margin: 0 20px 12px; color: var(--ink);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .7); display: flex; align-items: flex-end; justify-content: center; pointer-events: none;
  transition: opacity .25s; }
.hint.flash { animation: hintIn .45s var(--spring); }
@keyframes hintIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.bait-chip { justify-self: start; height: 50px; padding: 0 14px 0 8px; border-radius: 18px; display: flex; align-items: center; gap: 8px; max-width: 100%;
  transition: transform .2s var(--spring); }
.bait-chip:active { transform: scale(.95); }
.bait-chip .emoji { width: 36px; height: 36px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: 20px; flex: none; }
.bait-chip .txt { text-align: left; min-width: 0; }
.bait-chip .txt > span { display: block; }
.bait-chip .t1 { font-size: 11px; color: var(--muted); font-weight: 700; line-height: 1.1; }
.bait-chip .t2 { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 84px; }
.bait-chip.empty .t2 { color: var(--red); }
.right-slot { justify-self: end; }

.emoji svg { width: 76%; height: 76%; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }

/* главная кнопка */
.main-btn { position: relative; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; touch-action: none;
  transition: transform .2s var(--spring); }
.main-btn:active { transform: scale(.94); }
.main-btn .core { position: absolute; inset: 9px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(145deg, #A9E4D0, #2296e8); color: #03222b; box-shadow: 0 10px 30px rgba(34, 150, 232, .45), inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -6px 14px rgba(23, 52, 57, .35);
  transition: background .3s, box-shadow .3s, transform .2s; }
.main-btn .core .icon { width: 30px; height: 30px; }
.main-btn .label { font-size: 10.5px; font-weight: 900; letter-spacing: .02em; text-transform: none; }
.main-btn svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); pointer-events: none; }
.main-btn svg.ring circle { fill: none; stroke-width: 5; }
.main-btn svg.ring .bg { stroke: rgba(255, 255, 255, .12); }
.main-btn svg.ring .fg { stroke: var(--aqua); stroke-linecap: round; transition: stroke .2s; }
.main-btn.wait .core { background: linear-gradient(145deg, #1d4a66, #1B3C41); color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .15); }
.main-btn.wait .core::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(169, 228, 208, .35); animation: waitPulse 2.2s ease-out infinite; }
@keyframes waitPulse { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }
.main-btn.bite .core { background: linear-gradient(145deg, #ffe46b, #ff8a1c); color: #3a1a00; box-shadow: 0 0 0 6px rgba(255, 190, 60, .25), 0 0 44px rgba(255, 170, 40, .75); animation: biteShake .32s linear infinite; }
@keyframes biteShake { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-2px, 1px) rotate(-3deg); } 75% { transform: translate(2px, -1px) rotate(3deg); } }
.main-btn.fight .core { background: linear-gradient(145deg, #7ef7c0, #1fb877); color: #03241a; }
.main-btn.fight.reeling .core { transform: scale(.93); box-shadow: 0 4px 16px rgba(31, 184, 119, .5), inset 0 -4px 12px rgba(0, 60, 30, .4); }
.main-btn.fight.warn .core { background: linear-gradient(145deg, #ff9aa6, #E07A6E); color: #fff; animation: biteShake .18s linear infinite; }
.main-btn.busy { pointer-events: none; }
.main-btn.busy .core { filter: saturate(.4) brightness(.8); }
.reel-spin { animation: spin .5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* вываживание: дистанция */
.fight-meter { position: relative; height: 30px; margin: 0 6px 12px; display: none; align-items: center; gap: 8px; }
.fight-meter.show { display: flex; animation: hintIn .4s var(--spring); }
.fight-track { position: relative; flex: 1; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .1); overflow: visible; }
.fight-track .fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #A9E4D0, #9FE3B6); }
.fight-track .fish-mark { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; display: grid; place-items: center;
  background: #0E1D20; border: 2px solid var(--aqua); box-shadow: 0 0 14px rgba(169, 228, 208, .5); left: 0; }
.fight-track .fish-mark .icon { width: 16px; height: 16px; color: var(--aqua); }
.fight-meter .tag { font-size: 11px; font-weight: 800; color: var(--ink-2); min-width: 44px; }
.fight-meter .tag.r { text-align: right; }
.run-flag { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 900;
  background: var(--red); color: #fff; opacity: 0; transition: opacity .15s; white-space: nowrap; }
.run-flag.on { opacity: 1; animation: biteShake .25s linear infinite; }

.tap-hint { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7);
  pointer-events: none; animation: tapHint 1.8s ease-out infinite; z-index: 3; }
.tap-hint::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: rgba(255, 255, 255, .85); }
@keyframes tapHint { 0% { transform: scale(.5); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

/* ── шторки ─────────────────────────────────────────────── */
.sheet-wrap { position: absolute; inset: 0; z-index: 30; visibility: hidden; }
.sheet-wrap.open { visibility: visible; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 6, 12, .55); opacity: 0; transition: opacity .35s; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86%; display: flex; flex-direction: column; border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(21, 47, 51, .97), rgba(12, 26, 28, .99)); border-top: 1px solid var(--stroke-2);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); transform: translateY(105%); transition: transform .5s var(--spring); padding-bottom: var(--safe-bottom); }
.sheet-wrap.open .sheet { transform: none; }
.sheet .grab { width: 42px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .2); margin: 10px auto 4px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 8px 18px 12px; flex: none; }
.sheet-head h3 { margin: 0; font-family: var(--f-display); font-size: 19px; font-weight: 700; flex: 1; }
.sheet-head .sub { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.sheet-content { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.sheet-body { overflow-y: auto; padding: 4px 16px 18px; -webkit-overflow-scrolling: touch; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
.sheet-foot { padding: 10px 16px 16px; flex: none; border-top: 1px solid var(--stroke); background: rgba(3, 14, 24, .6); }

/* наживка */
.bait-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; margin-bottom: 10px; background: rgba(255, 255, 255, .04);
  border: 1px solid var(--stroke); transition: border-color .25s, background .25s; }
.bait-row.selected { border-color: rgba(169, 228, 208, .6); background: rgba(169, 228, 208, .08); }
.bait-row.useless { opacity: .5; }
.bait-row .emoji { width: 46px; height: 46px; border-radius: 15px; background: rgba(255, 255, 255, .07); display: grid; place-items: center; font-size: 25px; flex: none; }
.bait-row .info { flex: 1; min-width: 0; }
.bait-row .name { font-weight: 800; display: flex; align-items: center; gap: 8px; }
.bait-row .cnt { font-family: var(--f-display); font-size: 12px; color: var(--ink-2); font-weight: 700; }
.bait-row .bite { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.bite-dots { display: inline-flex; gap: 3px; }
.bite-dots i { width: 14px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .13); }
.bite-dots.q3 i { background: var(--green); } .bite-dots.q2 i:nth-child(-n+2) { background: var(--gold); } .bite-dots.q1 i:first-child { background: var(--red); }
.bait-row .who { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bait-row .acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.buy-price { display: inline-flex; align-items: center; gap: 4px; }

/* садок */
.bucket-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fish-tile { position: relative; border-radius: 20px; padding: 10px 10px 12px; background: rgba(255, 255, 255, .045); border: 1px solid var(--stroke);
  overflow: hidden; transition: transform .2s var(--spring), border-color .2s; animation: cardIn .5s var(--ease) both; }
.fish-tile:active { transform: scale(.96); }
.fish-tile.sel { border-color: var(--gold); background: rgba(243, 210, 139, .08); }
.fish-tile.sel::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold);
  color: #3a2300; font-weight: 900; font-size: 13px; display: grid; place-items: center; }
.fish-tile .pic { height: 78px; display: grid; place-items: center; position: relative; }
.fish-tile .pic::before { content: ""; position: absolute; inset: 8px 12px; border-radius: 50%; filter: blur(16px); opacity: .5; background: var(--tc, var(--t-common)); }
.fish-tile .pic img { position: relative; max-width: 92%; max-height: 74px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45)); }
.fish-tile .nm { font-weight: 800; font-size: 13.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fish-tile .row { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; font-size: 12px; color: var(--ink-2); }
.fish-tile .price { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 800; font-family: var(--f-display); font-size: 12px; }
.tier-common { --tc: var(--t-common); } .tier-good { --tc: var(--t-good); } .tier-rare { --tc: var(--t-rare); }
.tier-legendary { --tc: var(--t-legendary); } .tier-loot { --tc: var(--t-loot); }
.empty-state { text-align: center; padding: 36px 20px 30px; color: var(--ink-2); }
.empty-state .big { width: 64px; height: 64px; margin: 0 auto 10px; color: var(--aqua); opacity: .8; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .4)); }
.empty-state .big svg { width: 100%; height: 100%; }
.empty-state b { display: block; font-family: var(--f-display); font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.cap-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 6px; }
.cap-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #A9E4D0, #F3D28B); transition: width .6s var(--ease); }

/* ── улов ───────────────────────────────────────────────── */
.catch-wrap { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; visibility: hidden; }
.catch-wrap.open { visibility: visible; }
.catch-backdrop { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, rgba(17, 39, 43, .5), rgba(0, 4, 10, .88)); opacity: 0; transition: opacity .4s;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.catch-wrap.open .catch-backdrop { opacity: 1; }
.catch-card { position: relative; width: min(360px, 100%); padding: 22px 20px 18px; border-radius: 30px; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, rgba(26, 59, 64, .96), rgba(13, 30, 33, .98)); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .3), 0 0 60px -10px var(--tc); transform: scale(.6) translateY(30px); opacity: 0; }
.catch-wrap.open .catch-card { animation: cardPop .7s var(--spring) forwards; }
@keyframes cardPop { 0% { transform: scale(.6) translateY(40px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.catch-card .rays { position: absolute; left: 50%; top: 118px; width: 560px; height: 560px; margin: -280px 0 0 -280px; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg, var(--tc) 0deg 7deg, transparent 7deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0 20%, transparent 62%); mask: radial-gradient(circle, #000 0 20%, transparent 62%); animation: spin 18s linear infinite; }
.catch-card .halo { position: absolute; left: 50%; top: 118px; width: 240px; height: 240px; margin: -120px 0 0 -120px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--tc), transparent 65%); opacity: .45; filter: blur(8px); }
.catch-card .kicker { position: relative; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--tc); }
.catch-card .pic { position: relative; height: 190px; display: grid; place-items: center; margin: 4px 0 2px; }
.catch-card .pic img { max-width: 94%; max-height: 180px; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .55)); animation: fishIn .9s var(--spring) .15s both; }
@keyframes fishIn { 0% { transform: translateY(-40px) scale(.3) rotate(-25deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.catch-card .pic img.flop { animation: fishIn .9s var(--spring) .15s both, flop 2.6s ease-in-out 1.1s infinite; }
@keyframes flop { 0%, 100% { transform: rotate(0); } 8% { transform: rotate(-6deg) translateY(-4px); } 16% { transform: rotate(4deg); } 24% { transform: rotate(0); } }
.catch-card h2 { position: relative; margin: 2px 0 0; font-family: var(--f-display); font-size: 24px; font-weight: 800; line-height: 1.15; }
.catch-card .badges { position: relative; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 2px; min-height: 26px; }
.badge-chip { height: 26px; padding: 0 10px; border-radius: 13px; font-size: 11.5px; font-weight: 900; display: inline-flex; align-items: center; gap: 5px;
  animation: chipIn .5s var(--spring) both; }
@keyframes chipIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.badge-chip.new { background: linear-gradient(135deg, #A9E4D0, #9CCBE8); color: #03222b; }
.badge-chip.trophy { background: linear-gradient(135deg, #FFE6A0, #E8B55C); color: #3a2300; }
.badge-chip.record { background: linear-gradient(135deg, #d4b8ff, #9a6bff); color: #1e0a45; }
.badge-chip.rarity { background: rgba(255, 255, 255, .08); color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 50%, transparent); }
.catch-stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 12px; }
.catch-stats.two { grid-template-columns: 1fr 1fr; }
.catch-stats .st { border-radius: 16px; padding: 10px 4px 9px; background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke); }
.catch-stats .v { font-family: var(--f-display); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.catch-stats .k { font-size: 11px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.catch-card .desc { position: relative; font-size: 12.5px; color: var(--ink-2); margin: 0 4px 14px; }
.catch-card .acts { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.catch-card .note { position: relative; font-size: 12px; color: var(--gold); margin: -6px 0 12px; font-weight: 700; }
#confetti { position: absolute; inset: 0; pointer-events: none; z-index: 41; }

/* повышение уровня */
.modal-wrap { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; visibility: hidden; }
.modal-wrap.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 4, 10, .78); opacity: 0; transition: opacity .35s; }
.modal-wrap.open .modal-backdrop { opacity: 1; }
.levelup { position: relative; width: min(340px, 100%); text-align: center; padding: 26px 22px 20px; border-radius: 30px;
  background: radial-gradient(120% 90% at 50% 0%, #1f5a7a, #12292C 60%); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 80px -20px rgba(243, 210, 139, .6); opacity: 0; }
.modal-wrap.open .levelup { animation: cardPop .75s var(--spring) forwards; }
.levelup .big-lvl { position: relative; width: 132px; height: 132px; margin: 0 auto 8px; display: grid; place-items: center; }
.levelup .big-lvl::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #F3D28B, #ff9f1c, #F3D28B, #A9E4D0, #F3D28B); animation: spin 4s linear infinite; filter: blur(1px); }
.levelup .big-lvl::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #1e4f6e, #12292C); }
.levelup .big-lvl span { position: relative; z-index: 1; font-family: var(--f-display); font-weight: 900; font-size: 52px;
  background: linear-gradient(180deg, #fff6c4, #ffb62e); -webkit-background-clip: text; background-clip: text; color: transparent; animation: lvlNum .9s var(--spring) .2s both; }
@keyframes lvlNum { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.levelup h2 { margin: 6px 0 2px; font-family: var(--f-display); font-size: 22px; }
.levelup .rank { color: var(--gold); font-weight: 800; }
.unlock-list { margin: 14px 0 16px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.unlock-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--stroke); font-weight: 700; font-size: 13.5px; animation: chipIn .5s var(--spring) both; }
.unlock-item .thumb { width: 44px; height: 44px; border-radius: 12px; background-size: cover; background-position: center; flex: none; }

/* ── тосты ──────────────────────────────────────────────── */
#toasts { position: absolute; left: 0; right: 0; top: calc(var(--safe-top) + 64px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; padding: 0 16px; }
.toast { max-width: 420px; padding: 11px 16px; border-radius: 18px; font-weight: 700; font-size: 13.5px; text-align: center; line-height: 1.35;
  background: rgba(14, 31, 34, .92); border: 1px solid var(--stroke-2); box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: toastIn .45s var(--spring) both; }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
.toast.good { border-color: rgba(54, 217, 138, .45); }
.toast.warn { border-color: rgba(243, 210, 139, .5); }
.toast.bad { border-color: rgba(255, 90, 110, .55); }
@keyframes toastIn { from { transform: translateY(-18px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(-12px) scale(.96); opacity: 0; } }

.float-text { position: absolute; z-index: 45; pointer-events: none; font-family: var(--f-display); font-weight: 800; font-size: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .7); animation: floatUp 1.4s var(--ease) forwards; white-space: nowrap; }
@keyframes floatUp { 0% { transform: translate(-50%, 0) scale(.7); opacity: 0; } 15% { transform: translate(-50%, -8px) scale(1.08); opacity: 1; } 100% { transform: translate(-50%, -64px) scale(1); opacity: 0; } }
.flyer { position: absolute; z-index: 46; pointer-events: none; will-change: transform; }

/* ── профиль ────────────────────────────────────────────── */
.profile-hero { text-align: center; padding: 22px 16px 18px; border-radius: var(--r-l); position: relative; overflow: hidden; }
.profile-hero .avatar-wrap { width: 96px; height: 96px; margin: 0 auto 10px; }
.profile-hero .avatar { inset: 7px; font-size: 30px; }
.profile-hero .player-name { font-size: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.stat { padding: 14px; border-radius: 18px; }
.stat .v { font-family: var(--f-display); font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 6px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.dex-loc { margin-top: 16px; }
.dex-loc h4 { margin: 0 4px 8px; font-size: 13.5px; font-weight: 800; color: var(--ink-2); display: flex; justify-content: space-between; }
.dex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dex-cell { aspect-ratio: 1; border-radius: 16px; background: rgba(255, 255, 255, .045); border: 1px solid var(--stroke); display: grid; place-items: center; position: relative; overflow: hidden; }
.dex-cell img { width: 82%; height: 70%; object-fit: contain; }
.dex-cell.unknown img { filter: brightness(0) invert(.28); opacity: .75; }
.dex-cell .q { position: absolute; font-family: var(--f-display); font-weight: 800; color: rgba(255, 255, 255, .35); font-size: 18px; }
.dex-cell.rare { border-color: rgba(182, 146, 255, .4); }
.dex-cell .w { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 800; color: var(--ink-2); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 18px; margin-top: 12px; font-weight: 700; }
.switch { width: 50px; height: 30px; border-radius: 15px; background: rgba(255, 255, 255, .14); position: relative; transition: background .3s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }
.admin-box { margin-top: 16px; padding: 14px; border-radius: 20px; border: 1px dashed rgba(243, 210, 139, .4); background: rgba(243, 210, 139, .05); }
.admin-box h4 { margin: 0 0 10px; font-size: 13px; color: var(--gold); }
.admin-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-btns .btn { height: 36px; padding: 0 12px; font-size: 12.5px; border-radius: 12px; }
.admin-btns .btn.on { border-color: var(--gold); color: var(--gold); }

.fish-info-sheet .pic { height: 150px; display: grid; place-items: center; }
.fish-info-sheet .pic img { max-width: 80%; max-height: 140px; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5)); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--stroke); font-size: 13.5px; }
.kv span:first-child { color: var(--muted); font-weight: 700; }
.kv span:last-child { font-weight: 800; text-align: right; }

@media (min-width: 560px) {
  .home-scroll { padding-left: calc(50% - 250px); padding-right: calc(50% - 250px); }
  .tabbar { left: calc(50% - 250px); right: calc(50% - 250px); }
}
