:root {
  --bg: #15100c;
  --panel: #221a14;
  --panel2: #2c221a;
  --line: #4a3a2a;
  --text: #eadfcf;
  --dim: #a8987f;
  --gold: #e3b964;
  --red: #e0605a;
  --blue: #6fa8e8;
  --green: #74c98a;
  --boss: #c780e8;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 21px; margin: 4px 0 8px; }
h2 { font-size: 17px; margin: 18px 0 8px; color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
h3 { font-size: 15px; margin: 12px 0 6px; }
.top {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 10px; align-items: center;
  padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
  background: linear-gradient(#2b1f15, #1b1410); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; white-space: nowrap; font-size: 16px; color: var(--gold); }
.search { flex: 1; min-width: 0; }
.search input {
  width: 100%; padding: 8px 12px; border-radius: 18px; border: 1px solid var(--line);
  background: #0f0b08; color: var(--text); font-size: 16px; outline: none;
}
.search input:focus { border-color: var(--gold); }
.tabs { display: flex; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 53px; z-index: 9; }
.tabs a { flex: 1; text-align: center; padding: 9px 0; color: var(--dim); font-weight: 600; }
.tabs a.on { color: var(--gold); box-shadow: inset 0 -3px var(--gold); }
.tabs a:hover { text-decoration: none; }
main { max-width: 920px; margin: 0 auto; padding: 12px 12px 40px; }
.loading, .empty { color: var(--dim); text-align: center; padding: 30px 0; }
.foot { color: var(--dim); font-size: 12px; text-align: center; padding: 12px 16px 30px; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card {
  display: block; padding: 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--text);
}
.card b { display: block; color: var(--gold); font-size: 17px; margin-bottom: 2px; }
.card span { color: var(--dim); font-size: 13px; }
.card:hover { text-decoration: none; border-color: var(--gold); }

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #30261c; color: var(--text);
}
a.row:hover { background: var(--panel); text-decoration: none; }
.row .main { flex: 1; min-width: 0; }
.row .name { font-weight: 600; }
.row .sub { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.row .right { text-align: right; white-space: nowrap; font-size: 14px; }
.thumb { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; background: #100c09; border-radius: 6px; overflow: hidden; }
.thumb img { max-width: 44px; max-height: 44px; image-rendering: auto; }
.icon { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #100c09; border-radius: 4px; vertical-align: middle; }
.icon img { max-width: 32px; max-height: 32px; image-rendering: pixelated; }
.noimg { color: #5a4a3a; font-size: 11px; }

.hero { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.hero .pic { width: 110px; height: 110px; flex: none; display: flex; align-items: center; justify-content: center; background: #0e0a07; border-radius: 8px; }
.hero .pic img { max-width: 104px; max-height: 104px; }
.hero .pic.small img { image-rendering: pixelated; width: 64px; height: auto; max-height: 64px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-top: 10px; }
.stat { background: var(--panel2); border-radius: 6px; padding: 6px 8px; }
.stat i { display: block; font-style: normal; color: var(--dim); font-size: 12px; }
.stat b { font-size: 16px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: var(--panel2); color: var(--dim); margin: 0 4px 2px 0; }
.tag.boss { background: #3d2348; color: var(--boss); }
.tag.agro { background: #47201d; color: var(--red); }
.tag.lv { background: #3a2e18; color: var(--gold); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.filters input, .filters select { background: #0f0b08; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px 8px; font-size: 15px; }
.filters input { flex: 1; min-width: 120px; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--dim); border-radius: 16px; padding: 4px 11px; font-size: 13px; cursor: pointer; }
.chip.on { border-color: var(--gold); color: var(--gold); }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t td, .t th { padding: 6px 4px; border-bottom: 1px solid #30261c; text-align: left; vertical-align: middle; }
.t th { color: var(--dim); font-weight: 500; font-size: 12px; }
.t td.n { text-align: right; white-space: nowrap; }
.t .it { display: flex; align-items: center; gap: 8px; }
.pct { color: var(--green); }

.mapbox { position: relative; overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 8px; background: #000; -webkit-overflow-scrolling: touch; }
.mapbox .inner { position: relative; transform-origin: 0 0; }
.mapbox img.base { display: block; max-width: none; }
.dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; border: 1px solid rgba(0,0,0,.7); background: var(--red); }
.dot.npc { background: var(--blue); }
.dot.pt { background: var(--green); border-radius: 2px; }
.zone { position: absolute; border: 1px solid rgba(255,242,0,.8); background: rgba(255,242,0,.12); z-index: 2; pointer-events: none; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--dim); margin: 6px 0; }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; background: var(--red); }
.legend .l-npc::before { background: var(--blue); }
.legend .l-pt::before { background: var(--green); border-radius: 2px; }
.zoombar { display: flex; gap: 6px; margin: 6px 0; }
.zoombar button { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px; font-size: 15px; }
.tip { position: absolute; z-index: 5; background: rgba(20,14,10,.95); border: 1px solid var(--gold); color: var(--text); padding: 4px 8px; border-radius: 6px; font-size: 13px; white-space: nowrap; pointer-events: none; }

.chapter { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 12px 0; }
.chapter h2 { margin-top: 0; border: 0; }
.chapter .summary { color: var(--dim); margin: -4px 0 10px; }
.chapter ol { margin: 0; padding-left: 22px; }
.chapter li { margin: 10px 0; }
.chapter li img { display: block; width: 100%; max-width: 560px; border-radius: 6px; margin-top: 6px; border: 1px solid var(--line); }
.toc { display: flex; flex-wrap: wrap; gap: 6px; }
.band { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.band h3 { margin: 4px 0; color: var(--gold); }
.note { color: var(--dim); font-size: 13px; }
.price { color: var(--gold); font-variant-numeric: tabular-nums; }
.more { display: block; width: 100%; padding: 10px; margin-top: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--gold); border-radius: 8px; font-size: 15px; }

/* 首頁 + 布告欄 */
.welcome {
  text-align: center; padding: 22px 14px 18px; margin: 4px 0 6px; border-radius: 12px; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 0%, #4a3320 0%, #2a1e15 55%, #1b1410 100%);
}
.welcome h1 { margin: 0 0 4px; color: var(--gold); font-size: 22px; letter-spacing: 1px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.welcome p { margin: 0 0 14px; color: var(--dim); }
.play {
  display: inline-block; padding: 10px 26px; border-radius: 22px; font-weight: 700; font-size: 16px; color: #1b1410;
  background: linear-gradient(#f0cd7c, #c9973f); border: 1px solid #f3d999; box-shadow: 0 2px 10px rgba(227,185,100,.25);
}
.play:hover { text-decoration: none; filter: brightness(1.08); }
.news-h2 { display: flex; justify-content: space-between; align-items: baseline; }
.news-h2 a { font-size: 13px; font-weight: 500; }
.news { display: flex; flex-direction: column; gap: 8px; }
.news-row {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
}
.news-row:hover { text-decoration: none; border-color: var(--gold); }
.news-row.pin { border-color: #7a5a2a; background: linear-gradient(90deg, #33261a, var(--panel) 60%); }
.news-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.news-date { color: var(--dim); font-size: 12px; margin-left: auto; font-variant-numeric: tabular-nums; }
.news-title { font-weight: 700; font-size: 16px; }
.news-snip { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.pin { background: #5a3d16; color: #ffd27a; }
.tag.cat-update { background: #1d3a26; color: var(--green); }
.tag.cat-event { background: #3d2348; color: var(--boss); }
.tag.cat-notice { background: #1c2f47; color: var(--blue); }
.tag.ev-on { background: #47201d; color: #ff8a7a; }
.tag.ev-soon { background: #3a2e18; color: var(--gold); }
.tag.ev-end { background: #2a2520; color: #7d6f5d; }
.post { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.post h1 { margin: 8px 0 6px; color: var(--gold); }
.ev-range { display: inline-block; font-size: 13px; color: var(--gold); background: #3a2e18; border-radius: 6px; padding: 2px 8px; margin-bottom: 6px; }
.post-body { font-size: 15px; line-height: 1.75; word-break: break-word; }
.post-body p { margin: 8px 0; }
.post-body ul { margin: 6px 0; padding-left: 22px; }
.post-body li { margin: 3px 0; }
.post-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; }
.post-nav a { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 官方 LINE 浮動鈕 + 卡片(每一頁都有) */
.line-float { position: fixed; right: 14px; bottom: 14px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.line-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid #fff; background: #06c755; color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45); animation: line-pulse 2.4s infinite; }
.line-btn span { font-weight: 900; font-size: 16px; letter-spacing: 1px; line-height: 1; }
.line-btn small { font-size: 10px; margin-top: 3px; }
@keyframes line-pulse { 0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,.45), 0 0 0 0 rgba(6,199,85,.55); } 50% { box-shadow: 0 4px 14px rgba(0,0,0,.45), 0 0 0 10px rgba(6,199,85,0); } }
.line-card { position: relative; width: 220px; padding: 14px 14px 12px; border-radius: 12px; background: #fff; color: #222; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.line-card[hidden] { display: none; }
.line-card b { font-size: 16px; color: #06c755; }
.line-card span { font-size: 12px; color: #555; }
.line-card img { width: 180px; height: 180px; image-rendering: pixelated; }
.line-add { display: block; width: 100%; padding: 9px 0; border-radius: 8px; background: #06c755; color: #fff; font-weight: 800; font-size: 15px; }
.line-add:hover { text-decoration: none; filter: brightness(1.08); }
.line-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 20px; color: #888; cursor: pointer; }
.line-id { font-size: 12px; color: #777; user-select: all; }

/* 首頁最上方:背景影片 + 金屬外框(outer-metal-frame.png 九宮格)+ 寶石鈕(start.png)—— 使用者 2026-11-02 */
.welcome { position: relative; overflow: hidden; background: #0e0a07; border: 22px solid transparent; border-radius: 0;
  border-image: url(hero/outer-metal-frame.png) 56 fill / 22px / 0 round; border-image-outset: 0; padding: 0;
  aspect-ratio: 16 / 9; display: flex; align-items: flex-end; justify-content: center;
  /* 比內文欄(920)寬:最寬 1280、左右各留 12px,置中 */
  width: min(1280px, calc(100vw - 24px)); margin-left: calc(50% - min(640px, calc(50vw - 12px))); }
/* 手機:16:9 太矮、標題會被擠掉 → 改固定高度(影片左右會裁一些) */
@media (max-width: 699px) { .welcome { aspect-ratio: auto; min-height: 300px; } .welcome-in { padding-bottom: 22px; } }
.welcome-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.welcome::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(10,7,5,.15), rgba(10,7,5,.55)); }
.welcome-in { position: relative; z-index: 2; padding: 0 14px 6%; text-align: center; }
.welcome-in h1 { text-shadow: 0 2px 8px rgba(0,0,0,.9); }
.welcome-in p { color: #e9dcc4; text-shadow: 0 1px 4px rgba(0,0,0,.9); }
.play-gem { display: inline-flex; align-items: center; justify-content: center; width: 260px; height: 87px; max-width: 80vw;
  background: url(hero/start.png) center / contain no-repeat; filter: drop-shadow(0 4px 12px rgba(0,0,0,.6)); }
.play-gem span { color: #fff7dc; font-size: 22px; font-weight: 800; letter-spacing: 4px;
  text-shadow: 0 0 6px rgba(120,180,255,.9), 0 2px 3px rgba(0,0,0,.9); }
.play-gem:hover { text-decoration: none; filter: drop-shadow(0 4px 16px rgba(120,180,255,.6)) brightness(1.1); }

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
  .play-gem { width: 330px; height: 110px; }
  .play-gem span { font-size: 26px; }
  .hero .pic { width: 140px; height: 140px; }
  .hero .pic img { max-width: 132px; max-height: 132px; }
  .welcome h1 { font-size: 28px; }
}

/* 首頁「關於回憶天堂」(SEO 介紹段,2026-11-02) */
.about { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; }
.about ul { padding-left: 20px; margin: 6px 0; }
.about li { margin: 4px 0; }

/* 遊戲介紹 /guide/about/(2026-11-06) */
.welcome-sub { margin: 10px 0 0; font-size: 14px; }
.welcome-sub a { color: #f1d9a0; text-shadow: 0 1px 4px rgba(0,0,0,.9); }
.about-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.about-btn { display: block; padding: 12px 10px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--gold); font-weight: 600; }
.about-btn.main { grid-column: 1 / -1; background: var(--gold); color: #1b1410; font-size: 17px; }
.about-btn:hover { text-decoration: none; filter: brightness(1.1); }
.about-list { padding-left: 22px; }
.about-list li { margin: 6px 0; }
.about-list a, .faq a, #app > p a { text-decoration: underline; text-underline-offset: 2px; }  /* 文中連結不能只靠顏色分(Lighthouse link-in-text-block) */
.faq dt { margin-top: 14px; color: var(--gold); font-weight: 600; }
.faq dd { margin: 4px 0 0; }
@media (max-width: 420px) { .about-cta { grid-template-columns: 1fr; } }

/* 商城飾品能力表 /guide/accessories/(2026-11-08) */
.acc-rules { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.acc-rules b:first-child { color: var(--gold); }
.acc-rules ul { margin: 6px 0 0; padding-left: 20px; }
.acc-rules li { margin: 4px 0; }
.acc-item { margin: 14px 0 22px; }
.acc-top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.acc-top h3 { margin: 0; color: var(--gold); font-size: 17px; }
.acc-top .sub { color: var(--dim); font-size: 13px; }
.acc-ic { width: 40px; height: 40px; image-rendering: pixelated; flex: none; }
.acc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; }
.acc-table { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; }
.acc-table th, .acc-table td { padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.acc-table thead th { background: var(--panel); color: var(--dim); font-weight: 600; font-size: 12px; }
.acc-table tbody th { color: var(--gold); position: sticky; left: 0; background: var(--bg, #1b1410); }
.acc-table tbody tr:last-child td, .acc-table tbody tr:last-child th { border-bottom: 0; }
