:root {
  --bg: #0a0810;
  --bg-2: #14101c;
  --panel: #1a1426;
  --panel-2: #221a32;
  --line: #382b50;
  --line-gold: rgba(212,166,74,0.45);
  --text: #ece6d5;
  --muted: #a094b3;
  --gold: #d4a64a;
  --gold-bright: #f5d77d;
  --gold-deep: #8a6a23;
  --crimson: #8b1f2c;
  --crimson-bright: #c83a4a;
  --ok: #5fb37a;
  --err: #c8556a;
  --ff-display: "Cinzel Decorative", "Noto Serif TC", "Microsoft JhengHei", serif;
  --ff-serif: "Noto Serif TC", "Cinzel", "Microsoft JhengHei", serif;
  --ff-body: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* 禁止訪客選取／複製文字 */
html, body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* 輸入欄位仍需可選取與輸入（搜尋、後台登入等） */
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(212,166,74,0.12), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(200,58,74,0.16), transparent 60%),
    radial-gradient(800px 400px at 50% 110%, rgba(139,31,44,0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

main.container { flex: 1; padding-top: 28px; padding-bottom: 48px; }

/* Header */
.site-header {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.85), rgba(20,16,28,0.7));
  border-bottom: 1px solid var(--line-gold);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 22px rgba(0,0,0,0.5);
}
.site-header::after {
  content: ""; display: block; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--crimson-bright) 50%, var(--gold) 70%, transparent);
  opacity: 0.55;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand-logo { width: auto; height: 84px; filter: drop-shadow(0 0 6px rgba(212,166,74,0.45)); transition: transform .25s, filter .25s; }
.brand-wordmark { width: auto; height: 52px; filter: drop-shadow(0 0 6px rgba(212,166,74,0.35)); }
.brand:hover .brand-logo { transform: rotate(-4deg) scale(1.04); filter: drop-shadow(0 0 10px rgba(245,215,125,0.7)); }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-title {
  font-family: var(--ff-display);
  font-weight: 900; font-size: 22px; letter-spacing: 6px;
  background: linear-gradient(180deg, #f5d77d 0%, #d4a64a 60%, #8a6a23 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(212,166,74,0.25);
}
.brand-text small {
  display: block; font-family: var(--ff-display);
  font-size: 10px; color: var(--muted); letter-spacing: 4px; font-weight: 500;
}
nav { display: flex; gap: 4px; }
nav a {
  color: var(--text); text-decoration: none;
  font-family: var(--ff-serif);
  font-size: 15px; font-weight: 500;
  padding: 8px 16px; letter-spacing: 2px;
  position: relative;
  transition: color .2s;
}
nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-50%);
  transition: width .25s;
}
nav a:hover { color: var(--gold-bright); }
nav a:hover::after { width: 70%; }
nav a.active { color: var(--gold-bright); }
nav a.active::after { width: 80%; }

/* Hero */
.hero {
  position: relative;
  padding: 60px 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  border: 1px solid var(--line-gold);
  border-radius: 16px;
  background:
    url('/img/hero-bg.svg') center/cover no-repeat,
    radial-gradient(700px 250px at 50% -20%, rgba(212,166,74,0.22), transparent 70%),
    linear-gradient(180deg, var(--panel), var(--bg-2));
  margin-bottom: 28px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6), 0 6px 24px rgba(0,0,0,0.4);
}
.hero::before, .hero::after {
  content: ""; position: absolute; left: 24px; right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--crimson-bright) 50%, var(--gold) 80%, transparent);
  opacity: 0.65;
}
.hero::before { top: 18px; }
.hero::after  { bottom: 18px; }
.hero h1 {
  font-family: var(--ff-display);
  font-size: 52px; margin: 0 0 14px;
  letter-spacing: 8px; font-weight: 900;
  text-shadow: 0 0 25px rgba(0,0,0,0.6);
}
.hero h1 .accent {
  background: linear-gradient(180deg, #f5d77d 0%, #d4a64a 55%, #8a6a23 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(212,166,74,0.55));
}
.hero-tagline {
  font-family: var(--ff-display);
  margin: 0 0 14px;
  font-size: 26px; font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(180deg, #f5d77d 0%, #d4a64a 55%, #8a6a23 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(212,166,74,0.45));
}
.hero-sub {
  font-family: var(--ff-serif);
  color: var(--muted); margin: 0 0 28px;
  font-size: 16px; letter-spacing: 2px; font-weight: 500; line-height: 1.9;
}
.hero-actions { display: flex; gap: 14px; justify-content: flex-start; flex-wrap: wrap; }
.hero-logo {
  display: block;
  width: 400px;
  height: 400px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 18px rgba(212,166,74,0.45));
}
.hero-text { text-align: left; max-width: 440px; }
.hero-text .hero-sub { margin: 0 0 28px; }
@media (max-width: 860px) {
  .hero { gap: 24px; }
  .hero-logo { width: 280px; height: 280px; }
  .hero-text { text-align: center; }
  .hero-text .hero-actions { justify-content: center; }
}

/* 加 LINE 好禮 */
.linegift-box {
  flex-shrink: 0;
  width: 360px;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(56,43,80,0.30), var(--panel-2));
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
}
.lg-box-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line-gold);
}
.lg-box-icon { width: 48px; height: 48px; image-rendering: pixelated; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }
.lg-box-name {
  font-family: var(--ff-serif);
  font-size: 20px; font-weight: 700; letter-spacing: 2px;
  color: var(--gold-bright);
}
.lg-contents { list-style: none; margin: 0; padding: 0; }
.lg-contents li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
}
.lg-contents li:last-child { border-bottom: 0; }
.lg-item-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  image-rendering: pixelated;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}
.lg-item-name { color: var(--text); flex: 1; }
.lg-item-count { color: var(--gold); font-weight: 700; white-space: nowrap; }
.lg-qr { margin-top: 18px; }
.lg-qr-img {
  display: block; width: 180px; height: 180px; border-radius: 10px;
  border: 1px solid var(--line-gold); background: #fff; padding: 8px;
}
.lg-qr-cap { margin: 8px 0 0; }
@media (max-width: 860px) {
  .linegift-hero .hero-text { text-align: center; }
  .linegift-box { text-align: left; }
  .lg-qr-img { margin-left: auto; margin-right: auto; }
}

/* Card */
.card {
  background:
    linear-gradient(180deg, rgba(56,43,80,0.15), transparent 30%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 30px;
  margin-bottom: 22px;
  position: relative;
  box-shadow: 0 2px 14px rgba(0,0,0,0.35);
}
.card::before {
  content: ""; position: absolute; top: 0; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.card.center { text-align: center; }
.card h1 { margin-top: 0; font-family: var(--ff-serif); }
.card h2 { font-family: var(--ff-serif); color: var(--gold-bright); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--ff-serif);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 3px;
  border: 1px solid var(--line-gold);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--text);
  cursor: pointer;
  position: relative;
  transition: transform .1s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { background: linear-gradient(180deg, #2d2244, var(--panel-2)); border-color: var(--gold); box-shadow: 0 0 18px rgba(212,166,74,0.25); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 60%, var(--gold-deep));
  color: #1a0f02; border-color: var(--gold-deep);
  box-shadow: 0 0 14px rgba(212,166,74,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.btn.primary:hover { filter: brightness(1.1); box-shadow: 0 0 22px rgba(245,215,125,0.6), inset 0 1px 0 rgba(255,255,255,0.3); }
.btn.ghost { background: transparent; border-color: var(--line); }

/* Markdown */
.markdown h1, .markdown h2, .markdown h3 { color: var(--gold-bright); font-family: var(--ff-serif); letter-spacing: 1px; }
.markdown h1 { border-bottom: 1px solid var(--line-gold); padding-bottom: 8px; position: relative; }
.markdown h1::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 60px; height: 1px; background: var(--gold-bright); }
.markdown a { color: var(--gold-bright); text-decoration: none; border-bottom: 1px dashed rgba(245,215,125,0.5); }
.markdown a:hover { color: var(--gold); border-bottom-style: solid; }
.markdown table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.markdown th { background: var(--panel-2); }
.markdown blockquote { border-left: 3px solid var(--gold); padding-left: 14px; color: var(--muted); margin: 14px 0; }
.markdown code { background: var(--bg-2); padding: 2px 6px; border-radius: 4px; }
.markdown img {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  margin: 18px auto;
  border-radius: 10px;
  border: 1px solid var(--line-gold);
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}

/* Query */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 18px; flex-wrap: wrap; }
.tab {
  background: transparent; color: var(--muted);
  border: none; border-bottom: 2px solid transparent;
  padding: 10px 18px; cursor: pointer; font-size: 15px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold-bright); border-bottom-color: var(--gold); }
.tab-panel.hidden { display: none; }

.query-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 18px; }
.query-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.query-form input, .query-form select {
  min-width: 180px;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}
.query-form input:focus, .query-form select:focus { outline: none; border-color: var(--gold); }

.result table {
  width: 100%; border-collapse: collapse; margin-top: 12px;
  font-size: 13px;
}
.result th, .result td {
  border: 1px solid var(--line); padding: 6px 10px;
}
.result th { background: var(--panel-2); color: var(--gold-bright); text-align: left; position: sticky; top: 0; }
.result tr:hover td { background: rgba(212,166,74,0.05); }
.result .meta { color: var(--muted); margin-top: 10px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.result-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }

/* Armor grid */
.armor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.armor-card {
  display: flex; flex-direction: column; align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 10px 10px;
  text-decoration: none;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.armor-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.armor-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.06), rgba(0,0,0,0.4));
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  image-rendering: pixelated;
}
.armor-icon img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.armor-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 4px;
  word-break: break-all;
}
.armor-meta { font-size: 11px; color: var(--muted); }

/* Grade colors (1=一般 ~ 6=神話) */
.armor-card.grade-0 .armor-name { color: #2fd6c3; text-shadow: 0 0 8px rgba(47,214,195,0.45); }
.armor-card.grade-0 { border-color: rgba(47,214,195,0.40); }
.armor-card.grade-1 .armor-name { color: #f3f0e6; text-shadow: 0 0 6px rgba(255,255,255,0.15); }
.armor-card.grade-2 .armor-name { color: #5fdc7c; text-shadow: 0 0 8px rgba(95,220,124,0.35); }
.armor-card.grade-3 .armor-name { color: #5aa2ff; text-shadow: 0 0 8px rgba(90,162,255,0.45); }
.armor-card.grade-4 .armor-name { color: #ff5d6c; text-shadow: 0 0 8px rgba(255,93,108,0.45); }
.armor-card.grade-5 .armor-name { color: #b975ff; text-shadow: 0 0 10px rgba(185,117,255,0.55); }
.armor-card.grade-6 .armor-name { color: #ffcf3a; text-shadow: 0 0 12px rgba(255,207,58,0.75); }

.armor-card.grade-2 { border-color: rgba(95,220,124,0.35); }
.armor-card.grade-3 { border-color: rgba(90,162,255,0.45); }
.armor-card.grade-4 { border-color: rgba(255,93,108,0.50); }
.armor-card.grade-5 { border-color: rgba(185,117,255,0.55); }
.armor-card.grade-6 {
  border-color: rgba(255,207,58,0.7);
  background: linear-gradient(180deg, rgba(255,207,58,0.10), var(--panel-2));
}

/* Tooltip */
.tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 360px;
  background: rgba(10,8,16,0.96);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  pointer-events: none;
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
}

/* Craft */
.craft-recipe {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
}
.craft-header {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px; margin-bottom: 12px;
}
.craft-id { color: var(--muted); font-family: ui-monospace, monospace; }
.craft-note { color: var(--gold-bright); font-weight: 600; flex: 1; }
.craft-chance { color: var(--ok); font-weight: 600; }
.craft-flow { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.craft-side { flex: 1; min-width: 200px; }
.craft-label { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.craft-arrow { display: grid; place-items: center; color: var(--gold); font-size: 28px; }

.material-row {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.material-card {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  width: 110px;
  text-align: center;
}
.material-card.output { border-color: rgba(212,166,74,0.5); }
.material-card img {
  width: 44px; height: 44px;
  image-rendering: pixelated;
  margin-bottom: 6px;
}
.material-name { font-size: 12px; font-weight: 600; line-height: 1.3; word-break: break-all; }
.material-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Dropmap (Phase 2) */
.dropmap-search { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 22px; }
.dropmap-mode { display: flex; gap: 6px; }
.mode-btn {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 18px;
  cursor: pointer;
  font-family: var(--ff-serif);
  font-size: 14px;
  letter-spacing: 2px;
  transition: all .2s;
}
.mode-btn:hover { color: var(--text); border-color: var(--gold-deep); }
.mode-btn.active {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: #1a0f02; border-color: var(--gold-deep); font-weight: 700;
  box-shadow: 0 0 12px rgba(212,166,74,0.35);
}
.dropmap-input {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text);
  font-family: var(--ff-body);
}
.dropmap-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 10px rgba(212,166,74,0.2); }

.dropmap-list, .dropmap-view { min-height: 200px; }
.dropmap-view.hidden, .dropmap-list.hidden { display: none; }
.dropmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.dropmap-card {
  background: linear-gradient(180deg, rgba(56,43,80,0.2), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: var(--ff-serif);
  font-size: 15px;
  position: relative;
  transition: all .15s;
}
.dropmap-card:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(212,166,74,0.08), var(--panel-2));
  box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,166,74,0.1);
  transform: translateY(-2px);
}
.dropmap-card::before {
  content: ""; position: absolute; left: 6px; top: 6px; width: 4px; height: calc(100% - 12px);
  background: linear-gradient(180deg, var(--gold), transparent);
  opacity: 0; transition: opacity .15s;
}
.dropmap-card:hover::before { opacity: 1; }
.dm-name { display: block; padding-left: 6px; word-break: break-word; }

/* Filter bar (weapon/armor) */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 16px; align-items: center; }
.filter-bar .dropmap-input { flex: 1; min-width: 220px; }
.filter-bar select {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; font-size: 14px;
  font-family: var(--ff-body);
}
.filter-bar select:focus { outline: none; border-color: var(--gold); }

/* 遊戲式 hover tooltip（武器/防具）*/
.equip-tooltip {
  position: fixed;
  z-index: 9999;
  width: 340px;
  background: linear-gradient(180deg, #0a0610 0%, #14101e 100%);
  border: 1px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.85), 0 0 22px rgba(212,166,74,0.25);
  padding: 0;
  pointer-events: none;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
}
.equip-tooltip.hidden { display: none; }
.tip-header {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(212,166,74,0.10), transparent);
  border-bottom: 1px solid var(--line-gold);
}
.tip-header.grade-1 { background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent); }
.tip-header.grade-2 { background: linear-gradient(180deg, rgba(95,220,124,0.12), transparent); }
.tip-header.grade-3 { background: linear-gradient(180deg, rgba(90,162,255,0.14), transparent); }
.tip-header.grade-4 { background: linear-gradient(180deg, rgba(255,93,108,0.14), transparent); }
.tip-header.grade-5 { background: linear-gradient(180deg, rgba(185,117,255,0.16), transparent); }
.tip-header.grade-6 { background: linear-gradient(180deg, rgba(255,207,58,0.18), transparent); }
.tip-icon {
  flex: 0 0 56px; width: 56px; height: 56px;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.08), rgba(0,0,0,0.5));
  border: 1px solid var(--line-gold);
  border-radius: 6px;
  display: grid; place-items: center;
  overflow: hidden;
}
.tip-icon img { max-width: 80%; max-height: 80%; image-rendering: pixelated; }
.tip-title { min-width: 0; flex: 1; }
.tip-grade { font-family: var(--ff-display); color: var(--gold-bright); letter-spacing: 3px; font-size: 11px; }
.tip-name { font-family: var(--ff-serif); font-size: 16px; font-weight: 700; color: var(--text); margin: 2px 0; word-break: break-word; }
.tip-name { font-size: 16px; }
.tip-header.grade-2 .tip-name { color: #5fdc7c; text-shadow: 0 0 6px rgba(95,220,124,0.4); }
.tip-header.grade-3 .tip-name { color: #5aa2ff; text-shadow: 0 0 6px rgba(90,162,255,0.5); }
.tip-header.grade-4 .tip-name { color: #ff5d6c; text-shadow: 0 0 6px rgba(255,93,108,0.5); }
.tip-header.grade-5 .tip-name { color: #b975ff; text-shadow: 0 0 8px rgba(185,117,255,0.6); }
.tip-header.grade-6 .tip-name { color: #ffcf3a; text-shadow: 0 0 10px rgba(255,207,58,0.7); }
.tip-type { color: var(--muted); font-size: 11px; }
.tip-meta {
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.tip-meta div { white-space: nowrap; }
.tip-classes {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
}
.tip-section { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.tip-section:last-child { border-bottom: none; }
.tip-section-title { color: var(--gold-bright); font-size: 12px; letter-spacing: 2px; margin-bottom: 6px; font-family: var(--ff-serif); }
.tip-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; }
.tip-stat { display: flex; justify-content: space-between; font-size: 12px; }
.tip-stat span { color: var(--muted); }
.tip-stat b { color: var(--gold-bright); font-weight: 700; }
.tip-skill { color: var(--crimson-bright); font-size: 12px; padding: 2px 0; }
.tip-muted { color: var(--muted); font-size: 12px; font-style: italic; }
.tip-loading, .tip-error { padding: 14px; text-align: center; color: var(--muted); }
.tip-error { color: var(--err); }

/* Detail view (weapon/armor) — DEPRECATED Phase 4 改用 hover tooltip */
.detail-view { animation: fadeIn .2s; }
.detail-view.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.detail-header {
  display: flex; gap: 20px; align-items: center;
  padding: 22px;
  background: linear-gradient(180deg, rgba(212,166,74,0.06), var(--panel-2));
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  margin: 14px 0 18px;
}
.detail-header.grade-1 { border-color: rgba(255,255,255,0.2); }
.detail-header.grade-2 { border-color: rgba(95,220,124,0.4); background: linear-gradient(180deg, rgba(95,220,124,0.08), var(--panel-2)); }
.detail-header.grade-3 { border-color: rgba(90,162,255,0.45); background: linear-gradient(180deg, rgba(90,162,255,0.08), var(--panel-2)); }
.detail-header.grade-4 { border-color: rgba(255,93,108,0.50); background: linear-gradient(180deg, rgba(255,93,108,0.08), var(--panel-2)); }
.detail-header.grade-5 { border-color: rgba(185,117,255,0.55); background: linear-gradient(180deg, rgba(185,117,255,0.10), var(--panel-2)); }
.detail-header.grade-6 { border-color: rgba(255,207,58,0.7); background: linear-gradient(180deg, rgba(255,207,58,0.12), var(--panel-2)); }
.detail-icon {
  flex: 0 0 96px; width: 96px; height: 96px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.08), rgba(0,0,0,0.5));
  border: 1px solid var(--line-gold);
  border-radius: 10px;
  overflow: hidden;
}
.detail-icon img { max-width: 80%; max-height: 80%; image-rendering: pixelated; }
.detail-info { flex: 1; min-width: 0; }
.detail-grade { font-family: var(--ff-display); color: var(--gold-bright); letter-spacing: 4px; font-size: 13px; margin-bottom: 4px; }
.detail-name { font-family: var(--ff-serif); margin: 0 0 8px; font-size: 26px; color: var(--text); }
.detail-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.detail-meta span { background: rgba(0,0,0,0.3); padding: 4px 10px; border-radius: 4px; }
.detail-classes { font-size: 13px; color: var(--gold); }
.detail-section { margin: 18px 0; }
.detail-section h3 { font-family: var(--ff-serif); color: var(--gold-bright); border-bottom: 1px solid var(--line-gold); padding-bottom: 6px; margin: 0 0 12px; }
.detail-section ul { margin: 0; padding-left: 22px; line-height: 1.9; }
.detail-section ul li { color: var(--text); }
.detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.stat-item {
  display: flex; justify-content: space-between;
  background: var(--bg-2); padding: 8px 12px;
  border-radius: 6px; border: 1px solid var(--line);
  font-size: 13px;
}
.stat-label { color: var(--muted); }
.stat-value { color: var(--gold-bright); font-weight: 700; }

/* Items grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.item-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(56,43,80,0.18), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  transition: all .15s;
}
.item-card.clickable { cursor: pointer; }
.item-card.clickable:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(212,166,74,0.08), var(--panel-2));
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}
.item-icon {
  flex: 0 0 48px; width: 48px; height: 48px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.06), rgba(0,0,0,0.4));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.item-icon img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.item-info { flex: 1; min-width: 0; }
.item-name { font-family: var(--ff-serif); font-weight: 700; color: var(--text); margin-bottom: 4px; font-size: 14px; word-break: break-word; }
.item-meta { font-size: 11px; color: var(--muted); display: flex; gap: 10px; }
.item-hint { font-size: 11px; color: var(--gold); margin-top: 4px; font-style: italic; }
.item-maps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.item-map-link {
  font-size: 11px;
  color: var(--gold);
  background: rgba(212,166,74,0.10);
  border: 1px solid rgba(212,166,74,0.45);
  border-radius: 999px;
  padding: 2px 9px;
  cursor: pointer;
  transition: all .15s;
}
.item-map-link:hover {
  background: rgba(212,166,74,0.22);
  border-color: var(--gold);
}

.dropmap-card.no-drop { opacity: 0.65; }
.dropmap-card.no-drop:hover { opacity: 1; }
.dm-sub { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; font-style: italic; }

.back-btn {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); padding: 6px 14px; border-radius: 6px;
  cursor: pointer; font-size: 13px; margin-bottom: 10px;
  font-family: var(--ff-body);
}
.back-btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.view-title {
  font-family: var(--ff-display);
  color: var(--gold-bright); font-size: 24px; margin: 8px 0 16px;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--line-gold); padding-bottom: 10px;
}
.center { text-align: center; }

/* 製作查詢 */
.craft-npc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.craft-npc-grid.hidden { display: none; }
.craft-npc-card {
  display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: var(--ff-serif);
  transition: all .15s;
}
.craft-npc-card:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(212,166,74,0.10), var(--panel-2));
  box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,166,74,0.12);
  transform: translateY(-2px);
}
.cn-name { font-weight: 700; font-size: 15px; color: var(--text); }
.cn-meta { font-size: 12px; color: var(--muted); }

/* 職業介紹（圖文左右排） */
.class-block {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 28px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.class-block:last-child { border-bottom: none; }
.class-block .class-text > h3:first-child { margin-top: 0; }
.class-block .class-img { display: grid; place-items: center; }
.class-block .class-img img,
.class-block .class-img video {
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line-gold);
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  display: block;
}
@media (max-width: 720px) {
  .class-block { grid-template-columns: 1fr; gap: 14px; }
  .class-block .class-img { order: -1; }
  .class-block .class-img img,
  .class-block .class-img video { max-width: 320px; }
}

/* 背景音樂開關按鈕 */
#bgm-toggle {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 9999;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  background: rgba(26,20,38,0.85);
  color: var(--gold);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
#bgm-toggle:hover { transform: scale(1.08); border-color: var(--gold); box-shadow: 0 6px 18px rgba(212,166,74,0.4); }
#bgm-toggle.is-on { border-color: var(--gold); box-shadow: 0 0 12px rgba(245,215,125,0.45); }
@media (max-width: 720px) {
  #bgm-toggle { width: 42px; height: 42px; right: 12px; bottom: 12px; font-size: 18px; }
}

/* 頁面底部影片 */
.page-video {
  margin: 36px auto 24px;
  max-width: 880px;
  padding: 0 16px;
  display: flex;
  justify-content: center;
}
.page-video video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line-gold);
  box-shadow: 0 6px 28px rgba(0,0,0,0.55);
  background: #000;
}

/* 系統介紹索引 */
.system-index-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}
@media (min-width: 640px)  { .system-index-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .system-index-grid { grid-template-columns: repeat(3, 1fr); } }
.system-card {
  display: block;
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--ff-serif);
  text-decoration: none;
  transition: all .15s;
}
.system-card:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(212,166,74,0.12), var(--panel-2));
  box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,166,74,0.18);
  transform: translateY(-2px);
}
.system-card .sc-name {
  font-size: 22px; font-weight: 700;
  letter-spacing: 4px;
  color: var(--gold-bright);
}
.link-gold { color: var(--gold); text-decoration: none; }
.link-gold:hover { color: var(--gold-bright); text-decoration: underline; }

/* 娃娃系統列表 */
.doll-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}
@media (min-width: 640px)  { .doll-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .doll-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .doll-grid { grid-template-columns: repeat(5, 1fr); } }
.doll-card {
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s;
}
.doll-card:hover { border-color: var(--gold); }
.doll-icon { display: grid; place-items: center; height: 56px; }
.doll-icon img {
  max-width: 56px; max-height: 56px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.doll-name {
  text-align: center;
  font-weight: 700;
  color: var(--gold-bright);
  font-family: var(--ff-serif);
  letter-spacing: 2px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.doll-powers {
  margin: 0; padding-left: 18px;
  font-size: 13px; color: var(--text);
  line-height: 1.7;
}
.doll-powers li { list-style: disc; }

/* 遠征錄系統：製作材料區塊 */
.exp-craft {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.exp-craft-title {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 4px;
}
.exp-mats {
  margin: 0; padding-left: 16px;
  font-size: 12px; color: var(--muted);
  line-height: 1.6;
}
.exp-mats li { list-style: circle; }

/* 變身系統 */
.tf-search { margin: 16px 0 4px; }
.tf-search-input {
  width: 100%; box-sizing: border-box; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-gold); border-radius: 8px; padding: 11px 14px; font-size: 15px;
}
.tf-search-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 14px rgba(212,166,74,0.25); }
.tf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tf-chip {
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.tf-chip:hover { color: var(--text); border-color: var(--gold); }
.tf-chip.is-active {
  color: #1a1426; font-weight: 700; border-color: var(--gold);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
}
.transform-section { margin-top: 28px; }
.transform-section:first-of-type { margin-top: 18px; }
.transform-section-title {
  font-family: var(--ff-serif);
  font-size: 18px;
  letter-spacing: 4px;
  color: var(--gold);
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.transform-section-count {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 6px;
}
.transform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px)  { .transform-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px)  { .transform-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .transform-grid { grid-template-columns: repeat(5, 1fr); } }
.transform-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  transition: border-color .15s;
}
.transform-card:hover { border-color: var(--gold); }
.tf-icon { flex-shrink: 0; width: 56px; height: 56px; display: grid; place-items: center; }
.tf-icon img {
  max-width: 56px; max-height: 56px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.tf-body { flex: 1; min-width: 0; }
.tf-title {
  font-family: var(--ff-serif);
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 14px;
  letter-spacing: 1px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.tf-stat {
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
}

/* 變身覺醒教學 */
.awaken-steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.awaken-step {
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line); border-radius: 10px; padding: 16px;
}
.awaken-step-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.awaken-step-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  color: #1a1426; background: linear-gradient(180deg, var(--gold-bright), var(--gold));
}
.awaken-step-text { flex: 1; min-width: 0; }
.awaken-step-text p { margin: 4px 0 0; color: var(--text); line-height: 1.7; }
.awaken-rules { margin: 8px 0 0; padding-left: 18px; }
.awaken-rules li { color: var(--muted); font-size: 13px; line-height: 1.8; }
.awaken-img {
  display: block; width: 100%; max-width: 240px; height: auto;
  border-radius: 8px; border: 1px solid var(--line-gold);
}
.awaken-img-lg { max-width: 480px; }

/* 陣營系統 */
.camp-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin: 18px 0 8px;
}
.camp-hero img { max-width: 100%; height: auto; border-radius: 10px; }
.camp-hero-names { max-width: 520px; }
.camp-hero-npc { max-width: 420px; }
.camp-section { margin-top: 30px; }
.camp-title {
  font-family: var(--ff-serif);
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--gold);
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.camp-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.camp-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
.camp-table th, .camp-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.camp-table thead th {
  position: sticky; top: 0;
  background: var(--panel-2);
  color: var(--gold-bright);
  font-family: var(--ff-serif);
  font-weight: 700;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--line-gold);
}
.camp-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.camp-table tbody tr:hover { background: rgba(212,166,74,0.08); }
.camp-rank { color: var(--gold); font-weight: 700; }
.camp-title-cell { color: var(--gold-bright); font-family: var(--ff-serif); white-space: nowrap; }
.camp-num { font-variant-numeric: tabular-nums; }
.camp-num.zero { color: var(--muted); }

/* 武器屬性系統 */
.wattr-section { margin-top: 30px; }
.wattr-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--ff-serif);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--gold);
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.wattr-elem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
}
.wattr-tag { font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.wattr-earth .wattr-elem { background: linear-gradient(135deg, #8a6a23, #5c4515); }
.wattr-fire  .wattr-elem { background: linear-gradient(135deg, #c0392b, #7a1f16); }
.wattr-water .wattr-elem { background: linear-gradient(135deg, #2980b9, #16455e); }
.wattr-wind  .wattr-elem { background: linear-gradient(135deg, #27ae60, #145c33); }
.wattr-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.wattr-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.wattr-table th, .wattr-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}
.wattr-table thead th {
  background: var(--panel-2);
  color: var(--gold-bright);
  font-family: var(--ff-serif);
  font-weight: 700;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--line-gold);
}
.wattr-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.wattr-table tbody tr:hover { background: rgba(212,166,74,0.08); }
.wattr-stage { color: var(--gold); font-weight: 700; }
.wattr-name { color: var(--gold-bright); font-family: var(--ff-serif); }
.wattr-num { font-variant-numeric: tabular-nums; }
.wattr-eff-col { width: 46%; }
.wattr-eff { text-align: left; white-space: normal; color: var(--text); }

/* 簽到系統 */
.att-h2 {
  font-family: var(--ff-serif);
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--gold);
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 8px;
  margin: 30px 0 16px;
}
.att-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.att-step {
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.att-step-text {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; color: var(--text); line-height: 1.6;
}
.att-step-text strong { color: var(--gold-bright); }
.att-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  color: #1a0f02; font-weight: 700; font-size: 15px;
  font-family: var(--ff-serif);
}
.att-img {
  display: block;
  max-width: 100%;
  margin: 14px auto 0;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.att-reward {
  border-collapse: collapse;
  width: 100%;
  max-width: 420px;
  margin: 16px auto 0;
  font-size: 14px;
}
.att-reward th, .att-reward td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.att-reward thead th {
  background: var(--panel-2);
  color: var(--gold-bright);
  font-family: var(--ff-serif);
  letter-spacing: 2px;
  border-bottom: 1px solid var(--line-gold);
}
.att-reward tbody tr:hover { background: rgba(212,166,74,0.08); }
.att-reward td:first-child { color: var(--gold); font-weight: 700; }
.att-rules {
  margin: 0; padding-left: 22px;
  font-size: 15px; color: var(--text); line-height: 1.9;
}
.att-rules li { margin-bottom: 6px; }

/* 娃娃系統 — 獲取方式 */
.doll-acq { margin-bottom: 8px; }
.doll-acq-title {
  margin: 26px 0 8px;
  font-family: var(--ff-serif);
  font-size: 18px; color: var(--gold-bright); letter-spacing: 1px;
}
.doll-acq-sub {
  margin: 14px 0 6px;
  color: var(--muted); font-weight: 700; letter-spacing: 1px;
}
.vip-note { margin: 6px 0 16px; color: var(--gold); font-weight: 600; }
.doll-rules {
  margin: 0; padding: 14px 16px 14px 34px;
  list-style: disc;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px; line-height: 2;
}
.doll-rules li { margin-bottom: 4px; }
.doll-rules .c-normal, .doll-rules .c-high, .doll-rules .c-rare,
.doll-rules .c-hero, .doll-rules .c-legend, .doll-rules .c-myth,
.doll-rules .c-unique { font-weight: 700; }
.c-normal { color: #f2f2f2; }
.c-high   { color: #4fd06b; }
.c-rare   { color: #5aa9ff; }
.c-hero   { color: #ff6b6b; }
.c-legend { color: #c98bff; }
.c-myth   { color: #f5d77d; }
.c-unique { color: #2fd6c3; }

/* 注意事項（各系統共用） */
.sys-note {
  margin-top: 28px; padding: 16px 18px;
  border: 1px solid rgba(212,166,74,0.28);
  border-left: 3px solid var(--gold, #d4a64a);
  border-radius: 8px;
  background: rgba(212,166,74,0.06);
}
.sys-note-title {
  margin: 0 0 8px; font-family: var(--ff-serif);
  font-size: 16px; color: var(--gold, #d4a64a); letter-spacing: 1px;
}
.sys-note-list { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted, #b9b2a3); line-height: 1.8; }

/* 常見問題 — Accordion */
.faq-cat { margin-top: 28px; }
.faq-cat:first-of-type { margin-top: 18px; }
.faq-cat-title {
  font-family: var(--ff-serif);
  font-size: 19px;
  letter-spacing: 3px;
  color: var(--gold);
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 8px;
  margin: 0 0 14px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item[open] { border-color: var(--gold); }
.faq-q {
  list-style: none;
  cursor: pointer;
  padding: 15px 46px 15px 16px;
  position: relative;
  font-family: var(--ff-serif);
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 15px;
  line-height: 1.5;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: "";
  position: absolute;
  right: 18px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
.faq-item[open] .faq-q::after { transform: translateY(-30%) rotate(225deg); }
.faq-q:hover { color: var(--gold); }
.faq-a {
  padding: 0 16px 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.faq-a ul { margin: 0; padding-left: 20px; }
.faq-a li { margin-bottom: 4px; }
.faq-a .faq-p { margin: 0 0 8px; }
.faq-a .faq-p + ul { margin-top: -4px; margin-bottom: 8px; }
.faq-a .faq-p:last-child { margin-bottom: 0; }
.faq-warn {
  margin: 10px 0 0;
  color: var(--err);
  font-size: 13px;
}
.faq-a .faq-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
}
.faq-a .faq-link:hover { color: var(--gold-bright); text-decoration: underline; }

/* 常見問題 — 圖文教學頁 */
.faq-summary {
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 18px 0 8px;
}
.faq-summary p { margin: 0 0 8px; font-size: 15px; line-height: 1.7; color: var(--text); }
.faq-summary p:last-child { margin-bottom: 0; }
.faq-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.faq-step {
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.faq-step-text {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 15px; color: var(--text); line-height: 1.7;
}
.faq-step-num {
  flex-shrink: 0;
  padding: 3px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  color: #1a0f02; font-weight: 700; font-size: 13px;
  font-family: var(--ff-serif);
  letter-spacing: 1px;
  white-space: nowrap;
}
.faq-note {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line-gold);
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
}
.faq-note p { margin: 0 0 8px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.faq-note p:last-child { margin-bottom: 0; }
.faq-note strong { color: var(--gold-bright); }

/* 煉金系統 */
.alc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 560px)  { .alc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 820px)  { .alc-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1080px) { .alc-grid { grid-template-columns: repeat(5, 1fr); } }
.alc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color .15s;
}
.alc-card:hover { border-color: var(--gold); }
.alc-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
}
.alc-icon img {
  max-width: 40px; max-height: 40px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.alc-name {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  min-width: 0;
}

/* 哈芙萬能藥系統 — 主要道具 */
.huff-items {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin: 18px 0 8px;
}
.huff-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 20px;
  min-width: 120px;
}
.huff-item img {
  width: 48px; height: 48px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.huff-item-name {
  font-family: var(--ff-serif);
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 14px;
  letter-spacing: 1px;
}

/* 地圖介紹 */
.map-section { margin-top: 22px; }
.map-section:first-of-type { margin-top: 14px; }
.map-section-title {
  font-family: var(--ff-serif);
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--gold);
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.map-section-count { font-size: 12px; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.map-npc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.map-npc-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  font-family: var(--ff-serif);
  transition: all .15s;
}
.map-npc-card:hover {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(212,166,74,0.10), var(--bg-2));
  color: var(--gold-bright);
}
.map-drop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.map-drop-card {
  display: flex; gap: 10px; align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
}
.md-icon { width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; }
.md-icon img { max-width: 32px; max-height: 32px; image-rendering: pixelated; }
.md-name { font-size: 13px; color: var(--text); line-height: 1.3; }

.craft-recipes.hidden { display: none; }
.recipe-list { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.recipe-card {
  background: linear-gradient(180deg, rgba(56,43,80,0.18), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
}
.recipe-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px;
  gap: 12px;
}
.rc-note { font-family: var(--ff-serif); color: var(--gold-bright); font-size: 14px; }
.rc-note.muted { color: var(--muted); }
.rc-chance { font-size: 13px; color: var(--gold); white-space: nowrap; }
.rc-chance.ok { color: var(--ok); font-weight: 700; }

.recipe-flow { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.recipe-side { flex: 1; min-width: 220px; }
.recipe-label { font-size: 11px; color: var(--muted); letter-spacing: 2px; margin-bottom: 8px; font-family: var(--ff-serif); }
.recipe-arrow { display: grid; place-items: center; color: var(--gold); font-size: 22px; }

.recipe-items { display: flex; flex-direction: column; gap: 6px; }
.recipe-item {
  display: flex; gap: 10px; align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}
.recipe-item.output { border-color: rgba(212,166,74,0.4); background: linear-gradient(180deg, rgba(212,166,74,0.06), var(--bg-2)); }
.recipe-item.exchange {
  border-color: rgba(90,162,255,0.4);
  background: linear-gradient(180deg, rgba(90,162,255,0.06), var(--bg-2));
  border-style: dashed;
}
.ri-enchant { color: var(--gold-bright); font-weight: 700; margin-right: 4px; }

.material-with-alts {
  background: rgba(0,0,0,0.18);
  border-left: 2px solid var(--gold-deep);
  padding: 6px 8px 6px 10px;
  border-radius: 4px;
}
.material-alts { margin: 6px 0 0 14px; }
.alt-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 4px;
  font-style: italic;
}
.alt-items { display: flex; flex-direction: column; gap: 4px; }
.alt-hint { color: var(--gold); font-size: 11px; margin-left: 6px; font-style: italic; font-weight: normal; }

.recipe-fail {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.recipe-fail .recipe-label { color: var(--err); }
.ri-icon {
  flex: 0 0 36px; width: 36px; height: 36px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.06), rgba(0,0,0,0.4));
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.ri-icon img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.ri-info { flex: 1; min-width: 0; }
.ri-name { font-size: 13px; color: var(--text); font-family: var(--ff-serif); word-break: break-word; }
.ri-count { font-size: 11px; color: var(--muted); }

@media (max-width: 720px) {
  .recipe-flow { flex-direction: column; }
  .recipe-arrow { transform: rotate(90deg); }
}

/* Pagination */
.pagination {
  display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}
.pg-btn {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--ff-serif);
  cursor: pointer;
  transition: all .12s;
  min-width: 38px;
}
.pg-btn:hover:not(:disabled):not(.disabled) {
  background: linear-gradient(180deg, rgba(212,166,74,0.12), var(--panel-2));
  border-color: var(--gold);
  color: var(--gold-bright);
}
.pg-btn.active {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 60%, var(--gold-deep));
  color: #1a0f02;
  border-color: var(--gold-deep);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(212,166,74,0.35);
}
.pg-btn:disabled, .pg-btn.disabled { opacity: 0.35; cursor: not-allowed; }
.pg-ellipsis { color: var(--muted); padding: 6px 4px; }
.page-info {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 1px;
}
.equip-list { display: block; }
.armor-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.small { font-size: 12px; }
@media (max-width: 720px) {
  .craft-flow { flex-direction: column; }
  .craft-arrow { transform: rotate(90deg); }
}

/* Admin */
.row-between { display: flex; justify-content: space-between; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 6px; }
.stack input, .stack textarea {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 12px; font-size: 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.stack textarea { line-height: 1.6; }
.admin-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }

/* FAQ 表單式編輯器 */
#fe-cats { display: flex; flex-direction: column; gap: 18px; }
.fe-cat {
  border: 1px solid var(--line-gold); border-radius: 8px;
  background: linear-gradient(180deg, rgba(56,43,80,0.20), var(--panel-2));
  padding: 16px;
}
.fe-cat-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.fe-cat-name {
  flex: 1; background: var(--bg-2); color: var(--gold-bright);
  border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
  font-size: 16px; font-family: var(--ff-serif, serif); font-weight: 600;
}
.fe-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.fe-item {
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2);
  padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.fe-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fe-q, .fe-a, .fe-warn, .fe-link-text, .fe-link-href {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; font-size: 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace; width: 100%; box-sizing: border-box;
}
.fe-a { line-height: 1.6; resize: vertical; }
.fe-optional { margin-top: 4px; }
.fe-optional > summary { cursor: pointer; color: var(--muted); font-size: 13px; user-select: none; }
.fe-optional[open] > summary { color: var(--gold); margin-bottom: 6px; }
.btn.fe-add-item { align-self: flex-start; }

/* States */
.error { color: var(--err); }
.success { color: var(--ok); }
.muted { color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line-gold);
  padding: 28px 0 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: rgba(0,0,0,0.45);
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; top: -2px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--crimson-bright) 50%, var(--gold) 70%, transparent);
  opacity: 0.6;
}
.site-footer p { margin: 4px 0; }
.site-footer .brand-mini {
  font-family: var(--ff-display);
  letter-spacing: 6px; color: var(--gold);
  font-weight: 900; font-size: 16px;
}

@media (max-width: 720px) {
  .nav { flex-direction: column; gap: 10px; }
  nav a { margin: 0 10px; }
  .hero h1 { font-size: 28px; }
  .query-form input, .query-form select { min-width: 0; width: 100%; }
  .query-form label { width: 100%; }
}

/* 蒐藏系統 */
.col-search {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 8px;
}
.col-search input {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
}
.col-search input:focus { outline: none; border-color: var(--gold); }
.col-search-hint { color: var(--muted); font-size: 13px; }
.col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px)  { .col-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px)  { .col-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .col-grid { grid-template-columns: repeat(5, 1fr); } }
.col-card {
  background: linear-gradient(180deg, rgba(56,43,80,0.22), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  transition: border-color .15s;
}
.col-card:hover { border-color: var(--gold); }
.col-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.col-icons img {
  width: 40px; height: 40px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.col-name {
  font-family: var(--ff-serif);
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 14px;
  letter-spacing: 1px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.col-line {
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
}
.col-label {
  display: inline-block;
  color: var(--muted);
  margin-right: 6px;
}
