/* ---- ホームの入口 ---- */
.atlas-entry {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  min-height: 44px;
}
.atlas-entry-icon { font-size: 22px; flex-shrink: 0; }
.atlas-entry-body { display: flex; flex-direction: column; gap: 2px; }
.atlas-entry-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.atlas-entry-desc { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---- 図鑑本体 ---- */
.atlas-head { display: flex; flex-direction: column; gap: 8px; }
.atlas-title { font-size: 19px; margin: 0; }
.atlas-progress { margin: 0; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.atlas-progress-track { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; }
.atlas-progress-bar { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.4s ease; }
.atlas-lead { margin: 0; font-size: 12px; color: var(--ink-faint); line-height: 1.7; }

.atlas-section { margin-top: 22px; }
.atlas-section-title {
  font-size: 13px;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.atlas-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.atlas-row {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
/* 未発見でも行そのものは消さない。隠れているのは確率と出典だけ */
.atlas-row.is-locked { opacity: 0.55; }
.atlas-row.is-unlocked { border-color: var(--accent-soft); }

.atlas-icon { width: 22px; height: 22px; color: var(--ink-soft); flex-shrink: 0; margin-top: 2px; }
.atlas-row.is-unlocked .atlas-icon { color: var(--accent); }
.atlas-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.atlas-label { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.atlas-odds {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.atlas-row.is-locked .atlas-odds, .atlas-row.is-seen .atlas-odds { color: var(--ink-faint); }
.atlas-note { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-soft); line-height: 1.7; }
.atlas-source { margin: 2px 0 0; font-size: 10.5px; color: var(--ink-faint); }

.atlas-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--track);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}
.atlas-badge.is-new { background: var(--accent); color: #fff; }

/* 未解放の行は詰める(65行あるので、1行の高さがそのまま一覧の長さになる) */
.atlas-row.is-locked, .atlas-row.is-seen { padding: 10px 14px; }
.atlas-row.is-locked .atlas-label, .atlas-row.is-seen .atlas-label { font-size: 13px; }
.atlas-lead b { color: var(--ink-soft); }

/* 65行を8画面スクロールするので、現在地が分かるように見出しを貼り付ける */
.atlas-section-title {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding: 8px 0 6px;
  margin: 0 0 6px;
}

.atlas-filters { display: flex; gap: 6px; }
.atlas-filter {
  flex: 1;
  min-height: 36px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
}
.atlas-filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* 一覧が9〜13画面ぶんあるので、底からでもホームへ戻れるようにヘッダーを貼り付ける。
   iPhoneの戻るスワイプはSPAでは効かない(履歴を積んでいない)ため、ここが唯一の出口 */
#screen-atlas .game-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg);
  padding: 6px 0;
  margin: -6px 0 0;
}
#screen-atlas .atlas-section-title { top: 44px; }

/* 「見つけた」バッジのコントラストが4.4:1でAA未達だった */
.atlas-badge { background: var(--line); color: var(--ink); }
/* 解放済みの枠線が、未解放の枠線より薄かった(逆転していた) */
.atlas-row.is-unlocked { border-color: var(--accent); }

/* 絞り込みは36pxで、Appleの下限44pxを割っていた(2026-08-24のレビューで実測)。
   3つ横並びなので、高さだけ確保して幅は変えない */
.atlas-filter {
  min-height: 44px;
}
