/* ══════════════════════════════════════════
   POE1 流放之路攻略區專用樣式
   依賴全站 style.css 的 CSS 變數(--bg-card / --border / --text-main /
   --text-dim / --gold 系列 / --accent-blue),深淺色模式跟隨全站
   [data-theme="light"] 機制,本檔只在需要額外對比度時另外覆蓋。
══════════════════════════════════════════ */

/* ── 2026-07-19 閱讀性改版 tokens(深色預設;淺色由 [data-theme="light"] 覆蓋)──
   動機:深色模式 gold-dim 標籤對比僅 3.33、text-dim 4.25 皆過低;
   內文術語舊填色太搶眼打斷閱讀 → 改柔和色+細底線。 */
:root {
  --poe-gold-soft: #d9b666;      /* 標籤/label 用金,取代 gold-dim(對比 3.33→8.9) */
  --poe-gold-strong: #efd291;
  --poe-text-soft: #a49c90;      /* 次要文字,取代 text-dim 在 poe 區的大量使用(4.25→6.9) */
  --poe-surface: #15151f;
  --poe-surface-2: #1b1b27;
  --poe-gem: #9fc9d4;            /* 技能術語:柔藍綠(近正文亮度) */
  --poe-gear: #dcbe8b;           /* 裝備術語:柔沙金 */
  --poe-node: #c0abe4;           /* 天賦/昇華節點與機制增益:柔紫 */
  --poe-gem-line: rgba(120,190,205,.5);
  --poe-gear-line: rgba(210,170,110,.55);
  --poe-node-line: rgba(165,135,220,.5);
  --poe-sS: #ff8f6d; --poe-sA: #e6c168; --poe-sB: #8fc0e6; --poe-sC: #8f8a82;
}
[data-theme="light"] {
  --poe-gold-soft: #8a6412;
  --poe-gold-strong: #6f5210;
  --poe-text-soft: #5f574d;
  --poe-surface: #f6f2e9;
  --poe-surface-2: #f1ece1;
  --poe-gem: #1d6274;
  --poe-gear: #8a6212;
  --poe-node: #6b4fa0;
  --poe-gem-line: rgba(29,98,116,.45);
  --poe-gear-line: rgba(138,98,18,.45);
  --poe-node-line: rgba(107,79,160,.45);
  --poe-sS: #c0432a; --poe-sA: #8a6412; --poe-sB: #2166a0; --poe-sC: #6f685f;
}

/* ── Hero ── */
.poe-hero {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(201,168,76,.10) 0%, transparent 55%),
    linear-gradient(160deg, rgba(74,158,255,.06) 0%, transparent 50%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 32px 28px;
  margin-bottom: 24px;
}
.poe-kicker {
  font-size: 11px;
  letter-spacing: 2.5px;
  color: var(--poe-gold-soft);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
.poe-hero-title {
  font-size: clamp(20px, 3vw, 28px);
  color: var(--gold-light);
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
.poe-hero-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.9;
  max-width: 720px;
  margin-bottom: 10px;
}
.poe-hero-desc:last-child { margin-bottom: 0; }

/* ── Section 說明文字 ── */
.poe-section-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 720px;
  margin: -6px 0 16px;
}

/* ── 篩選列 ── */
.poe-filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 24px;
}
.poe-filter-note {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.poe-filter-note code {
  font-size: 11px;
  color: var(--gold-dim);
  background: rgba(255,255,255,.05);
  padding: 1px 5px;
  border-radius: 3px;
}
.poe-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.poe-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.poe-filter-field select {
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-main);
  /* 告訴瀏覽器彈出的原生選項清單要用深色系,避免「淺色字+系統白底」看不見 */
  color-scheme: dark;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 8px;
  cursor: pointer;
}
.poe-filter-field select:hover,
.poe-filter-field select:focus {
  border-color: var(--border-hover);
  outline: none;
}
/* 選項清單雙保險:部分瀏覽器允許直接染 option */
.poe-filter-field select option {
  background: #15151f;
  color: #e8e2d8;
}
[data-theme="light"] .poe-filter-field select { color-scheme: light; }
[data-theme="light"] .poe-filter-field select option {
  background: #ffffff;
  color: #2c2620;
}

/* ── Build 卡片 grid ── */
.poe-build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.poe-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  transition: border-color 0.2s, transform 0.2s;
}
.poe-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.poe-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.poe-card-version {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--poe-gold-soft);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 3px;
  padding: 2px 7px;
}
.poe-card-title { font-size: 14px; margin-bottom: 6px; }
.poe-card-title a { color: var(--gold-light); text-decoration: none; }
.poe-card-title a:hover { text-decoration: underline; }
.poe-card-desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.7; margin-bottom: 10px; }
.poe-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.poe-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.2);
  color: var(--poe-gold-soft);
  letter-spacing: 0.3px;
}

/* ── 評級徽章(S~C,索引卡與 build 頁 TL;DR 評級卡共用) ── */
.poe-card-rating,
.poe-rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.poe-rating-S { background: rgba(255,99,99,.15); border: 1px solid rgba(255,99,99,.4); color: #ff8888; }
.poe-rating-A { background: rgba(201,168,76,.15); border: 1px solid rgba(201,168,76,.4); color: var(--gold-light); }
.poe-rating-B { background: rgba(74,158,255,.15); border: 1px solid rgba(74,158,255,.4); color: var(--accent-blue); }
.poe-rating-C { background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--text-dim); }
[data-theme="light"] .poe-rating-S { color: #a02828; }

/* ── 空狀態 ── */
.poe-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--text-dim);
}
.poe-empty-icon { font-size: 26px; display: block; margin-bottom: 10px; }
.poe-empty-state p { font-size: 13px; line-height: 1.8; margin: 0; }
.poe-empty-sub { font-size: 12px !important; opacity: 0.8; margin-top: 4px !important; }

/* ── 開荒常青攻略預告卡(無連結) ── */
.poe-guide-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.poe-guide-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 18px 16px;
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
a.poe-guide-preview-card:hover {
  border-color: var(--gold, #c9a55a);
  transform: translateY(-2px);
}
.poe-guide-preview-icon { font-size: 20px; margin-bottom: 8px; display: block; }
.poe-guide-preview-title { font-size: 13.5px; color: var(--text-main); font-weight: 600; margin-bottom: 5px; }
.poe-guide-preview-desc { font-size: 12px; color: var(--text-dim); line-height: 1.65; margin-bottom: 10px; }
.poe-guide-preview-badge {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

/* ── Build 條目頁(template.html)內容區塊 ── */
.poe-article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.poe-rating-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.poe-rating-item {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}
.poe-rating-item-label { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; letter-spacing: 0.5px; }

/* ⭐ 站方原創評注段落(TL;DR / 版本適配度 / 開荒里程碑 / 優缺點 等) */
.poe-callout {
  background: radial-gradient(ellipse at 100% 0%, rgba(201,168,76,.08) 0%, transparent 60%), var(--bg-card);
  border: 1px solid rgba(201,168,76,.28);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 22px;
}
.poe-callout-label {
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--poe-gold-soft);
  margin-bottom: 10px;
  font-weight: 700;
}

.poe-source-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.poe-source-list li {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-dim);
}
.poe-source-list a { color: var(--accent-blue); text-decoration: none; }
.poe-source-list a:hover { text-decoration: underline; }

.poe-todo {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  background: repeating-linear-gradient(135deg, rgba(255,180,80,.06), rgba(255,180,80,.06) 6px, rgba(255,180,80,.1) 6px, rgba(255,180,80,.1) 12px);
  border: 1px dashed rgba(255,180,80,.4);
  border-radius: 4px;
  padding: 10px 12px;
  line-height: 1.7;
}

/* ── 內文閱讀性(2026-07-17 使用者回饋:段落太擠、要重點標色) ── */
.poe-article p {
  line-height: 1.95;
  margin: 0 0 16px;
}
.poe-article h2 { margin-top: 36px; }
.poe-article ul, .poe-article ol {
  line-height: 1.9;
  margin: 10px 0 18px;
  padding-left: 24px;
}
.poe-article li { margin: 6px 0; }

/* 內文連結:不設定會落到瀏覽器預設藍/紫(visited 深紫在深色底幾乎看不見) */
.poe-article a,
.poe-article a:visited {
  color: var(--accent-blue, #7aa2ff);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.poe-article a:hover { color: var(--gold, #c9a55a); }
[data-theme="light"] .poe-article a,
[data-theme="light"] .poe-article a:visited { color: #1a5fb4; }
[data-theme="light"] .poe-article a:hover { color: #96600e; }

/* 技能與裝備術語(2026-07-19 改版:柔和色+細底線,近正文亮度不打斷閱讀) */
.poe-skill, .poe-item, .poe-passive {
  font-weight: 600;
  border-bottom: 1.5px solid;
  padding-bottom: 0.5px;
}
.poe-skill   { color: var(--poe-gem); border-color: var(--poe-gem-line); }
.poe-item    { color: var(--poe-gear); border-color: var(--poe-gear-line); }
.poe-passive { color: var(--poe-node); border-color: var(--poe-node-line); }

/* 重點速覽框(段首條列摘要) */
.poe-keypoints {
  background: rgba(255,255,255,.03);
  border-left: 3px solid var(--gold, #c9a55a);
  border-radius: 4px;
  padding: 12px 18px 12px 16px;
  margin: 14px 0 20px;
}
.poe-keypoints-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold, #c9a55a);
  margin-bottom: 6px;
}
.poe-keypoints ul { margin: 0; padding-left: 20px; }
.poe-keypoints li { font-size: 13px; margin: 5px 0; }
[data-theme="light"] .poe-keypoints { background: rgba(0,0,0,.03); }

/* ══ 2026-07-19 build 頁閱讀性改版:排版與新元件 ══ */

/* 內文排版:字級提升、標題附裝飾與分隔線 */
.poe-article { font-size: 15px; max-width: 780px; }
.poe-article h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Songti TC", serif;
  font-size: clamp(24px, 3.6vw, 31px);
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}
.poe-article h2 {
  font-size: 19px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.poe-article h2::before { content: "▍"; color: var(--poe-gold-soft); font-size: 15px; margin-right: 6px; }
.poe-article .poe-hero-desc,
.poe-article .poe-section-desc { color: var(--poe-text-soft); }
.poe-callout p, .poe-keypoints li { color: var(--text-main); }

/* 頁首速覽資訊條 */
.poe-facts {
  flex: 1 1 100%; /* 外層 .poe-article-tags 是 flex,避免 dl 被縮成內容寬 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
}
.poe-fact { background: var(--poe-surface); padding: 11px 14px; }
.poe-fact dt {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--poe-text-soft);
  margin: 0 0 3px;
}
.poe-fact dd { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--text-main); }
.poe-fact dd.hl { color: var(--poe-gold-strong); }

/* 五維評級:字母+長度條 */
.poe-ratings { display: grid; gap: 11px; margin: 4px 0 16px; }
.poe-rrow { display: grid; grid-template-columns: 64px 26px 1fr; align-items: center; gap: 12px; }
.poe-rlabel { font-size: 13px; color: var(--poe-text-soft); }
.poe-rgrade { font-weight: 800; font-size: 15px; text-align: center; }
.poe-rbar { height: 7px; border-radius: 99px; background: rgba(127,127,127,.15); overflow: hidden; }
.poe-rbar i { display: block; height: 100%; border-radius: 99px; }
/* 門檻兩維(上手難度/造價)改文字膠囊:字母評級會被誤讀為「造價 S=超貴」(2026-07-19 使用者裁示提案A) */
.poe-rrow-pill { grid-template-columns: 64px auto 1fr; }
.poe-pill {
  justify-self: start;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid;
}
.poe-pill-g { color: #8fce9a; border-color: rgba(120,200,140,.45); background: rgba(120,200,140,.1); }
.poe-pill-y { color: #e6c168; border-color: rgba(220,185,100,.45); background: rgba(220,185,100,.1); }
.poe-pill-r { color: #ff9d80; border-color: rgba(255,140,110,.45); background: rgba(255,140,110,.1); }
[data-theme="light"] .poe-pill-g { color: #1e6b34; border-color: rgba(30,107,52,.4); background: rgba(30,107,52,.07); }
[data-theme="light"] .poe-pill-y { color: #8a6412; border-color: rgba(138,100,18,.4); background: rgba(138,100,18,.07); }
[data-theme="light"] .poe-pill-r { color: #b33f24; border-color: rgba(179,63,36,.4); background: rgba(179,63,36,.07); }

.poe-g-S { color: var(--poe-sS); } .poe-rb-S { width: 100%; background: var(--poe-sS); }
.poe-g-A { color: var(--poe-sA); } .poe-rb-A { width: 80%;  background: var(--poe-sA); }
.poe-g-B { color: var(--poe-sB); } .poe-rb-B { width: 58%;  background: var(--poe-sB); }
.poe-g-C { color: var(--poe-sC); } .poe-rb-C { width: 34%;  background: var(--poe-sC); }

/* 技能連結卡片 */
.poe-links { display: grid; gap: 12px; margin: 6px 0 10px; }
.poe-linkcard {
  background: var(--poe-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.poe-lc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.poe-lc-title { font-size: 13px; font-weight: 700; letter-spacing: 0.05em; color: var(--poe-gold-soft); }
.poe-lc-n {
  font-size: 11px;
  color: var(--poe-text-soft);
  background: var(--poe-surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.poe-gems { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.poe-chip {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  background: var(--poe-surface-2);
  border: 1px solid var(--border);
  color: var(--text-main);
}
.poe-chip-main {
  background: linear-gradient(180deg, rgba(217,182,102,.16), rgba(217,182,102,.06));
  border-color: rgba(201,168,76,.5);
  color: var(--poe-gold-strong);
}
.poe-plus { color: var(--poe-text-soft); font-size: 12px; }
.poe-lc-note { font-size: 13px; color: var(--poe-text-soft); line-height: 1.7; margin: 10px 0 0; }

/* 裝備分階表格 */
.poe-geartbl-wrap { overflow-x: auto; margin: 6px 0 10px; }
.poe-geartbl { width: 100%; border-collapse: collapse; font-size: 13.5px; border-radius: 10px; overflow: hidden; }
.poe-geartbl th, .poe-geartbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.poe-geartbl thead th {
  background: var(--poe-surface-2);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--poe-gold-soft);
  font-weight: 700;
}
.poe-geartbl tbody th { background: var(--poe-surface); width: 88px; color: var(--poe-text-soft); font-weight: 600; font-size: 12.5px; }
.poe-geartbl td { background: var(--poe-surface); color: var(--text-main); line-height: 1.7; }
.poe-geartbl tr:last-child th, .poe-geartbl tr:last-child td { border-bottom: none; }

/* ── 手機版 ── */
@media (max-width: 768px) {
  .poe-hero { padding: 22px 18px; }
  .poe-hero-title { font-size: 19px; }
  .poe-filter-row { grid-template-columns: repeat(2, 1fr); }
  .poe-rrow { grid-template-columns: 58px 24px 1fr; }
}
