/* adteach 共通スタイル。新デザイン（adteach-design）の配色・コンポーネントを踏襲する。 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

body {
  background-color: #f3f6f9;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
  padding-top: 75px; /* ヘッダー固定用(60px × ヘッダーのzoom 1.25) */
  padding-bottom: 80px; /* ボトムナビ固定用 */
}

a { text-decoration: none; color: inherit; }

/* =========================================
   共通ヘッダー（画面上部に固定）
========================================= */
header.site-header {
  background-color: #d1eaee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  height: 60px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99;
  zoom: 1.25; /* ヘッダーだけ拡大表示。本文は等倍にして小さい画面でも左右の余白を確保する */
}

.logo, .site-logo {
  font-size: 18px;
  font-weight: bold;
  color: #1a5260;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-trigger {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: none; border: none; color: #333; font-size: 14px; padding: 4px; border-radius: 6px;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-left .brand { font-weight: bold; color: #1a5260; padding: 4px; }
.menu-trigger { position: relative; }
.menu-dot {
  position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; background-color: #ff5252;
  border-radius: 50%; border: 2px solid #d1eaee;
}

.search-container { position: relative; width: 40%; }
.search-bar { position: relative; }
.search-bar .material-symbols-outlined {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #888; font-size: 20px;
}
.search-bar input[type=text] {
  width: 100%; padding: 8px 12px 8px 36px; border-radius: 20px; border: 1px solid #ccc; outline: none; font-size: 13px;
}

.header-right {
  display: flex; align-items: center; gap: 16px;
}
.notification-icon { position: relative; display: flex; color: #333; }

.user-profile {
  display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.user-profile:hover { background-color: rgba(0,0,0,0.05); }

.badge {
  position: absolute; top: -4px; right: -6px; background-color: #ff5252; color: #fff; border-radius: 10px;
  font-size: 10px; min-width: 16px; height: 16px; padding: 0 4px; display: flex; align-items: center; justify-content: center;
}
.badge.badge-menu { position: static; margin-left: auto; }

/* =========================================
   サイドメニュー（ドロワー）
========================================= */
.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4);
  opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 100;
}
.overlay.active { opacity: 1; visibility: visible; }

.side-menu {
  position: fixed; top: 0; left: -280px; width: 280px; height: 100%;
  background-color: #fff; box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease; z-index: 101; display: flex; flex-direction: column;
}
.side-menu.active { left: 0; }

.menu-header {
  background-color: #e3f2fd; padding: 20px 16px; display: flex;
  justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #d1eaee;
}
.welcome-text { font-size: 14px; font-weight: bold; color: #1a5260; line-height: 1.4; }
.close-btn { cursor: pointer; color: #666; border: none; background: none; }
.menu-body { padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.menu-title { font-size: 12px; font-weight: bold; color: #888; margin-bottom: 4px; margin-top: 8px; }
.menu-body .btn { justify-content: flex-start; }
.menu-divider { border-top: 1px solid #edf2f7; margin-top: 16px; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }

/* =========================================
   コンテナ・カード共通
========================================= */
.container { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.container-narrow { max-width: 800px; margin: 24px auto; padding: 0 16px; }
.container-medium { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.container-auth { max-width: 420px; margin: 40px auto; padding: 0 16px; }
.container-auth.wide { max-width: 520px; }

.card, .card-box {
  background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.card-lg { padding: 28px; }
.card-flush { padding: 0; overflow: hidden; }
.card-auth { padding: 32px 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.section-title { font-size: 16px; font-weight: bold; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-link { font-size: 13px; color: #3182ce; font-weight: normal; }

.page-title { font-size: 18px; font-weight: bold; color: #1a5260; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.page-title.center { justify-content: center; font-size: 20px; margin-bottom: 24px; }
.page-title:has(+ .page-lead) { margin-bottom: 6px; }
.page-lead { font-size: 13px; color: #718096; margin-bottom: 20px; }

/* =========================================
   ボタン共通
========================================= */
.btn {
  padding: 10px 20px; border: none; border-radius: 8px; font-weight: bold;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: #fff; font-size: 14px; transition: opacity 0.2s; text-align: center;
}
.btn:hover { opacity: 0.9; }
.btn:disabled, .btn.btn-disabled { opacity: 0.5; cursor: not-allowed; }
.btn-teal { background-color: #2b93a3; }
.btn-green { background-color: #38a169; width: 100%; }
.btn-orange { background-color: #ed8936; }
.btn-gray { background-color: #718096; }
.btn-red { background-color: #e53e3e; }
.btn-secondary { background: #e2e8f0; color: #4a5568; }
.btn-primary { background: #2b93a3; color: #fff; }
.btn-outline { background: #fff; color: #4a5568; border: 1px solid #cbd5e0; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: all 0.2s ease; }
.btn-outline:hover { opacity: 1; box-shadow: 0 6px 12px rgba(0,0,0,0.1); transform: translateY(-2px); border-color: #a0aec0; }
.btn-danger-soft { background: #fff5f5; color: #e53e3e; border: 1px solid #feb2b2; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 6px; }
.btn-pill { border-radius: 24px; padding: 12px 32px; }
.btn-inline { width: auto; }
.btn .material-symbols-outlined { font-size: 18px; }

/* アクションボタン（いいね・保存） */
.btn-action {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: none;
  font-size: 13px; font-weight: bold; color: #718096; cursor: pointer; padding: 6px 12px; border-radius: 6px;
}
.btn-action:hover { background: #f7fafc; color: #2b93a3; }
.btn-action:disabled { cursor: not-allowed; color: #cbd5e0; }
.btn-action:disabled:hover { background: none; }
.btn-action.small { padding: 0; font-size: 12px; }
.btn-action.small .material-symbols-outlined { font-size: 14px; }
.btn-action.liked { color: #e0245e !important; }
.btn-action.liked .material-symbols-outlined { font-variation-settings: 'FILL' 1; color: #e0245e !important; }
.btn-action.saved { color: #38a169 !important; }
.btn-action.saved .material-symbols-outlined { font-variation-settings: 'FILL' 1; color: #38a169 !important; }
.btn-action.bordered { border: 1px solid #cbd5e0; }
.action-bar { display: flex; gap: 16px; padding: 12px 0; align-items: center; flex-wrap: wrap; }
.action-bar form { display: inline; }

/* エディタツールバー用アイコンボタン */
.btn-icon {
  background: none; border: none; cursor: pointer; color: #4a5568; padding: 4px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.btn-icon:hover { background: #e2e8f0; color: #2b93a3; }

.button-group { display: flex; gap: 12px; margin-top: 24px; }
.button-group > .btn { flex: 1; }
.button-group > .btn.grow { flex: 2; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* =========================================
   フォーム要素
========================================= */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: bold; margin-bottom: 8px; font-size: 13px; color: #4a5568; }
.form-label .required, .required { color: #e53e3e; margin-left: 4px; }
.form-label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.form-label-row .form-label { margin-bottom: 0; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 14px; outline: none; background: #fff;
}
/* クラス指定のないウィジェット（パスワード欄など）も同じ見た目にする */
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 14px; outline: none; background: #fff;
}
textarea { height: 140px; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus, input:focus, select:focus, textarea:focus { border-color: #2b93a3; }
.form-textarea { height: 140px; resize: vertical; }
.form-select.compact { width: auto; padding: 6px 32px 6px 12px; font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.help-text { font-size: 12px; color: #a0aec0; margin-top: 4px; }
.error-text { font-size: 12px; color: #e53e3e; margin-top: 4px; }
.error-text ul { list-style: none; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.checkbox-row input { width: auto; }
.char-count { font-size: 11px; color: #718096; }
.text-link { color: #2b93a3; font-weight: bold; }
.muted { color: #a0aec0; font-size: 13px; }

/* エディタツールバー（投稿画面） */
.editor-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px;
  background: #f7fafc; border: 1px solid #cbd5e0; border-bottom: none; border-radius: 6px 6px 0 0;
}
.editor-toolbar .tools { display: flex; gap: 8px; }
.rich-editor.is-rich .editor-toolbar { flex-wrap: wrap; position: sticky; top: 75px; z-index: 5; } /* 固定ヘッダー(60px × zoom 1.25)の下に留める */
.rich-editor.is-rich .editor-toolbar .tools { gap: 2px; flex-wrap: wrap; }
.rich-editor .btn-icon .material-symbols-outlined { font-size: 20px; }
.rich-editor .btn-icon.is-active { background: #e6f6f8; color: #2b93a3; }
.rich-editor .toolbar-sep { width: 1px; align-self: stretch; margin: 2px 4px; background: #cbd5e0; }
.editor-table-tools { display: flex; gap: 2px; flex-wrap: wrap; padding: 4px 12px; background: #e6f6f8; border: 1px solid #cbd5e0; border-bottom: none; }
.editor-table-tools[hidden] { display: none; }
.rich-editor-host { display: none; }
.rich-editor.is-rich .rich-editor-host { display: block; }
.rich-editor-host .ProseMirror {
  min-height: 320px; padding: 16px; border: 1px solid #cbd5e0; border-radius: 0 0 6px 6px; outline: none; background: #fff;
  font-size: 15px; color: #2d3748; overflow-wrap: anywhere;
}
.rich-editor-host .ProseMirror:focus { border-color: #2b93a3; }
.rich-editor-host .ProseMirror p.is-empty::before,
.rich-editor-host .ProseMirror h2.is-empty::before,
.rich-editor-host .ProseMirror h3.is-empty::before { content: attr(data-placeholder); color: #a0aec0; float: left; height: 0; pointer-events: none; }
.rich-editor-host .ProseMirror .selectedCell { background: #e6f6f8; }
.rich-editor-host .ProseMirror .toc-editor { cursor: default; user-select: none; }
.rich-editor-host .ProseMirror .toc-editor li { font-size: 14px; color: #2d3748; }
.rich-editor-host .ProseMirror .toc-editor .toc-level-3 { padding-left: 1.2em; }
.rich-editor-host .ProseMirror .toc-empty { font-size: 13px; color: #a0aec0; margin: 0; }
.rich-editor-host .ProseMirror .ProseMirror-selectednode { outline: 2px solid #2b93a3; }
.rich-editor-host .ProseMirror .tableWrapper { overflow-x: auto; }

/* 「/」メニュー */
.slash-menu {
  position: fixed; z-index: 1000; width: 280px; max-width: calc(100vw - 16px); max-height: 320px; overflow-y: auto;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); padding: 4px;
}
.slash-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: none; background: none; border-radius: 6px; cursor: pointer; text-align: left; color: #2d3748; }
.slash-menu-item .material-symbols-outlined { font-size: 20px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; flex-shrink: 0; }
.slash-menu-item.is-selected, .slash-menu-item:hover { background: #e6f6f8; }
.slash-menu-text { display: flex; flex-direction: column; min-width: 0; }
.slash-menu-text strong { font-size: 14px; }
.slash-menu-text small { font-size: 11px; color: #718096; }
.slash-menu-empty { padding: 8px; font-size: 13px; color: #a0aec0; }
.editor-toolbar .form-select { padding: 4px 28px 4px 8px; font-size: 12px; width: auto; }
.editor-toolbar + .form-textarea { border-radius: 0 0 6px 6px; }

/* タグ選択（マスタタグのみ。チップ型のチェックボックス） */
.tag-select { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-select label { cursor: pointer; }
.tag-select input { display: none; }
.tag-select input + span {
  display: inline-flex; align-items: center; background: #edf2f7; color: #4a5568; padding: 6px 12px;
  border-radius: 20px; font-size: 12px; border: 1px solid transparent; transition: 0.2s;
}
.tag-select input:checked + span { background: #3182ce; color: #fff; }
.tag-select .tag-hidden { display: none; }

/* タグ検索(投稿画面。よく使うタグ以外を検索して追加) */
.tag-search { position: relative; display: flex; align-items: center; gap: 6px; margin-top: 10px; width: 100%; max-width: 420px; }
.tag-search[hidden] { display: none; }
.tag-search > .material-symbols-outlined { position: absolute; left: 10px; font-size: 18px; color: #a0aec0; pointer-events: none; }
.tag-search .tag-search-input {
  flex: 1; width: 100%; min-width: 0; padding: 8px 12px 8px 34px; font-size: 13px;
  border: 1px solid #cbd5e0; border-radius: 6px; outline: none; background: #fff;
}
.tag-search .tag-search-input:focus { border-color: #2b93a3; }
.tag-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 4px;
}
.tag-search-results[hidden] { display: none; }
.tag-search-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 8px 10px;
  border: none; background: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: #2d3748; text-align: left;
}
.tag-search-item small { color: #a0aec0; font-size: 11px; flex-shrink: 0; }
.tag-search-item.is-active, .tag-search-item:hover { background: #ebf8ff; }
.tag-search-empty { padding: 8px 10px; font-size: 12px; color: #a0aec0; }

/* ファイルアップロードUI */
.upload-area {
  display: block; border: 2px dashed #cbd5e0; border-radius: 8px; padding: 32px; text-align: center;
  background: #f7fafc; cursor: pointer; transition: 0.2s; margin-bottom: 8px;
}
.upload-area:hover, .upload-area.dragover { background: #ebf8ff; border-color: #3182ce; }
.upload-area input[type=file] { display: none; }
.upload-area .material-symbols-outlined { font-size: 32px; color: #a0aec0; margin-bottom: 8px; }
.upload-area .upload-title { font-weight: bold; color: #4a5568; margin-bottom: 4px; }
.upload-area .upload-note { font-size: 11px; color: #a0aec0; }
.upload-area .upload-filename { font-size: 12px; color: #2b93a3; font-weight: bold; margin-top: 8px; }

/* プロフィール画像の変更UI */
.avatar-upload { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }
.avatar-upload label { cursor: pointer; position: relative; display: block; }
.avatar-upload .camera {
  position: absolute; bottom: 0; right: 0; background: #fff; border-radius: 50%; padding: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2); display: flex;
}
.avatar-upload .camera .material-symbols-outlined { font-size: 16px; color: #4a5568; }
.avatar-upload .change-link { font-size: 12px; color: #3182ce; font-weight: bold; margin-top: 12px; cursor: pointer; }
#avatarPreview { background-size: cover; background-position: center; }

/* =========================================
   タブ切り替え
========================================= */
.tab-header { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn { padding: 10px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; border: none; background: #e2e8f0; color: #4a5568; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.tab-btn.active { background: #38a169; color: white; }
.tab-btn .material-symbols-outlined { font-size: 18px; }

/* 下線タイプのタブ（プロフィール画面） */
.underline-tabs { display: flex; border-bottom: 1px solid #edf2f7; background: #faf5ff; }
.underline-tab {
  flex: 1; text-align: center; padding: 14px; font-weight: bold; color: #718096;
  border-bottom: 3px solid transparent; cursor: pointer; transition: 0.2s; background: transparent; border-top: none; border-left: none; border-right: none; font-size: 14px;
}
.underline-tab.active { color: #2b93a3; border-bottom-color: #2b93a3; background: #fff; }
.tab-panel { padding: 16px; }

/* =========================================
   アバター・バッジ・タグ
========================================= */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background-color: #4a90e2; color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: bold; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-md { width: 44px; height: 44px; font-size: 16px; }
.avatar-sm { width: 36px; height: 36px; font-size: 14px; }
.avatar-large { width: 80px; height: 80px; font-size: 32px; }
.item-badge { display: inline-block; background: #ebf8ff; color: #3182ce; font-size: 12px; padding: 4px 10px; border-radius: 4px; font-weight: bold; }
.item-badge.gray { background: #e2e8f0; color: #4a5568; font-weight: normal; padding: 2px 8px; }
.item-badge.green { background: #c6f6d5; color: #22543d; }
.item-badge.red { background: #fed7d7; color: #c53030; }
.tag-item, .tag-chip {
  display: inline-flex; align-items: center; gap: 4px; background: #edf2f7; color: #4a5568;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; transition: 0.2s;
}
a.tag-chip:hover { background: #e2e8f0; }
.tag-chip.active { background: #3182ce; color: #fff; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }

/* =========================================
   タイムライン（ダッシュボード）
========================================= */
/* 記事を広めに取り、右の枠は勉強会で埋める */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); gap: 20px; max-width: 1200px; margin: 20px auto; padding: 0 16px; }
/* 画面が広いときだけ、記事を中央に置き、右の余白を勉強会枠で埋める(左は空白)。狭いときは上の2列のまま */
@media (min-width: 1280px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 760px minmax(0, 1fr); max-width: 1400px; }
  .dashboard-grid > main { grid-column: 2; }
  .dashboard-grid > .dashboard-sidebar { grid-column: 3; }
}
.idea-cards { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.idea-card { min-width: 180px; max-width: 220px; border: 1px solid #eee; border-radius: 8px; overflow: hidden; background: #fff; display: block; transition: transform 0.2s, box-shadow 0.2s; }
.idea-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.idea-card .thumb { height: 100px; display: flex; align-items: center; justify-content: center; }
.idea-card .thumb .material-symbols-outlined { font-size: 48px; }
.idea-card .thumb.c0 { background: #c6f6d5; color: #2f855a; }
.idea-card .thumb.c1 { background: #fed7d7; color: #c53030; }
.idea-card .thumb.c2 { background: #e9d8fd; color: #6b46c1; }
.idea-card .thumb.c3 { background: #bee3f8; color: #2b6cb0; }
.idea-card .thumb.c4 { background: #feebc8; color: #c05621; }
.idea-card .body { padding: 10px; }
.idea-card .tag { font-size: 11px; font-weight: bold; color: #3182ce; }
.idea-card .title { font-size: 12px; font-weight: bold; margin: 4px 0; color: #2d3748; }
.idea-card .author { font-size: 11px; color: #718096; margin-bottom: 4px; }

.timeline-item { border-bottom: 1px solid #edf2f7; padding: 16px 0; }
.timeline-item:last-child { border-bottom: none; }
.timeline-item .author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.timeline-item .author-name { font-weight: bold; }
.timeline-item .meta { font-size: 12px; color: #a0aec0; }
.timeline-item .content { display: block; padding: 4px 0; color: #2d3748; }
.timeline-item .content .title { font-size: 14px; font-weight: bold; margin-bottom: 8px; }
.timeline-item .content .excerpt { font-size: 13px; line-height: 1.5; color: #4a5568; }
.timeline-item .tag-list { margin-top: 8px; }
.timeline-item .stats { display: flex; gap: 16px; color: #718096; font-size: 12px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.timeline-item .stats .stat { display: inline-flex; align-items: center; gap: 6px; font-weight: bold; padding: 6px 12px; }
.timeline-item .stats .material-symbols-outlined { font-size: 16px; }
.load-more { text-align: center; margin-top: 24px; padding-bottom: 16px; }

.session-mini {
  background: #f7fafc; padding: 12px; border-radius: 8px; margin-bottom: 8px; display: flex; gap: 12px;
  align-items: center; border: 1px solid #edf2f7; transition: 0.2s;
}
.session-mini:hover { background: #ebf8ff; }
.session-mini .date { background: #e2e8f0; color: #2d3748; padding: 6px; border-radius: 4px; text-align: center; font-size: 11px; font-weight: bold; line-height: 1.2; min-width: 44px; }
.session-mini .title { font-weight: bold; font-size: 12px; color: #2d3748; margin-bottom: 4px; }
.session-mini .sub { color: #3182ce; font-size: 11px; display: flex; align-items: center; gap: 4px; }
.session-mini .sub .material-symbols-outlined { font-size: 14px; }

/* 一覧の1行（検索結果・保存記事・プロフィールの記事一覧） */
.list-item { border-bottom: 1px solid #edf2f7; padding: 12px 0 16px; }
.list-item:last-child { border-bottom: none; }
.list-item .title { display: block; font-weight: bold; font-size: 15px; margin: 6px 0 4px; color: #2d3748; }
.list-item .title:hover { color: #3182ce; }
.list-item .meta { font-size: 12px; color: #718096; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-item.with-actions { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.list-item.with-actions > div:first-child { flex: 1; min-width: 0; }

/* 検索フィルター */
.filter-panel { background: #fff; padding: 16px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #edf2f7; display: flex; flex-direction: column; gap: 12px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filter-row .form-input { flex: 1; min-width: 200px; padding: 6px 12px; font-size: 13px; }
.filter-label { font-size: 13px; font-weight: bold; color: #718096; display: inline-flex; align-items: center; gap: 4px; }
.filter-label .material-symbols-outlined { font-size: 16px; }
.filter-tags { border-top: 1px dashed #edf2f7; padding-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-block { display: flex; flex-direction: column; gap: 8px; }
.filter-detail { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-detail .tag-search { margin-top: 0; max-width: 300px; }

/* 基本タグ(分類)の絞り込みボタン。検索ページ・保存済み記事ページで使う */
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.category-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; font-size: 14px;
  background: #fff; color: #2d3748; border: 1px solid #cbd5e0; transition: 0.2s; white-space: nowrap;
}
.category-chip:hover { border-color: #2b93a3; color: #2b93a3; }
.category-chip.active { background: #e6f6f8; color: #1a5260; border-color: #2b93a3; font-weight: bold; }
.category-chip small { font-size: 12px; color: #718096; font-weight: normal; }
.category-chip.active small { color: #2b93a3; }
.selected-tag { display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px 4px 12px; border-radius: 999px; background: #e6f6f8; color: #1a5260; font-size: 13px; font-weight: bold; }
.selected-tag a { display: inline-flex; color: #2b93a3; border-radius: 50%; }
.selected-tag a:hover { background: #cdeef2; }
.selected-tag .material-symbols-outlined { font-size: 16px; }
.card > .category-chips { margin-bottom: 16px; }
.card > .category-chips:has(+ .more-tags) { margin-bottom: 0; }
.more-tags { margin: 12px 0 16px; }
.more-tags summary { font-size: 13px; color: #718096; cursor: pointer; margin-bottom: 8px; }
.highlight { background: #fefcbf; }

/* ページ送り */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 16px; font-size: 13px; color: #718096; }

/* =========================================
   記事詳細・コメント
========================================= */
.article-title { font-size: 22px; font-weight: bold; color: #1a202c; margin: 12px 0 16px; line-height: 1.4; }
.author-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid #edf2f7; padding-bottom: 16px; margin-bottom: 20px; }
.author-bar .who { display: flex; align-items: center; gap: 12px; }
.author-bar .name { font-weight: bold; font-size: 14px; color: #2d3748; }
.author-bar a.name:hover { color: #3182ce; }
.author-bar .sub { font-size: 12px; color: #a0aec0; }
.author-bar .label { font-size: 11px; color: #718096; margin-bottom: 2px; }
.article-body { font-size: 15px; color: #2d3748; margin-bottom: 24px; overflow-wrap: anywhere; }

/* Markdown本文(詳細画面とエディタで共通の見た目) */
.markdown-body { line-height: 1.8; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body p { margin: 0 0 12px; }
.markdown-body img { display: block; max-width: 100%; height: auto; margin: 12px 0; border-radius: 4px; }
.markdown-body img.ProseMirror-selectednode { outline: 3px solid #2b93a3; }
.markdown-body h2 { font-size: 20px; margin: 28px 0 12px; padding-bottom: 6px; border-bottom: 2px solid #e2e8f0; color: #1a202c; }
.markdown-body h3 { font-size: 17px; margin: 22px 0 10px; padding-left: 10px; border-left: 4px solid #2b93a3; color: #1a202c; }
.markdown-body h4 { font-size: 15px; margin: 18px 0 8px; }
.markdown-body ul, .markdown-body ol { margin: 0 0 12px; padding-left: 1.6em; }
.markdown-body ul { list-style: disc; }
.markdown-body ol { list-style: decimal; }
.markdown-body li { margin: 2px 0; }
.markdown-body li > p { margin: 0; }
.markdown-body li > ul, .markdown-body li > ol { margin: 2px 0; }
.markdown-body blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 4px solid #cbd5e0; color: #4a5568; background: #f7fafc; }
.markdown-body hr { border: none; border-top: 1px solid #e2e8f0; margin: 24px 0; }
.markdown-body a { color: #2b93a3; text-decoration: underline; }
.markdown-body code { background: #edf2f7; padding: 1px 5px; border-radius: 4px; font-size: 0.9em; font-family: Consolas, Menlo, monospace; }
.markdown-body pre { background: #2d3748; color: #f7fafc; padding: 12px 14px; border-radius: 6px; overflow-x: auto; margin: 0 0 12px; }
.markdown-body pre code { background: none; padding: 0; color: inherit; }
.markdown-body table { border-collapse: collapse; margin: 0 0 12px; display: block; overflow-x: auto; max-width: 100%; }
.markdown-body th, .markdown-body td { border: 1px solid #cbd5e0; padding: 6px 10px; min-width: 60px; vertical-align: top; text-align: left; }
.markdown-body th { background: #f7fafc; font-weight: bold; }
.markdown-body th p, .markdown-body td p { margin: 0; }
.markdown-body .toc { background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.markdown-body .toctitle { display: block; font-weight: bold; font-size: 13px; color: #4a5568; margin-bottom: 4px; }
.markdown-body .toc ul { list-style: none; padding-left: 0; margin: 0; }
.markdown-body .toc ul ul { padding-left: 1.2em; }
.markdown-body .toc a { color: #2d3748; text-decoration: none; font-size: 14px; }
.markdown-body .toc a:hover { color: #2b93a3; text-decoration: underline; }
.markdown-body h2[id], .markdown-body h3[id] { scroll-margin-top: 80px; }

.attachment-box { background: #faf5ff; border: 1px solid #e9d8fd; border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.attachment-box .file { display: flex; align-items: center; gap: 10px; font-weight: bold; color: #5a67d8; font-size: 13px; word-break: break-all; }
.attachment-box .btn-action { color: #2b93a3; font-size: 12px; }
.attachment-preview { margin: -12px 0 24px; border: 1px solid #e9d8fd; border-radius: 8px; padding: 8px 12px 12px; background: #fff; }
.attachment-preview summary { cursor: pointer; font-size: 12px; font-weight: bold; color: #4a5568; margin-bottom: 8px; }
.attachment-preview img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 4px; }
.attachment-preview iframe { display: block; width: 100%; height: 600px; border: 0; }

.comment-section { margin-top: 32px; border-top: 2px solid #edf2f7; padding-top: 24px; }
.comment-section h2 { font-size: 16px; font-weight: bold; color: #2d3748; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.comment-form { display: flex; gap: 12px; margin-bottom: 32px; }
.comment-form .fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.comment-form .fields .submit { text-align: right; }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 12px; }
.comment .bubble { flex: 1; background: #f7fafc; padding: 16px; border-radius: 8px; min-width: 0; }
.comment .bubble.own { background: #fff; border: 1px solid #edf2f7; }
.comment .head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.comment .name { font-weight: bold; font-size: 13px; color: #2d3748; }
.comment .author-tag { background: #e2e8f0; color: #4a5568; padding: 2px 6px; border-radius: 4px; font-size: 10px; margin-left: 4px; font-weight: normal; }
.comment .time { font-size: 11px; color: #a0aec0; }
.comment .text { font-size: 13px; color: #4a5568; line-height: 1.5; margin-bottom: 12px; white-space: pre-line; }
.comment .actions { display: flex; gap: 16px; align-items: center; }
.comment .actions form { display: inline; }

/* =========================================
   プロフィール
========================================= */
.profile-head { display: flex; gap: 20px; align-items: flex-start; }
.profile-head .info { flex: 1; min-width: 0; }
.profile-head .name { font-size: 20px; font-weight: bold; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-head .sub { color: #718096; font-size: 13px; margin-bottom: 12px; }
.profile-head .bio { font-size: 13px; line-height: 1.5; color: #2d3748; margin-bottom: 12px; }
.profile-head .sns { color: #2b93a3; font-size: 12px; word-break: break-all; }
.profile-stats { display: flex; gap: 20px; border-top: 1px solid #edf2f7; padding-top: 12px; margin-top: 12px; font-size: 13px; }
.profile-stats strong { color: #1a5260; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; }
.profile-actions .btn { font-size: 13px; padding: 8px 16px; min-width: 120px; }

/* =========================================
   勉強会
========================================= */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.event-card {
  border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.event-card .cover { position: relative; height: 100px; background: linear-gradient(135deg, #38a169, #48bb78); color: white; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: bold; font-size: 16px; padding: 12px; text-align: center; }
.event-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.event-card .title { font-weight: bold; font-size: 15px; margin-bottom: 8px; color: #2d3748; }
.event-card .meta { font-size: 12px; color: #718096; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.event-card .meta .material-symbols-outlined { font-size: 16px; }
.event-card .btn { margin-top: 12px; }
/* 勉強会カードの状態バッジ(主催・参加予定・満員・開催終了など) */
.event-badges { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.event-badge { font-size: 11px; font-weight: bold; padding: 2px 8px; border-radius: 4px; background: #fff; color: #2d3748; }
.event-badge.organizer { color: #6b46c1; }
.event-badge.joined { color: #2b6cb0; }
.event-badge.full { color: #c53030; }
.event-badge.muted { background: rgba(255,255,255,0.75); color: #4a5568; }
.tab-header .tab-create { margin-left: auto; width: auto; }
@media (max-width: 600px) {
  .tab-header .tab-btn { padding: 8px 12px; font-size: 13px; }
  .tab-header .tab-create { width: 100%; margin-left: 0; }
}

.event-cover { height: 140px; background: linear-gradient(135deg, #38a169, #48bb78); border-radius: 12px 12px 0 0; display: flex; align-items: center; justify-content: center; color: white; }
.event-cover .material-symbols-outlined { font-size: 64px; opacity: 0.8; }
.event-cover + .card { border-radius: 0 0 12px 12px; padding-top: 32px; }
.event-info { background: #f7fafc; border-radius: 8px; padding: 16px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.event-info .row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #4a5568; }
.event-description { font-size: 14px; color: #2d3748; margin-bottom: 32px; overflow-wrap: anywhere; } /* 改行はMarkdownのnl2brで保持 */
.event-action { background: #ebf8ff; border: 1px solid #bee3f8; border-radius: 8px; padding: 20px; text-align: center; }
.event-action .status { font-weight: bold; color: #2b6cb0; margin-bottom: 12px; }
.event-action .location { background: #fff; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; color: #2d3748; word-break: break-all; }
.event-action .cancel-link { background: none; border: none; color: #e53e3e; text-decoration: underline; font-size: 12px; cursor: pointer; }
.organizer-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }

/* =========================================
   通知
========================================= */
.notif-header { padding: 20px 24px; border-bottom: 1px solid #edf2f7; display: flex; justify-content: space-between; align-items: center; }
.notif-header h1 { font-size: 18px; font-weight: bold; color: #1a5260; display: flex; align-items: center; gap: 8px; }
.notif-list { display: flex; flex-direction: column; padding-top: 8px; }
.notif-item { display: flex; gap: 16px; padding: 16px 24px; background: #fff; border-bottom: 1px solid #edf2f7; transition: background 0.2s; }
a.notif-item:hover { background: #f7fafc; }
.notif-item.unread { background: #ebf8ff; }
a.notif-item.unread:hover { background: #e2e8f0; }
.notif-icon { width: 40px; height: 40px; border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #2b93a3; }
.notif-icon .material-symbols-outlined { font-size: 20px; }
.notif-icon.like { background: #e0245e; }
.notif-icon.comment { background: #f6ad55; }
.notif-icon.session_confirmed { background: #38a169; }
.notif-icon.session_cancelled { background: #718096; }
.notif-icon.report_resolved { background: #3182ce; }
.notif-item .text { font-size: 13px; color: #2d3748; margin-bottom: 4px; }
.notif-item .time { font-size: 11px; color: #a0aec0; }
.notif-item.unread .time { color: #3182ce; font-weight: bold; }

/* =========================================
   空の状態（Empty State）
========================================= */
.empty-state { text-align: center; padding: 48px 24px; color: #718096; }
.empty-state .material-symbols-outlined { font-size: 64px; color: #cbd5e0; margin-bottom: 16px; display: block; }

/* =========================================
   ボトムナビゲーション（スマホのみ）
========================================= */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; width: 100%; height: 65px; background-color: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05); display: flex; justify-content: space-around;
  align-items: center; z-index: 98; border-top: 1px solid #edf2f7;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #718096; font-size: 10px; font-weight: bold; text-decoration: none; flex: 1;
}
.nav-item.active { color: #00b900; }
.nav-item.active .material-symbols-outlined { font-variation-settings: 'FILL' 1; }
.nav-item-center { position: relative; flex: 1.2; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; padding-bottom: 10px; }
.nav-item-center .fab-text { font-size: 10px; font-weight: bold; color: #718096; }
.fab-button {
  position: absolute; top: -24px; width: 58px; height: 58px; background-color: #00c68e; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); border: 3px solid #ffffff; transition: transform 0.2s;
}
.fab-button .material-symbols-outlined { font-size: 34px; }
.fab-button:hover { transform: scale(1.05); }

/* フローティング・ホームボタン */
.floating-home-btn {
  position: fixed; bottom: 85px; right: 16px; width: 48px; height: 48px; background-color: #2b93a3; color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 97; transition: transform 0.2s, background-color 0.2s;
}
.floating-home-btn:hover { transform: scale(1.1); background-color: #1a5260; }

/* 作成用のプラスボタン(ホームボタンの上に重ねて固定) */
.fab-add {
  position: fixed; bottom: 145px; right: 16px; width: 48px; height: 48px; background-color: #00c68e; color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 97; transition: transform 0.2s;
}
.fab-add .material-symbols-outlined { font-size: 30px; }
.fab-add.green { background-color: #38a169; }
.fab-add:hover { transform: scale(1.1); }

/* =========================================
   トースト通知（Djangoのメッセージもここに出す）
========================================= */
#toast-container {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none; width: max-content; max-width: 90%;
}
.toast {
  background-color: #2d3748; color: white; padding: 12px 24px; border-radius: 8px; font-size: 14px; font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); opacity: 0; transform: translateY(20px);
  /* 0.3秒で下からフワッと出て、3.7秒後に下へ消える（合計4秒） */
  animation: fade-in-up 0.3s forwards, fade-out-down 0.3s forwards 3.7s;
}
.toast.error { background-color: #c53030; }
.toast.success { background-color: #2f855a; }
@keyframes fade-in-up { to { opacity: 1; transform: translateY(0); } }
@keyframes fade-out-down { to { opacity: 0; transform: translateY(20px); } }

/* =========================================
   モーダル（確認・通報・公開前確認）
========================================= */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.2s; z-index: 1000; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: #fff; padding: 24px; border-radius: 12px; width: 90%; max-width: 440px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); transform: translateY(20px); transition: 0.2s; }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-content h3 { margin-bottom: 8px; font-size: 18px; }
.modal-content .modal-text { color: #4a5568; font-size: 14px; margin-bottom: 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }

/* 設定用のトグルスイッチ */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #cbd5e0; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #38a169; }
input:checked + .slider:before { transform: translateX(20px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }

/* ローディングスピナー */
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* =========================================
   フッター・規約ページ
========================================= */
.site-footer { max-width: 1200px; margin: 32px auto 24px; padding: 16px; text-align: center; font-size: 12px; color: #718096; border-top: 1px solid #e2e8f0; }
.site-footer a { color: #4a5568; margin: 0 8px; }

.legal h1 { font-size: 20px; margin-bottom: 8px; }
.legal h2 { font-size: 15px; margin: 24px 0 8px; }
.legal h3 { font-size: 14px; margin: 16px 0 4px; }
.legal p + p { margin-top: 6px; }
.legal p, .legal li { font-size: 14px; line-height: 1.8; }
.legal ol, .legal ul { padding-left: 24px; margin: 8px 0; }
.legal .legal-meta { font-size: 12px; color: #718096; margin-bottom: 16px; }

.notice-list { margin-bottom: 20px; padding-left: 20px; }

/* =========================================
   レスポンシブ
========================================= */
@media (max-width: 767px) {
  header.site-header { padding: 0 12px; }
  .header-left .brand { display: none; }
  .header-signup { display: none; }
  .search-container { flex: 1; width: auto; min-width: 0; }
  .header-right { gap: 12px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-sidebar { display: none; }
  /* スマホはボトムナビに投稿・ホームがあるため、PC用の右下ボタンは出さない */
  .floating-home-btn, .fab-add { display: none; }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .profile-head { flex-wrap: wrap; }
  .profile-actions { flex-direction: row; width: 100%; }
  .card-lg { padding: 20px; }
}

@media (min-width: 768px) {
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
  .header-right { gap: 24px; }
  .container, .container-narrow, .container-medium { margin-top: 40px; }
  #toast-container { bottom: 32px; }
  .floating-home-btn { bottom: 32px; right: 32px; width: 56px; height: 56px; }
  .floating-home-btn .material-symbols-outlined { font-size: 28px; }
  .fab-add { bottom: 104px; right: 32px; width: 56px; height: 56px; }
}
