/* 美食图鉴（fd-*）与同伴系统（cmp-* / #comp-frame）样式 */

/* ---------- 钓鱼 ---------- */
.fd-fishing { width: min(460px, 94vw); padding: 14px 16px; --tc: #5ad1ff; }
.fd-fh { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fd-fh h3 { margin: 0; display: flex; align-items: center; gap: 6px; }
.fd-env { display: flex; gap: 4px; flex-wrap: wrap; }
.fd-report { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; padding: 6px; background: rgba(10, 6, 22, .45); box-shadow: inset 0 0 0 1px var(--line); }
.fd-report .cell { width: 40px; height: 40px; }
.fd-report .cell img { width: 28px; height: 28px; }
.fd-rt { font-size: 11px; margin: 4px 0 6px; }
.fd-bait { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; }
.fd-bait .btn img { width: 16px; height: 16px; image-rendering: pixelated; }
.fd-fishing .fish-status { margin-top: 8px; font-size: 16px; min-height: 26px; transition: color .2s; }
.fd-fishing .fish-status.bite { color: var(--gold); animation: fd-pulse .35s ease-in-out infinite alternate; }
.fd-fishing .fish-status.big { text-shadow: 0 0 10px var(--tc), 0 2px 0 var(--ink); }
.fd-fishing .fish-track { height: 40px; margin: 10px 0; }
.fd-fishing.fighting .fish-track { box-shadow: inset 0 0 0 2px var(--tc), 0 0 14px color-mix(in srgb, var(--tc) 45%, transparent); }
.fd-fishing.rage .fish-track { animation: fd-shake .18s linear infinite; box-shadow: inset 0 0 0 2px #ff5a6a, 0 0 18px rgba(255, 90, 106, .6); }
.fd-fishing.rage .fish-zone { box-shadow: inset 0 0 0 2px #ffb84a, 0 0 10px rgba(255, 184, 74, .5); }
.fd-fishing .fish-zone { transition: background .15s; }
.fd-fishing .fish-zone.in { background: rgba(125, 255, 138, .45); }
.fd-fishing .fish-dot { transition: opacity .15s; top: 7px; }
.fd-ripple { position: absolute; top: 50%; width: 22px; height: 10px; margin: -5px 0 0 -11px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(168, 240, 255, .55); opacity: 0; animation: fd-ripple 1s ease-out infinite; pointer-events: none; }
.fd-splash { position: absolute; top: 4px; width: 28px; height: 28px; margin-left: -14px; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(220, 248, 255, .9) 0 20%, rgba(90, 209, 255, .5) 30%, transparent 62%); }
.fd-splash.go { animation: fd-splash .45s ease-out; }
.fd-bobber { height: 18px; position: relative; display: none; }
.fd-fishing.waiting .fd-bobber, .fd-fishing.biting .fd-bobber { display: block; }
.fd-bobber i { position: absolute; left: 50%; top: 2px; width: 10px; height: 14px; margin-left: -5px; background: linear-gradient(180deg, #ff5a6a 0 50%, #f0f0f0 50%); box-shadow: 0 0 0 2px var(--ink); animation: fd-bob 1.4s ease-in-out infinite; }
.fd-bobber.nib i { animation: fd-nib .25s linear; }
.fd-fishing.biting .fd-bobber i { animation: fd-sink .3s ease-in forwards; }
.fd-fishing.waiting .fish-track, .fd-fishing.biting .fish-track { opacity: .55; }
.fd-result { display: none; align-items: center; gap: 10px; padding: 8px; margin: 6px 0; background: rgba(10, 6, 22, .5); box-shadow: inset 0 0 0 1px var(--line2); }
.fd-result.show { display: flex; animation: fd-pop .3s ease-out; }
.fd-result.r3, .fd-result.r4, .fd-result.r5 { box-shadow: inset 0 0 0 2px var(--gold), 0 0 16px rgba(255, 216, 74, .35); }
.fd-result .col { gap: 3px; }
.fd-tip-line { font-size: 12px; margin: 6px 0; text-align: center; }
.fd-btns { gap: 8px; }
.fd-btns .fd-main { flex: 1; touch-action: none; user-select: none; -webkit-user-select: none; }
.fd-main.gold { animation: fd-pulse .3s ease-in-out infinite alternate; }

/* 钓鱼：触屏大按钮 + 横屏两栏（矮屏不溢出、不压到 HUD 按键） */
.fd-fishing { max-height: calc(100dvh - 16px - var(--safe-t) - var(--safe-b)); overflow-y: auto; overscroll-behavior: contain; }
.fd-fishing.touch .fd-main { min-height: 64px; font-size: 22px; letter-spacing: 2px; }
.fd-fishing.touch .fd-btns .btn.ghost { min-height: 64px; }
.fd-fishing.touch .fish-track { height: 48px; }
.fd-fishing.touch .fish-dot { top: 11px; }
@media (max-height: 560px) and (orientation: landscape) {
  .fd-fishing { width: min(780px, 96vw); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 4px 14px; padding: 10px 12px; align-items: start; }
  .fd-colL, .fd-colR { min-width: 0; }
  .fd-fishing .fd-report { margin-top: 6px; }
  .fd-fishing .fd-report .cell { width: 34px; height: 34px; }
  .fd-fishing .fd-report .cell img { width: 24px; height: 24px; }
  .fd-fishing .fish-status { margin-top: 0; font-size: 15px; min-height: 22px; }
  .fd-fishing .fish-track { margin: 6px 0; }
  .fd-fishing .fd-tip-line { margin: 4px 0; font-size: 11px; }
  .fd-fishing.touch .fd-main, .fd-fishing.touch .fd-btns .btn.ghost { min-height: 56px; }
  .fd-fishing .fd-result { margin: 4px 0; padding: 4px 6px; }
}

/* 鱼类格子：剪影 / 当季 / 王者 */
.cell.fd-fish.sil img { filter: drop-shadow(0 0 0 rgba(0,0,0,0)) brightness(.9); opacity: .9; }
.cell.fd-fish.off { opacity: .38; filter: saturate(.3); }
.cell.fd-fish.now:not(.off) { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px var(--rc, #3a2d63), 0 0 10px rgba(90, 209, 255, .55); }
.cell.fd-fish.pref:not(.off)::after { content: '★'; position: absolute; left: 3px; top: 1px; font-size: 10px; color: var(--gold); text-shadow: 1px 1px 0 #000; }
.cell.fd-fish.king { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px #ffb84a, inset 0 0 0 5px rgba(7, 4, 15, .7); }
.fd-tip .fd-hint, .fd-hint { color: #ffd8a0; font-style: italic; }
.fd-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.fd-entry { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; cursor: pointer; text-align: center; background: rgba(10, 6, 22, .35); box-shadow: inset 0 0 0 1px var(--line); transition: background .12s; }
.fd-entry:hover { background: rgba(60, 40, 110, .45); }
.fd-entry .cell { width: 46px; height: 46px; }
.fd-entry .cell img { width: 32px; height: 32px; }
.fd-nm { font-size: 12px; line-height: 1.2; }
.fd-sub { font-size: 10px; color: var(--dim); }
.fd-now .row .cell { width: 44px; height: 44px; }
.fd-modal { width: min(460px, 94vw); }

/* 烹饪 */
.fd-filter { gap: 4px; margin: 8px 0; align-items: center; }
.fd-can { cursor: pointer; }
.fd-recipes .recipe-row { align-items: flex-start; }
.fd-needs { gap: 4px; }
.fd-needs .chip img { width: 14px; height: 14px; image-rendering: pixelated; }
.fd-eff { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.fd-eff .chip { font-size: 11px; }
.fd-slot { padding: 1px 6px; font-size: 11px; color: #1a0f05; background: #ff9a4a; }
.fd-slot.drink { background: #5ad1ff; }
.fd-cond { color: var(--dim); box-shadow: inset 0 0 0 1px rgba(154, 144, 192, .3); }
.fd-cond.on { color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(90, 209, 255, .55); }
.fd-learn { font-size: 12px; color: #ffd8a0; margin: 2px 0 4px; }
.fd-unknown { opacity: .78; }
.fd-cookbtn { gap: 4px; align-items: stretch; }
.fd-buffcard.meal { box-shadow: inset 3px 0 0 #ff9a4a; }
.fd-buffcard.drink { box-shadow: inset 3px 0 0 #5ad1ff; }
.fd-ms.ready { background: rgba(255, 216, 74, .08); }
.fd-ms.done { opacity: .6; }

/* HUD 料理增益图标 */
.hud-status span.hb-meal, .hud-status span.hb-other { cursor: pointer; }
.hud-status span.hb-meal { box-shadow: 0 0 0 1px #ff9a4a; background: rgba(255, 154, 74, .18); }
.hud-status span.hb-meal.drink { box-shadow: 0 0 0 1px #5ad1ff; background: rgba(90, 209, 255, .18); }

@keyframes fd-pulse { from { transform: scale(1); } to { transform: scale(1.05); } }
@keyframes fd-shake { 0% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
@keyframes fd-ripple { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
@keyframes fd-splash { 0% { opacity: 1; transform: scale(.3) translateY(4px); } 100% { opacity: 0; transform: scale(1.5) translateY(-6px); } }
@keyframes fd-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
@keyframes fd-nib { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes fd-sink { to { transform: translateY(10px); opacity: .3; } }
@keyframes fd-pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 同伴面板 ---------- */
.cmp-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 10px 0; }
.cmp-card { position: relative; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; padding: 6px 8px; cursor: pointer; background: rgba(10, 6, 22, .45); box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--cc); transition: background .12s, transform .12s; }
.cmp-card:hover { background: rgba(60, 40, 110, .45); transform: translateY(-1px); }
.cmp-card.on { background: rgba(80, 50, 140, .55); box-shadow: inset 0 0 0 2px var(--cc), 0 0 12px color-mix(in srgb, var(--cc) 35%, transparent); }
.cmp-card.dead { opacity: .4; filter: grayscale(1); }
.cmp-card.part { opacity: .75; }
.cmp-por { grid-row: span 2; width: 40px; height: 40px; image-rendering: pixelated; object-fit: contain; }
.cmp-card:not(.un) .cmp-por { filter: brightness(.75); }
.cmp-cn { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cmp-cn b { font-weight: normal; font-size: 14px; }
.cmp-cn small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-steps { display: flex; gap: 3px; }
.cmp-steps i { width: 14px; height: 4px; background: #2a2150; box-shadow: 0 0 0 1px var(--ink); }
.cmp-steps i.done { background: var(--cc); }
.cmp-steps i.cur { background: #fff; animation: fd-pulse .6s ease-in-out infinite alternate; }
.cmp-tag { position: absolute; right: 4px; top: 3px; font-size: 10px; padding: 0 4px; color: #1a0f05; background: var(--gold); }
.cmp-tag.rdy { background: var(--green); }
.cmp-detail { box-shadow: inset 0 0 0 1px var(--line), inset 0 3px 0 var(--cc); }
.cmp-head { display: flex; gap: 12px; align-items: flex-start; }
.cmp-big { width: 84px; height: 84px; image-rendering: pixelated; object-fit: contain; flex: none; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--cc) 30%, transparent), transparent 70%); }
.cmp-blurb { font-size: 12px; line-height: 1.5; }
.cmp-mate { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line2); }
.cmp-bond .bar { margin: 4px 0; }
.bar.pink > i { background: linear-gradient(180deg, #ffb0d0, #ff7ab6); }
.cmp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }
.cmp-stat { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 12px; background: rgba(10, 6, 22, .4); }
.cmp-stat span { color: var(--muted); }
.cmp-kit { display: grid; gap: 6px; }
.cmp-k { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; background: rgba(10, 6, 22, .35); font-size: 13px; }
.cmp-k img { flex: none; image-rendering: pixelated; }
.cmp-k .dim { font-size: 12px; }
.cmp-gear { display: grid; gap: 6px; }
.cmp-g { display: flex; gap: 8px; align-items: center; padding: 4px 8px; background: rgba(10, 6, 22, .35); }
.cmp-lines { display: flex; flex-direction: column; gap: 3px; }
.cmp-line { font-size: 12px; display: flex; gap: 8px; }
.cmp-line .dim { flex: none; width: 3.5em; }
.cmp-chain { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.cmp-st { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; background: rgba(10, 6, 22, .35); font-size: 13px; }
.cmp-st .cmp-n { flex: none; width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; background: #2a2150; box-shadow: 0 0 0 1px var(--ink); }
.cmp-st.done .cmp-n { background: var(--cc); color: #1a0f05; }
.cmp-st.cur { box-shadow: inset 0 0 0 1px var(--cyan); }
.cmp-st.cur .cmp-n { background: var(--cyan); color: #1a0f05; }
.cmp-st.next { box-shadow: inset 0 0 0 1px rgba(255, 216, 74, .5); }
.cmp-st.lock { opacity: .5; }
.cmp-st .dim { font-size: 12px; }
.cmp-end { display: flex; flex-direction: column; gap: 2px; padding: 8px; background: rgba(255, 122, 182, .1); box-shadow: inset 0 0 0 1px rgba(255, 122, 182, .4); }
.cmp-end.best { background: rgba(255, 216, 74, .1); box-shadow: inset 0 0 0 1px rgba(255, 216, 74, .5); }
.cmp-end.part { background: rgba(90, 209, 255, .08); box-shadow: inset 0 0 0 1px rgba(90, 209, 255, .35); }

/* ---------- HUD 同伴头像框 ---------- */
#comp-frame { position: fixed; z-index: 6; left: 10px; top: calc(96px + var(--safe-t)); width: 172px; display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; cursor: pointer; --cc: #ff9ac8;
  background: linear-gradient(90deg, rgba(20, 14, 38, .88), rgba(20, 14, 38, .55)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 3px 0 0 var(--cc); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
#comp-frame.hidden { display: none; }
#comp-frame .cf-por { position: relative; width: 34px; height: 34px; flex: none; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--cc) 35%, transparent), rgba(10, 6, 22, .8) 72%); box-shadow: 0 0 0 1px var(--ink), inset 0 0 0 1px var(--cc); }
#comp-frame .cf-por img { width: 34px; height: 34px; image-rendering: pixelated; object-fit: contain; }
#comp-frame .cf-rv { position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; color: #fff; text-shadow: 0 2px 0 #000; }
#comp-frame .cf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#comp-frame .cf-nm { font-weight: normal; font-size: 12px; line-height: 1.1; color: var(--cc); text-shadow: 0 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#comp-frame .cf-bar { height: 5px; background: rgba(10, 6, 22, .85); box-shadow: 0 0 0 1px var(--ink); }
#comp-frame .cf-bar i { display: block; height: 100%; transition: width .2s; }
#comp-frame .cf-bar.hp i { background: linear-gradient(180deg, #a8ffb0, #4ad05a); }
#comp-frame .cf-bar.sk { height: 3px; }
#comp-frame .cf-bar.sk i { background: var(--cc); }
#comp-frame .cf-btn { flex: none; width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; color: #6a6090; background: #1a1430; box-shadow: 0 0 0 1px var(--ink), inset 0 0 0 1px #3a2d63; }
#comp-frame.ready .cf-btn { color: #1a0f05; background: var(--gold); box-shadow: 0 0 0 1px var(--ink), 0 0 10px rgba(255, 216, 74, .8); animation: fd-pulse .45s ease-in-out infinite alternate; }
#comp-frame.ready .cf-bar.sk i { background: var(--gold); }
#comp-frame.down .cf-por img { filter: grayscale(1) brightness(.5); }
#comp-frame.cast { animation: fd-pop .35s ease-out; }
body.has-comp .hud-quest { top: calc(142px + var(--safe-t)) !important; }
@media (max-width: 760px), (pointer: coarse) {
  #comp-frame { width: 150px; top: calc(92px + var(--safe-t)); }
  body.has-comp .hud-quest { top: calc(136px + var(--safe-t)) !important; }
}
@media (max-width: 520px) {
  .cmp-roster { grid-template-columns: repeat(2, 1fr); }
  .cmp-head { flex-direction: column; align-items: center; text-align: center; }
  .cmp-head .row { justify-content: center; }
  .fd-grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); }
}
