/* Discord 教學頁（discord-guild.html、discord-party.html）共用，疊在 landing.css 上。
   這兩頁是拿來邊看邊照做的長文，版面收窄到單欄、步驟配截圖。 */
:root { --gold: #e2a93b; --discord: #5865f2; --warn: #f0b45a; }

main > section.guide { width: min(820px, 100% - 2rem); padding: 2.5rem 0; }

.guide-head { padding-top: 2.5rem; }
.guide-head .eyebrow { color: var(--gold); font-weight: 700; font-size: .9rem; letter-spacing: .08em; }
.guide-head h1 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.6rem); margin: .4rem 0 0; }
.guide-head .lead { margin-bottom: 1.25rem; }

.toc {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin: 0; padding: 0; list-style: none;
}
.toc a {
  display: inline-block; padding: .35rem .85rem; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--fg); text-decoration: none; font-size: .92rem;
}
.toc a:hover { border-color: var(--brand); color: var(--brand); }

.guide h2 { scroll-margin-top: 1rem; }
.guide h3 { font-size: 1.12rem; margin: 2rem 0 .6rem; }
.guide p { margin: 0 0 1rem; }
.guide .muted { color: var(--muted); }

.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 720px) { .roles { grid-template-columns: minmax(0, 1fr); } }
.roles a {
  display: grid; gap: .3rem; padding: 1rem 1.15rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--rule); color: var(--fg); text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.roles a:hover { border-color: var(--brand); background: var(--surface-raised); }
.roles strong { font-size: 1.05rem; }
.roles span { color: var(--muted); font-size: .9rem; line-height: 1.6; }

ol.walk { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; counter-reset: walk; }
ol.walk > li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0 1rem; counter-increment: walk; }
ol.walk > li::before {
  content: counter(walk); width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-weight: 800;
}
ol.walk > li > div { min-width: 0; }
ol.walk h3 { margin: .2rem 0 .5rem; }

.cmd {
  display: inline-flex; align-items: center; gap: .5rem; max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem;
  background: var(--surface-raised); color: var(--fg); border: 1px dashed var(--rule);
  border-radius: 8px; padding: .4rem .7rem; cursor: pointer; text-decoration: none;
  overflow-wrap: anywhere; text-align: left;
  transition: border-color .15s ease, color .15s ease;
}
.cmd svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.cmd:hover { border-color: var(--brand); color: var(--brand); }
.cmd.copied { border-color: var(--gold); color: var(--gold); }
.cmd-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }

.guide code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em;
  background: var(--surface-raised); padding: .1em .4em; border-radius: 4px;
}

.note {
  margin: 0 0 1rem; padding: .85rem 1rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--warn);
}
.note strong { color: var(--warn); }
.note p:last-child { margin-bottom: 0; }

/* 截圖照 width 屬性的尺寸顯示，不撐滿欄寬：Discord 截下來多半是 1x 的窄圖，放大會糊；
   app 的截圖是 2x，width 填邏輯尺寸。
   還沒截的先放虛線框，寫上清單編號與要截什麼（docs/discord_guide_screenshots.md）。 */
figure.shot { margin: 0 0 1.25rem; }
figure.shot img {
  display: block; max-width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--rule); background: var(--surface);
}
figure.shot .todo {
  display: grid; place-items: center; text-align: center; gap: .3rem;
  min-height: 9rem; padding: 1rem; border-radius: 12px;
  border: 2px dashed var(--rule); background: var(--surface); color: var(--muted); font-size: .9rem;
}
figure.shot .todo b { color: var(--gold); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
figure.shot figcaption { color: var(--muted); font-size: .88rem; margin-top: .45rem; }

.table-wrap { overflow-x: auto; margin: 0 0 1rem; border: 1px solid var(--rule); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { background: var(--surface-raised); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; }
td code { white-space: nowrap; }

details {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0 1.2rem; transition: border-color .2s ease;
}
details + details { margin-top: .75rem; }
details[open] { border-color: var(--brand); }
summary {
  cursor: pointer; font-weight: 700; padding: 1rem 0; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary svg {
  flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2;
  transition: transform .25s ease;
}
details[open] summary svg { transform: rotate(180deg); stroke: var(--brand); }
details p { color: var(--muted); }

.next {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.35rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--rule);
}
.next a { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .cmd, .roles a, details, summary svg { transition: none; }
}

.guide pre.sample {
  margin: 0 0 1rem; padding: .85rem 1rem; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
}
.guide pre.sample code { background: none; padding: 0; }
.guide ul:not(.toc) { margin: 0 0 1rem; padding-left: 1.2rem; }
.guide ul:not(.toc) > li + li { margin-top: .4rem; }
