/* 太古垂钓录：大厅（钓场预览、渔具铺、图鉴）与全屏游戏层。游戏层尺寸用容器单位 cqh，跟着画面大小缩放。 */
.fishing-page { --sea: #0c6fa8; --sea-deep: #0a3f66; --foam: #e6f7ff; }
body.fs-playing { overflow: hidden; }
.fs-logo { font-size: 24px; line-height: 1; }

/* ---------- 钓场横幅（原版地图实景）与选择栏 ---------- */
.fs-banner {
  position: relative; overflow: hidden; margin-bottom: 0; aspect-ratio: 16 / 9;
  background: #2f6fa8; border: 5px solid #fff; border-bottom: 0; border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
}
#fs-prev { position: absolute; inset: 0; display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.fs-dock {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; margin-bottom: 18px; padding: 14px 18px 16px;
  color: #f4ecd6; background: linear-gradient(180deg, #34465f, #222f42); border: 5px solid #fff; border-top: 0;
  border-radius: 0 0 26px 26px; box-shadow: var(--shadow-lg);
}
.fs-brand { min-width: 0; }
.fs-kicker { margin: 0; color: #ffd76a; font-size: 12.5px; font-weight: 800; letter-spacing: 2px; }
.fs-brand h2 { margin: 0 0 2px; font-family: var(--font-title); font-size: clamp(26px, 3.4vw, 38px); letter-spacing: 3px; color: #fff; }
.fs-sub { margin: 0; color: #d9cfb6; font-size: 13.5px; font-weight: 700; line-height: 1.6; }
.fs-go { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; }
.fs-go-btn {
  color: #fff; background: linear-gradient(180deg, #ffb347, #ff7a1a); box-shadow: 0 5px 0 #c4520a, 0 14px 26px -10px rgba(196, 82, 10, .7);
}
.fs-quick { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.fs-quick span { padding: 3px 10px; color: #f4ecd6; font-size: 12.5px; font-weight: 800; background: rgba(0, 0, 0, .3); border-radius: 99px; }
.fs-spots { grid-column: 1 / 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.spot-btn {
  display: grid; gap: 1px; padding: 8px 12px; color: #f4ecd6; text-align: left; cursor: pointer;
  background: rgba(0, 0, 0, .28); border: 2px solid rgba(255, 255, 255, .18); border-radius: 12px; font: inherit;
  transition: transform .2s var(--jelly), background .2s, border-color .2s;
}
.spot-btn b { font-size: 14px; }
.spot-btn small { font-size: 11.5px; font-weight: 700; opacity: .8; }
.spot-btn em { font-size: 11px; font-style: normal; font-weight: 800; color: #ffd76a; }
.spot-btn.on { color: #3a2a14; background: linear-gradient(180deg, #f7e7b8, #e2c98a); border-color: #fff4cf; transform: translateY(-2px); }
.spot-btn.on em { color: #a0580a; }
.spot-btn.lock { opacity: .7; }
.spot-btn.lock b::before { content: "🔒 "; }
@media (hover: hover) and (pointer: fine) {
  .spot-btn:not(.on):hover { background: rgba(0, 0, 0, .45); border-color: rgba(255, 255, 255, .5); }
}

/* ---------- 面板 ---------- */
.fs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.fs-grid > .panel { margin: 0; }
.panel h2 small { margin-left: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.fs-bar { position: relative; height: 26px; margin: 4px 0 12px; overflow: hidden; background: #e6f2fb; border-radius: 99px; }
.fs-bar i { display: block; width: var(--p, 0%); height: 100%; background: linear-gradient(90deg, #6fd8ff, #2a8fe0); border-radius: 99px; transition: width .4s var(--out); }
.fs-bar span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-size: 13px; font-weight: 800; }
.fs-bar.done i { background: linear-gradient(90deg, #7ef0b0, #22c3a3); }
.fs-coins { color: #c47a0a !important; }

.gear-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gear-list li {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px;
  background: #f6fbff; border: 2px solid #e2f0fa; border-radius: 14px;
}
.gear-ico { display: grid; place-items: center; width: 40px; height: 40px; font-size: 22px; background: linear-gradient(180deg, #dff3ff, #b9e2fb); border-radius: 12px; }
.gear-info b { font-size: 14px; }
.gear-info .lv { margin-left: 6px; color: #f08a12; letter-spacing: 1px; font-size: 12px; }
.gear-info p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.gear-list .btn { white-space: nowrap; }

.dex-tabs { margin-bottom: 12px; flex-wrap: wrap; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dex-card {
  position: relative; display: grid; gap: 2px; padding: 8px 8px 10px; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, #e9f6ff, #cfe8f8); border: 3px solid var(--rc, #d6e6f2); border-radius: 16px; font: inherit; color: var(--ink);
  transition: transform .2s var(--jelly);
}
.dex-card canvas { width: 100%; height: auto; aspect-ratio: 2 / 1; }
.dex-card b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dex-card small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.dex-card .dex-rar { position: absolute; left: 8px; top: 6px; padding: 1px 7px; color: #fff; font-size: 10.5px; font-weight: 800; background: var(--rc); border-radius: 99px; }
.dex-card .dex-crown { position: absolute; right: 8px; top: 4px; font-size: 15px; }
.dex-card.unk { cursor: default; background: linear-gradient(180deg, #eef2f6, #dde4ec); border-color: #e2e8ee; }
.dex-card.unk b { color: #9aa6b2; }
@media (hover: hover) and (pointer: fine) { .dex-card:not(.unk):hover { transform: translateY(-3px); } }
.dex-modal canvas { display: block; width: min(100%, 360px); height: auto; margin: 0 auto 8px; background: linear-gradient(180deg, #def2ff, #b5dcf5); border-radius: 16px; }
.dex-modal p { margin: 6px 0; line-height: 1.7; }

/* ---------- 游戏层 ---------- */
.fs-play {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #04192b;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; -webkit-tap-highlight-color: transparent;
}
.fs-stage { position: relative; width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden; container-type: size; background: #000; }
@supports (height: 100dvh) { .fs-stage { width: min(100vw, calc(100dvh * 16 / 9)); } }
#fs-cv { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

.fs-hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-body); color: #fff; }
.hud-left { position: absolute; left: 2cqh; top: 2cqh; display: flex; flex-wrap: wrap; gap: 1cqh; max-width: 40%; }
.hud-chip {
  display: inline-flex; align-items: center; gap: .6cqh; padding: .8cqh 1.8cqh; font-size: 2.5cqh; font-weight: 800;
  background: rgba(4, 26, 46, .55); border: .3cqh solid rgba(255, 255, 255, .4); border-radius: 99px; backdrop-filter: blur(4px);
}
.hud-bait i { display: inline-block; width: 1.5cqh; height: 2.4cqh; background: linear-gradient(180deg, #ff9fb2, #e8607a); border-radius: 1cqh; }
.hud-bait i.used { opacity: .25; }
.hud-mid { position: absolute; left: 50%; top: 1.4cqh; display: grid; justify-items: center; transform: translateX(-50%); text-shadow: 0 .3cqh 0 rgba(0, 20, 40, .6); }
.hud-score { font-family: var(--font-body); font-weight: 900; font-size: 5.4cqh; line-height: 1.1; color: #fff3a0; font-variant-numeric: tabular-nums; }
.hud-score.pop { animation: hud-pop .5s var(--jelly); }
@keyframes hud-pop { 40% { transform: scale(1.35); } }
.hud-combo { margin-top: .2cqh; padding: .2cqh 1.4cqh; font-size: 2.3cqh; font-weight: 900; color: #fff; background: linear-gradient(90deg, #ff7a3c, #ff3c7a); border-radius: 99px; }
.hud-btns { position: absolute; right: 2cqh; top: 2cqh; display: flex; gap: 1cqh; pointer-events: auto; }
.hud-btn {
  display: grid; place-items: center; width: 7cqh; height: 7cqh; padding: 0; color: #fff; font-size: 3cqh; font-weight: 900;
  background: rgba(4, 26, 46, .55); border: .3cqh solid rgba(255, 255, 255, .45); border-radius: 50%; cursor: pointer;
}
.hud-tip {
  position: absolute; left: 50%; bottom: 3cqh; max-width: 80%; padding: 1cqh 3cqh; font-size: 2.7cqh; font-weight: 800; text-align: center;
  background: rgba(4, 26, 46, .6); border-radius: 99px; transform: translateX(-50%); text-shadow: 0 .2cqh 0 rgba(0, 0, 0, .4);
  transition: opacity .25s;
}
.hud-tip:empty { opacity: 0; }
.hud-tip.hot { color: #ffe066; background: rgba(160, 30, 20, .7); animation: tip-hot .35s ease-in-out infinite alternate; }
@keyframes tip-hot { to { transform: translateX(-50%) scale(1.08); } }
.hud-flash {
  position: absolute; left: 50%; top: 22%; padding: 1cqh 4cqh; font-family: var(--font-title); font-size: 6cqh; letter-spacing: .4cqh;
  color: #fff; text-shadow: 0 .5cqh 0 rgba(0, 0, 0, .35); transform: translateX(-50%); animation: flash-in 1.4s var(--out) forwards;
}
@keyframes flash-in { 0% { opacity: 0; transform: translateX(-50%) scale(.4); } 15% { opacity: 1; transform: translateX(-50%) scale(1.1); } 25% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-4cqh); } }

.fs-card { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle, rgba(4, 20, 40, .2), rgba(4, 20, 40, .62)); }
.card-in {
  position: relative; width: min(64cqh * 1.25, 80%); padding: 2.4cqh 3cqh 2cqh; color: var(--ink); text-align: center;
  background: var(--card); border: .8cqh solid var(--rc, #fff); border-radius: 4cqh; box-shadow: 0 0 6cqh var(--rg, rgba(255, 255, 255, .3)), var(--shadow-lg);
  animation: card-in .5s var(--jelly);
}
@keyframes card-in { from { transform: scale(.5) rotate(-6deg); opacity: 0; } }
.card-rar { position: absolute; left: 50%; top: -2.6cqh; padding: .5cqh 2.4cqh; color: #fff; font-size: 2.4cqh; font-weight: 900; letter-spacing: .3cqh; background: var(--rc, #9aa); border-radius: 99px; transform: translateX(-50%); }
.card-new { position: absolute; right: 2cqh; top: 1.6cqh; padding: .3cqh 1.4cqh; color: #fff; font-size: 2.2cqh; font-weight: 900; background: #ff4a6a; border-radius: 1cqh; transform: rotate(8deg); animation: new-pulse .8s ease-in-out infinite alternate; }
@keyframes new-pulse { to { transform: rotate(8deg) scale(1.12); } }
#card-cv { display: block; width: 100%; height: auto; margin: .6cqh 0; background: radial-gradient(ellipse at 50% 60%, #e6f6ff, #bfe1f6); border-radius: 2.6cqh; }
.card-in h3 { margin: 0; font-family: var(--font-title); font-size: 4.6cqh; letter-spacing: .3cqh; }
.card-w { margin: .4cqh 0 1cqh; font-size: 2.8cqh; font-weight: 900; color: #2c78c9; }
.card-pts { display: flex; flex-wrap: wrap; justify-content: center; gap: .8cqh; margin: 0; padding: 0; list-style: none; }
.card-pts li { padding: .4cqh 1.4cqh; font-size: 2.2cqh; font-weight: 800; background: #eef6fd; border-radius: 99px; }
.card-pts li.tot { color: #fff; background: linear-gradient(90deg, #ff9b2f, #ff5c7a); }
.card-tap { margin: 1.4cqh 0 0; color: var(--muted); font-size: 2.1cqh; font-weight: 700; animation: tap-blink 1.2s ease-in-out infinite; }
@keyframes tap-blink { 50% { opacity: .35; } }
.card-in.miss { --rc: #8a96a6; }

.ov { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 3cqh; background: rgba(4, 16, 32, .62); }
.ov-card {
  width: min(92%, 96cqh); max-height: 94cqh; overflow: auto; padding: 3cqh 4cqh; color: var(--ink); text-align: center;
  background: var(--card); border: .8cqh solid #fff; border-radius: 4cqh; box-shadow: var(--shadow-lg); animation: fun-pop .4s var(--jelly);
}
.ov-card h3 { margin: 0 0 1.6cqh; font-family: var(--font-title); font-size: 5cqh; letter-spacing: .5cqh; }
.ov-card .hint { font-size: 2.2cqh; }
.ov-kicker { margin: 0; color: #2c78c9; font-size: 2.4cqh; font-weight: 800; letter-spacing: .4cqh; }
.ov-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6cqh; margin-top: 2cqh; }
.ov-actions .btn { height: 7.6cqh; padding: 0 3.4cqh; font-size: 2.8cqh; }
.res-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(15cqh, 1fr)); gap: 1.2cqh; margin: 0 0 1.6cqh; padding: 0; list-style: none; }
.res-stats li { padding: 1.2cqh; background: #eef6fd; border-radius: 2cqh; }
.res-stats b { display: block; font-size: 3.8cqh; }
.res-stats span { color: var(--muted); font-size: 2cqh; font-weight: 700; }
.res-catch { display: flex; flex-wrap: wrap; justify-content: center; gap: 1cqh; margin-bottom: 1.4cqh; }
.res-fish { position: relative; width: 15cqh; padding: .6cqh; background: #eef6fd; border: .4cqh solid var(--rc, #dde); border-radius: 1.6cqh; }
.res-fish canvas { display: block; width: 100%; height: auto; }
.res-fish small { display: block; overflow: hidden; font-size: 1.7cqh; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.res-fish .new { position: absolute; right: -.8cqh; top: -1cqh; padding: 0 .8cqh; color: #fff; font-size: 1.6cqh; font-weight: 900; background: #ff4a6a; border-radius: .8cqh; }
#res-reward .rewards { justify-content: center; }
.rotate-tip { position: absolute; inset: 0; z-index: 9; display: none; place-items: center; color: #fff; text-align: center; background: #04192b; }
.rotate-tip b { display: block; font-size: 60px; animation: rot-tip 1.6s ease-in-out infinite; }
@keyframes rot-tip { 50% { transform: rotate(90deg); } }
@media (orientation: portrait) and (pointer: coarse) {
  .fs-play .rotate-tip { display: grid; }
}

@media (max-width: 720px) {
  .fs-dock { grid-template-columns: 1fr; }
  .fs-go { grid-column: 1; grid-row: auto; align-items: stretch; }
  .fs-spots { grid-column: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-quick { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .fs-go-btn, .card-tap, .card-new, .hud-tip.hot { animation: none; }
}

/* ---------- 原版石框（客户端 26001~26009 九宫格，fishing-frame.webp） ---------- */
.card-in, .ov-card, .fs-stone {
  color: #f4ecd6; background: #24344b padding-box; border-style: solid; border-color: transparent; border-width: 3.4cqh 4.5cqh;
  border-image: url("/static/fishing-frame.webp") 48 64 fill / 3.4cqh 4.5cqh stretch; border-radius: 0; box-shadow: 0 1.4cqh 4cqh rgba(0, 0, 0, .55);
  image-rendering: pixelated;
}
.card-in { padding: .6cqh 1cqh 1cqh; box-shadow: 0 0 5cqh var(--rc, transparent), 0 1.4cqh 4cqh rgba(0, 0, 0, .55); }
.card-rar { top: -4.6cqh; border: .3cqh solid #3a2a14; }
#card-cv { background: radial-gradient(ellipse at 50% 70%, #2f6fa8, #173a5e); border-radius: .6cqh; image-rendering: pixelated; }
.card-w { color: #ffd76a; }
.card-pts li { color: #f4ecd6; background: rgba(0, 0, 0, .35); }
.card-tap { color: #c8bfa8; }
.ov-card { padding: 1.4cqh 2.4cqh; }
.ov-card .hint, .ov-kicker { color: #d9cfb6; }
.ov-kicker { color: #ffd76a; }
.res-stats li { background: rgba(0, 0, 0, .32); }
.res-stats span { color: #c8bfa8; }
.res-fish { background: rgba(0, 0, 0, .3); }
.res-fish canvas, .dex-card canvas, .dex-modal canvas { image-rendering: pixelated; }
.dex-card canvas { aspect-ratio: 4 / 3; }
.dex-card { background: linear-gradient(180deg, #2f6fa8, #173a5e); color: #fff; }
.dex-card small { color: #cfe2f3; }
.dex-card.unk { background: linear-gradient(180deg, #4a5d72, #2c3a4a); }
.dex-card.unk b { color: #b8c4d0; }
.dex-modal canvas { width: min(100%, 360px); background: radial-gradient(ellipse at 50% 70%, #2f6fa8, #173a5e); }

/* ---------- 新手引导：指向目标的提示气泡 + 讲解卡（讲解卡打开时游戏不走） ---------- */
.coach-tip {
  position: absolute; z-index: 3; left: var(--x, 50%); top: var(--y, 50%); width: max-content; max-width: 58cqh;
  padding: 1.1cqh 2cqh; color: #3a2a14; font-size: 2.6cqh; font-weight: 900; line-height: 1.45; text-align: center;
  background: linear-gradient(180deg, #fff8dc, #ffe39a); border: .4cqh solid #8a5a1a; border-radius: 1.6cqh;
  box-shadow: 0 .8cqh 2cqh rgba(0, 0, 0, .4); transform: translate(-50%, -100%); pointer-events: none;
  animation: coach-bob 1.2s ease-in-out infinite;
}
.coach-tip::after {
  content: ""; position: absolute; left: 50%; bottom: -2.4cqh; border: 1.2cqh solid transparent; border-top-color: #8a5a1a;
  transform: translateX(-50%);
}
.coach-tip.left { transform: translate(-100%, -50%); animation-name: coach-nudge; }
.coach-tip.left::after { left: auto; right: -2.4cqh; top: 50%; bottom: auto; border-top-color: transparent; border-left-color: #8a5a1a; transform: translateY(-50%); }
.coach-tip.hot { color: #a01010; background: linear-gradient(180deg, #fff3a0, #ffd23a); border-color: #c0301a; font-size: 3cqh; }
.coach-tip.hot::after { border-top-color: #c0301a; }
@keyframes coach-bob { 50% { margin-top: -.9cqh; } }
@keyframes coach-nudge { 50% { margin-left: -.9cqh; } }
.coach-ov { z-index: 7; }
.coach-card { max-width: 92cqh; text-align: left; }
.coach-card h3 { text-align: center; color: #ffd76a; }
.coach-card .ov-kicker { text-align: center; }
.coach-list { display: grid; gap: 1cqh; margin: 0; padding: 0; list-style: none; }
.coach-list li { display: grid; grid-template-columns: 5cqh 1fr; align-items: start; gap: 1.2cqh; padding: 1cqh 1.4cqh; font-size: 2.4cqh; line-height: 1.55; background: rgba(0, 0, 0, .28); border-radius: 1.2cqh; }
.coach-list li i { font-size: 3.4cqh; font-style: normal; line-height: 1.1; text-align: center; }
.coach-list li b { color: #ffd76a; }
.fs-go-btn.first { animation: go-first 1.1s ease-in-out infinite; }
@keyframes go-first { 50% { transform: scale(1.06); box-shadow: 0 5px 0 #c4520a, 0 0 0 8px rgba(255, 200, 80, .35); } }
.fs-first-tip { color: #ffd76a; font-size: 12.5px; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .coach-tip, .fs-go-btn.first { animation: none; } }

/* ---------- 钓鱼人等级、成就、图鉴星级 ---------- */
.fs-me { margin-bottom: 16px; }
.me-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.me-lv { font-family: var(--font-title); font-size: 30px; color: #e06a12; }
.me-title { padding: 2px 10px; color: #fff; font-size: 13px; font-weight: 800; background: linear-gradient(90deg, #6a48c9, #3b8fe8); border-radius: 99px; }
.fs-me .fs-bar i { background: linear-gradient(90deg, #ffd36a, #ff8a1c); }
.dex-stars { color: #ffd76a; font-size: 13px; letter-spacing: 1px; }
.star-list { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.star-list li.on { color: #c47a0a; font-weight: 800; }
.fs-ach { margin-bottom: 16px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ach-grid li { display: grid; gap: 2px; padding: 8px 10px; background: #f3f6fa; border: 2px solid #e2e8f0; border-radius: 12px; }
.ach-grid li b { font-size: 13.5px; }
.ach-grid li span { color: var(--muted); font-size: 12px; }
.ach-grid li em { color: #c47a0a; font-size: 12px; font-style: normal; font-weight: 800; }
.ach-grid li.done { background: #fff6dc; border-color: #f2d37a; }

/* ---------- 收船按钮、本局渔获 ---------- */
.hud-btn.hud-quit { width: auto; padding: 0 2.4cqh; font-size: 2.6cqh; border-radius: 99px; background: rgba(170, 70, 20, .75); border-color: rgba(255, 220, 160, .7); }
.hud-catch { color: #bff3ff; }
.pause-haul { display: flex; flex-wrap: wrap; justify-content: center; gap: 1cqh; max-height: 26cqh; margin: 0 0 1.6cqh; padding: 0; overflow-y: auto; list-style: none; }
.pause-haul li { display: inline-flex; align-items: center; gap: .8cqh; padding: .6cqh 1.6cqh; font-size: 2.4cqh; background: rgba(255, 255, 255, .12); border: .3cqh solid var(--rc, #d7e1ea); border-radius: 99px; }
.pause-haul li span { color: #fff3a0; font-weight: 900; }
