/* 神之領域 玩家資料站：全站樣式
   版面與配色照使用者給的參考網站（橫幅＋橫式下拉選單＋職業卡片＋天空藍底＋米色內容框＋深紅標題＋金色站名）；圖是自己畫的。
   不用外部字型、不連外。 */
:root {
  --sky: #e5f5fe;
  --panel: #fffae8;
  --drop: #fff8e0;
  --text: #241b14;
  --nav-text: #1a1a2e;
  --muted: #6d5c49;
  --edge: rgba(104, 75, 42, .26);
  --line: #dccba6;
  --red: #8b0000;
  --deep: #6f1010;
  --gold: #f0d080;
  --link: #174f93;
  --link-visited: #6b3f86;
  --th-bg: #f3e2b8;
  --row-alt: #fdf4dc;
  --row-hover: #fbe9c6;
  --nav-h: 64px;
  --serif: "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "Songti TC", "Yu Mincho", "Batang", "PMingLiU", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Microsoft JhengHei", "Microsoft YaHei", "Yu Gothic UI", "Meiryo", "Malgun Gothic", "Noto Sans CJK TC", sans-serif;
  color-scheme: light;
}
html:lang(ja) { --serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif CJK JP", serif; --sans: "Yu Gothic UI", "Hiragino Sans", "Meiryo", sans-serif; }
html:lang(ko) { --serif: "Noto Serif KR", "Nanum Myeongjo", "Batang", "AppleMyungjo", serif; --sans: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
html:lang(zh-CN) { --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif; --sans: "Microsoft YaHei", "PingFang SC", sans-serif; }
html:lang(en) { --serif: Georgia, "Times New Roman", serif; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; color: var(--text); background: var(--sky) url(sky.svg) center / cover no-repeat fixed;
  font: 15px/1.75 var(--sans); overflow-x: clip;
}
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--red); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---- 橫幅 ---- */
.hero { position: relative; background: #6bb4f0 url(hero.webp) center bottom / cover no-repeat; }
.hero-home { min-height: clamp(340px, 46vw, 640px); display: flex; align-items: center; }
.hero-page { height: clamp(96px, 14vw, 210px); background-position: center 21%; }
.hero-text { box-sizing: border-box; padding: 24px 1.5vw 24px 5.8vw; max-width: 39vw; position: relative; }
.hero-title {
  margin: 0; font: 900 clamp(40px, 6.4vw, 100px)/1.15 var(--serif); letter-spacing: .06em; color: var(--gold);
  text-shadow: 0 0 2px #5a3a08, 2px 3px 0 rgba(58, 36, 6, .75), 0 0 28px rgba(255, 240, 190, .55);
}
:lang(en) .hero-title { letter-spacing: .02em; }
.hero-tag { margin: 10px 0 22px; font: 700 clamp(17px, 2vw, 30px)/1.5 var(--serif); color: #fff; text-shadow: 0 1px 4px rgba(10, 40, 90, .85), 0 0 14px rgba(10, 40, 90, .55); }
.pills { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; }
.pill, .pill:visited {
  display: inline-block; padding: 11px 30px; border-radius: 999px; border: 2px solid #d9b65c;
  background: linear-gradient(#f7fbff, #cfe4fa); box-shadow: 0 0 0 4px rgba(255, 255, 255, .55), 0 6px 16px rgba(20, 60, 120, .28);
  color: #1d4e92; font: 700 clamp(15px, 1.25vw, 19px)/1.3 var(--serif);
}
.pill:hover { color: var(--red); background: linear-gradient(#fff, #e2f0ff); text-decoration: none; }

/* ---- 橫式選單 ---- */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: clamp(10px, 2vw, 34px);
  min-height: var(--nav-h); padding: 0 clamp(14px, 3.2vw, 56px);
  background: rgba(216, 238, 252, .96); border-bottom: 1px solid rgba(240, 208, 128, .95); box-shadow: 0 4px 14px rgba(40, 80, 130, .16);
}
.brand, .brand:visited {
  flex: none; font: 900 clamp(19px, 1.7vw, 28px)/1.2 var(--serif); letter-spacing: .1em; color: var(--gold); white-space: nowrap;
  text-shadow: 0 0 1px #5a3a08, 1px 1px 0 #5a3a08, 1px 2px 3px rgba(58, 36, 6, .7);
}
:lang(en) .brand, :lang(ko) .brand { letter-spacing: .02em; }
.brand:hover { color: #ffe6a6; text-decoration: none; }
.links { display: flex; align-items: center; gap: clamp(8px, 1.5vw, 28px); }
.links > a, .links > a:visited, .dd > summary {
  padding: 8px 2px; font: 700 clamp(15px, 1.12vw, 19px)/1.3 var(--serif); color: var(--nav-text); white-space: nowrap; cursor: pointer; list-style: none;
}
.dd > summary::-webkit-details-marker { display: none; }
.links > a:hover, .links > a.cur, .dd > summary:hover, .dd[open] > summary, .dd.cur > summary {
  color: var(--red); text-shadow: 0 0 10px rgba(240, 208, 128, .7); text-decoration: none;
}
.dd { position: relative; }
.dd > div, .lang ul, .qres {
  border: 1px solid var(--edge); border-radius: 8px; background: var(--drop); box-shadow: 0 18px 38px rgba(44, 35, 24, .22);
}
.dd > div { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); min-width: 210px; max-height: 66vh; overflow-y: auto; padding: 10px; }
.dd > div a, .dd > div a:visited { display: block; padding: 8px 12px; border-radius: 6px; color: #2a2118; font: 600 15px/1.35 var(--serif); text-align: center; }
.dd > div a:hover, .dd > div a.cur { background: rgba(139, 0, 0, .1); color: var(--red); text-decoration: none; }
.tools { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 1 340px; min-width: 0; justify-content: flex-end; }
.search { position: relative; flex: 1 1 130px; min-width: 0; max-width: 230px; }
.search input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid rgba(104, 75, 42, .35); border-radius: 999px; background: rgba(255, 255, 255, .8); color: var(--text); font: 14px var(--sans); }
.qres { position: absolute; right: 0; top: 44px; width: min(440px, 92vw); max-height: 70vh; overflow: auto; margin: 0; padding: 6px; list-style: none; }
.qres li a { display: block; padding: 6px 12px; border-radius: 6px; color: var(--text); }
.qres li a:hover, .qres li a.sel { background: rgba(139, 0, 0, .1); text-decoration: none; }
.qres small { display: block; color: var(--muted); font-size: 12px; }
.qres .none { padding: 8px 12px; color: var(--muted); }
.lang { position: relative; flex: none; }
.lang summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid #d9b65c; border-radius: 999px; background: rgba(255, 250, 232, .9); color: var(--nav-text); font: 700 14px/1.4 var(--sans); white-space: nowrap; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " \25BE"; }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; margin: 0; padding: 8px; list-style: none; }
.lang li a, .lang li a:visited { display: block; padding: 7px 14px; border-radius: 6px; color: #2a2118; text-align: center; }
.lang li a:hover { background: rgba(139, 0, 0, .1); color: var(--red); text-decoration: none; }
.lang li a[aria-current] { font-weight: 700; color: var(--red); }
.menu-btn { display: none; flex: none; width: 40px; height: 40px; padding: 9px 8px; border: 1px solid #d9b65c; border-radius: 8px; background: rgba(255, 250, 232, .9); cursor: pointer; }
.menu-btn span { display: block; height: 2px; margin: 4px 0; background: var(--nav-text); }

/* ---- 內容框 ---- */
main { width: min(94%, 1360px, 100vw - 2 * var(--side)); margin: clamp(18px, 2.6vw, 40px) auto 24px; }
.content {
  position: relative; padding: clamp(20px, 2.8vw, 46px); border: 1px solid var(--edge); border-radius: 10px;
  background: rgba(255, 250, 232, .95); box-shadow: 0 0 0 5px rgba(255, 255, 255, .6), 0 0 0 6px #e3cd92, 0 18px 42px rgba(44, 35, 24, .18); overflow-wrap: anywhere;
}
.pending { margin: 0 0 14px; padding: 8px 14px; border: 1px solid #d9b65c; border-radius: 8px; background: #fff3cc; font-size: 14px; }
.content h1 { margin: 0 0 16px; font: 900 clamp(27px, 2.6vw, 42px)/1.3 var(--serif); color: var(--deep); text-wrap: balance; }
.content h2 { margin: 34px 0 12px; padding-bottom: 5px; font: 700 clamp(20px, 1.7vw, 27px)/1.4 var(--serif); color: var(--red); border-bottom: 1px solid #e0c078; }
.content h3 { margin: 24px 0 8px; font: 700 18px/1.4 var(--serif); color: var(--deep); }
.content h4, .content h5, .content h6 { margin: 18px 0 6px; font: 700 15.5px/1.4 var(--serif); }
.content [id] { scroll-margin-top: calc(var(--nav-h) + 14px); }
.anchor { margin-left: 6px; color: var(--muted); font-weight: 400; font-size: .75em; opacity: 0; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor { opacity: 1; }
.content p { margin: 8px 0; }
.content ul, .content ol { margin: 8px 0; padding-left: 1.6em; }
.content li { margin: 3px 0; }
blockquote { margin: 12px 0; padding: 8px 16px; border: 1px solid rgba(111, 16, 16, .16); border-radius: 8px; background: rgba(255, 255, 255, .5); color: var(--muted); }
blockquote p { margin: 4px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code { padding: 1px 4px; border-radius: 4px; background: rgba(255, 255, 255, .6); font-size: .92em; }
.tbl { max-width: 100%; overflow-x: auto; margin: 12px 0 18px; -webkit-overflow-scrolling: touch; border-radius: 6px; }
table { border-collapse: collapse; font-size: 14px; line-height: 1.6; background: rgba(255, 255, 255, .45); }
th, td { padding: 6px 10px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
th { background: var(--th-bg); color: var(--deep); font-weight: 700; white-space: nowrap; }
td.center, th.center { text-align: center; }
td.right, th.right { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:nth-child(even) td { background: var(--row-alt); }
tbody tr:hover td { background: var(--row-hover); }
.sitemap li { margin: 4px 0; }
.sitemap ul { columns: 2 260px; margin: 2px 0 8px; font-size: 14px; }
.muted { color: var(--muted); }

/* ---- 首頁 ---- */
.sec-title { margin: clamp(26px, 3.6vw, 56px) 0 clamp(14px, 1.8vw, 26px); text-align: center; font: 900 clamp(24px, 2.6vw, 40px)/1.3 var(--serif); color: var(--deep); }
.jobs { overflow: visible; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.job { flex: 0 0 calc((min(100%, 1120px) - 4 * 16px) / 5); }
.job, .job:visited {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 14px; min-height: clamp(190px, 21vw, 300px);
  padding: 12px 8px 16px; border: 2px solid #e6c980; border-radius: 12px 12px 30px 30px; color: #fff; text-align: center;
  background: linear-gradient(170deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .16), 0 10px 22px rgba(30, 50, 90, .24);
}
.job:hover { color: #fff; text-decoration: none; filter: brightness(1.12); }
.job { justify-content: flex-end; }
.job, .job:visited { background: radial-gradient(circle at 50% 42%, rgba(255, 250, 220, .6), rgba(255, 250, 220, .14) 46%, transparent 66%), linear-gradient(170deg, var(--c1), var(--c2)); }
.job img { position: relative; z-index: 1; flex: none; width: 176%; max-width: 400px; height: auto; margin: auto 0; transition: transform .18s; }
.job:hover img { transform: translateY(-5px) scale(1.06); }
.job b { position: relative; z-index: 1; }
.job b { font: 700 clamp(15px, 1.35vw, 21px)/1.3 var(--serif); text-shadow: 0 1px 3px rgba(0, 0, 0, .55); overflow-wrap: anywhere; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 28px); }
.card { padding: clamp(16px, 1.6vw, 26px); border: 1px solid rgba(111, 16, 16, .2); border-radius: 10px; background: rgba(255, 250, 232, .93); box-shadow: 0 8px 20px rgba(44, 35, 24, .1); }
.card h2 { margin: 0 0 8px; font: 700 clamp(19px, 1.6vw, 26px)/1.35 var(--serif); color: var(--red); }
.card h2 a, .card h2 a:visited { color: inherit; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li a, .card li a:visited { display: block; padding: 4px 0; color: var(--text); font-weight: 600; }
.card li a:hover { color: var(--red); }
.bottom { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: clamp(26px, 3.4vw, 50px) 0 10px; }
.foot { width: min(94%, 1360px); margin: 0 auto; padding: 8px 4px 32px; color: #4b5b6c; font-size: 12.5px; text-align: center; }
.root-pick main { max-width: 560px; margin-top: 60px; }
.pick { list-style: none; padding: 0 !important; font-size: 18px; }

@media (max-width: 1180px) {
  .menu-btn { display: block; order: -1; }
  .links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 18px 18px; background: var(--drop); border-bottom: 1px solid #d9b65c; box-shadow: 0 18px 38px rgba(44, 35, 24, .22);
  }
  body.menu-open .links { display: flex; }
  .links > a, .dd > summary { display: block; padding: 11px 4px !important; font-size: 17px !important; border-bottom: 1px solid rgba(104, 75, 42, .15); }
  .dd > div { position: static; transform: none; max-height: none; border: 0; box-shadow: none; background: transparent; padding: 4px 0 8px; }
  .dd > div a, .dd > div a:visited { text-align: left; }
}
@media (max-width: 860px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jobs { gap: 12px; } .job { flex-basis: calc((100% - 2 * 12px) / 3); } }
@media (max-width: 560px) {
  :root { --nav-h: 56px; }
  .top { gap: 8px; padding: 0 12px; }
  .brand { font-size: 17px !important; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto !important; letter-spacing: .03em; }
  .tools { flex: none; }
  .search { display: none; }
  body.menu-open .search { display: block; position: fixed; left: 12px; right: 12px; bottom: 14px; max-width: none; z-index: 40; }
  body.menu-open .qres { top: auto; bottom: 44px; }
  .cards { grid-template-columns: 1fr; }
  .content { padding: 18px 14px 24px; }
  .lang summary { padding: 6px 10px; font-size: 13px; }
}
@media print { .top, .hero, .foot { display: none; } .content { border: 0; box-shadow: none; } }
@media (max-width: 1000px) {
  .hero-text { max-width: none; padding: 24px 5.8vw; }
  .hero-home::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 32, 78, .72), rgba(6, 32, 78, .28)); }
}

/* ---- 左右兩側：地龍、火龍（跟著捲動，慢慢回到畫面中間） ---- */
:root { --side: 0px; }
.side { display: none; }
@media (min-width: 1280px) {
  :root { --side: clamp(120px, (100vw - 1040px) / 2, 300px); }
  .side { display: block; position: fixed; top: 0; bottom: 0; width: calc(var(--side) + 24px); overflow: hidden; z-index: 0; pointer-events: none; }
  .side-l { left: 0; } .side-r { right: 0; }
  .side img { position: absolute; top: 0; height: auto; filter: drop-shadow(0 12px 16px rgba(20, 50, 100, .35)); will-change: transform; }
  .side-l img { right: 32px; width: min(calc(var(--side) * 2.1), 620px); max-width: none; }
  .side-r img { left: 32px; width: min(calc(var(--side) * 1.65), 480px); max-width: none; }
  .hero, .top, main, .foot { position: relative; z-index: 1; }
  .top { position: sticky; z-index: 30; }
}
@media print { .side { display: none; } }
@media (max-width: 860px) { main { overflow-x: clip; overflow-clip-margin: 10px; padding: 0 1px; } .job img { width: 164%; } }

/* ---- 合併角色申請 ---- */
.merge-form { max-width: 560px; margin: 18px 0; }
.merge-form fieldset { margin: 0 0 16px; padding: 12px 18px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf5; }
.merge-form legend { padding: 0 8px; font: 700 17px/1.4 var(--serif); color: var(--red); }
.merge-form label { display: block; margin-top: 8px; font-weight: 700; }
.merge-form input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid #b99f6c; border-radius: 8px; background: #fff; color: var(--text); font: 16px/1.4 var(--sans); }
.merge-form button { margin-top: 14px; cursor: pointer; }
.merge-form button:disabled { opacity: .55; cursor: default; }
.merge-msg { min-height: 1.8em; margin: 14px 0 0; font-weight: 700; }
.merge-msg.good { color: #1c6b2f; }
.merge-msg.bad { color: #b00020; }
@media (min-width: 1181px) and (max-width: 1500px) { :lang(en) .links, :lang(ja) .links { gap: 10px; } :lang(en) .links > a, :lang(ja) .links > a, :lang(en) .dd > summary, :lang(ja) .dd > summary { font-size: 14px !important; } }
