:root {
  --bg: #0f0d0a;
  --panel: #1a1611;
  --panel2: #221d16;
  --line: #3a3024;
  --gold: #e8c26b;
  --gold-dim: #b18f45;
  --text: #e9e3d6;
  --muted: #9b917f;
  --ok: #4ecb5a;
  --warn: #ffd200;
  --bad: #ff5050;
  --alliance: #4a8fe7;
  --horde: #d9453b;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.65 "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  background-image: radial-gradient(ellipse at top, #2a2116 0%, var(--bg) 60%);
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

header.top {
  display: flex; align-items: center; gap: 28px;
  padding: 14px 32px; border-bottom: 1px solid var(--line);
  background: rgba(15, 13, 10, .85); position: sticky; top: 0; backdrop-filter: blur(6px); z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--gold); letter-spacing: 1px; }
.brand .logo { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #7ad46b, #2f6b2a 70%); border: 2px solid var(--gold-dim); display: grid; place-items: center; font-size: 18px; }
.brand small { color: var(--muted); font-weight: 400; font-size: 12px; letter-spacing: 0; }
header nav { display: flex; gap: 4px; flex: 1; }
header nav a { color: var(--text); padding: 6px 12px; border-radius: 6px; font-size: 14px; }
header nav a:hover, header nav a.on { background: var(--panel2); color: var(--gold); text-decoration: none; }
header nav a.soon { color: var(--muted); }
header nav a.soon::after { content: "即將推出"; font-size: 10px; margin-left: 4px; color: var(--gold-dim); border: 1px solid var(--line); padding: 0 4px; border-radius: 3px; }
.btn {
  display: inline-block; padding: 8px 18px; border-radius: 6px; border: 1px solid var(--gold-dim);
  background: linear-gradient(#5a3d12, #3a270b); color: #ffe7a8; font-weight: 600; cursor: pointer; font-size: 14px;
}
.btn:hover { filter: brightness(1.15); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--gold); }

main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 60px; }
.hero {
  border: 1px solid var(--line); border-radius: 12px; padding: 40px 40px 34px; margin-bottom: 26px;
  background: linear-gradient(120deg, rgba(40,30,15,.95), rgba(20,30,20,.85)),
              repeating-linear-gradient(45deg, #1b1610 0 12px, #1e1912 12px 24px);
  position: relative; overflow: hidden;
}
.hero h1 { margin: 0 0 6px; font-size: 34px; color: var(--gold); letter-spacing: 2px; }
.hero p { margin: 0 0 20px; color: var(--muted); max-width: 640px; }
.hero .realm { position: absolute; right: 36px; top: 34px; text-align: right; color: var(--muted); font-size: 13px; }
.hero .realm code { color: var(--text); background: var(--panel2); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line); }

.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.card h2 { margin: 0 0 12px; font-size: 16px; color: var(--gold); display: flex; justify-content: space-between; align-items: center; }
.card h2 small { color: var(--muted); font-weight: 400; font-size: 12px; }

.status-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.status-row:last-child { border-bottom: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; box-shadow: 0 0 8px currentColor; }
.dot.ok { background: var(--ok); color: var(--ok); }
.dot.warn { background: var(--warn); color: var(--warn); }
.dot.bad { background: var(--bad); color: var(--bad); }
.big { font-size: 30px; font-weight: 700; color: var(--text); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.stat { background: var(--panel2); border-radius: 8px; padding: 10px 12px; }
.stat .label { color: var(--muted); font-size: 12px; }
.bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.bar .a { background: var(--alliance); } .bar .h { background: var(--horde); }
.legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }

.news article { padding: 14px 0; border-bottom: 1px solid var(--line); }
.news article:last-child { border-bottom: 0; }
.news .tag { font-size: 11px; padding: 1px 8px; border-radius: 10px; margin-right: 8px; border: 1px solid; }
.tag.notice { color: var(--warn); border-color: #6b5a12; }
.tag.update { color: var(--ok); border-color: #2c6b33; }
.tag.event { color: #c08bff; border-color: #563a7a; }
.news h3 { margin: 6px 0 4px; font-size: 17px; }
.news p { margin: 0; color: var(--muted); font-size: 14px; }
.news time { color: var(--muted); font-size: 12px; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.muted { color: var(--muted); }

/* forms */
.form-wrap { max-width: 460px; margin: 10px auto; }
.form-wrap h1 { color: var(--gold); font-size: 26px; margin: 0 0 4px; }
label { display: block; margin: 14px 0 6px; font-size: 14px; }
input[type=text], input[type=password], input[type=email] {
  width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line);
  background: #120f0b; color: var(--text); font-size: 15px;
}
input:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 2px rgba(232,194,107,.15); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hint.ok { color: var(--ok); } .hint.bad { color: var(--bad); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 16px 0; }
.captcha { display: flex; align-items: center; gap: 10px; background: #120f0b; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.captcha .box { width: 22px; height: 22px; border: 2px solid var(--ok); border-radius: 4px; display: grid; place-items: center; color: var(--ok); font-weight: 700; }
.alert { border-radius: 8px; padding: 12px 14px; font-size: 14px; margin: 14px 0; }
.alert.ok { background: rgba(78,203,90,.08); border: 1px solid #2c6b33; }

/* guide */
.guide { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.toc { position: sticky; top: 80px; align-self: start; }
.toc a { display: block; padding: 6px 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: 14px; }
.toc a.on { border-color: var(--gold); color: var(--gold); }
.step { display: flex; gap: 14px; margin: 16px 0; }
.step .n { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--gold-dim); color: var(--gold); display: grid; place-items: center; font-weight: 700; }
.step h3 { margin: 2px 0 4px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
pre { background: #0b0907; border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; color: #cfe8c6; font-size: 13px; overflow-x: auto; }
.callout { border-left: 3px solid var(--warn); background: rgba(255,210,0,.05); padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: 14px; margin: 14px 0; }

table.online { width: 100%; border-collapse: collapse; font-size: 14px; }
table.online th { text-align: left; color: var(--muted); font-weight: 400; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.online td { padding: 7px 8px; border-bottom: 1px dashed var(--line); }
.c-mage { color: #69ccf0; } .c-warrior { color: #c79c6e; } .c-priest { color: #fff; } .c-paladin { color: #f58cba; }
.c-hunter { color: #abd473; } .c-rogue { color: #fff569; } .c-druid { color: #ff7d0a; } .c-warlock { color: #9482c9; } .c-shaman { color: #0070de; }
.badge-bot { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; margin-left: 4px; }

.plus { font-size: .62em; vertical-align: super; color: #7ad46b; margin-left: 2px; letter-spacing: 0; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.tier { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-align: center; }
.tier.hot { border-color: var(--gold-dim); box-shadow: 0 0 0 1px rgba(232,194,107,.25) inset; }
.tier .price { font-size: 22px; font-weight: 700; color: var(--gold); }
.tier .coins { color: var(--ok); font-size: 14px; }
.tier p { margin: 6px 0 12px; font-size: 13px; }
.btn.disabled { opacity: .5; cursor: not-allowed; }
button.menu { display: none; background: none; border: 1px solid var(--line); color: var(--gold); font-size: 20px; border-radius: 6px; padding: 2px 10px; cursor: pointer; }
.table-scroll { overflow-x: auto; }
details.run { border-bottom: 1px dashed var(--line); padding: 7px 0; }
details.run:last-of-type { border-bottom: 0; }
details.run summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
details.run summary::-webkit-details-marker { display: none; }
details.run summary .cnt { margin-left: auto; color: var(--muted); font-size: 13px; }
details.run .who { font-size: 12px; color: var(--muted); padding: 4px 0 0 46px; }
.kind { font-size: 11px; border-radius: 3px; padding: 0 5px; border: 1px solid; }
.kind.raid { color: #ff8000; border-color: #6b3a0b; }
.kind.dungeon { color: #69ccf0; border-color: #1f4f63; }
.bg { padding: 8px 0 10px; border-bottom: 1px dashed var(--line); }
.bg:last-of-type { border-bottom: 0; }
.bg-head { display: flex; justify-content: space-between; font-size: 14px; }
.score { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; margin-top: 4px; }
.score .muted { font-weight: 400; font-size: 12px; }

/* Grid children must shrink below image/gallery intrinsic widths on mobile. */
.post > *, .grid > *, .editor > * { min-width: 0; }
.post .body { overflow-wrap: anywhere; }

/* images in posts — never break layout */
.post-img { display: block; margin: 10px 0; max-width: 100%; }
.post-img img { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; border-radius: 8px;
  border: 1px solid var(--line); object-fit: contain; background: #0b0907; cursor: zoom-in; }
.post-img figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.post-img .src { font-size: 11px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; margin: 10px 0; max-width: 680px; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .more { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #fff; }
.news-thumb { float: right; width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); margin: 0 0 6px 14px; }
.ext-wait { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; max-width: 520px; }
.dropzone { border: 2px dashed var(--line); border-radius: 8px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0; }
.dropzone b { color: var(--gold); }
.uploads { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.uploads .u { width: 92px; font-size: 11px; color: var(--muted); }
.uploads .u img { width: 92px; height: 69px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); display: block; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: none; place-items: center; z-index: 50; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 90vh; }
.lightbox:target { display: grid; }
@media (max-width: 960px) { .news-thumb { width: 110px; } .post-img img { max-height: 70vh; } }

/* reactions */
.reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.react { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel2); font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.react:hover { border-color: var(--gold-dim); }
.react.mine { border-color: var(--gold); background: rgba(232,194,107,.12); color: var(--gold); }
.react.add { padding: 2px 8px; }
.react-pick { display: inline-flex; gap: 2px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 16px; background: #120f0b; }
.react-pick span { font-size: 18px; padding: 0 3px; cursor: pointer; border-radius: 6px; }
.react-pick span:hover { background: var(--panel2); transform: scale(1.2); }

/* news editor */
textarea { width: 100%; min-height: 220px; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); background: #120f0b;
  color: var(--text); font: 14px/1.7 inherit; font-family: inherit; resize: vertical; }
select { padding: 9px 10px; border-radius: 6px; border: 1px solid var(--line); background: #120f0b; color: var(--text); font-size: 14px; }
.toolbar { display: flex; gap: 4px; margin: 6px 0; flex-wrap: wrap; }
.toolbar span { border: 1px solid var(--line); border-radius: 4px; padding: 1px 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.preview { background: var(--panel2); border-radius: 8px; padding: 14px 16px; }
.preview p { margin: 0 0 8px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.admin-list li { align-items: center; gap: 10px; }
.admin-list .acts { display: flex; gap: 10px; font-size: 12px; }
.pill { font-size: 11px; padding: 0 6px; border-radius: 3px; border: 1px solid var(--line); color: var(--muted); }
.pill.pub { color: var(--ok); border-color: #2c6b33; }
.pill.pin { color: var(--gold); border-color: var(--gold-dim); }
@media (max-width: 960px) {
  .editor { grid-template-columns: 1fr; }
  .admin-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .admin-list .acts a { white-space: nowrap; }
  .card h2 { flex-wrap: wrap; gap: 6px; }
}

/* forum / profile */
.post { display: grid; grid-template-columns: 170px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; background: var(--panel); }
.post .author { background: var(--panel2); padding: 14px; border-right: 1px solid var(--line); font-size: 13px; }
.post .author .nick { font-size: 16px; font-weight: 700; color: var(--gold); }
.post .author .main { margin: 6px 0; }
.post .author .alts { color: var(--muted); font-size: 12px; }
.post .author .alts summary { cursor: pointer; }
.post .body { padding: 14px 18px; }
.post .body .meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.avatar { width: 56px; height: 56px; border-radius: 8px; border: 2px solid var(--gold-dim); background: #2b2318; display: grid; place-items: center; font-size: 28px; margin-bottom: 8px; }
.role { font-size: 10px; padding: 0 5px; border-radius: 3px; border: 1px solid #6b2c2c; color: #ff8080; margin-left: 4px; vertical-align: middle; }
.discord { display: inline-flex; align-items: center; gap: 6px; background: #5865f2; color: #fff; border-radius: 6px; padding: 8px 14px; font-weight: 600; font-size: 14px; }
.discord.linked { background: #2b2f55; border: 1px solid #5865f2; }
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); gap: 12px; }
.setting-row:last-child { border-bottom: 0; }
.chars { list-style: none; padding: 0; margin: 0; }
.chars li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.chars li:last-child { border-bottom: 0; }
.chars .star { color: var(--gold); cursor: pointer; }
.chars .eye { margin-left: auto; font-size: 12px; color: var(--muted); }
@media (max-width: 960px) {
  .post { grid-template-columns: 1fr; }
  .post .author { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .post .author .avatar { width: 40px; height: 40px; font-size: 20px; margin: 0; }
  .post .author .alts { flex-basis: 100%; }
}

/* ── 手機／平板 ─────────────────────────────── */
@media (max-width: 960px) {
  header.top { flex-wrap: wrap; gap: 10px 14px; padding: 10px 14px; }
  button.menu { display: block; }
  .brand { flex: 1; font-size: 17px; }
  header nav { display: none; order: 9; flex-basis: 100%; flex-direction: column; gap: 0; }
  body.nav-open header nav { display: flex; }
  header nav a { padding: 10px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  header .btn { padding: 6px 12px; font-size: 13px; }
  main { padding: 16px 12px 40px; }
  .hero { padding: 24px 18px; }
  .hero h1 { font-size: 24px; }
  .hero .realm { position: static; text-align: left; margin-bottom: 14px; }
  .hero .realm code { display: inline-block; margin-top: 4px; word-break: break-all; }
  .grid { grid-template-columns: 1fr; }
  .guide { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a { border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; font-size: 13px; }
  .tiers { grid-template-columns: 1fr; }
  table.online th:nth-child(4), table.online td:nth-child(4) { display: none; }
  .form-wrap { padding: 16px; }
}
@media (max-width: 480px) {
  header.top .btn.ghost { display: none; }
  .stats .big { font-size: 24px; }
  table.online { font-size: 13px; }
  table.online th:nth-child(3), table.online td:nth-child(3) { display: none; }
}

footer { border-top: 1px solid var(--line); padding: 20px 32px; color: var(--muted); font-size: 12px; text-align: center; }

/* ── 正式站補充（P1） ─────────────────────────── */
.news .body { color: var(--muted); font-size: 14px; }
.news .body p { margin: 0 0 6px; }
.news .body ul { margin: 4px 0 6px; padding-left: 20px; }
.news .body strong { color: var(--text); }
.news h3 a { color: var(--text); }
.tag.fix { color: #69ccf0; border-color: #1f4f63; }
.tag.maintenance { color: var(--warn); border-color: #6b5a12; }
.article .body { color: var(--text); font-size: 15px; }
.article .body p { margin: 0 0 10px; }
input[type=text], input[type=password] { width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); background: #120f0b; color: var(--text); font-size: 15px; }
button.btn { font-family: inherit; }
button.btn:disabled { opacity: .55; cursor: default; }
.alert.bad { background: rgba(255,80,80,.08); border: 1px solid #6b2c2c; }
.alert[hidden] { display: none; }
.hide { display: none !important; }
.cf-turnstile { margin-top: 16px; min-height: 65px; }
.pager { display: flex; justify-content: space-between; margin-top: 14px; font-size: 14px; }
code { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: 13px; word-break: break-all; }
.step ol { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }

