:root {
  /* Street コーポレートカラー（www.street-inc.com 由来） */
  --brand: #007235;
  --brand-dark: #084524;
  --brand-accent: #e38330;
  --brand-tint: #eef9f3;
  --brand-tint-strong: #e3f1e9;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

/* ブランドアイコン（白チップに載せて暗背景でも視認可） */
.brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  padding: 3px;
  background: #fff;
  border-radius: 6px;
  vertical-align: middle;
}
.brand-chip img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-chip-lg { width: 34px; height: 34px; border-radius: 8px; padding: 4px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: #1a1a1a;
}

/* ===== 起動時ローディング ===== */
.loading {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #1b1c1d;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-text { color: rgba(255, 255, 255, 0.5); font-size: 13px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ログイン ===== */
.signin {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b1c1d;
}
.signin-card {
  width: 100%;
  max-width: 360px;
  padding: 32px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
.signin-title { color: #fff; font-size: 20px; margin: 0 0 8px; }
.signin-sub { color: rgba(255, 255, 255, 0.6); font-size: 14px; margin: 0 0 24px; }
.signin-btn {
  width: 100%;
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.signin-btn:hover { opacity: 0.9; }
.signin-error { color: #ff9a9a; font-size: 13px; margin-top: 14px; min-height: 18px; }

/* ===== レイアウト ===== */
.portal { height: 100%; display: flex; }
.sidebar {
  width: 288px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  /* 青みがかった深いネイビーグレー（真っ黒だとコントラストが強すぎるため） */
  background: #1e293b;
  color: #fff;
}
.sidebar-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-head h1 {
  font-size: 16px;
  margin: 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sidebar-head h1:hover { opacity: 0.85; }

/* ===== 検索 ===== */
.search-box { padding: 12px; }
#search-input {
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
#search-input::placeholder { color: rgba(255, 255, 255, 0.4); }
.search-deep {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  user-select: none;
}
.search-deep input { accent-color: var(--brand); cursor: pointer; margin: 0; }
.search-results { margin-top: 8px; max-height: 240px; overflow: auto; }
.search-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  cursor: pointer;
}
.search-item:hover { background: #2c3a52; }
.search-item-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== ファイル種別バッジ ===== */
.ftype {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 16px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
}
.ft-pdf { background: #e8453c; }
.ft-doc { background: #1a73e8; }
.ft-sheet { background: #1e8e3e; }
.ft-slide { background: #f29900; }
.ft-image { background: #9334e6; }
.ft-html { background: #00897b; }
.ft-md { background: #5c6bc0; }
.ft-other { background: #80868b; }

/* ===== コマンドパレット用ヒント ===== */
.kbd-hint {
  margin-top: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}
.kbd-hint kbd {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-family: inherit;
}

/* ===== ツリー ===== */
.tree { flex: 1; overflow-y: auto; padding-bottom: 8px; }
.tree-source + .tree-source {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.tree-source-head {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.42);
}
.tree-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}
.tree-row:hover { background: #2c3a52; }
.tree-row.active { background: var(--brand); color: #fff; }
.tree-caret { width: 12px; flex-shrink: 0; color: rgba(255, 255, 255, 0.5); margin-top: 2px; }
.tree-icon { flex-shrink: 0; margin-top: 1px; }
.tree-label {
  /* 長い名前は2行まで表示してそれ以降を省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.tree-loading, .tree-empty, .tree-error {
  padding: 6px 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.tree-error { color: #ff9a9a; }

/* ===== フッター ===== */
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.inquiry {
  display: block;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
}
.inquiry:hover { background: #2c3a52; }
.static-page {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
}
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout { border: 0; background: transparent; color: rgba(255, 255, 255, 0.4); cursor: pointer; font-size: 12px; }
.logout:hover { color: rgba(255, 255, 255, 0.8); }

/* ===== プレビュー ===== */
.preview { flex: 1; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9aa0a6;
  text-align: center;
}
.empty-title { font-size: 24px; margin: 0; }
.empty-sub { font-size: 14px; max-width: 420px; margin: 12px 16px 0; line-height: 1.7; }
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* 右上の固定ツールバー（ヘルプ・アカウント）と重ならないよう右側に余白を確保 */
  padding: 12px 124px 12px 20px;
  border-bottom: 1px solid #e5e7eb;
}
.preview-title-box { min-width: 0; }
.preview-title { font-size: 18px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-date { font-size: 12px; color: #9aa0a6; margin: 2px 0 0; }
.preview-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.preview-open,
.preview-copy {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid #d2d5da;
  border-radius: 6px;
  font-size: 14px;
  color: #5f6368;
  text-decoration: none;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.preview-open:hover,
.preview-copy:hover { background: #f5f5f5; }
.preview-frame { flex: 1; border: 0; width: 100%; }

/* ===== ホーム（サイトマップ） ===== */
.sitemap { flex: 1; overflow-y: auto; padding: 36px 64px; }
/* パンくず（ホーム › 祖先 › 現在） */
.sitemap-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0 0 10px;
}
.sitemap-crumb {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}
.sitemap-crumb:hover { background: var(--brand-tint); text-decoration: underline; }
.sitemap-crumb-current {
  color: #5f6368;
  cursor: default;
  font-weight: 600;
}
.sitemap-crumb-current:hover { background: transparent; text-decoration: none; }
.sitemap-crumb-sep { color: #c0c4c9; font-size: 13px; }
.sitemap-crumb-home { display: inline-flex; align-items: center; gap: 3px; }
.sitemap-crumb-icon { font-size: 16px; }
.sitemap-title { font-size: 24px; margin: 0 0 28px; }

/* ホームのワードマーク（STREET=極太 ＋ PORTAL=細字／大文字・フラット・コーポレートグリーン） */
.sitemap-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22em;
  margin: 6px 0 30px;
  color: var(--brand);
  line-height: 1;
  text-shadow: none;
}
.wordmark-street {
  font-weight: 800;
  font-size: 46px;
  letter-spacing: -0.015em;
}
.wordmark-portal {
  font-weight: 400;
  font-size: 38px;
  letter-spacing: 0.04em;
}
.sitemap-source { margin: 0 0 12px; }
.sitemap-source-head {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 28px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
}
.sitemap-grid {
  display: grid;
  /* 幅は自動折り返し。1項目が折り返しすぎない幅を確保。高さは行内で揃える */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px;
  align-items: stretch;
}

/* フォルダ=カード（縦長め・枠線なし・上品な影） */
.sitemap-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 200px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  /* ふんわり浮かせるソフトシャドウ */
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08),
    0 4px 10px rgba(16, 24, 40, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.sitemap-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(16, 24, 40, 0.12),
    0 6px 14px rgba(16, 24, 40, 0.06);
}

/* カード見出し（薄緑・フォルダ名＋件数バッジ・クリックでドリルダウン） */
.sitemap-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  flex-shrink: 0;
  text-align: left;
  padding: 11px 14px;
  border: 0;
  background: var(--brand-tint);
  cursor: pointer;
  transition: background 0.15s ease;
}
.sitemap-card-head:hover { background: var(--brand-tint-strong); }
.sitemap-card-head-plain { cursor: default; }
.sitemap-card-head-plain:hover { background: var(--brand-tint); }
/* カード見出しのフォルダアイコン（白い丸形チップ） */
.sitemap-card-head-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  font-size: 18px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}
.sitemap-card-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-dark);
  /* 見出しも省略せず折り返す */
  word-break: break-word;
  overflow-wrap: anywhere;
}
/* 件数バッジ：薄緑見出しの上で白ピル＋ブランド文字（控えめ） */
.sitemap-card-count {
  flex-shrink: 0;
  min-width: 20px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* 本文：中身がわかる箇条書き */
.sitemap-card-list {
  margin: 0;
  padding: 12px 16px 14px 16px;
  list-style: none;
}
.sitemap-card-list li {
  position: relative;
  padding-left: 14px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.65;
  /* 語の途中で割らず、自然な位置で折り返す */
  word-break: normal;
  overflow-wrap: normal;
}
.sitemap-card-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

/* 本文（1段落の説明文。文字列指定時のフォールバック） */
.sitemap-card-desc {
  margin: 0;
  padding: 12px 16px 14px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
}
/* 説明未設定：テキストを出さず余白だけ確保 */
.sitemap-card-empty { padding: 14px 16px; }

/* カード内のファイル一覧（「資料」カード専用） */
.sitemap-card-preview { padding: 6px 12px 12px; }
.sitemap-card-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3c4043;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  /* 省略せず全文を折り返して表示（途中で切れないように） */
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.sitemap-card-item:hover { background: var(--brand-tint); color: var(--brand); }

/* 「資料」＝カードではなく全幅リスト表示 */
.sitemap-files {
  grid-column: 1 / -1;
}
.sitemap-files-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-tint-strong);
}
.sitemap-files-icon { font-size: 20px; color: var(--brand); }
.sitemap-files-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-dark);
}
.sitemap-files-count {
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
/* 横3列に流し込むリスト */
.sitemap-files-list {
  columns: 3;
  column-gap: 28px;
}
.sitemap-files-list .sitemap-card-item {
  break-inside: avoid;
  padding: 7px 8px;
  /* 折り返さず1行で省略（全文はホバーで表示） */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sitemap-empty { color: #9aa0a6; font-size: 13px; margin: 0; padding: 6px; }
.sitemap-loading { color: #9aa0a6; font-size: 14px; }

/* ===== クイックリンク ===== */
.quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  /* 下のカード群と視覚的に区切る：余白を広めにとり、薄い境界線を引く */
  margin: 0 0 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e5e7eb;
}
.quicklink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 0;
  /* 角丸を強く＝独立したボタン／タブ感 */
  border-radius: 18px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  /* 立体感のある影 */
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08),
    0 1px 2px rgba(16, 24, 40, 0.06);
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease,
    transform 0.12s ease;
}
.quicklink:hover {
  /* カチッと：ブランドグリーンで塗りつぶし＋浮き上がり */
  background: var(--brand);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 114, 53, 0.28),
    0 3px 8px rgba(0, 114, 53, 0.18);
}
.quicklink:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0, 114, 53, 0.22);
}
.quicklink-icon { font-size: 20px; line-height: 1; }
/* Material Icons をブランド色基調に（ホバー時はボタン文字色=白を継承） */
.quicklink .quicklink-icon.material-icons { color: var(--brand); }
.quicklink:hover .quicklink-icon.material-icons { color: #fff; }
.quicklink-disabled .quicklink-icon.material-icons { color: #b0b4b9; }
.quicklink-label { white-space: nowrap; }
.quicklink-disabled {
  cursor: not-allowed;
  background: #f2f3f5;
  color: #b0b4b9;
  box-shadow: none;
}
.quicklink-disabled:hover {
  background: #f2f3f5;
  color: #b0b4b9;
  transform: none;
  box-shadow: none;
}

/* ===== 右上ツールバー（ヘルプ・アカウント） ===== */
.topbar {
  position: fixed;
  top: 14px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
}
.topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-dark);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.topbar-btn .material-icons { font-size: 23px; }
.topbar-btn:hover {
  background: var(--brand-tint);
  color: var(--brand);
  transform: translateY(-1px);
}
.topbar-user { position: relative; }

/* アカウントのポップオーバー */
.user-popover {
  position: absolute;
  top: 48px;
  right: 0;
  min-width: 230px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.16),
    0 2px 8px rgba(16, 24, 40, 0.08);
  padding: 14px;
  z-index: 110;
}
.user-popover[hidden] { display: none; }
.user-popover-head { display: flex; align-items: center; gap: 10px; }
.user-popover-avatar { font-size: 40px; color: var(--brand); }
.user-popover-meta { min-width: 0; }
.user-popover-name { margin: 0; font-size: 14px; font-weight: 700; color: #1a1a1a; }
.user-popover-email {
  margin: 2px 0 0;
  font-size: 12px;
  color: #5f6368;
  word-break: break-all;
}
.user-popover-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 9px 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #5f6368;
  font-size: 13px;
  cursor: pointer;
}
.user-popover-logout .material-icons { font-size: 18px; }
.user-popover-logout:hover { background: #f7f8f9; color: #1a1a1a; }

/* ===== ヘルプ（更新方法） ===== */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.help-overlay[hidden] { display: none; }
.help-card {
  width: 100%;
  max-width: 560px;
  max-height: 84vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.3);
}
.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #eef0f2;
  position: sticky;
  top: 0;
  background: #fff;
}
.help-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
  color: var(--brand-dark);
}
.help-title .material-icons { color: var(--brand); }
.help-close {
  display: inline-flex;
  border: 0;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px;
}
.help-close:hover { background: #f2f3f5; color: #1a1a1a; }
.help-body { padding: 8px 22px 22px; }
.help-sec { margin-top: 18px; }
.help-sec h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--brand);
}
.help-sec p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: #3c4043;
}
.help-sec code {
  background: #f1f3f4;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12.5px;
}

/* ===== コマンドパレット ===== */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  z-index: 1000;
}
.cmdk {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: cmdk-in 0.12s ease-out;
}
@keyframes cmdk-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cmdk-input {
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid #ececec;
  font-size: 16px;
  outline: none;
  color: #1a1a1a;
}
.cmdk-section {
  font-size: 11px;
  font-weight: 600;
  color: #9aa0a6;
  padding: 10px 14px 4px;
}
.cmdk-list { overflow-y: auto; padding: 4px 8px 10px; }
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 14px;
  color: #1a1a1a;
  cursor: pointer;
}
.cmdk-item:hover,
.cmdk-item.active { background: var(--brand-tint); }
.cmdk-item-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmdk-item-date { flex-shrink: 0; font-size: 12px; color: #9aa0a6; }
.cmdk-empty { padding: 18px 12px; text-align: center; font-size: 13px; color: #9aa0a6; }
.cmdk-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid #ececec;
  font-size: 12px;
  color: #5f6368;
}
.cmdk-deep { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.cmdk-deep input { accent-color: var(--brand); cursor: pointer; margin: 0; }
.cmdk-foot-hint { color: #9aa0a6; }

/* ===== お知らせ・周知ボード（ホーム埋め込み）===== */
.ann-board {
  background: #fff;
  border: 2px solid var(--brand);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 40px;
}
.ann-board-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  background: var(--brand-dark);
  color: #fff;
}
.ann-board-icon { font-size: 20px; opacity: 0.9; }
.ann-board-title { flex: 1; font-size: 15px; font-weight: 700; }
.ann-more-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}
.ann-more-link:hover { color: #fff; }
.ann-more-icon { font-size: 18px; }

.ann-list { }
.ann-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s;
}
.ann-row:last-child { border-bottom: 0; }
.ann-row:hover { background: var(--brand-tint); }

.ann-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.ann-tag-danger  { background: #d32f2f; }
.ann-tag-info    { background: var(--brand); }
.ann-tag-sys     { background: #78909c; }
.ann-tag-default { background: #9e9e9e; }

.ann-title {
  flex: 1;
  font-size: 14px;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ann-date {
  flex-shrink: 0;
  font-size: 13px;
  color: #9aa0a6;
}
/* 投稿者名（ホーム・一覧の行） */
.ann-author {
  flex-shrink: 0;
  font-size: 12px;
  color: #5f6368;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 掲載状態バッジ（管理者一覧のみ表示） */
.ann-status {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.ann-status-expired { background: #fdecea; color: #c5221f; }
.ann-status-scheduled { background: #e8f0fe; color: #1967d2; }
.ann-empty { padding: 20px; text-align: center; color: #9aa0a6; font-size: 14px; margin: 0; }

/* ===== お知らせ一覧ページ ===== */
.ann-page { max-width: 860px; }
.ann-page-head {
  display: flex;
  align-items: center;
  margin: 0 0 20px;
}
.ann-page-title { flex: 1; font-size: 22px; font-weight: 700; margin: 0; }
.ann-post-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ann-post-btn:hover { opacity: 0.88; }

.ann-full-list {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.ann-full-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.ann-full-row:last-child { border-bottom: 0; }

.ann-delete-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #c0c4c9;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ann-delete-btn:hover { background: #fce8e6; color: #d32f2f; }

.ann-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}
.ann-pager-btn {
  padding: 8px 18px;
  border: 1px solid #d2d5da;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s;
}
.ann-pager-btn:hover:not(:disabled) { background: var(--brand-tint); }
.ann-pager-btn:disabled { opacity: 0.38; cursor: default; }
.ann-pager-info { font-size: 13px; color: #9aa0a6; }

/* ===== 投稿モーダル ===== */
.ann-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  animation: cmdk-in 0.12s ease-out;
}
.ann-modal {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.28);
}
.ann-modal-title { font-size: 18px; font-weight: 700; margin: 0 0 22px; }

.ann-form-row { margin-bottom: 16px; }
.ann-form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #5f6368;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.ann-form-select,
.ann-form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d2d5da;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
}
.ann-form-select:focus,
.ann-form-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(0,114,53,0.12); }

/* 掲載期間（開始日・終了日） */
.ann-form-period {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ann-form-date {
  padding: 8px 10px;
  border: 1px solid #d2d5da;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
}
.ann-form-date:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(0,114,53,0.12); }
.ann-form-date-label { font-size: 12px; color: #5f6368; }
.ann-form-date-sep { color: #9aa0a6; }
.ann-form-hint { font-size: 12px; color: #80868b; margin: 6px 0 0; line-height: 1.5; }

.ann-modal-error { font-size: 13px; color: #d32f2f; margin: 0; min-height: 18px; }
.ann-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}
.ann-modal-cancel {
  padding: 9px 18px;
  border: 1px solid #d2d5da;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.ann-modal-cancel:hover { background: #f7f8f9; }
.ann-modal-submit {
  padding: 9px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ann-modal-submit:hover { opacity: 0.88; }
.ann-modal-submit:disabled { opacity: 0.5; cursor: default; }

/* 通知対象バッジ */
.ann-target {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--brand-tint);
  color: var(--brand-dark);
  border: 1px solid var(--brand-tint-strong);
}

/* 本文テキストエリア */
.ann-form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d2d5da;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  resize: vertical;
  min-height: 720px;
}
.ann-form-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(0,114,53,0.12); }

/* Slack通知チェックボックス行 */
.ann-form-row-slack { margin-bottom: 0; }
.ann-form-slack-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #5f6368;
  cursor: pointer;
  user-select: none;
}
.ann-form-slack-chk { accent-color: var(--brand); cursor: pointer; margin: 0; }

/* 一覧の行レイアウト（本文対応） */
.ann-full-row { align-items: flex-start; }
.ann-full-main { flex: 1; min-width: 0; }
.ann-full-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.ann-full-top .ann-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ann-body-preview {
  margin: 4px 0 0;
  font-size: 12px;
  color: #5f6368;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 一覧メイン領域クリック */
.ann-full-main-clickable { cursor: pointer; }
.ann-full-main-clickable:hover .ann-title { color: var(--brand); text-decoration: underline; }

/* ===== お知らせ詳細ポップアップ ===== */
.ann-detail-modal {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 14px;
  padding: 22px 28px 28px;
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.28);
  animation: cmdk-in 0.14s ease-out;
}
.ann-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ann-detail-badges { display: flex; align-items: center; gap: 8px; }
.ann-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  transition: background 0.12s;
  flex-shrink: 0;
}
.ann-detail-close:hover { background: #f2f3f5; color: #1a1a1a; }
.ann-detail-close .material-icons { font-size: 20px; }
.ann-detail-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 12px;
  color: #1a1a1a;
  word-break: break-word;
}
.ann-detail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}
.ann-detail-date { font-size: 13px; color: #9aa0a6; }
.ann-detail-by   { font-size: 13px; color: #5f6368; }
.ann-detail-period { display: block; font-size: 12px; color: #80868b; margin-top: 2px; }
.ann-detail-body {
  font-size: 14px;
  line-height: 1.8;
  color: #3c4043;
  white-space: pre-wrap;
  word-break: break-word;
}
.ann-detail-nobody { font-size: 13px; color: #bbb; margin: 0; }

/* ===== 絵文字ピッカー ===== */
.ann-form-body-label-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.ann-form-body-label-row .ann-form-label { margin-bottom: 0; }
.ann-emoji-toggle {
  padding: 2px 6px; border: 1px solid #d2d5da; border-radius: 6px;
  background: #fff; font-size: 16px; cursor: pointer; line-height: 1;
  transition: background 0.12s;
}
.ann-emoji-toggle:hover { background: var(--brand-tint); }

.emoji-picker {
  flex-direction: column;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-top: 6px;
  z-index: 10;
}
.emoji-tabs {
  display: flex; overflow-x: auto; gap: 2px;
  padding: 6px 6px 0; border-bottom: 1px solid #f0f0f0;
  scrollbar-width: none;
}
.emoji-tabs::-webkit-scrollbar { display: none; }
.emoji-tab {
  flex-shrink: 0; padding: 4px 10px; border: 0;
  border-radius: 6px 6px 0 0; background: transparent;
  font-size: 12px; color: #5f6368; cursor: pointer;
  white-space: nowrap;
}
.emoji-tab.active { background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; }
.emoji-tab:hover:not(.active) { background: #f5f5f5; }
.emoji-grid {
  flex-wrap: wrap; gap: 2px; padding: 8px;
  max-height: 160px; overflow-y: auto;
}
.emoji-item {
  width: 34px; height: 34px; border: 0; border-radius: 6px;
  background: transparent; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.emoji-item:hover { background: var(--brand-tint); }

/* モーダル幅広版（添付あり） */
.ann-modal-wide { max-width: 580px; }

/* アバター */
.ann-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ann-avatar-fallback {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}

/* 詳細ポップアップ再設計 */
.ann-detail-modal {
  width: 100%; max-width: 560px;
  background: #fff; border-radius: 14px;
  padding: 22px 28px 28px;
  box-shadow: 0 20px 60px rgba(16,24,40,0.28);
  animation: cmdk-in 0.14s ease-out;
  max-height: 90vh; overflow-y: auto;
}
.ann-detail-head {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.ann-detail-poster { display: flex; align-items: center; gap: 10px; }
.ann-poster-meta { display: flex; flex-direction: column; gap: 2px; }
.ann-poster-name { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.ann-detail-head-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.ann-detail-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: #5f6368; cursor: pointer;
}
.ann-detail-close:hover { background: #f2f3f5; color: #1a1a1a; }
.ann-detail-close .material-icons { font-size: 20px; }
.ann-detail-title { font-size: 18px; font-weight: 700; margin: 0 0 10px; line-height: 1.5; }
.ann-detail-divider { border: 0; border-top: 1px solid #f0f0f0; margin: 0 0 14px; }
.ann-detail-body {
  font-size: 14px; line-height: 1.8; color: #3c4043;
  white-space: pre-wrap; word-break: break-word;
  margin-bottom: 16px;
}
.ann-detail-link { color: var(--brand); text-decoration: underline; }
.ann-detail-link:hover { opacity: 0.8; }

/* 詳細：画像 */
.ann-detail-images { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ann-detail-image {
  max-width: 100%; max-height: 320px;
  border-radius: 8px; object-fit: cover;
  border: 1px solid #e5e7eb;
}

/* 詳細：ファイル */
.ann-detail-files { display: flex; flex-direction: column; gap: 6px; }
.ann-detail-filelink {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--brand-tint); color: var(--brand-dark);
  text-decoration: none; font-size: 13px;
  border: 1px solid var(--brand-tint-strong);
  transition: background 0.12s;
}
.ann-detail-filelink:hover { background: var(--brand-tint-strong); }
.ann-detail-fileicon { font-size: 18px; color: var(--brand); }
.ann-detail-filelink-name { font-weight: 600; }
.ann-detail-filelink-size { color: #9aa0a6; font-size: 12px; }

/* フォーム：画像プレビュー */
.ann-attach-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ann-img-wrap { position: relative; display: inline-block; }
.ann-img-thumb {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 6px; border: 1px solid #e5e7eb; display: block;
}
.ann-img-wrap-new .ann-img-thumb { opacity: 0.85; }
.ann-attach-rm {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: #333; color: #fff;
  font-size: 12px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.ann-attach-rm:hover { background: #d32f2f; }

/* フォーム：ファイルリスト */
.ann-attach-filelist { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.ann-attach-fileitem {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: 6px;
  background: var(--brand-tint); font-size: 13px;
}
.ann-attach-fileitem-new { background: #f1f3f4; }
.ann-attach-fileicon { font-size: 16px; color: var(--brand); }
.ann-attach-filename { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-attach-filesize { color: #9aa0a6; font-size: 12px; flex-shrink: 0; }

/* フォーム：添付ボタン */
.ann-attach-btn {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border: 1px dashed #d2d5da;
  border-radius: 6px; background: #fff;
  color: #5f6368; font-size: 13px; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.ann-attach-btn:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--brand); }

/* 編集ボタン */
.ann-edit-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #c0c4c9;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ann-edit-btn:hover { background: var(--brand-tint); color: var(--brand); }
