/* 版面概念:把遊戲的銅邊石板介面放進星落夜空。導覽列像遊戲的底部列,資料區像遊戲內的道具說明框。 */
:root {
  color-scheme: dark;
  --night: #0b1020; --night-2: #1a1b38; --dusk: #3a2440; --ember: #8a3324;
  --page: #0c0f16; --slate: #141824; --slate-2: #1b2030; --stone: #26221d; --stone-2: #15110c; --ink: #0e0c09;
  --gold: #e8c374; --gold-hi: #f8e6b4; --bronze: #a07a38; --bronze-lo: #6e5630;
  --text: #f0e9d8; --mute: #a39c8b; --blue: #7fd0ff; --warn: #ff6a5a;
  --hp: #d8433f; --mp: #3f86e0; --xp: #b58cf0;
  --r0: #d5d5d5; --r1: #5fd35f; --r2: #4aa3ff; --r3: #c56bff; --r4: #ffb13b; --r5: #ff5a3c;
  --war: #d9534f; --mag: #8d7be8; --ran: #63b86c; --ass: #c25595;
  --serif: "Noto Serif TC", "PMingLiU", "Songti TC", serif;
  --sans: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  --latin: "Cinzel", "Noto Serif TC", serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px)); --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wide: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 16px/1.75 var(--sans); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--stone-2); }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.3; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wrap { width: min(var(--wide), 100%); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.narrow { width: min(820px, 100%); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); }
.muted { color: var(--mute); }
.gold { color: var(--gold); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 導覽列:照遊戲底部列的銅邊 */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: linear-gradient(#2a251f, #15110c); border-bottom: 1px solid var(--bronze); box-shadow: 0 1px 0 #000, 0 8px 24px rgba(0, 0, 0, .45); }
.top-in { display: flex; align-items: center; gap: 18px; height: 64px; width: min(1360px, 100%); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); flex: none; }
.brand svg { width: 54px; height: 25px; }
.brand b { font: 900 21px/1 var(--serif); letter-spacing: .1em; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a, .nav summary { display: block; padding: 8px 12px; color: var(--text); text-decoration: none; font-size: 15px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 7px; border: solid var(--mute); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.nav a:hover, .nav summary:hover { color: var(--gold-hi); }
.nav a[aria-current="page"], .nav details.here > summary { color: var(--gold); border-bottom-color: var(--gold); }
.nav details { position: relative; }
.nav .drop { position: absolute; top: calc(100% + 8px); left: -6px; width: 200px; padding: 6px; background: var(--stone-2); border: 1px solid var(--bronze-lo); box-shadow: 0 16px 34px rgba(0, 0, 0, .55); }
.nav .drop a { border: 0; padding: 8px 10px; }
.nav .drop a:hover { background: var(--stone); }
.nav .drop small { display: block; color: var(--mute); font-size: 12px; line-height: 1.4; }
.burger { display: none; margin-left: auto; }
.burger summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border: 1px solid var(--bronze-lo); background: var(--stone-2); }
.burger summary::-webkit-details-marker { display: none; }
.burger summary i, .burger summary i::before, .burger summary i::after { display: block; width: 20px; height: 2px; background: var(--gold); content: ""; }
.burger summary i { position: relative; }
.burger summary i::before { position: absolute; top: -6px; }
.burger summary i::after { position: absolute; top: 6px; }
.burger .sheet { position: absolute; left: 0; right: 0; top: 64px; max-height: calc(100vh - 64px); overflow-y: auto; padding: 8px var(--gutter-r) 20px var(--gutter-l); background: var(--stone-2); border-bottom: 1px solid var(--bronze); }
.burger .sheet a { display: block; padding: 12px 4px; color: var(--text); text-decoration: none; border-bottom: 1px solid #2c261e; }
.burger .sheet a[aria-current="page"] { color: var(--gold); }
.burger .sheet h4 { margin: 14px 0 2px; color: var(--mute); font: 400 13px var(--sans); }

/* 按鈕 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border: 1px solid var(--bronze); background: linear-gradient(#2f2a22, #1a1612); color: var(--text); text-decoration: none; font-size: 16px; cursor: pointer; transition: border-color .15s, color .15s, filter .15s; }
.btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn.main { background: linear-gradient(#94702c, #7a5a22 48%, #5f4417); border-color: var(--gold); color: #fff6df; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 235, 180, .45), 0 0 26px rgba(232, 195, 116, .22); }
.btn.main:hover { filter: brightness(1.14); color: #fff; }
.top .btn { min-height: 38px; padding: 6px 14px; font-size: 14px; flex: none; }

/* 夜空區塊:首頁主視覺和各頁標題共用 */
.sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.night { position: relative; overflow: hidden; background: linear-gradient(#0b1020 0%, #15183a 44%, #3a2440 78%, #6a2c26 100%); isolation: isolate; }
.page-head { padding-block: 54px 42px; }
.page-head .wrap { position: relative; display: grid; gap: 8px; }
.page-head::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--bronze), transparent); }
.eyebrow { font: 500 13px/1.4 var(--latin); letter-spacing: .22em; color: var(--gold); text-transform: uppercase; }
.page-head h1 { font-size: clamp(32px, 5vw, 50px); font-weight: 900; letter-spacing: .06em; color: var(--gold-hi); text-shadow: 0 2px 0 #3f2d14, 0 0 28px rgba(232, 195, 116, .25); }
.page-head p.lead { max-width: 62ch; color: #d9d2c2; }

/* 主視覺 */
.hero { min-height: clamp(600px, 82vh, 860px); display: grid; align-items: center; background: linear-gradient(#0b1020 0%, #14163a 40%, #33214a 68%, #7c3226 88%, #2a1512 100%); }
.hero-in { position: relative; z-index: 3; width: min(1360px, 100%); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 46px 120px; display: grid; gap: 14px; justify-items: start; }
.hero .crest { width: clamp(120px, 15vw, 176px); height: auto; filter: drop-shadow(0 4px 18px rgba(232, 195, 116, .35)); }
.hero h1 { font-size: clamp(60px, 10.5vw, 132px); font-weight: 900; line-height: 1.04; letter-spacing: .06em; background: linear-gradient(#fff3cf 12%, #e8c374 46%, #a07a38 78%, #e9c97c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #2c1e0c) drop-shadow(0 0 26px rgba(232, 195, 116, .3)); }
.hero .en { font: 700 clamp(15px, 2vw, 22px)/1.2 var(--latin); letter-spacing: .42em; color: var(--blue); text-shadow: 0 0 16px rgba(127, 208, 255, .5); }
.hero .say { margin-top: 12px; max-width: 26em; font: 700 clamp(19px, 2.4vw, 26px)/1.5 var(--serif); color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.hero .sub { max-width: 34em; color: #dcd5c6; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.hero .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.stage { position: absolute; z-index: 2; right: 0; bottom: 0; width: min(62vw, 960px); height: 100%; pointer-events: none; }
.stage img { position: absolute; height: auto; }
.stage .dragon { right: 8%; bottom: 20%; width: 62%; filter: brightness(.82) saturate(1.05) drop-shadow(0 0 54px rgba(255, 110, 60, .42)); animation: breathe 7s ease-in-out infinite; }
.stage .h1 { left: -2%; bottom: 5%; width: 45%; }
.stage .h2 { left: 29%; bottom: 13%; width: 30%; }
.stage .h3 { left: 53%; bottom: 3%; width: 26%; }
.stage .h4 { left: 73%; bottom: 10%; width: 27%; }
.stage .h1, .stage .h2, .stage .h3, .stage .h4 { filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); }
.ground { position: absolute; z-index: 1; inset: auto 0 -1px; height: 140px; width: 100%; }
@keyframes breathe { 50% { transform: translateY(-1.4%) scale(1.012); } }

/* 區塊 */
.band { padding-block: 72px; }
.band.alt { background: linear-gradient(#10131c, #0c0f16); border-block: 1px solid #1d2230; }
.sec-head { display: grid; gap: 8px; margin-bottom: 30px; }
.sec-head.row { grid-template-columns: 1fr auto; align-items: end; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; color: var(--gold-hi); letter-spacing: .04em; }
.sec-head p { max-width: 62ch; color: var(--mute); }
.sub-h { font-size: 22px; color: var(--gold); margin-bottom: 14px; }

/* 遊戲視窗框 */
.frame { position: relative; background: linear-gradient(#1f1b16, #15110c); border: 1px solid var(--bronze-lo); box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255, 225, 160, .08); }
.frame::before, .frame::after { content: ""; position: absolute; width: 7px; height: 7px; background: radial-gradient(circle at 35% 30%, #f0d48c, #a07a38 55%, #3f2d14); border-radius: 50%; }
.frame::before { top: 5px; left: 5px; }
.frame::after { top: 5px; right: 5px; }

/* 公告 */
.notice { background: var(--stone-2); border-block: 1px solid var(--bronze-lo); }
.notice-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(1360px, 100%); margin-inline: auto; padding-left: calc(var(--gutter-l) + 16px); padding-right: var(--gutter-r); }
.notice a { display: grid; gap: 4px; padding: 14px 22px 14px 0; margin-right: 22px; color: var(--text); text-decoration: none; border-right: 1px solid #2c261e; min-width: 0; }
.notice a:last-child { border-right: 0; }
.notice a:hover { background: #1d1913; }
.notice time { color: var(--mute); font-size: 13px; }
.notice b { font-weight: 700; font-size: 15px; }
.tag { display: inline-block; padding: 0 7px; margin-right: 6px; font-size: 12px; line-height: 20px; color: var(--gold); border: 1px solid var(--bronze-lo); vertical-align: 1px; white-space: nowrap; }

/* 畫面展示 */
.show { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.show-view { padding: 8px; }
.show-view button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.show-view img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.show-tabs { display: grid; gap: 6px; }
.show-tabs button { display: grid; gap: 2px; width: 100%; padding: 12px 14px; text-align: left; cursor: pointer; background: var(--slate); border: 1px solid #262c3d; transition: border-color .15s; }
.show-tabs button b { font: 700 17px/1.3 var(--serif); color: var(--text); }
.show-tabs button span { font-size: 13px; line-height: 1.5; color: var(--mute); }
.show-tabs button:hover { border-color: var(--bronze); }
.show-tabs button[aria-selected="true"] { border-color: var(--gold); background: linear-gradient(90deg, #2c2416, var(--slate)); }
.show-tabs button[aria-selected="true"] b { color: var(--gold); }

/* 首頁職業 */
.class-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.class-tile { --c: var(--gold); position: relative; display: grid; align-content: end; min-height: 430px; overflow: hidden; padding: 18px; color: var(--text); text-decoration: none; background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--c) 42%, transparent), transparent 66%), linear-gradient(#171b2b, #0f121b); border: 1px solid #262c3d; transition: border-color .2s; }
.class-tile:hover { border-color: var(--c); color: var(--text); }
.class-tile img { position: absolute; top: 2%; left: 50%; width: 112%; max-width: none; transform: translateX(-50%); transition: transform .3s; }
.class-tile:hover img { transform: translateX(-50%) translateY(-6px) scale(1.04); }
.class-tile h3 { position: relative; font-size: 28px; font-weight: 900; color: var(--gold-hi); }
.class-tile p { position: relative; font-size: 14px; color: #d4cdbd; line-height: 1.6; }
.class-tile em { position: relative; font-style: normal; font-size: 13px; color: var(--c); }
.class-tile::after { content: ""; position: absolute; inset: auto 0 0; height: 56%; background: linear-gradient(transparent, #0d101a 62%); }
.class-tile > :not(img) { z-index: 1; }

/* 世界地圖 */
.world { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 34px; align-items: center; }
.map { position: relative; aspect-ratio: 1; max-width: 640px; width: 100%; margin-inline: auto; }
.map img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: 0 0 60px rgba(63, 134, 224, .22); }
.pin { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; padding: 3px 9px; min-width: 44px; min-height: 30px; align-content: center; background: rgba(9, 12, 20, .78); border: 1px solid var(--bronze); color: var(--gold-hi); font: 700 14px/1.25 var(--serif); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; text-decoration: none; }
.pin small { font: 400 11px/1.2 var(--sans); color: var(--mute); }
.pin:hover, .pin[aria-pressed="true"] { background: #6a4f1e; border-color: var(--gold); color: #fff; }
.pin[aria-pressed="true"] small, .pin:hover small { color: #f1e6c9; }
.pin.boss { border-color: var(--r5); color: #ffc2b0; }
.zone-list { display: grid; gap: 2px; }
.zone-list li { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: baseline; padding: 10px 2px; border-bottom: 1px solid #1f2433; }
.zone-list b { font: 700 16px var(--serif); }
.zone-list span { color: var(--mute); font-size: 14px; }
.zone-list i { font-style: normal; font-size: 13px; color: var(--gold); white-space: nowrap; }

/* 世界王 */
.boss { background: radial-gradient(ellipse at 72% 60%, #6d2a1c 0%, #2c1420 44%, var(--page) 78%); padding-block: 40px; }
.boss-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; }
.boss-in img { width: 100%; max-width: 620px; margin-inline: auto; filter: drop-shadow(0 0 40px rgba(255, 110, 60, .45)); }
.boss h2 { font-size: clamp(34px, 5vw, 58px); font-weight: 900; color: #ffd9c4; text-shadow: 0 0 26px rgba(255, 90, 60, .5); }
.boss .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-block: 18px; }
.boss .facts b { display: block; font: 900 26px/1.2 var(--serif); color: var(--r4); }
.boss .facts span { font-size: 13px; color: var(--mute); }

/* 圖鑑入口 */
.codex-links { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.codex-links a { display: grid; gap: 2px; padding: 18px 16px; background: var(--slate); border: 1px solid #262c3d; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.codex-links a:hover { border-color: var(--gold); transform: translateY(-2px); }
.codex-links b { font: 900 34px/1.1 var(--serif); color: var(--gold); }
.codex-links span { font: 700 16px var(--serif); }
.codex-links small { color: var(--mute); font-size: 13px; line-height: 1.5; }

/* 特色 */
.feat { display: grid; gap: 54px; }
.feat article { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 34px; align-items: center; }
.feat article:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.feat article:nth-child(even) .pic { order: 2; }
.feat .pic { padding: 6px; }
.feat .pic img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feat h3 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; color: var(--gold-hi); margin-bottom: 10px; }
.feat p { color: #d4cdbd; }

.spec { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 14px; }
.spec dt { color: var(--mute); padding: 9px 0; border-bottom: 1px solid #222838; }
.spec dd { margin: 0; padding: 9px 0; border-bottom: 1px solid #222838; }

/* 收尾號召 */
.cta { text-align: center; padding-block: 64px; }
.cta h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 900; color: var(--gold-hi); margin-bottom: 8px; }
.cta .acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; }

/* 圖鑑分頁列 */
.subnav { background: var(--stone-2); border-bottom: 1px solid var(--bronze-lo); position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 30; }
.subnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav a { padding: 11px 14px; color: var(--mute); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; font-size: 15px; }
.subnav a:hover { color: var(--text); }
.subnav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

/* 篩選 */
.filters { display: grid; gap: 10px; margin-bottom: 24px; }
.f-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.f-row > span { min-width: 3.4em; color: var(--mute); font-size: 14px; }
.chip { min-height: 36px; padding: 5px 13px; background: var(--slate); border: 1px solid #2a3144; color: var(--text); cursor: pointer; font-size: 14px; }
.chip:hover { border-color: var(--bronze); }
.chip[aria-pressed="true"] { border-color: var(--gold); background: #3a2d14; color: var(--gold-hi); }
.chip.r0[aria-pressed="true"] { color: var(--r0); border-color: var(--r0); background: #2a2a2a; }
.chip.r1[aria-pressed="true"] { color: var(--r1); border-color: var(--r1); background: #17301a; }
.chip.r2[aria-pressed="true"] { color: var(--r2); border-color: var(--r2); background: #14263a; }
.chip.r3[aria-pressed="true"] { color: var(--r3); border-color: var(--r3); background: #2c1a3a; }
.chip.r4[aria-pressed="true"] { color: var(--r4); border-color: var(--r4); background: #3a2a12; }
.search { flex: 1 1 200px; max-width: 280px; min-height: 36px; padding: 5px 11px; background: #0d1018; border: 1px solid #2a3144; color: var(--text); font: inherit; font-size: 14px; }
.count { margin-left: auto; color: var(--mute); font-size: 14px; }

/* 怪物卡 */
.mob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.mob-card { --z: var(--gold); position: relative; display: grid; gap: 2px; padding: 8px 12px 12px; width: 100%; text-align: left; cursor: pointer; background: radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--z) 22%, transparent), transparent 62%), #121622; border: 1px solid #262c3d; transition: border-color .15s; }
.mob-card:hover { border-color: var(--z); }
.mob-card b { font: 700 17px/1.3 var(--serif); color: var(--text); }
.mob-card span.m { font-size: 13px; color: var(--mute); line-height: 1.45; }
.mob-card .flag { position: absolute; top: 8px; right: 8px; padding: 0 6px; font-size: 12px; line-height: 20px; color: #120d08; background: var(--gold); }
.mob-card.boss .flag { background: var(--r5); color: #fff; }
.mob-card.elite { border-color: var(--bronze); }
.mob-card.boss { grid-column: 1 / -1; grid-template-columns: 210px minmax(0, 1fr); column-gap: 18px; align-items: center; border-color: var(--r5); background: radial-gradient(ellipse at 14% 50%, #6d2a1c, transparent 60%), #151019; }
.mob-card.boss .mob-box { grid-row: 1 / span 3; }
.mob-card.boss b { font-size: 28px; font-weight: 900; color: #ffd9c4; align-self: end; }
.mob-card.boss span.m { font-size: 15px; }
.mob-card.boss .say { color: #e9dccb; font-size: 15px; line-height: 1.6; align-self: start; }
.mob-box { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; }
.mob { position: absolute; inset: 0; background-repeat: no-repeat; background-size: 900% 100%; background-position: 0 0; transform: translate(var(--tx, 0), var(--ty, 0)) scale(var(--s, 1)); }
.mob-card:hover .mob, .mob.idle { animation: mob-idle .8s steps(2) infinite; }
.mob.walk { animation: mob-walk .7s steps(4) infinite; }
.mob.atk { animation: mob-atk .75s steps(3) infinite; }
@keyframes mob-idle { from { background-position-x: 0; } to { background-position-x: 25%; } }
@keyframes mob-walk { from { background-position-x: 25%; } to { background-position-x: 75%; } }
@keyframes mob-atk { from { background-position-x: 75%; } to { background-position-x: 112.5%; } }

/* 對話框 */
dialog { padding: 0; border: 0; background: none; color: var(--text); max-width: min(880px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgba(5, 7, 12, .78); }
.dlg { padding: 22px; max-height: calc(100dvh - 24px); overflow-y: auto; }
.dlg-x { position: absolute; top: 12px; right: 14px; z-index: 2; width: 40px; height: 40px; background: #0d0a07; border: 1px solid var(--bronze-lo); color: var(--gold); cursor: pointer; font-size: 18px; line-height: 1; }
.dlg-x:hover { border-color: var(--gold); }
.mob-dlg { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; }
.mob-dlg .side { display: grid; gap: 10px; align-content: start; }
.mob-dlg .mob-box { background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--z, #888) 26%, transparent), transparent 66%), #0e111b; border: 1px solid #262c3d; }
.mob-dlg h3 { font-size: 26px; font-weight: 900; color: var(--gold-hi); padding-right: 44px; }
.anim-row { display: flex; gap: 6px; }
.anim-row .chip { flex: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-block: 12px; }
.stat-grid div { padding: 7px 10px; background: var(--ink); border: 1px solid #2c261e; }
.stat-grid span { display: block; font-size: 12px; color: var(--mute); }
.stat-grid b { font-size: 19px; font-variant-numeric: tabular-nums; }
.lines { display: grid; gap: 4px; margin-bottom: 12px; }
.lines li { padding-left: 14px; position: relative; font-size: 15px; }
.lines li::before { content: ""; position: absolute; left: 1px; top: .72em; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.dlg h4 { font-size: 16px; color: var(--gold); margin: 12px 0 6px; }
.drops { display: grid; gap: 4px; }
.drops li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 5px 0; border-bottom: 1px solid #2a241c; font-size: 15px; }
.drops i { font-style: normal; color: var(--mute); font-size: 13px; }
.shot-dlg { max-width: min(1500px, calc(100vw - 24px)); }
.shot-dlg .dlg { padding: 8px; }
.shot-dlg img { width: 100%; }
.shot-dlg p { padding: 8px 6px 2px; color: var(--mute); font-size: 14px; }

/* 裝備 */
.ico { width: 60px; height: 60px; flex: none; background-repeat: no-repeat; background-size: 1200% 900%; background-position: calc(var(--c) / 11 * 100%) calc(var(--r) / 8 * 100%); background-color: #0b0a08; border: 1px solid #3a3226; }
.s-warrior { background-image: url(img/icons/warrior.webp); }
.s-mage { background-image: url(img/icons/mage.webp); }
.s-ranger { background-image: url(img/icons/ranger.webp); }
.s-assassin { background-image: url(img/icons/assassin.webp); }
.tier-head { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--bronze-lo); }
.tier-head h3 { font-size: 19px; color: var(--gold); }
.tier-head span { font-size: 13px; color: var(--mute); }
.gear-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gear { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 12px; padding: 10px; background: #121622; border: 1px solid #262c3d; align-items: center; }
.gear b { display: block; font: 700 16px/1.35 var(--serif); }
.gear .info { font-size: 13px; line-height: 1.55; color: var(--mute); }
.gear .stat { color: var(--text); }
.c-r0 { color: var(--r0); } .c-r1 { color: var(--r1); } .c-r2 { color: var(--r2); } .c-r3 { color: var(--r3); } .c-r4 { color: var(--r4); } .c-r5 { color: var(--r5); }
.b-r1 { border-color: var(--r1) !important; box-shadow: 0 0 10px color-mix(in srgb, var(--r1) 45%, transparent); }
.b-r2 { border-color: var(--r2) !important; box-shadow: 0 0 10px color-mix(in srgb, var(--r2) 45%, transparent); }
.b-r3 { border-color: var(--r3) !important; box-shadow: 0 0 12px color-mix(in srgb, var(--r3) 50%, transparent); }
.b-r4 { border-color: var(--r4) !important; box-shadow: 0 0 12px color-mix(in srgb, var(--r4) 50%, transparent); }
.b-r5 { border-color: var(--r5) !important; box-shadow: 0 0 14px color-mix(in srgb, var(--r5) 55%, transparent); }
.rar-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.rar { padding: 12px; background: #121622; border-top: 2px solid currentColor; }
.rar b { display: block; font: 700 18px var(--serif); }
.rar span { color: var(--mute); font-size: 13px; line-height: 1.5; display: block; }

/* 道具說明框:和遊戲裡的一樣 */
.tip { padding: 13px 15px; background: rgba(14, 12, 9, .96); border: 1px solid var(--bronze); box-shadow: 0 0 0 1px #000; font-size: 14px; line-height: 1.6; }
.tip h4 { margin: 0 0 3px; font-size: 17px; }
.tip p + p { margin-top: 4px; }
.tip .aff { color: #8fe08f; }
.tip .aff + .aff { margin-top: 1px; }   /* 詞條一條一行,行距收緊 */
.tip .set { color: var(--gold); }
.tip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.set-card h3 { font-size: 20px; color: var(--gold); margin-bottom: 4px; }
.set-card { padding: 16px 18px; }
.set-card dl { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 2px 8px; margin: 8px 0 0; font-size: 15px; }
.set-card dt { color: var(--mute); }
.set-card dd { margin: 0; }
.set-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
/* 2026-11-04 套裝的掉落出處:一行一張地圖,怪物名字可以點到怪物圖鑑 */
.set-h { margin: 12px 0 4px; font-size: 14px; color: var(--mute); font-weight: 600; }
.set-from { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.set-from li { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 6px; }
.set-from b { color: var(--gold); font-weight: 600; }
.set-from a, .set-also a, .zone-sets a { color: var(--text); }
.set-from a:hover, .zone-sets a:hover { color: var(--gold-hi); }
.set-also { margin: 6px 0 0; font-size: 13px; color: var(--mute); }
.jewel-from { padding: 14px 18px; margin-bottom: 10px; }
.jewel-from .set-h { margin-top: 0; }
.jewel-from .set-from { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.zone-sets { margin: 0; font-size: 13px; color: var(--mute); }
.drop-note { display: block; font-size: 12px; color: var(--mute); }

/* 表格 */
.tbl-box { overflow-x: auto; border: 1px solid #262c3d; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #1f2433; white-space: nowrap; }
.tbl th { background: var(--stone-2); color: var(--gold); font: 700 14px var(--serif); position: sticky; top: 0; }
.tbl td.wrap-ok { white-space: normal; min-width: 240px; }
.tbl tbody tr:hover { background: #151a29; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .icon-cell { display: flex; align-items: center; gap: 10px; }
.tbl .icon-cell img { width: 34px; height: 34px; }
.bar { position: relative; display: inline-block; width: 110px; height: 8px; background: #0a0806; border: 1px solid #3a3226; vertical-align: 1px; margin-right: 8px; }
.bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--bronze), var(--gold)); }

/* 模擬器 */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 20px; }
.sim label { display: grid; gap: 4px; font-size: 14px; color: var(--mute); }
.sim select { min-height: 38px; padding: 5px 8px; background: #0d1018; border: 1px solid #2a3144; color: var(--text); font: inherit; }
.sim-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.sim-form .btn { grid-column: 1 / -1; }
.sim-out { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; }
.sim-out .ico { width: 72px; height: 72px; }

/* 職業頁 */
.cls-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 18px; }
.cls-tabs a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--slate); border: 1px solid #262c3d; color: var(--text); text-decoration: none; font: 700 18px var(--serif); }
.cls-tabs a img { width: 44px; height: 44px; border-radius: 50%; background: #0c0f16; }
.cls-tabs a[aria-selected="true"] { border-color: var(--gold); color: var(--gold); background: linear-gradient(#2c2416, var(--slate)); }
.cls-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 30px; padding: 24px; }
.cls-art { position: relative; display: grid; gap: 10px; align-content: start; min-width: 0; }
.cls-pic { position: relative; width: 100%; aspect-ratio: 1; background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--c) 46%, transparent), transparent 66%), #0e111b; border: 1px solid #262c3d; }
.cls-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cls-info { min-width: 0; }
.cls-info h2 { font-size: 38px; font-weight: 900; color: var(--gold-hi); }
.cls-info .role { color: var(--c); font-weight: 700; }
.cls-info > p { margin-block: 8px 12px; color: #d4cdbd; }
.skill { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid #2a241c; }
.skill img { width: 52px; height: 52px; border: 1px solid #3a3226; }
.skill b { font: 700 17px var(--serif); }
.skill small { color: var(--mute); margin-left: 8px; }
.skill p { font-size: 14px; color: #d4cdbd; line-height: 1.55; }
.stat-bars { display: grid; gap: 4px; }
.stat-bars li { display: grid; grid-template-columns: 44px minmax(0, 1fr) 26px; gap: 8px; align-items: center; font-size: 14px; }
.stat-bars .bar { width: 100%; margin: 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }

/* 故事 */
.story { display: grid; gap: 0; position: relative; }
.story li { position: relative; display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 20px; padding: 14px 0 14px 28px; }
.story::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--gold), var(--bronze-lo), var(--r5)); }
.story li::before { content: ""; position: absolute; left: 1px; top: 23px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--z, var(--gold)); border: 1px solid #000; }
.story b { font: 700 18px/1.4 var(--serif); color: var(--gold-hi); }
.story small { display: block; color: var(--mute); }

/* NPC */
.npc-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
/* 2026-11-04 卡片頁:和遊戲裡的卡冊同一種卡,外框是等級的顏色,裡面是地圖的顏色 */
.card-group-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.card-group-h .sub-h { margin: 0; }
.card-group-h .sub-h small { margin-left: 8px; font-size: 14px; color: var(--mute); }
.card-group-h p { margin: 0; color: var(--mute); }
.card-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; max-width: 760px; }
.cardw { position: relative; display: flex; flex-direction: column; align-items: center; aspect-ratio: 3 / 4; padding: 6px; border-radius: 10px; background: linear-gradient(#4aa3ff, #1a1a22); box-shadow: 0 0 0 1px #000, 0 4px 10px rgba(0, 0, 0, .45); color: #fff3d0; text-decoration: none; transition: transform .15s; }
.cardw:hover { transform: translateY(-3px); }
.cardw.r3 { background: linear-gradient(#c56bff, #1a1a22); }
.cardw.r4 { background: linear-gradient(#ffb13b, #1a1a22); }
.cardw::before { content: ''; position: absolute; inset: 6px; border-radius: 6px; background: var(--tint, linear-gradient(#8fd068, #24461a)); }
.cardw.g-forest { --tint: linear-gradient(#5a9a62, #0e2416); }
.cardw.g-desert { --tint: linear-gradient(#e8c47e, #5a3812); }
.cardw.g-snow { --tint: linear-gradient(#c4e2f6, #28486a); }
.cardw.g-lava { --tint: linear-gradient(#f08a5a, #4a1008); }
.cardw.g-boss { --tint: linear-gradient(#ffd878, #5a2c04); }
.cardw img { position: relative; width: 100%; height: auto; margin-top: 6%; }
.cardw b { position: relative; margin-top: auto; padding: 1px 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px; background: rgba(10, 8, 6, .72); font: 700 14px var(--sans); }
.cardw small { position: relative; margin-top: 3px; font-size: 12px; color: #fff3d0; text-shadow: 0 1px 2px #000; }
.npc-line { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.npc-line img { flex: none; width: 96px; height: 96px; border-radius: 8px; background: #141822; }
.npc-line .sub-h { margin-bottom: 4px; }
@media (max-width: 560px) {
  .card-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cardw b { font-size: 12px; }
}
.npc { display: grid; gap: 6px; align-content: start; padding: 12px; background: #121622; border: 1px solid #262c3d; }
.npc img { width: 100%; aspect-ratio: 1; object-fit: cover; background: radial-gradient(circle at 50% 40%, #33405e, #141824 72%); }
.npc b { font: 700 16px/1.3 var(--serif); color: var(--gold); }
.npc small { color: var(--mute); }
.npc p { font-size: 13px; line-height: 1.55; color: #d4cdbd; }

.zone-cards { display: grid; gap: 12px; }
.zone-card { --z: var(--gold); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; background: #121622; border: 1px solid #262c3d; border-left: 3px solid var(--z); }
.zone-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.zone-card .t { padding: 18px 22px; display: grid; gap: 8px; align-content: center; min-width: 0; }
.zone-card h3 { font-size: 24px; font-weight: 900; color: var(--gold-hi); }
.zone-card h3 small { font: 400 14px var(--sans); color: var(--mute); margin-left: 8px; }
.mini-mobs { display: flex; flex-wrap: wrap; gap: 4px; }
.mini-mobs a { padding: 1px 8px; font-size: 13px; color: var(--text); text-decoration: none; border: 1px solid #2a3144; background: #0e111b; }
.mini-mobs a:hover { border-color: var(--z); color: var(--gold-hi); }

/* 消息 */
.news { display: grid; gap: 0; }
.news article { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid #1f2433; }
.news time { color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 3px; }
.news h2 { font-size: 20px; color: var(--gold-hi); margin-bottom: 4px; }
.news p { color: #d4cdbd; }

/* 指南 */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; padding: 16px; background: #121622; border: 1px solid #262c3d; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 8px; font: 900 15px var(--serif); color: #120d08; background: var(--gold); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.steps b { display: block; font: 700 17px var(--serif); color: var(--gold-hi); margin-bottom: 3px; }
.steps p { font-size: 14px; color: #d4cdbd; line-height: 1.6; }
.kbd { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 22px; }
.kbd li { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid #1f2433; font-size: 15px; }
kbd { display: inline-block; min-width: 26px; padding: 1px 6px; text-align: center; font: 700 13px/20px var(--sans); color: var(--gold-hi); background: linear-gradient(#2f2a22, #17130e); border: 1px solid var(--bronze-lo); border-bottom-width: 2px; margin-right: 3px; }
.tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tips div { padding: 14px 16px; background: #121622; border: 1px solid #262c3d; }
.tips b { display: block; font: 700 16px var(--serif); color: var(--gold); margin-bottom: 3px; }
.tips p { font-size: 14px; color: #d4cdbd; line-height: 1.65; }

/* 常見問題 */
.faq details { border-bottom: 1px solid #222838; }
.faq summary { padding: 14px 34px 14px 2px; cursor: pointer; font: 700 17px/1.5 var(--serif); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font: 400 22px var(--sans); color: var(--gold); }
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { color: var(--gold); }
.faq p { padding: 0 2px 16px; color: #d4cdbd; }

/* 頁尾 */
.foot { background: var(--stone-2); border-top: 1px solid var(--bronze); padding-block: 36px; }
.foot-in { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 26px; }
.foot h4 { font: 700 15px var(--serif); color: var(--gold); margin-bottom: 8px; }
.foot a { display: block; padding: 2px 0; color: var(--mute); text-decoration: none; font-size: 14px; }
.foot a:hover { color: var(--text); }
.foot p { font-size: 13px; color: var(--mute); line-height: 1.7; }
.foot .brand { margin-bottom: 8px; }
.copy { margin-top: 26px; padding-top: 14px; border-top: 1px solid #2c261e; font-size: 13px; color: var(--mute); }

@media (max-width: 1160px) {
  .nav, .top .btn { display: none; }
  .burger { display: block; }
  .npc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .codex-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rar-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .band { padding-block: 52px; }
  .hero { min-height: 0; }
  .hero-in { padding-block: 34px 0; justify-items: center; text-align: center; }
  .hero .acts { justify-content: center; }
  .stage { position: relative; width: 100%; max-width: 620px; height: 340px; margin: 6px auto 0; }
  .ground { height: 90px; }
  .show, .world, .boss-in, .cls-panel, .cols-2, .sim, .zone-card, .feat article, .feat article:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .feat article:nth-child(even) .pic { order: 0; }
  .show-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice-in { grid-template-columns: minmax(0, 1fr); padding-left: var(--gutter-l); }
  .notice a { border-right: 0; margin-right: 0; border-bottom: 1px solid #2c261e; }
  .notice a:last-child { border-bottom: 0; }
  .class-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-tile { min-height: 340px; }
  .steps, .tips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .npc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mob-dlg { grid-template-columns: minmax(0, 1fr); }
  .mob-dlg .mob-box { max-width: 240px; margin-inline: auto; width: 100%; }
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-in > :first-child { grid-column: 1 / -1; }
  .pin { font-size: 12px; padding: 2px 6px; }
  .pin small { display: none; }
}
@media (max-width: 560px) {
  .gear-grid, .steps, .tips, .codex-links { grid-template-columns: minmax(0, 1fr); }
  .codex-links a { grid-template-columns: 70px minmax(0, 1fr); column-gap: 10px; align-items: baseline; }
  .codex-links small { grid-column: 2; }
  .npc-grid, .cls-tabs, .show-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-grid, .jewel-from .set-from { grid-template-columns: minmax(0, 1fr); }
  .rar-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .news article { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sim-form { grid-template-columns: minmax(0, 1fr); }
  .boss .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .boss .facts b { font-size: 20px; }
  .zone-list li { grid-template-columns: 84px minmax(0, 1fr); }
  .zone-list i { grid-column: 2; }
  .mob-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mob-card.boss { grid-template-columns: 120px minmax(0, 1fr); column-gap: 10px; }
  .mob-card.boss b { font-size: 21px; }
  .mob-card.boss .say { display: none; }
  .count { margin-left: 0; }
  .sec-head.row { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
