/* 元素全書：延用遊戲的「水彩田野手帖」——紙、墨、朱紅、十個分類色。
   遊戲那邊靠 CSS 遮罩把介面畫成水彩暈染；這裡是內容頁，用素紙＋細線就好，
   不搬 wash 遮罩（多載四張 PNG 換一點裝飾，不值得）。 */
:root {
  --paper: #f5f3ee; --paper-2: #fdfcf9; --line: rgba(43,42,39,0.14);
  --ink: #2b2a27; --ink-dim: rgba(43,42,39,0.66); --ink-faint: rgba(43,42,39,0.42);
  --red: #c8452c; --gold: #b8860b; --tint: var(--red);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", "新細明體", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper) url("../assets/ui/xuan.webp") center / cover fixed;
  color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--red); }

/* ── 頂欄 ── */
.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: rgba(253,252,249,0.9); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px);
}
.seal {
  flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  width: 40px; height: 40px; padding: 3px; border-radius: 3px;
  background: var(--red); color: #fff; text-decoration: none;
  font-family: var(--serif); font-size: 14px; font-weight: 800;
  line-height: 1;   /* body 的 1.75 會讓 2×2 的四個字撐爆 40px 的印章 */
}
.seal span { display: flex; align-items: center; justify-content: center; }
.bar-t { flex: 1; min-width: 0; font-family: var(--serif); font-weight: 700; letter-spacing: 0.1em; }
.bar-t a { color: var(--ink); text-decoration: none; }
.play {
  flex: none; padding: 7px 14px; background: var(--red); color: #fff;
  text-decoration: none; border-radius: 2px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
}

/* ── 單顆元素 ── */
.el, .hub { max-width: 720px; margin: 0 auto; padding: 24px 18px 40px; }
.el { text-align: center; }
.art {
  display: flex; align-items: center; justify-content: center;
  height: 240px; margin-bottom: 6px;
  background: radial-gradient(circle at 50% 46%,
    color-mix(in srgb, var(--tint) 15%, transparent) 0%, transparent 62%);
}
.art-im { width: 220px; height: 220px; object-fit: contain; filter: drop-shadow(0 12px 16px rgba(43,42,39,0.24)); }
.art .emo { font-size: 140px; line-height: 1; }
.el h1 {
  margin: 0; font-family: var(--serif); font-size: 40px; font-weight: 700;
  letter-spacing: 0.14em; text-indent: 0.14em; line-height: 1.2;
}
.tags { margin: 12px 0 0; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tag {
  padding: 3px 12px; border: 1px solid var(--tint); border-radius: 999px;
  color: var(--tint); text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
}
.tag.rare { border-color: var(--gold); color: var(--gold); }
.tag.n { border-color: var(--line); color: var(--ink-faint); }
.quip {
  margin: 20px auto 0; max-width: 30em; font-family: var(--serif); font-size: 18px;
  line-height: 1.9; color: var(--ink);
}
.layer, .dead { margin: 14px 0 0; font-size: 13px; color: var(--ink-faint); letter-spacing: 0.04em; }

/* ── 配方（收起來：爬蟲讀得到，但不會不小心被雷） ── */
.fold {
  margin: 26px 0 0; text-align: left; background: rgba(253,252,249,0.72);
  border: 1px solid var(--line); border-radius: 2px;
}
.fold > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; cursor: pointer; list-style: none;
  font-family: var(--serif); font-weight: 700; letter-spacing: 0.08em; color: var(--ink);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "展開"; font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--red); }
.fold[open] > summary::after { content: "收起"; }
.fold > summary .cnt { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--ink-faint); letter-spacing: 0; }
.rows { margin: 0; padding: 4px 12px 14px; list-style: none; }
.rows li {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 7px 4px; border-top: 1px solid var(--line);
}
.op { flex: none; color: var(--ink-faint); font-size: 13px; font-weight: 400; }

/* ── 元素小籤（配方列與同類清單共用） ── */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 13px; white-space: nowrap;
}
.chip:hover { border-color: var(--tint); }
.chip.self { background: color-mix(in srgb, var(--tint) 12%, var(--paper-2)); border-color: var(--tint); font-weight: 700; }
.chip-ic { width: 22px; height: 22px; object-fit: contain; flex: none; }
.chip .emo.chip-ic { font-size: 15px; display: flex; align-items: center; justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.sibs { margin: 34px 0 0; text-align: left; }
.sibs h2, .cat h2 {
  margin: 0 0 12px; font-family: var(--serif); font-size: 16px; font-weight: 700;
  letter-spacing: 0.12em; padding-bottom: 7px; border-bottom: 2px solid var(--tint);
}

/* ── 全書首頁 ── */
.hub h1 {
  margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 700;
  letter-spacing: 0.16em; text-indent: 0.16em;
}
.lead { margin: 14px 0 0; color: var(--ink-dim); max-width: 40em; }
.lead.spoil { font-size: 13px; color: var(--ink-faint); }
.cat { margin: 34px 0 0; }
.cat h2 { display: flex; align-items: baseline; gap: 10px; }
.cat h2 .cnt { font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--ink-faint); letter-spacing: 0; }

/* ── 頁尾 ── */
.foot {
  margin-top: 20px; padding: 26px 18px 34px; text-align: center;
  border-top: 1px solid var(--line); background: rgba(253,252,249,0.6);
}
.foot-play {
  display: inline-block; padding: 10px 22px; background: var(--red); color: #fff;
  text-decoration: none; border-radius: 2px; font-family: var(--serif);
  font-weight: 700; letter-spacing: 0.1em;
}
.foot-brand { margin: 16px 0 0; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.06em; }

@media (max-width: 420px) {
  .el h1 { font-size: 32px; }
  .art { height: 200px; } .art-im { width: 180px; height: 180px; }
  .quip { font-size: 16px; }
}
