/* 流亡者典籍：精英玩家攻略集
   VOICE  沉穩、有份量的攻略手冊，熟悉的 POE 深色＋金色
   IDEA   一本被翻舊的流亡者手冊：紅色印章、金色標題、羊皮色文字
   PICTURE 惡魔貓的貓咪淡淡藏在背景
   COLOUR 暖黑底、古金標題、惡魔紅點綴；四種文章類型各有一色
   TYPE   標題 Noto Serif TC（書卷感），內文系統黑體
   顏色都集中在 :root，要調整改這裡 */
:root {
  --bg: #0d0b0a;
  --panel: rgba(23, 19, 16, .82);
  --panel-solid: #1a1512;
  --panel-2: rgba(40, 32, 26, .6);
  --line: #34291f;
  --line-soft: rgba(255, 228, 190, .08);
  --text: #e9e2d8;
  --muted: #a69b8e;
  --dim: #7a6f63;
  --gold: #d8b26e;
  --gold-hi: #f0d39a;
  --red: #c4372c;
  --red-hi: #e2574a;
  --build: #e8705e;   /* 流派 */
  --craft: #e0a83e;   /* 製作 */
  --mech: #5bbfae;    /* 解析 */
  --start: #93a9d6;   /* 入門 */
  --ok: #7cc47a;
  --warn: #e6b23c;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --top: 64px;
  --r: 4px;
}
* { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; color: var(--text); font: 16px/1.7 var(--sans); overflow-x: clip;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(150, 40, 30, .16), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(120, 85, 40, .12), transparent 70%),
    var(--bg);
  background-attachment: fixed; min-height: 100vh; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: #fff; }
.dim { color: var(--dim); }
:target { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(216, 178, 110, .2); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* 背景貓咪：淡淡的，不搶內容 */
.bg-cat { position: fixed; z-index: -1; pointer-events: none; right: -3vw; bottom: -4vh; width: min(58vw, 720px); aspect-ratio: 1;
  background: center / contain no-repeat; opacity: .085; filter: grayscale(.35) sepia(.25) contrast(.95); }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.preview-bar { background: #4a3608; color: #ffe2a0; text-align: center; font-size: .82rem; padding: 3px 8px; }

/* 印章 */
.seal { display: inline-grid; place-items: center; width: 34px; height: 34px; background: var(--red); color: #fff3e6; font: 900 20px/1 var(--serif);
  border-radius: 3px; box-shadow: inset 0 0 0 2px rgba(255, 240, 220, .25), 0 1px 0 rgba(0, 0, 0, .5); transform: rotate(-4deg); flex: none; }
.seal.sm { width: 20px; height: 20px; font-size: 12px; margin-right: 8px; vertical-align: -4px; }

/* 頂部列 */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(13, 11, 10, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(216, 178, 110, .08); }
.top-inner { display: flex; align-items: center; gap: 22px; min-height: var(--top); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-text { display: grid; line-height: 1.15; }
.brand-text b { font: 700 19px var(--serif); color: var(--gold-hi); letter-spacing: .04em; white-space: nowrap; }
.brand-text small { font-size: 11.5px; color: var(--muted); letter-spacing: .1em; white-space: nowrap; }
.nav { display: flex; gap: 2px; }
.nav-link { position: relative; padding: 8px 10px; color: var(--muted); white-space: nowrap; font-size: 15px; }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--gold-hi); }
.nav-link.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -11px; height: 2px; background: var(--red); }
.nav-team { color: var(--gold); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 40px; background: none; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 2px; background: var(--muted); margin: 0 auto; position: relative; content: ""; }
.nav-toggle span::before { position: absolute; top: -6px; } .nav-toggle span::after { position: absolute; top: 6px; }
.search { position: relative; margin-left: auto; width: 250px; flex: none; }
.search input, .hero-search input { width: 100%; background: rgba(0, 0, 0, .45); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--r); padding: 8px 12px; font: inherit; font-size: 15px; outline: none; }
.search input:focus, .hero-search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 178, 110, .15); }
.search input::placeholder, .hero-search input::placeholder { color: var(--dim); }

/* 搜尋結果 */
.results { position: absolute; right: 0; top: calc(100% + 6px); width: min(560px, 92vw); background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); max-height: min(72vh, 600px); overflow: auto; z-index: 40; text-align: left; }
.hero-search .results { left: 0; right: 0; width: auto; }
.result { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.result:last-child { border-bottom: 0; }
.result:hover, .result.sel { background: rgba(216, 178, 110, .07); color: var(--text); }
.r-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.r-title { font-weight: 700; color: var(--gold-hi); }
.r-sec { color: var(--muted); font-size: .85rem; }
.r-who { margin-left: auto; color: var(--dim); font-size: .8rem; }
.r-sum { font-size: .9rem; margin-top: 2px; }
.r-snip { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.r-st { font-size: .75rem; color: var(--warn); }
.result mark, .article-body mark.hl { background: rgba(216, 178, 110, .3); color: inherit; padding: 0 1px; border-radius: 2px; }
.r-more { display: block; text-align: center; padding: 9px; font-size: .9rem; }
.r-none { padding: 14px; color: var(--muted); font-size: .9rem; }

.main { padding-top: 22px; padding-bottom: 56px; }

/* 文章類型標籤 */
.ttag { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1; padding: 4px 7px 3px; border-radius: 2px; border: 1px solid currentColor; white-space: nowrap; letter-spacing: .05em; }
.t-build { color: var(--build); } .t-craft { color: var(--craft); } .t-mech { color: var(--mech); } .t-start { color: var(--start); }

/* 面板 */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); position: relative; margin-bottom: 18px; }
.panel::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; border-radius: var(--r) var(--r) 0 0;
  background: linear-gradient(90deg, transparent, rgba(216, 178, 110, .55) 20%, rgba(216, 178, 110, .55) 80%, transparent); }
.panel-title { font: 700 19px var(--serif); color: var(--gold-hi); margin: 0; padding: 14px 18px 4px; }
.pad { padding: 6px 18px 14px; margin: 0; }

/* 首頁 */
.hero { position: relative; text-align: center; padding: 46px 16px 34px; margin-bottom: 26px; }
.hero::after { content: ""; display: block; width: 120px; height: 1px; margin: 30px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.hero-kicker { display: inline-block; font-size: 13px; letter-spacing: .2em; color: var(--red-hi); border: 1px solid rgba(196, 55, 44, .5); padding: 3px 12px; border-radius: 99px; }
.hero h1 { font: 900 clamp(38px, 6vw, 60px)/1.1 var(--serif); color: var(--gold-hi); margin: 16px 0 10px; letter-spacing: .08em;
  text-shadow: 0 2px 0 #000, 0 0 30px rgba(216, 178, 110, .18); }
.hero-lead { max-width: 640px; margin: 0 auto 24px; color: var(--muted); font-size: 17px; text-wrap: balance; }
.hero-search { position: relative; max-width: 620px; margin: 0 auto; }
.hero-search input { padding: 13px 16px; font-size: 16px; background: rgba(0, 0, 0, .55); border-color: #4a3b2c; }
.hero-types { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.hero-types .ttag { margin-right: 7px; }

.sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 18px 6px; }
.sec-head h2 { font: 700 20px var(--serif); color: var(--gold-hi); margin: 0; }
.sec-head h2::before { content: "◆"; color: var(--red); font-size: 11px; margin-right: 8px; vertical-align: 3px; }
.sec-head .dim { font-size: 14px; }
.sec-head .more { margin-left: auto; font-size: 14px; color: var(--gold); white-space: nowrap; }
.home-sec { margin-bottom: 22px; }
.home-sec > .sec-head { padding-left: 2px; padding-right: 2px; }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }

/* 文章列表列 */
.rows { padding: 2px 0 6px; }
.row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line-soft); color: var(--text); }
.rows .row:first-child { border-top: 0; }
.row:hover { background: rgba(216, 178, 110, .05); color: var(--text); }
.row .ttag { margin-top: 4px; }
.row-main { flex: 1; display: grid; }
.row-title { font-weight: 700; color: var(--gold-hi); }
.row:hover .row-title { color: #fff; }
.row-class { font-size: 13px; color: var(--build); }
.row-sum { font-size: 14px; color: var(--muted); line-height: 1.55; }
.row-author { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); white-space: nowrap; margin-top: 3px; }

/* 頭像與作者卡 */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; background: #2a211b; border: 1px solid #4a3b2c; flex: none; }
.av-letter { font-family: var(--serif); font-weight: 700; color: var(--gold); }
.av-xs { width: 20px; height: 20px; font-size: 11px; }
.av-lg { width: 46px; height: 46px; font-size: 20px; }
.av-xl { width: 96px; height: 96px; font-size: 40px; border-width: 2px; border-color: var(--gold); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.author-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ac-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); background: linear-gradient(90deg, rgba(196, 55, 44, .14), transparent); border-bottom: 1px solid var(--line-soft); }
.ac-head:hover { color: var(--text); background: linear-gradient(90deg, rgba(196, 55, 44, .24), transparent); }
.ac-head span { display: grid; line-height: 1.3; }
.ac-head b { font: 700 17px var(--serif); color: var(--gold-hi); }
.ac-head small { color: var(--muted); font-size: 13px; }
.ac-body { padding: 8px 16px 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv > span { color: var(--dim); white-space: nowrap; }
.kv > b, .kv > a { text-align: right; font-weight: 600; }

/* 頁首 */
.crumbs { font-size: 13.5px; color: var(--dim); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 .5em; }
.page-head { margin: 4px 0 22px; }
.page-head h1 { font: 700 34px/1.2 var(--serif); color: var(--gold-hi); margin: 0 0 6px; }
.page-head p { color: var(--muted); margin: 0; }
.alert { border-radius: var(--r); padding: 9px 14px; margin-bottom: 16px; border: 1px solid; font-size: 14px; }
.alert-draft { background: rgba(196, 55, 44, .12); border-color: rgba(196, 55, 44, .5); color: #f0a49b; }
.alert-review { background: rgba(230, 178, 60, .1); border-color: rgba(230, 178, 60, .45); color: #f2cf7d; }
.alert-info { background: rgba(147, 169, 214, .1); border-color: rgba(147, 169, 214, .45); color: #c4d2ef; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-left: 5px; vertical-align: 3px; }
.dot-draft { background: var(--red-hi); } .dot-review { background: var(--warn); } .dot-block { background: var(--start); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 2px; vertical-align: 1px; margin-left: 4px; }
.badge-ok { background: rgba(124, 196, 122, .18); color: var(--ok); }
.badge-warn { background: rgba(230, 178, 60, .2); color: var(--warn); }
mark.tbd { background: rgba(230, 178, 60, .16); color: #f2cf7d; border: 1px dashed var(--warn); border-radius: 3px; padding: 0 5px; font-size: .8em; }

/* 文章 */
.art-head { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.art-type { display: flex; align-items: center; gap: 10px; }
.art-class { font-size: 14px; color: var(--build); }
.art-head h1 { font: 700 clamp(28px, 4vw, 40px)/1.2 var(--serif); color: var(--gold-hi); margin: 10px 0 2px; letter-spacing: .03em; text-wrap: balance; }
.art-en { font: 600 15px var(--serif); color: var(--dim); font-variant: small-caps; letter-spacing: .06em; }
.art-lead { font-size: 18px; color: var(--text); margin: 12px 0 4px; max-width: 760px; padding-left: 14px; border-left: 3px solid var(--red); }
.art-aliases { color: var(--dim); font-size: 13.5px; margin-top: 8px; }
.art-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 26px; align-items: start; }
.art-side { position: sticky; top: calc(var(--top) + 16px); max-height: calc(100vh - var(--top) - 32px); overflow: auto; scrollbar-width: thin; }
.art-side .panel { padding: 12px 16px; margin-bottom: 14px; }
.side-label { font-size: 12px; letter-spacing: .15em; color: var(--dim); margin-bottom: 6px; }
.side-author .ac-head { padding: 0; background: none; border: 0; }
.plain-author { color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip-link { font-size: 13px; border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; color: var(--gold); }
.chip-link:hover { border-color: var(--gold); color: var(--gold-hi); }
.build-box { border-color: rgba(196, 55, 44, .45); }
.btns { margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 16px; border-radius: var(--r); font-weight: 700; font-size: 14.5px; border: 1px solid; }
.btn-red { width: 100%; background: var(--red); border-color: var(--red); color: #fff4ea; }
.btn-red:hover { background: var(--red-hi); color: #fff; }
.btn-off { width: 100%; color: var(--dim); border-color: var(--line); border-style: dashed; font-weight: 400; }
.btn-ghost { border-color: var(--line); color: var(--muted); font-weight: 400; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.toc a { display: block; padding: 3px 0 3px 10px; font-size: 14px; color: var(--muted); border-left: 1px solid var(--line); }
.toc a:hover { color: var(--gold-hi); border-left-color: var(--red); }
.toc a.lv3 { padding-left: 22px; font-size: 13px; }

.video-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border-radius: var(--r); color: var(--text);
  background: linear-gradient(100deg, rgba(196, 55, 44, .28), rgba(23, 19, 16, .85) 60%); border: 1px solid rgba(196, 55, 44, .5); }
.video-card:hover { color: var(--text); border-color: var(--red-hi); }
.play { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: #fff; font-size: 16px; flex: none; padding-left: 3px; }
.video-card span:last-child { display: grid; line-height: 1.35; }
.video-card b { font-size: 16px; } .video-card small { color: var(--muted); }

.article-body { padding: 10px 28px 22px; }
.article-body h2 { font: 700 22px/1.35 var(--serif); color: var(--gold-hi); margin: 1.6em 0 .6em; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.article-body h2::before { content: "◆"; color: var(--red); font-size: 11px; margin-right: 10px; vertical-align: 4px; }
.article-body > h2:first-child, .article-body > blockquote:first-child + h2 { margin-top: .8em; }
.article-body h3 { font: 700 18px var(--serif); color: var(--gold); margin: 1.4em 0 .4em; }
.article-body p, .article-body li { line-height: 1.85; }
.article-body ul, .article-body ol { padding-left: 1.5em; }
.article-body li::marker { color: var(--gold); }
.article-body strong { color: #fff; }
.article-body blockquote { margin: 1.2em 0; padding: 8px 16px; background: rgba(0, 0, 0, .25); border-left: 3px solid var(--gold); color: var(--muted); }
.article-body code { background: rgba(0, 0, 0, .4); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; font-size: .88em; color: var(--gold-hi); }
.article-body pre { background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; overflow: auto; }
.article-body pre code { border: 0; background: none; padding: 0; }
.article-body img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--r); }
.wl { color: var(--gold-hi); border-bottom: 1px solid rgba(216, 178, 110, .45); }
.wl:hover { border-bottom-color: var(--gold-hi); }
.wl.missing { color: #f0a49b; border-bottom: 1px dashed #f0a49b; cursor: help; }
.table-wrap { overflow-x: auto; margin: 1.1em 0; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
th { background: rgba(196, 55, 44, .14); color: var(--gold-hi); font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(216, 178, 110, .04); }
.admonition { border: 1px solid var(--line); border-left: 3px solid var(--start); background: rgba(0, 0, 0, .28); border-radius: var(--r); padding: 2px 16px 6px; margin: 1.2em 0; }
.admonition-title { font-weight: 700; margin: 10px 0 2px; color: var(--start); }
.admonition.tip { border-left-color: var(--ok); } .admonition.tip .admonition-title { color: var(--ok); }
.admonition.warning, .admonition.danger { border-left-color: var(--red-hi); } .admonition.warning .admonition-title, .admonition.danger .admonition-title { color: #f0a49b; }
.admonition.example { border-left-color: var(--gold); } .admonition.example .admonition-title { color: var(--gold); }
.admonition p { margin: .35em 0; }
.sources { margin-top: 26px; font-size: 14px; }
.sources h2 { font-size: 16px !important; }
.sources ul { word-break: break-all; }
.art-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -4px 0 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; color: var(--muted); background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; }
.tag:hover { color: var(--gold-hi); border-color: var(--gold); }

/* 作者頁 */
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr) 260px; gap: 22px; align-items: center; padding: 22px 24px; margin-bottom: 22px; }
.profile h1 { font: 700 30px var(--serif); color: var(--gold-hi); margin: 0; }
.profile-role { color: var(--red-hi); font-size: 14px; letter-spacing: .1em; }
.profile p { color: var(--muted); margin: 8px 0 0; }
.profile-season { border-left: 1px solid var(--line); padding-left: 20px; }

.search-full .result { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; }

.footer { border-top: 1px solid var(--line); padding: 24px 0 34px; font-size: 13.5px; color: var(--muted); text-align: center; background: rgba(0, 0, 0, .3); }
.footer .wrap { display: grid; gap: 6px; }
.foot-brand { color: var(--gold); }
.footer-links { display: flex; gap: 16px; justify-content: center; }

/* 平板、手機 */
@media (max-width: 1060px) {
  .top-inner { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; }
  .nav-toggle { display: block; }
  .nav { display: none; order: 3; width: 100%; flex-direction: column; }
  .nav-open .nav { display: flex; }
  .nav-link.active::after { display: none; }
  .search { order: 4; width: 100%; margin-left: 0; }
  .results { left: 0; right: 0; width: auto; }
  .home .topbar .search { display: none; }
  .art-grid { grid-template-columns: minmax(0, 1fr); }
  .art-side { position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 14px; order: -1; }
  .art-side .toc { display: none; }
  .profile { grid-template-columns: auto minmax(0, 1fr); }
  .profile-season { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
}
@media (max-width: 760px) {
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .bg-cat { width: 115vw; right: -30vw; opacity: .07; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  .hero { padding-top: 30px; }
  .article-body { padding: 4px 16px 16px; }
  .row { flex-wrap: wrap; padding: 11px 14px; }
  .row-main { flex-basis: calc(100% - 60px); }
  .row-author { margin-left: 46px; margin-top: -4px; }
  .profile { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .profile .avatar { margin: 0 auto; }
  .profile .links { justify-content: center; }
  .page-head h1 { font-size: 28px; }
}
.btns { display: grid; gap: 8px; }
.btns .btn-ghost { width: 100%; }
@media (max-width: 1060px) { html { scroll-padding-top: 130px; } }

/* 寶石圖示（資料來自 POE2DB） */
a.gem{display:inline-flex;align-items:center;gap:.28em;color:inherit;text-decoration:none;border-bottom:1px dotted rgba(255,255,255,.18);white-space:nowrap}
a.gem:hover{border-bottom-color:currentColor}
a.gem img{width:20px;height:20px;object-fit:contain;flex:none;filter:drop-shadow(0 0 2px rgba(0,0,0,.6))}
a.gem .gem-dot{display:inline-block;width:.62em;height:.62em;border-radius:50%;flex:none;background:#bfb7a6;box-shadow:0 0 0 2px rgba(0,0,0,.35),0 0 6px currentColor}
a.gem.g-red span{color:#e07a6a}
a.gem.g-green span{color:#8fcf6a}
a.gem.g-blue span{color:#7aa8ec}
a.gem.g-x span{color:#e8d9b0}
a.gem.g-red .gem-dot{background:#d4523f;color:#d4523f}
a.gem.g-green .gem-dot{background:#6fbf4a;color:#6fbf4a}
a.gem.g-blue .gem-dot{background:#4f86de;color:#4f86de}
a.gem.g-x .gem-dot{background:#d8c690;color:#d8c690}
.gem-filter{margin-top:14px;width:100%;max-width:420px;padding:9px 12px;background:rgba(0,0,0,.35);border:1px solid rgba(201,162,90,.3);color:inherit;border-radius:4px;font:inherit}
.gem-group{margin:28px 0}
.gem-group h2{font-size:1.1rem;margin-bottom:12px}
.gem-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}
.gem-card{display:flex;gap:12px;align-items:flex-start;padding:10px 12px;background:rgba(20,16,14,.72);border:1px solid rgba(201,162,90,.16);border-radius:6px}
.gem-card .gem-pic{flex:none;width:40px;height:40px;display:flex;align-items:center;justify-content:center}
.gem-card .gem-pic img{width:40px;height:40px;object-fit:contain}
.gem-card .gem-dot{display:inline-block;width:18px;height:18px;border-radius:50%;box-shadow:0 0 0 2px rgba(0,0,0,.4),0 0 10px currentColor}
.gem-card.g-red .gem-dot{background:#d4523f;color:#d4523f}.gem-card.g-green .gem-dot{background:#6fbf4a;color:#6fbf4a}
.gem-card.g-blue .gem-dot{background:#4f86de;color:#4f86de}.gem-card.g-x .gem-dot{background:#d8c690;color:#d8c690}
.gem-card .gem-name a{font-weight:700;text-decoration:none}
.gem-card.g-red .gem-name a{color:#e07a6a}.gem-card.g-green .gem-name a{color:#8fcf6a}.gem-card.g-blue .gem-name a{color:#7aa8ec}.gem-card.g-x .gem-name a{color:#e8d9b0}
.gem-kind{margin-left:8px;font-size:.75rem;opacity:.6}
.gem-uses{font-size:.82rem;opacity:.85;margin-top:3px;line-height:1.6}
.gem-uses a{margin-right:8px;white-space:nowrap}

/* 章節總跑法（必看） */
.badge-core{margin-left:6px;background:#c4372c;color:#fff;font-size:.7rem;padding:1px 6px;border-radius:3px;vertical-align:middle}
.core-kicker{display:block;font-size:.78rem;letter-spacing:.08em;color:#e4b66a;font-weight:700;margin-bottom:4px}
.core-card{margin:18px 0;padding:20px 22px;border:1px solid rgba(196,55,44,.55);border-left:4px solid #c4372c;background:linear-gradient(90deg,rgba(196,55,44,.16),rgba(20,16,14,.78));border-radius:6px}
.core-card h2{margin:2px 0 8px;font-size:1.25rem}
.core-card p{margin:0 0 14px;line-height:1.75;opacity:.92}
.core-side{display:block;text-decoration:none;border-color:rgba(196,55,44,.55)!important;background:rgba(196,55,44,.12)!important}
.core-side b{display:block;color:#f0d9a8;font-size:1rem}
.core-side small{display:block;opacity:.75;margin-top:3px;font-size:.8rem}
.core-self{margin-bottom:12px;padding:10px 14px;border-left:4px solid #c4372c;background:rgba(196,55,44,.12);border-radius:4px}
.home-core{display:grid;gap:4px;margin:6px 0 26px;padding:18px 22px;text-decoration:none;color:inherit;border:1px solid rgba(196,55,44,.6);border-left:5px solid #c4372c;border-radius:6px;background:linear-gradient(90deg,rgba(196,55,44,.2),rgba(20,16,14,.8))}
.home-core b{font-size:1.35rem;font-family:"Noto Serif TC",serif;color:#f0d9a8}
.home-core .go{color:#e4b66a;font-weight:700;margin-top:4px}
.home-core:hover{border-color:#e0574a}

/* ───────── 2026-11 美術強化：LOGO × 貓、隨機昇華背景、區塊分層 ───────── */
/* 隨機昇華背景：圖放大鋪滿，再壓一層暗色與暈影，確保文字好讀 */
.bg-art { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: center 18% / cover no-repeat;
  filter: saturate(.9) brightness(.9); animation: bgIn 1.6s ease-out both; }
.bg-art::after { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 75% 65% at 50% 28%, transparent 30%, rgba(13, 11, 10, .6) 80%),
    linear-gradient(180deg, rgba(13, 11, 10, .28) 0%, rgba(13, 11, 10, .5) 38%, rgba(13, 11, 10, .84) 70%, rgba(13, 11, 10, .93) 100%); }
@keyframes bgIn { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
.bg-credit:empty { display: none; }

/* 頂部品牌：兩隻貓 */
.brand-cats { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); transition: transform .25s; }
.brand:hover .brand-cats { transform: rotate(-6deg) scale(1.08); }

/* 首頁 LOGO × 貓：進場跳出來 */
.hero-logo { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2.5vw, 26px);
  margin: -6px auto 14px; }
.hero-logo::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(760px, 95vw); height: 260px;
  transform: translate(-50%, -50%); background: radial-gradient(ellipse at center, rgba(196, 55, 44, .38), rgba(216, 120, 50, .14) 45%, transparent 70%);
  filter: blur(8px); animation: glowPulse 4s ease-in-out infinite; }
.hl-poe { height: clamp(120px, 20vw, 200px); width: auto; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .75)) drop-shadow(0 0 18px rgba(226, 87, 74, .35));
  animation: logoPop .9s cubic-bezier(.2, 1.4, .4, 1) both, logoFloat 6s ease-in-out 1s infinite; }
.hl-cats { height: clamp(112px, 18vw, 186px); width: auto; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .7));
  animation: catsIn .9s cubic-bezier(.2, 1.3, .4, 1) .25s both; transition: transform .3s; }
.hl-cats:hover { transform: translateY(-6px) rotate(2deg); }
.hl-x { font: 900 clamp(28px, 4vw, 46px)/1 var(--serif); color: var(--gold-hi); text-shadow: 0 0 14px rgba(240, 211, 154, .55);
  animation: xIn .6s ease-out .55s both; }
@keyframes logoPop { 0% { opacity: 0; transform: scale(.55) translateY(20px); } 70% { opacity: 1; transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes catsIn { 0% { opacity: 0; transform: translateX(40px) scale(.8); } 100% { opacity: 1; transform: none; } }
@keyframes xIn { from { opacity: 0; transform: scale(2.2) rotate(-30deg); } to { opacity: 1; transform: none; } }
@keyframes logoFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes glowPulse { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
.hero h1 { text-shadow: 0 3px 18px rgba(0, 0, 0, .85); }
.hero-lead { color: #cfc1aa; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
.hero-kicker { background: rgba(13, 11, 10, .6); }

/* 區塊分得更清楚：實心一點的面板、頂端金線、陰影 */
.panel { background: rgba(20, 16, 13, .9); border-color: #3d3024; box-shadow: 0 10px 28px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(240, 211, 154, .06);
  backdrop-filter: blur(6px); }
.panel::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 178, 110, .55), transparent); }
.cat-panel .sec-head, .panel > .sec-head { border-bottom: 1px solid rgba(216, 178, 110, .14); padding-bottom: 10px; margin-bottom: 4px; }
.home-sec > .sec-head, .page-head { text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
.topbar { background: rgba(10, 8, 7, .94); border-bottom: 1px solid #3d3024; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.footer { background: rgba(10, 8, 7, .92); }
@media (max-width: 760px) {
  .hero-logo { flex-wrap: nowrap; }
  .bg-art { background-position: center top; }
}

/* 稀有背景（約 1/50）：整張圖完整呈現在右側，不裁切 */
.bg-art.bg-rare { background-color: #0d0b0a; background-repeat: no-repeat; background-size: auto min(88vh, 1100px);
  background-position: right 3vw center; filter: none; }
.bg-art.bg-rare.is-frame { -webkit-mask-image: none; }
.bg-art.bg-rare::after { background:
    linear-gradient(90deg, rgba(13, 11, 10, .9) 0%, rgba(13, 11, 10, .55) 45%, rgba(13, 11, 10, .12) 75%, rgba(13, 11, 10, .25) 100%),
    linear-gradient(180deg, transparent 60%, rgba(13, 11, 10, .7) 100%); }
.bg-art.bg-rare.is-cut { background-position: right 2vw bottom; background-size: auto min(90vh, 1100px); }
@media (max-width: 900px) {
  .bg-art.bg-rare, .bg-art.bg-rare.is-cut { background-position: center 70px; background-size: min(100vw, 700px) auto; }
  .bg-art.bg-rare::after { background: linear-gradient(180deg, rgba(13, 11, 10, .2) 0%, rgba(13, 11, 10, .65) 50%, rgba(13, 11, 10, .92) 100%); }
}
.rare-toast { position: fixed; z-index: 60; left: 50%; top: 84px; transform: translateX(-50%); display: grid; gap: 2px; text-align: center;
  padding: 12px 26px; border-radius: 6px; background: linear-gradient(180deg, #2a1d0c, #160f08); border: 1px solid #e4b66a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 26px rgba(228, 182, 106, .55), 0 12px 30px rgba(0, 0, 0, .6);
  animation: toastIn .7s cubic-bezier(.2, 1.4, .4, 1) both; transition: opacity .7s, transform .7s; }
.rare-toast b { font: 900 20px var(--serif); color: #ffd98a; letter-spacing: .08em; text-shadow: 0 0 12px rgba(255, 200, 100, .8); }
.rare-toast span { font-size: 13px; color: #e8d6b4; }
.rare-toast.out { opacity: 0; transform: translateX(-50%) translateY(-12px); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) scale(.6); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
.beta-bar { background: linear-gradient(90deg, #3a1712, #5a2a12, #3a1712); color: #f3d9a6; }
.beta-bar a { color: #ffd98a; text-decoration: underline; }
