/* アタる — 計器盤／海図 (instrument panel) の美意識。
   §6 現場UX最優先: 高コントラスト・大タップ領域(48px)・暗所/直射日光下で読める。
   フォントは端末内蔵のみ（オフライン保証 / 外部Web font非依存）。差し替えは --font-* で。 */
:root {
  --bg: #0a0e13;
  --surface: #111a24;
  --surface-2: #0c131b;     /* 入力欄・へこみ */
  --line: #233140;
  --line-strong: #364d63;
  --text: #e9f2f9;
  --muted: #8a9fb2;
  --cyan: #41b8f0;          /* 読み / 主操作 */
  --cyan-ink: #03131f;
  --amber: #f7b85a;         /* 結果 / done */
  --red: #f0655c;
  --tap: 48px;

  --font-display: "Bahnschrift", "DIN Alternate", "Oswald", "Yu Gothic", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  --font-mono: "SFMono-Regular", "Consolas", "Roboto Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; }
body {
  background-color: var(--bg);
  /* 海図風の極薄グリッド＋上部ビネット。屋外可読性を損なわない程度に。 */
  background-image:
    linear-gradient(rgba(65, 184, 240, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 184, 240, 0.035) 1px, transparent 1px),
    radial-gradient(120% 70% at 50% -10%, rgba(65, 184, 240, 0.06), transparent 60%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* ---- ヘッダー ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(10, 14, 19, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand-accent { color: var(--cyan); }
.back-btn {
  align-self: center; flex: 0 0 auto;
  min-width: 40px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.back-btn:active { border-color: var(--cyan); color: var(--cyan); }
.back-btn[hidden] { display: none; }
.crumb {
  font-size: 0.82rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumb { flex: 1; }
.menu-btn {
  flex: 0 0 auto; margin-left: auto;
  min-width: 44px; min-height: 40px; display: grid; place-items: center;
  font-size: 1.3rem; line-height: 1; color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
}
.menu-btn:active { border-color: var(--cyan); }
.crumb .sep { margin: 0 6px; color: var(--line-strong); }
.crumb-link { color: var(--cyan); text-decoration: none; }
.crumb-cur { color: var(--text); }

/* ---- レイアウト ---- */
.app-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 18px 16px 64px;
  display: grid;
  gap: 16px;
}

/* ---- キッカー（計器ラベル: Latin + 日本語） ---- */
.kicker { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.kicker-latin {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 2px 7px;
  border: 1px solid rgba(65, 184, 240, 0.35);
  border-radius: 4px;
}
.kicker > span:last-child { font-size: 0.92rem; color: var(--muted); }

/* ---- カード ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 10px;
  padding: 16px;
  animation: rise 0.32s ease both;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head.sub { margin: 14px 0 8px; border-top: 1px dashed var(--line); padding-top: 12px; }

.screen-title { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.02em; margin: 4px 0 2px; }
.subtle { color: var(--muted); margin: 0 0 4px; font-family: var(--font-mono); font-size: 0.82rem; }
.species-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---- フォーム部品 ---- */
.field { display: block; margin: 10px 0; }
.field-label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 5px; letter-spacing: 0.02em; }
.inp {
  width: 100%;
  min-height: var(--tap);
  padding: 0 13px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.inp:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(65, 184, 240, 0.18); }
.inp::placeholder { color: #5f7081; }
textarea.inp.ta { padding: 10px 13px; min-height: 64px; resize: vertical; line-height: 1.5; }
select.inp.sel { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

/* ---- ボタン ---- */
.btn, .btn-ghost {
  min-height: var(--tap);
  padding: 0 18px;
  font-size: 0.98rem;
  font-weight: 700;
  font-family: var(--font-body);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.06s, filter 0.15s, background 0.15s;
}
.btn { color: var(--cyan-ink); background: var(--cyan); border: 1px solid var(--cyan); }
.btn:active { transform: translateY(1px); filter: brightness(0.92); }
.btn-ghost { color: var(--text); background: transparent; border: 1px solid var(--line-strong); }
.btn-ghost:active { transform: translateY(1px); background: rgba(255,255,255,0.04); }
.btn.small, .btn-ghost.small { min-height: 38px; padding: 0 12px; font-size: 0.84rem; }
.btn-ghost.danger { color: var(--red); border-color: rgba(240, 101, 92, 0.4); }
.btn-ghost.icon { min-width: 42px; padding: 0; font-size: 1.1rem; }

/* ---- 行レイアウト ---- */
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.row.gap { gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.filter { margin-bottom: 12px; }
.hidden-file { display: none; }
.hint { color: var(--muted); font-size: 0.84rem; margin: 0 0 12px; }
.row.filter .inp { flex: 1; }
.row.filter .sel { flex: 0 0 130px; }
.row > .inp { flex: 1; }

.empty { color: var(--muted); font-style: italic; padding: 6px 0; }
.empty.small { font-size: 0.85rem; }

/* ---- ホーム: 釣り物カード ---- */
.grid-list { display: grid; gap: 10px; }
.species-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  text-align: left;
  padding: 16px;
  min-height: var(--tap);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  animation: rise 0.3s ease both;
}
.species-card:active { border-color: var(--cyan); }
.species-name { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.02em; grid-column: 1; }
.species-meta { grid-column: 1; color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; }
.species-arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--cyan); font-size: 1.4rem; }

/* ---- 行アイテム（タックル・釣行） ---- */
.line-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left;
  padding: 13px 14px; margin-top: 8px;
  min-height: var(--tap);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}
.line-item:active { border-color: var(--cyan); }
.li-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.li-sub { color: var(--muted); font-size: 0.82rem; font-family: var(--font-mono); margin-top: 2px; }
.li-arrow { color: var(--cyan); font-size: 1.2rem; }
.result-mark { font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.result-mark.ok { color: var(--cyan-ink); background: var(--cyan); border-color: var(--cyan); }
.result-mark.ng { color: var(--red); border-color: rgba(240, 101, 92, 0.4); }

/* ---- 釣果写真 ---- */
.catch-photo { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pthumb { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.home-thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.home-thumb { flex: 0 0 auto; }
.hphoto { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.gallery-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { font-size: 0.82rem; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.chip.on { color: var(--cyan-ink); background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gallery-cell { padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; text-align: left; }
.gphoto { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: var(--surface-2); }
.gcap { padding: 8px 10px; display: grid; gap: 2px; }
.gcap-sp { font-weight: 700; color: var(--text); }
.gcap-meta { font-size: 0.76rem; color: var(--muted); font-family: var(--font-mono); }

/* ---- バッジ ---- */
.badge { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: 0.04em; }
.badge.draft { color: var(--cyan); border: 1px solid rgba(65, 184, 240, 0.5); }
.badge.done { color: var(--cyan-ink); background: var(--amber); }
.badge.live { color: var(--cyan-ink); background: var(--cyan); }

/* ---- key-value 表示 ---- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 0; }
.kv dt { color: var(--muted); font-size: 0.82rem; }
.kv dd { margin: 0; }

/* ---- タックル/変更 入力行 ---- */
.items { display: grid; gap: 8px; }
.item-row, .change-row { display: flex; gap: 8px; align-items: start; }
.item-inputs { flex: 1; display: grid; grid-template-columns: 100px 1fr; gap: 8px; }
.item-inputs3 { flex: 1; display: grid; grid-template-columns: 96px 1fr 110px; gap: 8px; }
@media (max-width: 560px) { .item-inputs3 { grid-template-columns: 1fr; } }
.change-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }
.item-hint { color: var(--muted); font-size: 0.78rem; padding-top: 2px; }
@media (max-width: 560px) {
  .item-inputs { grid-template-columns: 1fr; }
  .change-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- 釣行詳細: 変更の計器読み出し（核） ---- */
.change-view {
  display: grid; gap: 4px;
  padding: 10px 12px; margin-top: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
}
.cv-role { font-size: 0.74rem; color: var(--cyan); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-mono); }
.cv-flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-mono); }
.cv-from { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.cv-arrow { color: var(--cyan); }
.cv-to { color: var(--amber); font-weight: 700; }
.cv-reason { font-size: 0.86rem; color: var(--text); }
.snap { margin-top: 10px; font-size: 0.76rem; color: var(--muted); font-family: var(--font-mono); border-top: 1px dashed var(--line); padding-top: 8px; }

/* ---- 構成ビュー（Phase 5 仕掛けビルダー） ---- */
.rig-count { font-size: 0.76rem; font-family: var(--font-mono); color: var(--amber); }
.rig-snap { font-size: 0.76rem; color: var(--muted); font-family: var(--font-mono); margin-bottom: 8px; }
.rig-item {
  padding: 10px 12px; margin-top: 8px;
  background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
  border-radius: 8px;
}
.rig-item.changed { border-left-color: var(--cyan); }
.rig-item.extra { border-left-color: var(--amber); border-left-style: dashed; }
.ri-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ri-tag { font-size: 0.66rem; font-family: var(--font-mono); letter-spacing: 0.08em; padding: 1px 7px; border-radius: 999px; color: var(--cyan); border: 1px solid rgba(65, 184, 240, 0.5); }
.rig-item.extra .ri-tag { color: var(--amber); border-color: rgba(247, 184, 90, 0.5); }
.ri-tag.base { color: var(--muted); border-color: var(--line); }
.ri-keep { display: flex; align-items: center; gap: 8px; }
.ri-label { color: var(--text); }
.rig-item:not(.changed) .ri-label { color: var(--muted); }

/* ---- 商品（楽天・サムネ） ---- */
.thumb { flex: 0 0 auto; border-radius: 6px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-xs { width: 36px; height: 36px; }
.thumb-sm { width: 56px; height: 56px; }
.thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.6rem; color: var(--line-strong); letter-spacing: 0.1em; }
.thumb-strip { display: flex; gap: 5px; margin-top: 8px; }

.item-row.col { display: block; }
.item-top { display: flex; gap: 8px; align-items: start; }
.item-top .item-inputs { flex: 1; }
.item-product { margin: 8px 0 4px 0; padding-left: 2px; }

.picker { margin-top: 8px; padding: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.picker .results { display: grid; gap: 8px; margin-top: 10px; }
.mode-note { color: var(--amber); font-size: 0.76rem; font-family: var(--font-mono); margin: 0; }
.product-card {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text); cursor: pointer;
}
.product-card:active { border-color: var(--cyan); }
.pc-body { flex: 1; min-width: 0; }
.pc-title { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-price { color: var(--amber); font-family: var(--font-mono); font-size: 0.84rem; }
.pc-pick { color: var(--cyan-ink); background: var(--cyan); font-weight: 700; font-size: 0.78rem; padding: 5px 10px; border-radius: 6px; }

.product-view { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 8px; }
.pv-body { flex: 1; min-width: 0; }
.pv-title { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.pv-link { color: var(--cyan); font-size: 0.82rem; text-decoration: none; }
.pv-link.disabled { color: var(--line-strong); }

/* ---- タックル: インベントリ風グリッド（役割カード＋サムネ） ---- */
.tackle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
@media (min-width: 560px) { .tackle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tk-card {
  position: relative; aspect-ratio: 1 / 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); cursor: pointer; padding: 8px; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.tk-card:active { transform: scale(0.98); }
.tk-card.filled { border-color: var(--line-strong); }
.tk-card.empty, .tk-card.add { background: transparent; border-style: dashed; }
.tk-visual { width: 70%; aspect-ratio: 1 / 1; display: grid; place-items: center; color: var(--cyan); }
.tk-visual.faint { color: var(--line-strong); }
.tk-visual.lg { width: 150px; }
.tk-ico { width: 100%; height: 100%; }
.tk-ico svg { width: 100%; height: 100%; display: block; }
.tk-thumb { width: 72%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.tk-thumb.lg { width: 150px; }
.tk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-role { font-size: 0.82rem; font-weight: 600; text-align: center; line-height: 1.2; }
.tk-role.muted { color: var(--muted); font-weight: 500; }

/* 画像付きカードはサムネを大きく（ほぼ全面）＋ラベルを下に重ねる */
.tk-card.has-img { padding: 0; }
.tk-card.has-img .tk-visual { position: absolute; inset: 0; width: 100%; height: 100%; }
.tk-card.has-img .tk-thumb { width: 100%; height: 100%; aspect-ratio: auto; border: none; border-radius: 12px; }
.tk-card.has-img .tk-role {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 18px 8px 6px; z-index: 2;
  color: #fff; background: linear-gradient(transparent, rgba(6, 11, 17, 0.92));
}
.tk-card.has-img .tk-x, .tk-card.has-img .tk-badge { z-index: 3; }
.tk-plus { font-size: 1.8rem; color: var(--muted); line-height: 1; }
.tk-x {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2); color: var(--muted);
  font-size: 0.95rem; line-height: 1; border: 1px solid var(--line);
}
.tk-x:active { color: var(--red); }
.tk-badge {
  position: absolute; top: 6px; left: 6px; font-size: 0.62rem; padding: 1px 7px; border-radius: 10px;
  background: rgba(65, 184, 240, 0.14); color: var(--cyan); border: 1px solid rgba(65, 184, 240, 0.3);
}

/* ---- タックル: 全画面ポップアップ ---- */
.tk-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(4, 8, 12, 0.72); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 560px) { .tk-overlay { align-items: center; } }
.tk-modal {
  width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 16px 16px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
}
@media (min-width: 560px) { .tk-modal { border-radius: 16px; } }
.tk-modal-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; padding-bottom: 8px; }
.tk-modal-x { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); font-size: 1.1rem; }
.tk-modal-body { display: flex; flex-direction: column; gap: 12px; }
.tk-modal-visual { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; }
.tk-prod { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 8px; padding: 10px; }
.tk-prod-title { font-size: 0.9rem; margin-bottom: 8px; }
.tk-buy { display: inline-block; background: var(--cyan); color: var(--cyan-ink); font-weight: 700; font-size: 0.86rem; padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.tk-buy.disabled { background: var(--surface); color: var(--line-strong); border: 1px solid var(--line); }
.tk-fields { display: grid; gap: 10px; }
.tk-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.tk-modal-foot .btn { flex: 1; }
.btn.block { width: 100%; }

/* ---- 起動画面（スプラッシュ / Phase 6） ---- */
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 30%, #11202e, #0a0e13 70%);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash-inner { display: grid; justify-items: center; gap: 8px; animation: rise 0.5s ease both; }
.splash-mascot { filter: drop-shadow(0 6px 20px rgba(65, 184, 240, 0.25)); }
.splash-title { font-family: var(--font-display); font-size: 2.1rem; letter-spacing: 0.1em; color: var(--text); }
.splash-sub { font-family: var(--font-mono); font-size: 0.95rem; color: var(--cyan); letter-spacing: 0.18em; }

/* ---- 更新通知バナー（Phase 6: 新版あり→再読込） ---- */
.update-banner {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 90; display: flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 18px;
  background: var(--surface); border: 1px solid var(--cyan); border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem; color: var(--text);
  animation: rise 0.3s ease both;
}

/* ---- 広告枠（場所確保のみ・実装は後） ---- */
.ad-slot {
  display: grid; place-items: center;
  min-height: 64px; padding: 12px;
  border: 1px dashed var(--line); border-radius: 10px;
  color: var(--line-strong); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em;
}
.foot { text-align: center; padding: 8px 0 4px; }
.foot-link { color: var(--line-strong); font-size: 0.76rem; font-family: var(--font-mono); text-decoration: none; letter-spacing: 0.08em; }
.foot-link:active { color: var(--cyan); }

/* ---- 今日のミッション / ビンゴ ---- */
.bingo-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--amber); }
.bingo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cell {
  position: relative; min-height: 64px; padding: 8px 6px;
  display: grid; place-items: center; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.78rem; color: var(--muted); line-height: 1.25;
}
.cell.done {
  background: linear-gradient(160deg, rgba(247,184,90,0.18), rgba(247,184,90,0.06));
  border-color: var(--amber); color: var(--text);
}
.cell-check { position: absolute; top: 4px; right: 6px; color: var(--amber); font-weight: 700; font-size: 0.9rem; }
.cell-label { padding: 0 2px; }

/* ---- 達成演出（小: ミッション達成トースト） ---- */
.celebrate {
  position: fixed; left: 50%; top: 18%; transform: translateX(-50%);
  z-index: 95; pointer-events: none;
  display: grid; place-items: center;
  animation: pop 0.32s cubic-bezier(.2,1.4,.4,1) both;
}
.celebrate.out { animation: fadeout 0.4s ease forwards; }
.celebrate.noanim { animation: none; }
.celebrate-text {
  padding: 10px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--cyan);
  color: var(--text); font-weight: 700; font-size: 1rem; white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 24px rgba(65,184,240,0.25);
}
@keyframes pop { from { opacity: 0; transform: translateX(-50%) scale(0.6); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes fadeout { to { opacity: 0; transform: translateX(-50%) translateY(-8px); } }

/* ---- 達成演出（大: ビンゴ＝大漁祝祭・全画面） ---- */
.tairyo-fx {
  position: fixed; inset: 0; z-index: 120; pointer-events: none; overflow: hidden;
  animation: fxin 0.4s ease both;
}
.tairyo-fx.out { animation: fxout 0.5s ease forwards; }
.night {
  position: absolute; inset: 0;
  background:
    radial-gradient(2px 2px at 20% 18%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(2px 2px at 62% 12%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 82% 24%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 30%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(130% 90% at 50% 118%, #16294a 0%, #0a1426 45%, #05080f 80%);
}
.skyline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background:
    linear-gradient(transparent, rgba(65,184,240,0.06)),
    repeating-linear-gradient(90deg, #060b14 0 26px, #0a121f 26px 30px, #060b14 30px 64px, #0c1626 64px 70px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 38%);
  mask-image: linear-gradient(180deg, transparent, #000 38%);
  clip-path: polygon(0 38%, 5% 38%, 5% 20%, 11% 20%, 11% 40%, 18% 40%, 18% 26%, 26% 26%, 26% 44%, 33% 44%, 33% 14%, 40% 14%, 40% 42%, 48% 42%, 48% 28%, 56% 28%, 56% 46%, 64% 46%, 64% 20%, 72% 20%, 72% 40%, 80% 40%, 80% 30%, 88% 30%, 88% 44%, 95% 44%, 95% 24%, 100% 24%, 100% 100%, 0 100%);
}
/* 花火 */
.fw-layer { position: absolute; inset: 0; }
.fw { position: absolute; width: 0; height: 0; }
.fw span {
  position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-radius: 50%;
  opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.3);
  box-shadow: 0 0 8px currentColor; animation: fw 1200ms ease-out forwards;
}
@keyframes fw {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.3); }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d, 118px))) scale(1); }
}
/* 波しぶき */
.wave-crest {
  position: absolute; left: -10%; right: -10%; bottom: -8px; height: 60px;
  background: radial-gradient(60% 100% at 50% 100%, rgba(234,246,255,0.95), rgba(159,212,245,0.4) 60%, transparent 72%);
  filter: blur(1px); animation: crest 700ms ease-out both;
}
.splash-layer { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; }
.drop {
  position: absolute; bottom: 6px; width: 6px; height: 16px; border-radius: 50% 50% 50% 50%;
  background: linear-gradient(#eaf6ff, #8fcdf2); opacity: 0;
  animation: spray 1200ms ease-out forwards;
}
@keyframes spray {
  0% { opacity: 0; transform: translateY(0) scaleY(.6); }
  12% { opacity: .95; }
  100% { opacity: 0; transform: translate(var(--dx), calc(-1 * var(--dy, 90px))) scaleY(1.1); }
}
@keyframes crest { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
/* 大漁旗 */
.flag-wrap {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%);
  width: min(70vw, 340px); filter: drop-shadow(0 16px 30px rgba(0,0,0,0.55));
  animation: flagpop 0.5s cubic-bezier(.2,1.4,.4,1) both;
}
.flag-svg { width: 100%; height: auto; transform-origin: left center; animation: flagwave 820ms ease-in-out infinite; }
.flag-wrap.noanim .flag-svg { animation: none; }
@keyframes flagwave {
  0%, 100% { transform: rotate(-1deg) skewY(1.4deg) scaleX(1); }
  25% { transform: rotate(0.6deg) skewY(-2deg) scaleX(1.025); }
  50% { transform: rotate(1.1deg) skewY(1.6deg) scaleX(.99); }
  75% { transform: rotate(0.1deg) skewY(-1.1deg) scaleX(1.01); }
}
@keyframes flagpop { from { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-6deg); } to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } }
/* タイトル */
.fx-title {
  position: absolute; left: 50%; top: 62%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 2.2rem; letter-spacing: 0.08em; color: #fff;
  padding: 8px 22px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(214,50,43,0.95), rgba(126,24,19,0.95));
  border: 2px solid var(--amber); box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 40px rgba(247,184,90,0.5);
  animation: titlepop 0.5s cubic-bezier(.2,1.4,.4,1) 0.1s both;
  white-space: nowrap;
}
@keyframes titlepop { from { opacity: 0; transform: translateX(-50%) scale(.7) translateY(10px); } to { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); } }
@keyframes fxin { from { opacity: 0; } to { opacity: 1; } }
@keyframes fxout { to { opacity: 0; } }
.tairyo-fx.noanim .night, .tairyo-fx.noanim .fx-title, .tairyo-fx.noanim .flag-wrap { animation: none; }

/* ---- 戦績（ゲーム性 v1） ---- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 6px; text-align: center; }
.stat-val { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.02em; }
.stat-val.accent { color: var(--cyan); }
.stat-label { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mbadge { font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--line-strong); }
.mbadge.on { color: var(--cyan-ink); background: var(--amber); border-color: var(--amber); font-weight: 700; }

.hit-badge { font-size: 0.74rem; font-weight: 700; color: var(--cyan-ink); background: var(--amber); padding: 2px 10px; border-radius: 999px; }
.hit-badge.mini { font-size: 0.64rem; padding: 1px 7px; }

/* ---- 釣果クイック記録 ---- */
.big-catch { width: 100%; min-height: 64px; font-size: 1.3rem; letter-spacing: 0.08em; margin: 4px 0 10px; }
.catch-tally { display: flex; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: 0.9rem; }
.ct-count { color: var(--text); } .ct-best { color: var(--amber); }
.catch-list { display: grid; gap: 6px; margin-top: 10px; }
.catch-row { display: flex; align-items: center; gap: 10px; }
.catch-row.col { display: block; padding: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.catch-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.catch-top .sp-sel { flex: 1; min-height: 40px; }
.badge.gedo { color: var(--cyan-ink); background: var(--amber); flex: 0 0 auto; }
.catch-no { font-family: var(--font-mono); color: var(--muted); flex: 0 0 auto; }
.catch-inputs { flex: 1; display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.size-inp { width: 100%; }
.action-inp { width: 100%; }
@media (max-width: 460px) { .catch-inputs { grid-template-columns: 80px 1fr; } }

.top-action { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 8px; }
.ta-label { font-size: 0.72rem; color: var(--muted); }
.ta-val { font-weight: 700; color: var(--cyan); }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .card, .species-card, .splash-inner, .update-banner { animation: none; }
  .btn, .btn-ghost { transition: none; }
}
