/* ================================================================
   華耀東夷堂 — スタイルシート
   編集箇所のガイド:
   - デザイントークン（色・フォント）: 各セレクタに直書き
   - ベースカラー:   #0f1420
   - アクセントカラー: #c8a060
   - フォント: Noto Sans JP / IBM Plex Mono
================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #060a10; /* 画面外の最暗部 */
  font-family: 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* ── レターボックス背景レイヤー（コンテンツエリア外にのみ表示） ── */
#bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── スマホフレーム（コンテンツエリア） ── */
#stage {
  width: 100%;
  height: 100%;
  max-width: 430px;
  position: relative;
  overflow: hidden;
  background: #0f1420;
  z-index: 1;
  border: 1.5px solid rgba(180,185,210,0.18);   /* ベゼル線 */
  border-radius: 36px;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.55), 0 28px 80px rgba(0,0,0,0.65);
}

/* ================================================================
   SCENE 1: スプラッシュ
================================================================ */
#scene-splash {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 36px;
  opacity: 0;
  transition: opacity 0.6s ease;
}
#scene-splash.visible { opacity: 1; }
#scene-splash.out     { opacity: 0; transition: opacity 0.5s ease; }

#splash-logo {
  width: 140px; height: 140px;
  filter: sepia(0.6) saturate(3) hue-rotate(-25deg) brightness(1.05);
}

/* ローディングバー */
#loader-wrap {
  width: 200px; height: 1px;
  background: rgba(200,160,96,0.15);
  position: relative; overflow: hidden;
}
#loader-bar {
  position: absolute; top: 0; left: 0; height: 100%;
  width: 0%;
  background: #c8a060;
}

/* ================================================================
   SCENE 2: 利用規約
================================================================ */
#scene-terms {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
}
#scene-terms.visible { opacity: 1; pointer-events: all; }
#scene-terms.out     { opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }

#terms-header      { flex-shrink: 0; padding: 48px 28px 20px; }
#terms-site-name   {
  font-size: 10px; letter-spacing: 0.18em;
  color: #c8a060; font-weight: 300;
  font-family: 'IBM Plex Mono', monospace;
}
#terms-title       { margin-top: 10px; font-size: 18px; font-weight: 300; color: #f0ece4; letter-spacing: 0.05em; line-height: 1.5; }
#terms-subtitle    { margin-top: 6px; font-size: 11px; color: #5a6278; letter-spacing: 0.03em; }

#terms-scroll {
  flex: 1; overflow-y: auto; padding: 0 28px 20px;
  scroll-behavior: smooth;
}
#terms-scroll::-webkit-scrollbar       { width: 2px; }
#terms-scroll::-webkit-scrollbar-thumb { background: #2a3040; }

/* 規約本文（通常版・ひらがな版共通） */
.terms-body        { display: none; font-size: 12.5px; line-height: 2; color: #9aa0b0; font-weight: 300; letter-spacing: 0.02em; }
.terms-body.active { display: block; }
.terms-body h2     { font-size: 11px; font-weight: 500; color: #c8a060; letter-spacing: 0.1em; margin: 24px 0 8px; }
.terms-body p      { margin-bottom: 8px; }
.terms-body ul     { padding-left: 0; list-style: none; }
.terms-body ul li  { padding-left: 1em; text-indent: -1em; color: #7a8090; }
.terms-body .footer-note { margin-top: 32px; font-size: 10px; color: #3a4058; letter-spacing: 0.05em; }

/* フェードマスク */
#terms-fade-top    { position: absolute; left: 0; right: 0; height: 40px; pointer-events: none; top: 130px; background: linear-gradient(to bottom, #0f1420, transparent); z-index: 2; }
#terms-fade-bottom { position: absolute; left: 0; right: 0; height: 60px; pointer-events: none; bottom: 90px; background: linear-gradient(to top, #0f1420, transparent); z-index: 2; }

#terms-footer {
  flex-shrink: 0; padding: 12px 28px 36px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  position: relative; z-index: 3;
}

/* 同意ボタン */
#btn-agree {
  width: 100%; padding: 14px 0;
  background: #c8a060; color: #0f1420;
  font-size: 13px; font-weight: 500; letter-spacing: 0.1em;
  border: none; cursor: pointer; border-radius: 2px;
  opacity: 0.3; pointer-events: none;
  transition: opacity 0.3s ease;
  font-family: 'Noto Sans JP', sans-serif;
}
#btn-agree.active        { opacity: 1; pointer-events: all; }
#btn-agree.active:active { opacity: 0.85; }

/* ひらがな切替リンク */
#link-kana {
  font-size: 10px; color: #3a4058; letter-spacing: 0.06em;
  cursor: pointer; background: none; border: none;
  font-family: 'Noto Sans JP', sans-serif;
  transition: color 0.2s;
}
#link-kana:hover { color: #7a8090; }

/* ================================================================
   SCENE 3: 掲示板
================================================================ */
#scene-main {
  position: absolute; inset: 0; z-index: 5;
  opacity: 0; transform: scale(0.95);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34,1.2,0.64,1);
}
#scene-main.visible { opacity: 1; transform: scale(1); pointer-events: all; }

#board-root {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: transparent;
  position: relative; overflow: hidden;
}
#board-root ::-webkit-scrollbar       { width: 3px; }
#board-root ::-webkit-scrollbar-track { background: transparent; }
#board-root ::-webkit-scrollbar-thumb { background: #2a3040; border-radius: 2px; }

/* ── サイドバー ── */
#bd-overlay {
  display: none; position: absolute; inset: 0;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(1px);
  z-index: 40;
}
#bd-overlay.open { display: block; }

#bd-sidebar {
  position: absolute; top: 0; left: 0; bottom: 0; width: 240px;
  background: #0b0f1a; z-index: 50;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
#bd-sidebar.open { transform: translateX(0); }

#bd-sidebar-hdr {
  padding: 16px 16px 12px; border-bottom: 1px solid #1a2236;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
#bd-sidebar-hdr .bd-logo          { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
#bd-sidebar-hdr .bd-logo img      { width: 100%; height: 100%; object-fit: cover; }

.bd-site-name { font-size: 13px; font-weight: 700; color: #f0ece4; letter-spacing: 0.02em; }
.bd-site-kana { font-size: 10px; color: #5a6278; letter-spacing: 0.05em; }
.bd-site-ver  { font-size: 0.7rem; font-weight: 300; color: #9aa0b0; margin-top: 2px; }

#bd-nav-scroll  { flex: 1; overflow-y: auto; padding: 12px 8px; }
.bd-nav-label   { font-size: 10px; color: #5a6278; letter-spacing: 0.1em; padding: 4px 8px 8px; font-weight: 700; }

.bd-board-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px; background: transparent;
  border: none; border-radius: 6px; cursor: pointer;
  transition: background 0.15s; text-align: left;
}
.bd-board-btn:hover           { background: #141b2a; }
.bd-board-btn.active          { background: #1a2236; }
.bd-board-btn .bd-emoji       { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.bd-board-btn .bd-bname       { font-size: 13px; color: #ddd6c8; letter-spacing: 0.02em; }
.bd-board-btn.active .bd-bname{ color: #c8a060; font-weight: 700; }
.bd-board-btn .bd-indicator   { margin-left: auto; width: 3px; height: 16px; background: #c8a060; border-radius: 2px; flex-shrink: 0; display: none; }
.bd-board-btn.active .bd-indicator { display: block; }

/* ── カテゴリ構造（Discord風2層） ── */
.bd-category { margin-bottom: 2px; }

.bd-cat-hdr {
  display: flex; align-items: center; gap: 6px;
  width: 100%; padding: 6px 8px 4px;
  background: none; border: none; cursor: pointer;
  text-align: left;
}
.bd-cat-hdr:hover .bd-cat-name { color: #9aa0b0; }

.bd-cat-arrow {
  font-size: 8px; color: #5a6278;
  transition: transform 0.2s;
  display: inline-block;
}
.bd-cat-arrow.collapsed { transform: rotate(-90deg); }

.bd-cat-name {
  font-size: 12px; font-weight: 600; color: #5a6278;
  letter-spacing: 0.05em; text-transform: uppercase;
  transition: color 0.15s;
}

.bd-cat-boards { overflow: hidden; }
.bd-cat-boards.hidden { display: none; }

/* 未読バッジ */
.bd-unread {
  margin-left: auto; font-size: 8px; color: #c8a060;
  flex-shrink: 0;
}

/* サイドバーフッター */
#bd-sidebar-ftr {
  padding: 10px 16px 16px; border-top: 1px solid #1a2236;
  flex-shrink: 0;
}
.bd-ftr-desc { font-size: 10px; color: #5a6278; margin-bottom: 8px; }
.bd-legal-links { display: flex; align-items: center; gap: 8px; }
.bd-legal-btn {
  background: none; border: none; cursor: pointer;
  font-size: 10px; color: #3a4058;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.03em; padding: 0;
  transition: color 0.2s;
}
.bd-legal-btn:hover { color: #c8a060; }
.bd-legal-sep { font-size: 10px; color: #3a4058; }

/* ── 法的モーダル ── */
#bd-legal-modal {
  display: none; position: absolute; inset: 0;
  background: rgba(0,0,0,0.8); z-index: 200;
  align-items: flex-end; justify-content: center;
  padding: 0;
}
#bd-legal-modal.open { display: flex; }
#bd-legal-modal-box {
  background: #0d1220; border-top: 1px solid #c8a060;
  border-radius: 12px 12px 0 0;
  width: 100%; max-height: 75%;
  display: flex; flex-direction: column;
}
#bd-legal-modal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px; border-bottom: 1px solid #1a2236;
  flex-shrink: 0;
}
#bd-legal-modal-title { font-size: 14px; font-weight: 700; color: #c8a060; }
#bd-legal-modal-close {
  background: none; border: none; color: #5a6278;
  font-size: 16px; cursor: pointer; padding: 2px 6px;
  transition: color 0.15s;
}
#bd-legal-modal-close:hover { color: #f0ece4; }
#bd-legal-modal-body {
  flex: 1; overflow-y: auto; padding: 16px 18px 24px;
  font-size: 12px; line-height: 2; color: #9aa0b0;
}
#bd-legal-modal-body h2 { font-size: 11px; font-weight: 500; color: #c8a060; letter-spacing: 0.1em; margin: 20px 0 6px; }
#bd-legal-modal-body h3 { font-size: 10px; font-weight: 500; color: #8a9090; letter-spacing: 0.08em; margin: 14px 0 4px; }
#bd-legal-modal-body p  { margin-bottom: 6px; }
#bd-legal-modal-body ul { padding-left: 0; list-style: none; }
#bd-legal-modal-body ul li { color: #7a8090; }
#bd-legal-modal-body .footer-note { margin-top: 24px; font-size: 10px; color: #3a4058; }

/* ── ヘッダー ── */
#bd-header {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 52px;
  background: #0d1220; border-bottom: 1px solid #1a2236;
  flex-shrink: 0; z-index: 10; position: relative;
}
#bd-hamburger {
  background: none; border: none; cursor: pointer; padding: 4px;
  display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
}
#bd-hamburger span  { display: block; width: 18px; height: 1.5px; background: #5a6278; border-radius: 1px; }
#bd-header-title    { flex: 1; font-size: 15px; font-weight: 700; color: #f0ece4; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#bd-back-btn {
  display: none; background: none; border: none;
  color: #c8a060; font-size: 12px; cursor: pointer;
  padding: 4px 8px; letter-spacing: 0.05em;
  font-family: 'Noto Sans JP', sans-serif; flex-shrink: 0;
}

.bd-logo-sm     { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.bd-logo-sm img { width: 100%; height: 100%; object-fit: cover; }

/* ── メインコンテンツ ── */
#bd-full-banner {
  display: none;
  background: rgba(192,80,80,0.12); color: #c05050;
  font-size: 11px; text-align: center;
  padding: 7px 14px; border-bottom: 1px solid rgba(192,80,80,0.3);
  flex-shrink: 0; letter-spacing: 0.03em;
}
#bd-main { flex: 1; overflow-y: auto; padding-bottom: 4px; }

.bd-loading, .bd-empty {
  text-align: center; padding: 48px 20px;
  color: #5a6278; font-size: 13px; letter-spacing: 0.04em;
}

/* スレッドリスト */
.bd-thread-item         { padding: 12px 16px; cursor: pointer; transition: background 0.1s; }
.bd-thread-item:hover   { background: #141b2a; }
.bd-thread-sep          { height: 0.5px; background: rgba(255,255,255,0.04); filter: blur(0.4px); margin: 0 16px; }
.bd-thread-title        { font-size: 13.5px; color: #f0ece4; margin-bottom: 3px; letter-spacing: 0.01em; }
.bd-thread-meta         { font-size: 10px; color: #5a6278; font-family: 'IBM Plex Mono', monospace; }
.bd-thread-count        { float: right; font-size: 11px; color: #c8a060; margin-left: 8px; font-family: 'IBM Plex Mono', monospace; }
.bd-thread-item.full .bd-thread-title { color: #5a6278; }
.bd-thread-item.full .bd-thread-count { color: #c05050; }

/* 投稿 */
.bd-post              { padding: 10px 16px; }
.bd-post.system       { border-left: 2px solid #8a6a3a; margin: 0 16px; }
.bd-post.highlight    { background: rgba(200,160,96,0.08); }
.bd-post-hdr          { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.bd-post-num          { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: #c8a060; font-weight: 500; cursor: pointer; letter-spacing: 0.03em; }
.bd-post-id           { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: #c8a060; font-weight: 500; letter-spacing: 0.03em; }
.bd-post-time         { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: #3a4058; margin-left: 2px; }
.bd-post-body         { font-size: 13.5px; line-height: 1.75; color: #f0ece4; word-break: break-word; letter-spacing: 0.01em; }
.bd-post.system .bd-post-body { color: #ddd6c8; }
.bd-post-body a       { color: #c8a060; text-decoration: none; }
.bd-post-body a.anchor{ color: #7ab8e0; }
/* .inline-img は下部の統合スタイルで定義 */

/* ── 入力バー ── */
#bd-input-bar {
  display: none; padding: 10px 14px 14px;
  background: #0f1420; border-top: 1px solid #1a2236;
  flex-shrink: 0;
}
#bd-form { display: flex; align-items: flex-end; gap: 10px; }
#bd-textarea {
  flex: 1; resize: none; border: none; outline: none;
  background: #1a2236; color: #f0ece4; border-radius: 8px;
  padding: 10px 12px; font-size: 13.5px;
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.6; overflow: hidden; caret-color: #c8a060;
  min-height: 40px; max-height: 120px;
}
#bd-textarea::placeholder { color: #5a6278; }
#bd-send-btn {
  width: 38px; height: 38px; border-radius: 8px;
  background: #c8a060; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity 0.15s;
}
#bd-send-btn:disabled    { opacity: 0.4; cursor: default; }
#bd-send-btn svg         { pointer-events: none; }

/* ── スレッド作成モーダル（管理ページ用・一般画面からは非表示） ── */
#bd-modal {
  display: none; position: absolute; inset: 0;
  background: rgba(0,0,0,0.75); z-index: 200;
  align-items: center; justify-content: center; padding: 20px;
}
#bd-modal.open         { display: flex; }
#bd-modal-box          { background: #161d2e; border: 1px solid #c8a060; border-radius: 8px; padding: 20px; width: 100%; }
#bd-modal-box h3       { color: #c8a060; margin-bottom: 14px; font-size: 14px; font-weight: 500; letter-spacing: 0.05em; }
#bd-modal-box input,
#bd-modal-box textarea {
  width: 100%; background: #0f1420; border: 1px solid #1a2236;
  border-radius: 6px; color: #f0ece4; padding: 9px 12px;
  font-size: 13px; font-family: 'Noto Sans JP', sans-serif;
  margin-bottom: 10px; display: block; outline: none;
}
#bd-modal-box input:focus,
#bd-modal-box textarea:focus { border-color: #c8a060; }
#bd-modal-box textarea { min-height: 72px; resize: none; }

.bd-modal-actions          { display: flex; gap: 8px; }
.bd-modal-actions button   { flex: 1; padding: 10px; border-radius: 4px; font-size: 13px; cursor: pointer; border: none; font-family: 'Noto Sans JP', sans-serif; }
#bd-modal-submit           { background: #c8a060; color: #0f1420; font-weight: 700; }
#bd-modal-cancel           { background: none; border: 1px solid #3a4058 !important; color: #5a6278; }

/* ── 画像プレビュー（添付前） ── */
#bd-img-preview {
  display: none; flex-wrap: wrap; gap: 8px;
  padding: 8px 14px 0;
}
.img-prev-item {
  position: relative; width: 64px; height: 64px;
  border-radius: 6px; overflow: hidden;
  border: 1px solid #3a4058;
}
.img-prev-item img {
  width: 100%; height: 100%; object-fit: cover;
}
.img-prev-rm {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px;
  background: rgba(0,0,0,0.7); color: #f0ece4;
  border: none; border-radius: 50%; font-size: 9px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}

/* ── 添付ボタン ── */
#bd-attach-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity .15s;
}
#bd-attach-btn:hover   { opacity: .7; }
#bd-attach-btn:disabled { opacity: .3; cursor: default; }

/* ── 投稿内サムネイル ── */
.inline-img {
  max-width: 180px; max-height: 180px;
  display: block; margin-top: 6px;
  border-radius: 6px; cursor: zoom-in;
  object-fit: cover;
  border: 1px solid #2a3040;
  transition: opacity .15s;
}
.inline-img:hover { opacity: .85; }

/* ── ライトボックス ── */
#bd-lightbox {
  display: none; position: absolute; inset: 0;
  background: rgba(0,0,0,0.92); z-index: 400;
  align-items: center; justify-content: center;
}
#bd-lightbox.open { display: flex; }
#bd-lightbox-img {
  max-width: 94%; max-height: 88%;
  object-fit: contain; border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
#bd-lightbox-close {
  position: absolute; top: 16px; right: 18px;
  background: rgba(0,0,0,0.6); border: none;
  color: #f0ece4; font-size: 18px; width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .15s;
}
#bd-lightbox-close:hover { background: rgba(200,160,96,0.3); }

/* ── アンカーポップアップ ── */
#bd-anchor-popup {
  display: none; position: absolute;
  background: #1c2540; border: 1px solid #c8a060;
  border-radius: 6px; padding: 10px 12px;
  max-width: 88%; font-size: 12px; z-index: 300;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  line-height: 1.6; color: #ddd6c8; pointer-events: none;
}

/* ================================================================
   HOME PAGE
================================================================ */
.home-wrap {
  padding: 0 0 40px;
  color: #ddd6c8;
  font-size: 13.5px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

/* キービジュアル */
.home-kv {
  padding: 36px 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.home-kv-site {
  font-size: 9px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.2em;
  color: #c8a060;
  margin-bottom: 12px;
}
.home-kv-catch {
  font-size: 22px;
  font-weight: 300;
  color: #f0ece4;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* 本文セクション */
.home-section {
  padding: 24px 24px 8px;
}
.home-section p {
  margin-bottom: 14px;
  color: #c8cdd8;
}

/* 強調テキスト */
.home-em {
  font-style: italic;
  color: #c8a060 !important;
  letter-spacing: 0.06em;
  font-size: 14px;
  padding: 4px 0;
}

/* ブロックタイトル */
.home-block-title {
  font-size: 13px;
  font-weight: 700;
  color: #f0ece4;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.home-block-sub {
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
  color: #5a6278;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

/* 外部リンク */
.home-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #c8a060;
  text-decoration: none;
  border-bottom: 1px solid rgba(200,160,96,0.3);
  padding-bottom: 1px;
  transition: border-color 0.15s, color 0.15s;
}
.home-link:hover {
  color: #f0ece4;
  border-color: rgba(240,236,228,0.4);
}

/* 区切り線 */
.home-divider {
  height: 1px;
  margin: 16px 24px;
  background: rgba(255,255,255,0.06);
}

/* フッター */
.home-footer {
  margin-top: 32px;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}
.home-footer-name {
  font-size: 12px;
  color: #5a6278;
  letter-spacing: 0.08em;
}
.home-footer-sub {
  font-size: 10px;
  color: #3a4058;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* ================================================================
   ANNOUNCEMENTS
================================================================ */

/* ホーム内お知らせ */
.home-ann-loading {
  font-size: 12px;
  color: #5a6278;
  padding: 8px 0;
}
.home-ann-empty {
  font-size: 13px;
  color: #5a6278;
}
.home-ann-list { margin-top: 4px; }
.home-ann-item {
  border-left: 2px solid rgba(200,160,96,0.4);
  padding: 8px 0 8px 12px;
  margin-bottom: 14px;
}
.home-ann-meta {
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
  color: #5a6278;
  margin-bottom: 3px;
}
.home-ann-title {
  font-size: 13px;
  font-weight: 700;
  color: #f0ece4;
  margin-bottom: 4px;
}
.home-ann-body {
  font-size: 12.5px;
  color: #9aa0b0;
  line-height: 1.7;
}

/* 全件表示ビュー */
.ann-list { padding: 8px 0; }
.ann-item {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ann-item-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.ann-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #f0ece4;
  flex: 1;
}
.ann-item-date {
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
  color: #5a6278;
  white-space: nowrap;
  flex-shrink: 0;
}
.ann-item-body {
  font-size: 13px;
  color: #9aa0b0;
  line-height: 1.75;
  word-break: break-word;
}

/* ── サイドバー区切り線 ── */
.bd-nav-sep {
  height: 0.4px;
  background: rgba(255,255,255,0.08);
  margin: 4px 8px;
}

/* ================================================================
   LINKS PAGE
================================================================ */
.links-list { padding: 8px 0 32px; }
.links-item {
  padding: 20px 20px 16px;
}
.links-sep {
  height: 0.5px;
  background: rgba(255,255,255,0.06);
  margin: 0 20px;
}
.links-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f0ece4;
  margin-bottom: 10px;
  line-height: 1.5;
}
.links-desc {
  font-size: 13px;
  color: #9aa0b0;
  line-height: 1.8;
  margin-bottom: 14px;
}
.links-btn {
  display: inline-block;
  font-size: 12px;
  color: #c8a060;
  text-decoration: none;
  border: 1px solid rgba(200,160,96,0.35);
  border-radius: 4px;
  padding: 5px 12px;
  transition: background .15s, color .15s;
}
.links-btn:hover {
  background: rgba(200,160,96,0.12);
  color: #f0ece4;
}

/* ── PWA インストールボタン ── */
.bd-pwa-install-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 10px;
  padding: 10px 0;
  background: rgba(200,160,96,0.12);
  border: 1px solid rgba(200,160,96,0.40);
  border-radius: 8px;
  color: #c8a060;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.bd-pwa-install-btn:hover {
  background: rgba(200,160,96,0.22);
  color: #f0ece4;
}

/* ── ニュース速報 ── */
.news-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.news-filter-btn {
  padding: 3px 10px;
  border-radius: 3px;
  border: none;
  background: transparent;
  color: #5a6278;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: .72rem;
  cursor: pointer;
  transition: background .14s, color .14s;
  white-space: nowrap;
}
.news-filter-btn:hover {
  background: rgba(255,255,255,.05);
  color: #9aa0b0;
}
.news-filter-btn.active {
  background: rgba(200,160,96,.10);
  color: #c8a060;
}
.news-list {
  padding: 0;
}
a.news-item,
a.news-item:link,
a.news-item:visited,
a.news-item:hover,
a.news-item:active {
  display: flex;
  align-items: stretch;
  text-decoration: none !important;
  color: #e8e0d0 !important;
  padding: 12px 16px;
  transition: background .14s;
}
a.news-item:hover {
  background: rgba(255,255,255,.04);
}
.news-item-accent {
  width: 2px;
  flex-shrink: 0;
  margin-right: 13px;
  align-self: stretch;
  border-radius: 1px;
}
.news-item-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 2px;
}
.news-item-title {
  font-size: .875rem;
  color: #e8e0d0 !important;
  line-height: 1.6;
  word-break: break-word;
}
a.news-item:hover .news-item-title {
  color: #f0ece4 !important;
}
.news-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}
.news-item-cat {
  font-size: .69rem;
  color: #3a4058;
}
.news-item-time {
  font-size: .69rem;
  color: #3a4058;
  font-family: 'IBM Plex Mono', monospace;
}
.news-list .news-item + .news-item {
  border-top: 1px solid rgba(255,255,255,.05);
}

/* ── YouTube サムネイル ── */
.yt-thumb-wrap {
  display: block;
  margin-top: 8px;
  width: fit-content;
}
.yt-thumb {
  display: block;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity .15s;
}
.yt-thumb-wrap:hover .yt-thumb {
  opacity: 1;
}

/* ── 通報リンク ── */
.bd-report-btn {
  display: inline;
  font-size: 0.68rem;
  color: #5a6278;
  cursor: pointer;
  user-select: none;
  margin-left: 6px;
}
.bd-report-btn:hover { color: #c8a060; }

/* ── 通報モーダル ── */
#bd-report-modal {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 300;
  background: rgba(6,10,16,0.82);
  align-items: center;
  justify-content: center;
}
#bd-report-modal.open { display: flex; }
#bd-report-modal-box {
  width: calc(100% - 40px);
  max-width: 390px;
  background: #0d1220;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#bd-report-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: #f0ece4;
}
#bd-report-modal-hdr button {
  background: none;
  border: none;
  color: #5a6278;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
#bd-report-modal-desc {
  font-size: 12px;
  color: #7a8090;
}
#bd-report-reasons {
  display: block;
  max-height: 260px;
  overflow-y: auto;
}
.bd-report-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 2px;
  border-bottom: 1px solid #1a2236;
  cursor: pointer;
  font-size: 13px;
  color: #ddd6c8;
  box-sizing: border-box;
}
.bd-report-label:last-child { border-bottom: none; }
.bd-report-label input[type="radio"] {
  accent-color: #c8a060;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.bd-report-label span { flex: 1; line-height: 1.4; }
#bd-report-other {
  background: #0f1420;
  border: none;
  border-radius: 8px;
  color: #f0ece4;
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  padding: 10px 12px;
  resize: none;
  outline: none;
  width: 100%;
}
#bd-report-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
#bd-report-cancel {
  background: none;
  border: none;
  color: #5a6278;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  font-family: 'Noto Sans JP', sans-serif;
}
#bd-report-submit {
  background: #c8a060;
  border: none;
  border-radius: 8px;
  color: #0f1420;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 18px;
  font-family: 'Noto Sans JP', sans-serif;
}
#bd-report-submit:active { opacity: 0.8; }

/* ================================================================
   NAV SUB（インデント子要素）
================================================================ */
.bd-nav-sub {
  padding-left: 40px !important;
}
.bd-nav-sub .bd-bname {
  color: #7a8090;
  font-size: 12px;
}
.bd-nav-sub.active .bd-bname {
  color: #c8a060;
}

/* ================================================================
   COLUMN（設計ノート）
================================================================ */
.column-wrap {
  padding: 0 0 60px;
  color: #c8cdd8;
  font-size: 13.5px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}
.column-opening {
  font-size: 12px;
  color: #5a6278;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.08em;
}
.column-h2 {
  font-size: 16px;
  font-weight: 700;
  color: #c8a060;
  letter-spacing: 0.04em;
  margin-bottom: 0;
}
.column-h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #c8a060;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}
.column-italic {
  font-style: italic;
  color: #7a8090;
  font-size: 12.5px;
}
.column-step-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #f0ece4;
  letter-spacing: 0.05em;
  margin: 20px 0 6px;
}
pre.column-pre {
  background: #0b0f1a;
  color: #c8a060;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  line-height: 1.7;
  padding: 12px 14px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0 14px;
  border: 1px solid rgba(200,160,96,0.15);
  white-space: pre;
}
pre.column-pre code {
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  border: none;
}
code.column-code {
  background: #0b0f1a;
  color: #c8a060;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(200,160,96,0.15);
}
.column-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 12px 0 16px;
  font-family: 'IBM Plex Mono', monospace;
}
.column-table th {
  background: rgba(200,160,96,0.1);
  color: #c8a060;
  font-weight: 600;
  padding: 7px 10px;
  border: 1px solid rgba(200,160,96,0.2);
  text-align: left;
}
.column-table td {
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.07);
  color: #c8cdd8;
  vertical-align: top;
}
.column-table tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}
