/* 零件區第 1 期（2026-11-30）：零件搜尋、零件頁、盒組頁「這盒的零件」。
 * 零件圖一律放淺色底（使用者 11/29 定案 #e9eff9），深色零件才看得清楚；頁面其他地方照網站深藍。 */
.pt-page { --pt-tile: #e9eff9; --pt-line: rgba(176, 208, 255, .22); --pt-panel: rgba(255, 255, 255, .04); }
html.theme-light .pt-page, html.theme-light .ptz { --pt-line: rgba(24, 48, 96, .14); --pt-panel: #fff; }
.ptz { --pt-tile: #e9eff9; --pt-line: rgba(176, 208, 255, .22); --pt-panel: rgba(255, 255, 255, .04); }
.pt-main { max-width: 1240px; margin: 0 auto; padding: 18px 20px 80px; }
.pt-muted { color: var(--muted); }
.pt-h1 { font-size: 24px; margin: 6px 0 14px; }

/* 搜尋框：打一句話，拆成條件小標籤 */
.pt-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--pt-panel); border: 1px solid var(--pt-line); border-radius: 14px; padding: 8px 10px; }
.pt-search input { flex: 1 1 260px; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 16px var(--font); padding: 6px 4px; }
.pt-search button { border: 0; border-radius: 10px; padding: 8px 16px; background: var(--mint); color: #06221d; font: 600 14px var(--font); cursor: pointer; }
.pt-hint { font-size: 12px; color: var(--faint); margin: 6px 4px 0; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pt-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 4px 3px 10px; border-radius: 99px; border: 1px solid rgba(111, 214, 196, .45); color: var(--mint); background: rgba(111, 214, 196, .1); }
.pt-chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 13px; padding: 0 6px; }
.pt-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, .25); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); vertical-align: -1px; }

.pt-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; margin-top: 16px; }
.pt-layout > *, .pt-part > * { min-width: 0; }
.pt-side .pt-box { background: var(--pt-panel); border: 1px solid var(--pt-line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.pt-side h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.pt-cats a { display: flex; justify-content: space-between; gap: 6px; padding: 3px 4px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 14px; }
.pt-cats a small { color: var(--faint); }
.pt-cats a.on { color: var(--mint); background: rgba(111, 214, 196, .1); }
.pt-sw { display: flex; flex-wrap: wrap; gap: 5px; }
.pt-sw button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); cursor: pointer; padding: 0; }
.pt-sw button.on { outline: 2px solid var(--mint); outline-offset: 2px; }
.pt-sw[hidden] { display: none; }
.pt-sw-more { margin-top: 8px; font-size: 12px; background: none; border: 0; color: var(--sky); cursor: pointer; padding: 0; }
.pt-size { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pt-size label { font-size: 12px; color: var(--muted); }
.pt-size input { width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, .06); border: 1px solid var(--pt-line); border-radius: 8px; color: var(--ink); padding: 5px 6px; font: 14px var(--font); }
.pt-check { display: flex; gap: 6px; align-items: center; font-size: 13px; margin: 4px 0; cursor: pointer; }

.pt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.pt-head select { background: var(--pt-panel); color: var(--ink); border: 1px solid var(--pt-line); border-radius: 8px; padding: 4px 6px; font: 13px var(--font); }
.pt-seg { display: inline-flex; border: 1px solid var(--pt-line); border-radius: 8px; overflow: hidden; }
.pt-seg button { border: 0; background: none; color: var(--muted); padding: 4px 10px; font: 13px var(--font); cursor: pointer; }
.pt-seg button.on { background: rgba(111, 214, 196, .16); color: var(--ink); }

/* 結果圖格：零件圖淺色底 */
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pt-card { display: flex; flex-direction: column; background: var(--pt-panel); border: 1px solid var(--pt-line); border-radius: 14px; padding: 8px; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.pt-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.pt-img { background: var(--pt-tile); border-radius: 10px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pt-img img { width: 86%; height: 86%; object-fit: contain; }
.pt-img.none::after { content: "沒有圖"; color: #8796ad; font-size: 12px; }
.pt-card b { font-size: 14px; font-weight: 600; margin-top: 6px; line-height: 1.35; }
.pt-card .pt-en { font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-card .pt-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; font-size: 11px; color: var(--muted); gap: 4px; }
.pt-card .pt-dots { display: inline-flex; gap: 3px; align-items: center; }
.pt-qty { position: absolute; top: 6px; right: 6px; background: #13254a; color: #fff; font: 700 12px var(--font); padding: 1px 7px; border-radius: 99px; }
.pt-card { position: relative; }

.pt-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.pt-list td, .pt-list th { padding: 6px 8px; border-bottom: 1px solid var(--pt-line); text-align: left; }
.pt-list th { color: var(--muted); font-weight: 500; }
.pt-list .pt-img { width: 48px; height: 48px; aspect-ratio: auto; }
.pt-list a { color: var(--ink); }

.pt-pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pt-pager button { min-width: 36px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--pt-line); background: var(--pt-panel); color: var(--ink); cursor: pointer; font: 13px var(--font); }
.pt-pager button.on { background: var(--mint); color: #06221d; border-color: transparent; }
.pt-pager button:disabled { opacity: .4; cursor: default; }

.pt-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pt-wall a { display: block; text-align: center; color: var(--ink); text-decoration: none; font-size: 13px; }
.pt-wall a small { display: block; color: var(--faint); font-size: 11px; }
.pt-sec { margin-top: 26px; }
.pt-sec > h2 { font-size: 18px; margin: 0 0 10px; }
.pt-sec > h2 small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }

/* 零件頁 */
.pt-part { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 24px; margin-top: 8px; }
.pt-hero { background: var(--pt-tile); border-radius: 18px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.pt-hero img { width: 82%; height: 82%; object-fit: contain; }
.pt-credit { font-size: 11px; color: var(--faint); margin-top: 6px; }
.pt-cols { margin-top: 10px; }
.pt-cols .pt-sw button { width: 26px; height: 26px; }
.pt-colname { font-size: 13px; color: var(--muted); margin-top: 6px; min-height: 20px; }
.pt-title { font-size: 26px; margin: 0; line-height: 1.3; }
.pt-title small { display: block; font-size: 14px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pt-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.pt-tag { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: rgba(143, 182, 255, .14); color: var(--sky); }
.pt-tag.hot { background: rgba(255, 138, 118, .16); color: var(--coral); }
.pt-kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pt-kv div { background: var(--pt-panel); border: 1px solid var(--pt-line); border-radius: 12px; padding: 10px; }
.pt-kv small { display: block; font-size: 11px; color: var(--faint); }
.pt-kv b { font-size: 17px; font-weight: 600; }
.pt-ids { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.pt-ids td { padding: 7px 8px; border-bottom: 1px solid var(--pt-line); }
.pt-ids td:first-child { color: var(--muted); width: 140px; }
.pt-ids button, .pt-ids a.pt-out { float: right; margin-left: 10px; font-size: 12px; color: var(--sky); background: none; border: 0; cursor: pointer; text-decoration: none; }
.pt-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pt-sets a { color: var(--ink); text-decoration: none; font-size: 12px; text-align: center; }
.pt-sets img { width: 100%; border-radius: 8px; aspect-ratio: 4 / 5; object-fit: cover; background: rgba(255, 255, 255, .05); display: block; margin-bottom: 4px; }
.pt-sets small { color: var(--faint); display: block; }
.pt-more { margin-top: 10px; background: none; border: 1px solid var(--pt-line); color: var(--sky); border-radius: 8px; padding: 6px 12px; cursor: pointer; font: 13px var(--font); }
.pt-other { font-size: 13px; color: var(--muted); line-height: 1.9; }
.pt-src { font-size: 12px; color: var(--faint); margin-top: 26px; }

/* 盒組頁「這盒的零件」（預設收合） */
.ptz summary { cursor: pointer; font-size: 20px; font-weight: 700; list-style: none; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ptz summary::-webkit-details-marker { display: none; }
.ptz summary::before { content: "▸"; color: var(--mint); }
.ptz details[open] summary::before { content: "▾"; }
.ptz summary small { font-size: 13px; color: var(--muted); font-weight: 400; }
.ptz-body { margin-top: 14px; }
.ptz-group h3 { font-size: 14px; color: var(--muted); font-weight: 500; margin: 16px 0 8px; }
.ptz .pt-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.ptz .pt-card b { font-size: 12px; }
.ptz-note { font-size: 12px; color: var(--faint); margin-top: 12px; }

@media (max-width: 760px) {
  .pt-layout { grid-template-columns: minmax(0, 1fr); }
  .pt-side { order: 2; }
  .pt-part { grid-template-columns: minmax(0, 1fr); }
  .pt-kv { grid-template-columns: repeat(2, 1fr); }
  .pt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptz .pt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pt-main { padding: 12px 12px 60px; }
  .pt-list td:nth-child(4), .pt-list th:nth-child(4), .pt-list td:nth-child(5), .pt-list th:nth-child(5) { display: none; }
}

/* 1.7.83：還沒有圖時的空格（不顯示破圖小圖示）；署名裡的連結 */
.pt-hero { position: relative; }
.pt-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6b7a93; font-size: 15px; }
.pt-noimg[hidden] { display: none; }
.pt-credit a, .pt-src a, .ptz-note a { color: var(--sky, #6ea8ff); }
