/* 图鉴。顶栏沿用选城市页的 .city-head / .city-title，下面是四栏切换和一格一格的图 */
#codex { background: var(--sky); }
#cx-back { position: absolute; left: 8px; top: 10px; }

.cx-tabs { position: absolute; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 88px); }
.cx-list {
  position: absolute; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 150px);
  overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 10px calc(env(safe-area-inset-bottom) + 20px);
}
.cx-h { margin: 14px 4px 8px; font-size: 16px; font-weight: 700; color: #6A3B2C; }
.cx-list > .cx-grid:first-child { margin-top: 12px; }
.cx-grid { display: grid; gap: 8px; }
.cx-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cx-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cx-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; min-height: 44px;
  padding: 8px 4px 10px; border-radius: 16px; background: #FFF8EE; box-shadow: 0 2px 8px rgba(42, 10, 30, .08);
}
.cx-cell:active { transform: scale(.96); }
.cx-cell img { width: 100%; max-width: 72px; aspect-ratio: 1; object-fit: contain; }
.g3 .cx-cell img { max-width: 96px; }
.cx-cell.round img { border-radius: 50%; }
.cx-cell b { font-size: 15px; line-height: 1.25; text-align: center; }
.cx-cell small { font-size: 13px; line-height: 1.3; color: #6A3B2C; text-align: center; }

/* 详情：底部弹出 */
#cx-sheet { z-index: 5; }
.cx-top { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.cx-top img { flex: none; width: 96px; height: 96px; object-fit: contain; }
.cx-top img.round { border-radius: 50%; }
.cx-top h4 { font-size: 24px; line-height: 1.2; }
.cx-top span { display: block; margin-top: 4px; font-size: 16px; color: #6A3B2C; }
.cx-detail p { padding: 9px 2px; border-top: 1px dashed rgba(42, 10, 30, .15); font-size: 16px; line-height: 1.6; }
.cx-detail .cx-row { display: grid; grid-template-columns: 3.2em 1fr; gap: 10px; }   /* 标签一栏、内容一栏，折行不跑到标签下面 */
.cx-detail .cx-row b { color: #6A3B2C; }
.cx-detail p.cx-note { font-size: 15px; color: #6A3B2C; }
#cx-sheet .slab { width: 100%; margin-top: 12px; }
