/*
  discord-guide.css — Discordの使い方（/discord-guide/・page-discord-guide.php）
  assets.php がこのページだけで読む。色は style.css の変数（ライト/ダーク両方で読める値）。
  ★文字・アイコンの金は --text-gold（--gold は塗り専用。ライトの地で文字に使うと読めない・guide.css の冒頭と同じ理由）。
  図（.dg-phone）は Discord の画面を説明用に描いたもの。サイトのテーマに関係なく Discord のダーク寄りの色で描く。
  画像は切り取らない決まり（AGENTS.md）だが、このページの図は画像ではなく HTML なので対象外。どらbot のアイコンは丸く切ってよい（アイコン）。
*/

.dg-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ── ヒーロー ── */
.dg-hero {
  padding: 30px 0 4px;
}
.dg-hero h1 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 14px;
  text-align: center;
  background: none;
  border: none;
  padding: 0;
}
.dg-hero__lead {
  font-size: 0.86rem;
  line-height: 1.85;
  color: var(--text-light);
  margin: 4px 0 0;
}

/* ── どらbot の吹き出し ── */
.dg-say {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 14px;
}
.dg-say__icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line-gold);
}
.dg-say__bubble {
  background: var(--bg-card);
  border: 1px solid var(--line-gold);
  border-radius: 4px 14px 14px 14px;
  padding: 9px 13px;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--text-main);
}
.dg-say__bubble b {
  color: var(--text-gold);
}

/* ── 目次 ── */
.dg-toc {
  margin-top: 18px;
}
.dg-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dg-toc li {
  border-bottom: 1px solid var(--bg-subtle);
}
.dg-toc a {
  display: flex;
  gap: 10px;
  padding: 10px 2px;
  font-size: 0.88rem;
  color: var(--text-main);
  text-decoration: none;
}
.dg-toc a b {
  min-width: 1.2em;
  color: var(--text-gold);
  font-family: var(--font-mono);
}
.dg-toc a::after {
  content: '›';
  margin-left: auto;
  color: var(--text-light);
}

/* ── 章（箱にしない・ヘアラインで区切る） ── */
.dg-section {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line-gold);
  scroll-margin-top: 70px;
}
:root .dg-section > h2,
:root[data-theme="light"] .dg-section > h2 {
  font-size: 1.14rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text-main);
  background: none;
  border: none;
  padding: 0;
  line-height: 1.45;
}
.dg-chap {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-gold);
  border: 1px solid var(--line-gold-hi);
  border-radius: 99px;
  padding: 1px 9px;
  margin-bottom: 6px;
}
.dg-section p {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--text-main);
  margin: 0 0 10px;
}
.dg-section p.dg-muted,
.dg-muted {
  color: var(--text-light);
  font-size: 0.82rem;
}
.dg-section a:not([class]) {
  color: var(--text-gold);
}
:root[data-theme="light"] .dg-section a:not([class]) {
  text-decoration: underline;
}

/* 画面の上の言葉（ボタン名など）。枠なしの小さな地 */
.dg-ui {
  display: inline-block;
  font-size: 0.82em;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--bg-card-hi);
  color: var(--text-main);
  line-height: 1.6;
}

/* ── 番号の手順 ── */
.dg-steps {
  list-style: none;
  counter-reset: dg-s;
  margin: 14px 0 0;
  padding: 0;
}
.dg-steps > li {
  counter-increment: dg-s;
  position: relative;
  padding-left: 36px;
  margin: 0 0 14px;
}
.dg-steps > li::before {
  content: counter(dg-s);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1a1a;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dg-steps__t {
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 3px 0 3px;
  color: var(--text-main);
}
.dg-steps p {
  margin: 0;
}
.dg-list-dot {
  margin: 6px 0 0;
  padding-left: 1.1em;
  font-size: 0.86rem;
  line-height: 1.8;
}
.dg-list-dot li {
  margin-bottom: 4px;
}

/* ── 注意の一言（左の罫だけ） ── */
.dg-note {
  margin: 14px 0 0;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--line-gold-hi);
  font-size: 0.84rem;
  line-height: 1.8;
  color: var(--text-main);
}
.dg-note strong {
  display: block;
  font-size: 0.88rem;
}
.dg-note--warn {
  border-left-color: #e5484d;
}

/* ── 図（説明用に描いた Discord の画面） ── */
.dg-fig {
  margin: 10px 0 12px;
}
.dg-fig figcaption {
  font-size: 0.72rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 6px;
}
.dg-phone {
  width: 236px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 28px;
  background: #0b0b0d;
  padding: 9px;
  /* 内側の細い線はダークの地（黒）でスマホの縁が消えないように */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 18px rgba(0, 0, 0, 0.18);
}
.dg-scr {
  position: relative;
  height: 430px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  background: #313338;
  color: #dbdee1;
  font-size: 10.5px;
  line-height: 1.4;
}
.dg-rail {
  width: 46px;
  flex: none;
  background: #1e1f22;
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.dg-sv {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: #3a3c42;
  position: relative;
}
.dg-sv.is-on {
  background: #c9a227;
}
.dg-sv.is-on::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 6px;
  width: 4px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: #fff;
}
.dg-list {
  flex: 1;
  min-width: 0;
  background: #2b2d31;
  padding: 10px 8px 40px;
}
.dg-sname {
  font-weight: 800;
  font-size: 11.5px;
  color: #fff;
  padding: 2px 2px 7px;
}
.dg-search {
  background: #1e1f22;
  color: #949ba4;
  border-radius: 6px;
  padding: 3px 7px;
  margin-bottom: 6px;
}
.dg-cat {
  font-size: 9px;
  color: #949ba4;
  font-weight: 700;
  margin: 8px 2px 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dg-ch {
  padding: 3px 6px;
  border-radius: 4px;
  color: #949ba4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dg-ch.is-on {
  background: #404249;
  color: #fff;
}
.dg-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: #1e1f22;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.dg-tab {
  font-size: 9.5px;
  color: #949ba4;
}
.dg-tab.is-on {
  color: #fff;
  font-weight: 700;
}
/* 番号の印（赤い丸）。位置は図ごとに style で置く */
.dg-pin,
.dg-n {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #c62828; /* 白い数字と 5.6:1（#e5484d は 3.9:1 で足りなかった） */
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}
/* 印の置き方は3つ: 行の右端（is-in）・要素の右上の角（is-corner）・下のタブの文字の上（is-top）。
   絵の上に % で置くと幅や文字の大きさで印が文字に重なるので、印は描いた要素の中に入れる */
.dg-pin {
  flex: none;
  box-shadow: 0 0 0 2px #fff;
}
.dg-pin.is-in {
  margin-left: auto;
}
.dg-pin.is-corner {
  position: absolute;
  top: -9px;
  right: -11px;
}
.dg-pin.is-top {
  position: absolute;
  top: -27px;
  left: 50%;
  transform: translateX(-50%);
}
.dg-pin.is-left {
  position: absolute;
  right: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
}
.dg-cat,
.dg-ch,
.dg-menu__item,
.dg-sheet__title,
.dg-sheet__sub,
.dg-sheet__more {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dg-cat > span:first-child,
.dg-ch > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dg-tab,
.dg-plus {
  position: relative;
}
.dg-legend {
  list-style: none;
  margin: 6px 0 10px;
  padding: 0;
  font-size: 0.84rem;
  line-height: 1.7;
}
.dg-legend li {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.dg-n {
  flex: none;
  margin-top: 2px;
}

/* 機種ページ → Discord の流れ */
.dg-flow {
  max-width: 300px;
  margin: 0 auto;
}
.dg-hp {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  background: var(--bg-card);
}
.dg-hp__bar {
  font-size: 0.7rem;
  color: var(--text-light);
  background: var(--bg-card-hi);
  padding: 5px 10px;
}
.dg-hp__body {
  padding: 10px 10px 12px;
}
.dg-hp__title {
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
}
.dg-hp__btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dg-hp__btn {
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid var(--line-gold);
  border-radius: 8px;
  padding: 5px 9px;
  color: var(--text-main);
}
.dg-hp__btn.is-hl {
  border: 2px solid #c62828;
  padding: 4px 8px;
}
.dg-arrow {
  text-align: center;
  color: var(--text-gold);
  font-size: 0.9rem;
  margin: 6px 0;
}
.dg-room {
  border-radius: 12px;
  background: #313338;
  padding: 10px 12px 12px;
}
.dg-room__head {
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 8px;
}
.dg-room__line {
  height: 7px;
  border-radius: 4px;
  background: #4e5058;
  margin-bottom: 6px;
}
.dg-room__line.is-short {
  width: 60%;
}
.dg-room__cap {
  font-size: 0.7rem;
  color: #b5bac1;
  margin-top: 4px;
}

/* 書き込み画面 */
.dg-scr--chat {
  display: block;
}
.dg-chathead {
  padding: 12px 12px 10px;
  font-weight: 800;
  font-size: 11.5px;
  color: #fff;
  border-bottom: 1px solid #26272b;
}
.dg-msg {
  display: flex;
  gap: 8px;
  margin: 14px 10px 0;
  padding: 7px;
  border-radius: 8px;
  background: #3b3d44;
}
.dg-av {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #c9a227;
}
.dg-msg__name {
  font-weight: 700;
  color: #fff;
}
.dg-msg__text {
  color: #dbdee1;
}
.dg-menu {
  margin: 8px 10px 0 auto;
  width: 62%;
  background: #232428;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.dg-menu__item {
  padding: 6px 9px;
  border-radius: 6px;
  color: #dbdee1;
}
.dg-menu__item.is-hl {
  background: #5865f2;
  color: #fff;
  font-weight: 700;
}
.dg-mention {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 48px;
  background: #232428;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.dg-mention__item {
  display: flex;
  justify-content: space-between;
  padding: 6px 9px;
  border-radius: 6px;
}
.dg-mention__item b {
  color: #fff;
}
.dg-mention__item small {
  color: #949ba4;
  font-size: 9px;
}
.dg-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  background: #2b2d31;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px 0 34px;
}
.dg-plus {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3a3c42;
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.dg-input {
  flex: 1;
  background: #383a40;
  border-radius: 14px;
  padding: 5px 10px;
  color: #fff;
}

/* 通知の設定 */
.dg-phone--short .dg-scr {
  height: 300px;
}
.dg-scr--sheet {
  display: block;
  background: #1e1f22;
}
.dg-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #2b2d31;
  border-radius: 16px 16px 0 0;
  padding: 14px 12px 12px;
}
.dg-sheet__title {
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}
.dg-sheet__sub {
  color: #949ba4;
  font-size: 10px;
  margin: 8px 0 4px;
}
.dg-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 8px;
  color: #dbdee1;
}
.dg-radio__dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #80848e;
  flex: none;
}
.dg-radio.is-on {
  background: #404249;
  color: #fff;
  font-weight: 700;
}
.dg-radio.is-on .dg-radio__dot {
  border-color: #5865f2;
  background: radial-gradient(#5865f2 0 3px, transparent 4px);
}
.dg-sheet__more {
  margin-top: 6px;
  padding: 8px;
  border-top: 1px solid #3a3c42;
  color: #dbdee1;
}

/* ── 主な部屋 ── */
.dg-rooms {
  list-style: none;
  margin: 6px 0 12px;
  padding: 0;
}
.dg-rooms li {
  padding: 9px 0;
  border-bottom: 1px solid var(--bg-subtle);
}
.dg-rooms a {
  display: inline-block;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-gold);
  text-decoration: none;
}
.dg-rooms span {
  display: block;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-top: 1px;
}

/* ── ルール ── */
/* サイト全体の ol は番号を消しているので、番号は自前で描く */
.dg-rules {
  list-style: none;
  counter-reset: dg-r;
  margin: 4px 0 12px;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.85;
}
.dg-rules li {
  counter-increment: dg-r;
  position: relative;
  padding-left: 1.8em;
  margin-bottom: 6px;
}
.dg-rules li::before {
  content: counter(dg-r) '.';
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-gold);
}

/* ── 末尾のリンク ── */
.dg-links {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line-gold);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  font-size: 0.82rem;
}
.dg-links a {
  color: var(--text-light);
}
/* 候補の箱は画面の右端に近く、右上だと画面の外で切れるか「ロール」に重なるので、印は左上の角の外へ */
.dg-mention > .dg-pin.is-corner {
  right: auto;
  left: -6px;
  top: -14px;
}

/* 画像の図（未認証の×印の画面と直し方）。切り取らずに全体を出す決まり＝width:100%・height:auto */
.dg-shot {
  max-width: 300px;
  margin: 14px auto 0;
}
.dg-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.dg-shot figcaption {
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--text-light);
  text-align: center;
  margin-top: 6px;
}

/* ホームページの質問チャットの図（サイトの窓を説明用に描いたもの・サイトの色の変数で描く） */
.dg-hc {
  max-width: 320px;
  margin: 0 auto;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  background: var(--bg-card);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-main);
}
.dg-hc__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--bg-subtle);
}
.dg-hc__name {
  font-weight: 700;
  color: var(--text-gold);
  white-space: nowrap;
}
.dg-hc__toggle {
  position: relative;
  display: inline-flex;
  gap: 3px;
}
.dg-hc__mode {
  border: 1px solid var(--bg-subtle);
  border-radius: 99px;
  padding: 1px 8px;
  font-weight: 700;
  color: var(--text-light);
}
.dg-hc__mode.is-ai {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.5);
  color: #2f6fca;
}
:root:not([data-theme="light"]) .dg-hc__mode.is-ai {
  color: #7cb6ff;
}
.dg-hc__suffix {
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}
.dg-hc__icon {
  position: relative;
  color: var(--text-light);
  font-size: 13px;
  padding: 0 3px;
}
.dg-hc__icon:first-of-type {
  margin-left: auto;
}
.dg-hc__body {
  padding: 12px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-body);
}
.dg-hc__msg {
  max-width: 88%;
}
.dg-hc__msg.is-own {
  align-self: flex-end;
}
.dg-hc__author {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  margin: 0 0 2px 2px;
}
.dg-hc__bubble {
  background: var(--bg-card);
  border: 1px solid var(--bg-subtle);
  border-radius: 10px;
  padding: 6px 9px;
}
.dg-hc__msg.is-own .dg-hc__bubble {
  border-color: rgba(96, 165, 250, 0.45);
}
.dg-hc__swipe {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 10px;
  color: var(--text-light);
}
.dg-hc__typing {
  font-size: 10px;
  color: var(--text-light);
}
.dg-hc__form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-top: 1px solid var(--bg-subtle);
}
.dg-hc__clip,
.dg-hc__send {
  position: relative;
  flex: none;
  font-size: 14px;
}
.dg-hc__send {
  color: var(--text-gold);
}
.dg-hc__input {
  flex: 1;
  border: 1px solid var(--bg-subtle);
  border-radius: 10px;
  padding: 5px 9px;
  color: var(--text-light);
}

/* 質問チャットの図は窓の中が詰まっているので、番号の印は窓の上下の外に出す（上=is-top・下=is-bottom） */
.dg-pin.is-bottom {
  position: absolute;
  bottom: -27px;
  left: 50%;
  transform: translateX(-50%);
}
.dg-fig--hc {
  padding-top: 22px;
}
.dg-fig--hc figcaption {
  margin-top: 32px;
}
