/* 各彈卡表頁（scripts/build_card_list_pages.py 產生，原理見 docs/CARD_LIST_PAGES.md）。
   卡片排成閱讀模式的版面：卡圖在左、文字在右（比照 reading-mode.css 的 .reader-card）。
   改了這個檔要把產生腳本的 ASSET_VERSION +1 並重建。 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --ink: #1a1612; --muted: #78695d; --line: #e8e0d6; --paper: #fff; --bg: #faf8f5; --accent: #943f50; }
body { font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; background: var(--bg); color: var(--ink); min-height: 100dvh; display: flex; flex-direction: column; line-height: 1.6; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

.cl-header { display: flex; align-items: center; gap: 1rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--line); background: #fdf9f5; }
.cl-header img { height: 2rem; display: block; }
.cl-crumbs { font-size: .85rem; color: #8a7060; min-width: 0; overflow-wrap: anywhere; }
.cl-crumbs a { text-decoration: none; }
.cl-crumbs a:hover { text-decoration: underline; }

.cl-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1rem 3rem; min-width: 0; }
.cl-hero { max-width: 900px; margin: 0 auto; padding: 1.6rem 0 .8rem; text-align: center; }
.cl-hero h1 { font-size: 1.55rem; font-weight: 800; line-height: 1.35; }
.cl-hero p { margin-top: .5rem; color: #6b5f55; font-size: .88rem; line-height: 1.75; }
.cl-hero a { color: var(--accent); }
.cl-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; }

/* 入口頁：各系列的彈 */
.cl-series { max-width: 960px; margin: 1.4rem auto 0; }
.cl-series h2 { font-size: 1.05rem; font-weight: 800; padding-bottom: .4rem; border-bottom: 2px solid var(--accent); }
.cl-products { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: .5rem; margin-top: .7rem; }
.cl-products a { display: flex; flex-direction: column; gap: .1rem; height: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-decoration: none; }
.cl-products a:hover { border-color: var(--accent); }
.cl-products strong { font-size: .95rem; color: var(--accent); }
.cl-products span { font-size: .88rem; font-weight: 700; }
.cl-products small { font-size: .74rem; color: var(--muted); }

/* 各彈頁：搜尋與國家篩選 */
.cl-tools { position: sticky; top: 0; z-index: 2; display: grid; gap: .45rem; padding: .6rem 0; background: var(--bg); }
.cl-tools input { width: 100%; min-height: 40px; padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); font-size: .9rem; }
.cl-nations { display: flex; flex-wrap: wrap; gap: .35rem; }
.cl-nations:empty { display: none; }
.cl-nations button { min-height: 32px; padding: .2rem .7rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); cursor: pointer; font-size: .8rem; font-weight: 700; }
.cl-nations button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.cl-status { margin: .2rem 0 .6rem; color: var(--muted); font-size: .8rem; text-align: center; }

/* 卡片列：卡圖在左、文字在右；桌機兩欄 */
.cl-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 510px), 1fr)); gap: 16px; align-items: start; }
.cl-list > li { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 8px 24px rgba(24, 20, 34, .06); }
.cl-list > li[hidden] { display: none; }
.cl-list > li h2 { font-size: 18px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.cl-list > li p { color: var(--muted); font-size: .8rem; }
.cl-list > li p i { margin-left: .5rem; color: #a0907f; font-style: normal; }
.cl-list > li p b { font-weight: 700; }
.cl-card { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.cl-media { min-width: 0; }
.cl-thumb { display: block; width: 100%; aspect-ratio: 300 / 437; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: #efe8de; cursor: zoom-in; }
.cl-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cl-picker { display: grid; gap: 5px; margin-top: 9px; color: var(--muted); font-size: 11px; font-weight: 750; }
.cl-picker select { min-width: 0; width: 100%; min-height: 38px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); font-size: 12px; }
.cl-body { min-width: 0; overflow-wrap: anywhere; }
.cl-number { color: var(--accent) !important; font: 800 12px/1.5 ui-monospace, Consolas, monospace !important; }
.cl-body h2 { margin: 5px 0 4px; }
.cl-effect { margin-top: 12px; font-size: 15px; line-height: 1.75; color: var(--ink); }
.cl-effect:empty { display: none; }
.cl-effect p { margin: 0 0 9px; color: inherit; font-size: inherit; }
.cl-effect p:last-child { margin-bottom: 0; }

.cl-footer { padding: 1.2rem 1rem 2rem; border-top: 1px solid var(--line); color: #8a7c70; font-size: .74rem; text-align: center; }

@media (max-width: 640px) {
  .cl-hero h1 { font-size: 1.3rem; }
  .cl-header { padding: .6rem .9rem; }
  /* 手機上搜尋與國家篩選加起來太高，不固定在畫面上方 */
  .cl-tools { position: static; }
  .cl-list { gap: 12px; }
  .cl-list > li { padding: 10px; border-radius: 13px; }
  .cl-card { grid-template-columns: minmax(96px, .62fr) minmax(0, 1fr); gap: 10px; }
  .cl-thumb { border-radius: 8px; }
  .cl-list > li h2 { font-size: 16px; }
  .cl-number { font-size: 10px !important; }
}
