/* 釣りゲーム 固有の見た目（共通は ../common/base.css） */
.board-wrap { max-width: none; position: relative; }
/* 画面は 480×520。スマホでも上のバーから下のボタンまで1画面に入るよう、画面の高さに合わせて幅を決める */
#cv {
  display: block; margin: 0 auto; width: min(100%, 560px, calc((100svh - 230px) * 0.923)); min-width: min(100%, 260px);
  aspect-ratio: 480 / 520; height: auto; border-radius: var(--radius); background: #A8D8F0;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.board-wrap .callout { top: 40%; }

/* 上のバー */
.hud { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; font-variant-numeric: tabular-nums; }
.hud b { font-size: 1.15rem; }
.hud .score b { font-size: 1.3rem; }
.hud .goal { color: var(--ink-sub); margin-left: auto; }
.hud .goal.done { color: var(--ok); font-weight: 700; }

/* 設定の今日の印 */
.choice.is-today span::after { content: "今日"; display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--warn); color: #FFFFFF; font-size: 13px; font-weight: 700; line-height: 1.6; }
:root:lang(en) .choice.is-today span::after { content: "Today"; }

/* 一時停止 */
.pause-box {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 5;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 28px; text-align: center;
}
.pause-title { font-weight: 700; font-size: 1.2rem; margin: 0 0 10px; }

/* 釣れた魚・にげた（海・川） */
.catch-box {
  position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); z-index: 4; width: min(92%, 420px);
  background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); padding: 12px 16px; text-align: center;
}
.catch-head { margin: 0; font-weight: 700; font-size: 1.2rem; }
.catch-box img { display: block; width: min(100%, 260px); height: auto; max-height: 130px; object-fit: contain; margin: 4px auto; }
.catch-name { margin: 0; font-size: 1.1rem; }
.catch-name b { font-size: 1.2rem; }
.catch-new { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 4px; background: var(--ok); color: #FFFFFF; font-size: 14px; font-weight: 700; }
.catch-text { margin: 4px 0 0; font-size: 15px; line-height: 1.6; text-align: left; }
.catch-box .controls { justify-content: center; margin-top: 8px; }

.result-box { z-index: 6; inset: 6% 7% auto; max-height: 88%; overflow: auto; }
.result-box .big { margin: 0 0 4px; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-box .goal-line { margin: 0 0 8px; font-weight: 700; }
.result-box .goal-line.ok { color: var(--ok); }
.result-box .goal-line.ng { color: var(--ink-sub); }
.result-box dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: 0 0 8px; text-align: left; }
.result-box dt { color: var(--ink-sub); white-space: nowrap; }
.result-box dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-box dd .sub { font-weight: 400; font-size: 14px; color: var(--ink-sub); }
.result-box .new { color: var(--ok); font-weight: 700; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }

/* 図鑑 */
.zukan-dlg {
  width: min(760px, calc(100vw - 16px)); max-height: calc(100svh - 24px); padding: 0; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.zukan-dlg::backdrop { background: rgba(0, 0, 0, .35); }
.zk-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.zk-head h2 { margin: 0; font-size: 1.2rem; }
.zk-head .zk-count { color: var(--ink-sub); font-weight: 700; }
.zk-head .btn { margin-left: auto; }
.zk-body { padding: 8px 16px 16px; }
.zk-body h3 { margin: 12px 0 6px; font-size: 1rem; }
.zk-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.zk-card {
  appearance: none; font: inherit; color: var(--ink); cursor: pointer; width: 100%; min-height: 44px; padding: 6px 6px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.zk-card:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.zk-card img { width: 100%; height: 64px; object-fit: contain; }
.zk-card.unknown img, #zukan-detail img.unknown { filter: brightness(0) opacity(.28); }
.zk-name { font-weight: 700; font-size: 15px; line-height: 1.4; text-align: center; }
.zk-sub { color: var(--ink-sub); font-size: 14px; line-height: 1.35; text-align: center; }
#zukan-detail { display: flex; gap: 16px; align-items: flex-start; margin: 8px 0 4px; padding: 12px; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
#zukan-detail img { width: 42%; max-width: 280px; height: auto; object-fit: contain; flex: none; }
#zukan-detail p { margin: 0 0 6px; }
.zk-dname { font-weight: 700; font-size: 1.15rem; }
.zk-dsub { color: var(--ink-sub); font-size: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zk-card img, :root:not([data-theme="light"]) #zukan-detail img:not(.unknown), :root:not([data-theme="light"]) .catch-box img { background: #E9E6DD; border-radius: 4px; } }
:root[data-theme="dark"] .zk-card img, :root[data-theme="dark"] #zukan-detail img:not(.unknown), :root[data-theme="dark"] .catch-box img { background: #E9E6DD; border-radius: 4px; }

@media (max-width: 480px) {
  .stage { padding: 8px; }
  .result-box { inset: 3% 3% auto; padding: 14px; }
  .result-box h2 { font-size: 1.25rem; }
  .result-box .big { font-size: 1.35rem; }
  .hud { gap: 0 10px; font-size: .95rem; }
  .hud b { font-size: 1.05rem; }
  .hud .score b { font-size: 1.15rem; }
  .turnbar { margin-bottom: 6px; }
  .controls { margin-top: 8px; }
  .catch-box { padding: 8px 10px; bottom: 2%; }
  .catch-box img { max-height: 84px; }
  .catch-text { font-size: 14px; }
  #zukan-detail { flex-direction: column; }
  #zukan-detail img { width: 70%; align-self: center; }
  .zk-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
:root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1.25; } }
/* 上のバーの高さ ここまで */
