/* 桌伴 Discord 機器人說明頁：延伸 /site-pages.css，沿用相同色票與卡片風格 */
:root {
  --dc-blurple: #5865F2;
  --dc-blurple-hover: #4752c4;
  --dc-green: #2e7d4f;
}

.sp-top__inner.dc-wide,
.sp-wrap.dc-wide { max-width: 1040px; }

.sp-nav a[aria-current="page"] { color: #fde68a; text-decoration: underline; }

/* 頂欄品牌：文字＋線條圖示（不用點陣 logo 圖） */
.dc-top .sp-brand {
  gap: 8px;
  font-size: 1.05rem;
  white-space: nowrap;
}
.dc-top .dc-brand-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #fde68a;
}
.dc-top .sp-nav a { white-space: nowrap; }

@media (max-width: 720px) {
  .sp-top__inner.dc-top {
    justify-content: flex-start;
    row-gap: 10px;
    padding: 12px 14px;
  }
  .dc-top .sp-brand { margin-right: auto; font-size: 1rem; }
  .dc-top .sp-nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .dc-top .sp-nav::-webkit-scrollbar { display: none; }
}
.sp-nav a:focus-visible,
.sp-brand:focus-visible,
.dc-btn:focus-visible,
.sp-toc a:focus-visible,
.dc-faq summary:focus-visible {
  outline: 3px solid #fde68a;
  outline-offset: 2px;
  border-radius: 6px;
}
.sp-wrap a:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dc-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--card);
  color: var(--navy);
  border: 2px solid var(--text-main);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 800;
}
.dc-skip:focus { top: 12px; }

/* ---------- 按鈕 ---------- */
.dc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; align-items: center; }
.dc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 2px solid var(--text-main);
  box-shadow: 3px 3px 0 var(--text-main);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.2;
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.dc-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--text-main); }
.dc-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text-main); }
.dc-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.dc-btn--invite { background: var(--dc-blurple); color: #fff !important; }
.dc-btn--invite:hover { background: var(--dc-blurple-hover); }
.dc-btn--panel { background: var(--navy); color: #fff !important; }
.dc-btn--panel:hover { background: var(--navy-hover); }
.dc-btn--ghost { background: var(--card); color: var(--navy) !important; }
.dc-btn--lg { padding: 14px 26px; font-size: 1.08rem; }

/* ---------- 首頁主視覺 ---------- */
.dc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.dc-hero .sp-meta { margin-top: 12px; }
.dc-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #e8ecfd;
  color: #3b44b8;
  border: 1.5px solid #c5cbf7;
  font-size: 0.82rem;
  font-weight: 800;
}

/* Discord 成員列表示意 */
.dc-members {
  background: #2b2d31;
  color: #dbdee1;
  border: 2px solid var(--text-main);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--text-main);
  padding: 16px 14px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
.dc-members__title { font-size: 0.72rem; font-weight: 800; color: #949ba4; letter-spacing: .06em; margin: 0 6px 8px; }
.dc-members ul { list-style: none; margin: 0; padding: 0; }
.dc-members li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; font-size: 0.95rem; }
.dc-members li + li { margin-top: 2px; }
.dc-members li.is-dead { opacity: .55; }
.dc-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.dc-members__caption { margin: 10px 6px 0; font-size: 0.78rem; color: #949ba4; }

/* ---------- 功能卡片 ---------- */
.dc-section-title { margin: 30px 0 14px; font-size: 1.3rem; color: var(--brown); }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.dc-grid--games { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.dc-feature {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 2px 2px 0 rgba(44, 34, 30, 0.08);
}
.dc-feature h3 { margin: 12px 0 6px; font-size: 1.05rem; color: var(--navy); }
.dc-feature p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.dc-feature a { font-weight: 700; }
.dc-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 2px solid var(--text-main);
  background: #fdf3d7;
  color: var(--brown);
}
.dc-icon svg { width: 24px; height: 24px; }
.dc-icon--navy { background: #dbe8f3; color: var(--navy); }
.dc-icon--red { background: #f7dcd6; color: #9c2f1f; }
.dc-icon--purple { background: #eadcf5; color: #6b2f8f; }
.dc-icon--green { background: #d9f0e0; color: var(--dc-green); }
.dc-icon--blurple { background: #e1e4fd; color: #3b44b8; }

.dc-game-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.dc-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f3eee4;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brown);
}

/* ---------- 步驟 ---------- */
.dc-steps { list-style: none; counter-reset: dc-step; margin: 0; padding: 0; }
.dc-steps > li {
  counter-increment: dc-step;
  position: relative;
  padding: 2px 0 14px 48px;
  color: var(--muted);
  font-size: 0.95rem;
}
.dc-steps > li::before {
  content: counter(dc-step);
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  border: 2px solid var(--text-main);
}
.dc-steps > li strong:first-child { display: block; color: var(--text-main); font-size: 1rem; }
.dc-steps ul { margin-top: 6px; }

/* ---------- 表格與程式碼 ---------- */
.dc-table-wrap { overflow-x: auto; margin: 6px 0 12px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; }
.dc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dc-table caption { text-align: left; padding: 10px 12px 0; font-weight: 800; color: var(--brown); }
.dc-table th, .dc-table td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #ece4d6; }
.dc-table th { background: #f3eee4; color: var(--brown); font-weight: 800; white-space: nowrap; }
.dc-table tr:last-child td { border-bottom: 0; }
.dc-table td { color: var(--muted); }
.dc-table td:first-child { color: var(--text-main); }
.dc-table code { white-space: nowrap; }

.sp-card code, .dc-feature code, .dc-note code, .dc-table code {
  font-family: Consolas, "Cascadia Code", "Courier New", monospace;
  font-size: 0.86em;
  background: #f1ebe0;
  border: 1px solid #e2d7c5;
  border-radius: 6px;
  padding: 1px 6px;
  color: #6b3b2a;
  word-break: break-word;
}
.dc-pre {
  margin: 8px 0 12px;
  padding: 12px 14px;
  background: #2b2d31;
  color: #e6e6e6;
  border-radius: 10px;
  border: 2px solid var(--text-main);
  overflow-x: auto;
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 0.86rem;
  line-height: 1.6;
}

/* ---------- 提示框 ---------- */
.dc-note {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid;
  margin: 10px 0 12px;
  font-size: 0.92rem;
  color: var(--text-main);
}
.dc-note svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.dc-note p { margin: 0; color: inherit; }
.dc-note--warn { background: #fff5dc; border-color: #e7c66a; }
.dc-note--info { background: #e9f1f8; border-color: #9fbfdc; }

/* ---------- 常見問題 ---------- */
.dc-faq details {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 10px;
}
.dc-faq summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: var(--text-main);
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.dc-faq summary::-webkit-details-marker { display: none; }
.dc-faq summary::before { content: "＋"; color: var(--navy); font-weight: 900; }
.dc-faq details[open] summary::before { content: "－"; }
.dc-faq details > div { padding: 0 14px 12px 38px; }
.dc-faq details > div p, .dc-faq details > div li { color: var(--muted); font-size: 0.93rem; }

.sp-wrap.dc-footer { padding-top: 0; padding-bottom: 40px; }
.sp-wrap.dc-footer .sp-foot { margin-top: 0; }
main.sp-wrap { padding-bottom: 24px; }
main:focus { outline: none; }

.dc-cta-card { text-align: center; }
.dc-cta-card .dc-actions { justify-content: center; }

@media (max-width: 760px) {
  .dc-hero { grid-template-columns: 1fr; }
  .dc-btn { width: 100%; justify-content: center; }
  .dc-actions { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .dc-btn { transition: none; }
  .dc-btn:hover, .dc-btn:active { transform: none; }
}
