/* ============================================================
   Notion 風スタイル — 常闇トワ様配信データベース
   ============================================================ */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --sidebar-bg: #f7f7f5;
  --text: rgb(40, 38, 34);
  --muted: rgba(40, 38, 34, 0.78);
  --faint: rgba(40, 38, 34, 0.58);
  --line: #e9e9e7;
  --hover: rgba(55, 53, 47, 0.06);
  --active: rgba(55, 53, 47, 0.1);
  --accent: rgb(35, 131, 226);
  --today: #eb5757;
  --radius: 4px;
  font-family: "Noto Sans JP", ui-sans-serif, -apple-system, "Segoe UI",
    "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
}

/* Notion タグパレット */
:root {
  --tag-default-bg: rgba(227, 226, 224, 0.5); --tag-default-fg: rgb(50, 48, 44);
  --tag-gray-bg: rgb(227, 226, 224);   --tag-gray-fg: rgb(50, 48, 44);
  --tag-brown-bg: rgb(238, 224, 218);  --tag-brown-fg: rgb(68, 42, 30);
  --tag-orange-bg: rgb(250, 222, 201); --tag-orange-fg: rgb(73, 41, 14);
  --tag-yellow-bg: rgb(253, 236, 200); --tag-yellow-fg: rgb(64, 44, 27);
  --tag-green-bg: rgb(219, 237, 219);  --tag-green-fg: rgb(28, 56, 41);
  --tag-blue-bg: rgb(211, 229, 239);   --tag-blue-fg: rgb(24, 51, 71);
  --tag-purple-bg: rgb(232, 222, 238); --tag-purple-fg: rgb(65, 36, 84);
  --tag-pink-bg: rgb(245, 224, 233);   --tag-pink-fg: rgb(76, 35, 55);
  --tag-red-bg: rgb(255, 226, 221);    --tag-red-fg: rgb(93, 23, 21);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; }

/* ---------- レイアウト ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 250px;
  flex-shrink: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 10px 8px 24px;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
}
.workspace-icon { font-size: 16px; }
.workspace-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 8px 14px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--faint);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02);
}
.sidebar-search input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text);
}
.sidebar-search input::placeholder { color: var(--faint); }

.sidebar-section {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.table-nav { display: flex; flex-direction: column; gap: 1px; }

.nav-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--muted);
  text-align: left;
  width: 100%;
}
.nav-button:hover { background: var(--hover); }
.nav-button.active { background: var(--active); color: var(--text); font-weight: 500; }
.nav-icon { width: 18px; text-align: center; flex-shrink: 0; }
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: 12px; color: var(--faint); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 45px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 14px; overflow: hidden; }
.breadcrumb .crumb { padding: 2px 6px; border-radius: var(--radius); white-space: nowrap; }
.breadcrumb button.crumb:hover { background: var(--hover); }
.breadcrumb .crumb-sep { color: var(--faint); }
.topbar-meta { font-size: 12px; color: var(--faint); white-space: nowrap; }

.content { flex: 1; padding-bottom: 120px; }

.loading, .empty { color: var(--faint); padding: 24px; }

/* ---------- ページカバー（手書き風バナー） ---------- */
.page-cover {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.page-cover.photo {
  background: linear-gradient(120deg, #1a1030 0%, #4a1d6e 35%, #9b30c9 70%, #e05fc4 100%);
}
.cover-word {
  font-family: "Yusei Magic", "Noto Sans JP", sans-serif;
  font-size: clamp(56px, 11vw, 110px);
  letter-spacing: 0.06em;
  color: #111;
  user-select: none;
  white-space: nowrap;
}
.page-cover.photo .cover-word {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

/* ---------- ページヘッダー ---------- */
.page-head {
  max-width: 1260px;
  margin: 0 auto;
  padding: 24px 56px 8px;
}
.page-icon { font-size: 60px; line-height: 1; margin-top: -56px; display: inline-block; }
.page-title {
  margin: 8px 0 4px;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.page-props {
  /* 2026-07-19 沛核可：屬性區塊由直式卡片壓成一行小字，騰出縱向空間（資訊保留） */
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
  margin: 6px 0 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.prop { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.prop-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--faint);
  margin-bottom: 0;
}
.prop-value { color: var(--muted); }
.prop-value.is-empty { color: var(--faint); }

/* ---------- ビュー切替タブ ---------- */
.view-tabs {
  max-width: 1260px;
  margin: 0 auto;
  padding: 10px 56px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}
.view-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin-bottom: -1px;
  font-size: 14px;
  color: var(--faint);
  border-bottom: 2px solid transparent;
}
.view-tab:hover { background: var(--hover); border-radius: var(--radius) var(--radius) 0 0; }
.view-tab.active { color: var(--text); font-weight: 500; border-bottom-color: var(--text); }
.view-tabs .spacer { flex: 1; }

.toolbar {
  max-width: 1260px;
  margin: 0 auto;
  padding: 6px 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- フィルターバー ---------- */
.filter-bar {
  max-width: 1260px;
  margin: 0 auto;
  padding: 6px 56px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--faint);
}
.filter-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2px 8px;
  background: #fff;
  color: var(--muted);
}
.filter-select:hover { background: var(--hover); }
.filter-select.active {
  border-color: rgba(35, 131, 226, 0.5);
  background: rgba(35, 131, 226, 0.08);
  color: rgb(24, 51, 71);
}
.filter-label { font-size: 12px; color: var(--faint); }
.filter-select.active .filter-label { color: rgba(24, 51, 71, 0.7); }
.filter-select select {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: inherit;
  max-width: 150px;
  cursor: pointer;
}

/* ---------- T1b／A1・A2・C：配信記録／配信一覧の年／タイプ／平台…chip（.filter-select の見た目を流用） ---------- */
.filter-bar-chips { gap: 4px; }
/* T1b 初版曾用 <div class="filter-chip-group"> 包一組＋display:contents 拆盒子，
   但窄螢幕下 display:contents＋flex-wrap 有時會讓緊接在後的第一顆子項整顆消失
   （疑似 Chromium 邊界案例，見 L 檔）。改法：JS 端直接輸出扁平的 chip 清單（不再包 wrapper div），
   分隔線＝.filter-divider 本身就是平輩節點，不依賴 display:contents 就能正常換行。 */
.filter-chip {
  display: inline-flex;
  flex-shrink: 0;
  white-space: nowrap;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
}
.filter-chip:hover { background: var(--hover); }
.filter-chip.active {
  border-color: rgba(35, 131, 226, 0.5);
  background: rgba(35, 131, 226, 0.08);
  color: rgb(24, 51, 71);
}
.filter-divider { width: 1px; height: 16px; background: var(--line); margin: 0 4px; flex-shrink: 0; }

/* ---------- T1b／A5：選択中 pill（.tag のグレー底色を流用） ---------- */
.filter-selected {
  max-width: 1260px;
  margin: 0 auto;
  padding: 4px 56px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--faint);
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border-radius: 3px;
  font-size: 12.5px;
  line-height: 20px;
  background: var(--tag-gray-bg);
  color: var(--tag-gray-fg);
}
.pill-remove { font-size: 11px; opacity: 0.7; }
.pill-remove:hover { opacity: 1; }

@media (max-width: 900px) {
  .filter-bar { padding-left: 20px; padding-right: 20px; }
  .filter-selected { padding-left: 20px; padding-right: 20px; }
}
.table-filter {
  display: flex;
  align-items: center;
  flex: 0 1 300px;
}
.table-filter input {
  width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  font-size: 13.5px;
}
.table-filter input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.2); }
/* T1b／A3・C：ゲーム・コラボメンバー の datalist 輸入框，寬 200px、不隨 flex 伸縮 */
.table-filter.field-filter { flex: 0 0 auto; }
.table-filter.field-filter input { width: 200px; }
.text-button {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: var(--radius);
}
.text-button:hover { background: var(--hover); }
.row-count { font-size: 13px; color: var(--faint); margin-left: auto; }

/* ---------- テーブル ---------- */
.table-shell {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 56px 24px;
  /* 2026-07-19 沛核可（沙盒驗證後移植）：捲動容器限制在視窗高度內，
     水平捲軸永遠在可視底部；配合 thead sticky，垂直捲動欄名不消失。 */
  overflow: auto;
  max-height: calc(100vh - 300px);
}
.table-shell thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: inset 0 -1px 0 var(--line);
}
table {
  /* collapse 模式下 Chrome 的 thead sticky 失效（知名 bug），
     改 separate＋spacing 0，格線改單邊 border-bottom，視覺不變。 */
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 14px;
  /* T1／A7：欄寬固定＝欄名→寬度對照表（app.js columnWidths）透過 headerCell() 的
     inline style="width:...px" 灌進表頭第一列儲存格，fixed 版面演算法據此定寬。 */
  table-layout: fixed;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
  max-width: 340px;
  /* T1／A4：一列一行，超出用省略號（見 .cell-truncate），不再多行截斷 */
  white-space: nowrap;
}
th {
  font-weight: 400;
  font-size: 13.5px;
  color: var(--faint);
  white-space: nowrap;
  border-top: none;
}
th .sort-button {
  display: flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  padding: 2px 4px;
  border-radius: var(--radius);
}
th .sort-button:hover { background: var(--hover); color: var(--muted); }
tbody tr:hover { background: rgba(55, 53, 47, 0.03); }
.cell-truncate {
  /* T1／A4：改單行省略（原本 2 行 line-clamp），hover 看 title 全文 */
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
td a { color: var(--muted); text-decoration: none; border-bottom: 1px solid rgba(55,53,47,0.25); }
td a:hover { color: var(--text); }

.title-cell {
  font-weight: 500;
  color: var(--text);
  text-align: left;
  line-height: 1.4;
  /* T1／A4：與 .cell-truncate 一致的單行省略（title-cell 是 button，需自帶 block+nowrap） */
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.title-cell:hover { border-bottom: 1px solid rgba(55, 53, 47, 0.4); }
.title-cell .row-icon { margin-right: 6px; }
/* TWS-20260906-01／B3：videos の メン限 pill を Name 欄尾端に併記 */
.title-cell .member-badge { margin-left: 4px; }

/* ---------- タグ（Notion pill） ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  display: inline-block;
  padding: 0 7px;
  border-radius: 3px;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
  background: var(--tag-default-bg);
  color: var(--tag-default-fg);
}
.tag-gray   { background: var(--tag-gray-bg);   color: var(--tag-gray-fg); }
.tag-brown  { background: var(--tag-brown-bg);  color: var(--tag-brown-fg); }
.tag-orange { background: var(--tag-orange-bg); color: var(--tag-orange-fg); }
.tag-yellow { background: var(--tag-yellow-bg); color: var(--tag-yellow-fg); }
.tag-green  { background: var(--tag-green-bg);  color: var(--tag-green-fg); }
.tag-blue   { background: var(--tag-blue-bg);   color: var(--tag-blue-fg); }
.tag-purple { background: var(--tag-purple-bg); color: var(--tag-purple-fg); }
.tag-pink   { background: var(--tag-pink-bg);   color: var(--tag-pink-fg); }
.tag-red    { background: var(--tag-red-bg);    color: var(--tag-red-fg); }

/* リレーション（ページ参照）チップ */
.chips { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1px solid rgba(55, 53, 47, 0.25);
  padding: 0 1px;
  text-align: left;
}
.chip:hover { background: var(--hover); }
.chip::before { content: "📄"; font-size: 12px; opacity: 0.7; }
/* T1／B1：表格列「＋N」合成 chip（コラボメンバー等超過 3 人時），無圖示、色弱化區分 */
.chip-more { color: var(--faint); font-weight: 500; }
.chip-more::before { content: none; }

/* ---------- カレンダー ---------- */
.calendar-wrap {
  max-width: 1260px;
  margin: 0 auto;
  padding: 12px 56px 24px;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 10px;
}
.calendar-title { font-size: 16px; font-weight: 600; margin-right: auto; }
.cal-nav {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 15px;
}
.cal-nav:hover { background: var(--hover); }
.cal-today-btn {
  font-size: 13px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
}
.cal-today-btn:hover { background: var(--hover); }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.cal-dow {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--faint);
  text-align: right;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.cal-cell {
  min-height: 96px;
  padding: 4px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-cell.other-month { background: #fbfbfa; }
.cal-date {
  align-self: flex-end;
  font-size: 12.5px;
  color: var(--muted);
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.cal-cell.other-month .cal-date { color: var(--faint); }
.cal-date.today { background: var(--today); color: #fff; font-weight: 600; }
.cal-event {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.05);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cal-event:hover { background: var(--hover); }
.cal-event .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}
.cal-more { font-size: 11px; color: var(--faint); text-align: left; padding: 0 5px; }

/* ---------- ホーム（目録） ---------- */
.home-grid {
  max-width: 1260px;
  margin: 0 auto;
  padding: 8px 56px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.home-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: background 0.1s ease;
  display: flex;
  flex-direction: column;
}
.home-card:hover { background: #fbfbfa; box-shadow: 0 2px 6px rgba(15,15,15,0.06); }
.home-card-cover {
  height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line);
  font-family: "Yusei Magic", sans-serif;
  font-size: 30px;
  color: #111;
  background: #fff;
}
.home-card-body { padding: 10px 12px 12px; }
.home-card-title { font-weight: 600; font-size: 14px; }
.home-card-meta { font-size: 12px; color: var(--faint); margin-top: 2px; }
.section-heading {
  max-width: 1260px;
  margin: 0 auto;
  padding: 4px 56px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
}

/* ---------- 詳細ページ ---------- */
.record {
  max-width: 1260px;
  margin: 0 auto;
  padding: 8px 56px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}
.record .field-list { display: flex; flex-direction: column; }
.field-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 0;
  min-height: 32px;
  align-items: start;
}
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 13.5px;
  padding: 2px 6px;
  border-radius: var(--radius);
}
.field-value { padding-top: 1px; word-break: break-word; }
.field-value a { color: var(--muted); text-decoration: none; border-bottom: 1px solid rgba(55,53,47,0.25); }
.field-value a:hover { color: var(--text); }
.field-value .empty { color: var(--faint); padding: 0; }

.record-side { display: flex; flex-direction: column; gap: 18px; }
.thumb {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block;
}
.related-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  margin-bottom: 4px;
}
.related-list { display: flex; flex-direction: column; }
.related-item {
  text-align: left;
  padding: 6px 8px;
  border-radius: var(--radius);
  border-bottom: 1px solid var(--line);
}
.related-item:hover { background: var(--hover); }
.related-item strong { font-weight: 500; display: block; line-height: 1.35; }
.related-item .meta { font-size: 12px; color: var(--faint); }
.back-line { max-width: 1260px; margin: 0 auto; padding: 12px 56px 0; }

/* ---------- 検索結果 ---------- */
.search-results {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 56px;
  display: flex;
  flex-direction: column;
}
.search-head {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 56px 4px;
  font-size: 15px;
  color: var(--muted);
}
.search-result {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 6px;
}
.search-result:hover { background: var(--hover); }
.search-result strong { font-weight: 500; }
.search-result .meta { font-size: 12px; color: var(--faint); }
.badge {
  align-self: flex-start;
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 5px;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .page-head, .toolbar, .table-shell, .calendar-wrap, .home-grid,
  .record, .view-tabs, .back-line, .section-heading { padding-left: 20px; padding-right: 20px; }
  .record { grid-template-columns: 1fr; }
}

/* ============================================================
   T1 改版（2026-09-05，TWS-20260905-04）
   內頁（表頁／行事曆／詳情）壓縮版頭，讓「讀資料」優先；
   首頁（.page-cover.photo）不在下列選擇器命中範圍內，逐位元組視覺不變。
   ============================================================ */

/* ---------- A1：內頁 cover 壓成 56px 色帶（首頁 .page-cover.photo 不受影響） ---------- */
.page-cover:not(.photo) {
  height: 56px;
  justify-content: flex-start;
  padding-left: 56px;
}
.page-cover:not(.photo) .cover-word {
  font-size: 34px;
}

/* ---------- A2：內頁 page-head 壓成一行（icon 28px＋標題 22px）；page-props 隱藏
   （用「跟在非首頁 cover 後面的 page-head」做範圍，首頁的 page-head 不命中、維持原樣） ---------- */
.page-cover:not(.photo) + .page-head {
  padding: 10px 56px 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-cover:not(.photo) + .page-head .page-icon {
  font-size: 28px;
  margin-top: 0;
  line-height: 1;
}
.page-cover:not(.photo) + .page-head .page-title {
  font-size: 22px;
  margin: 0;
}
.page-cover:not(.photo) + .page-head .page-props {
  display: none;
}

/* ---------- A4（補）：tags／chips 不換行、溢出隱藏——限「表格列」內，
   詳情頁沿用同一批 class（.tags／.chips）需保留原本可換行、全部顯示，故不能改全域基底規則 ---------- */
.table-shell .tags,
.table-shell .chips {
  flex-wrap: nowrap;
  overflow: hidden;
}
.table-shell .tag {
  flex-shrink: 0;
  white-space: nowrap;
}
.table-shell .chip {
  /* 一般 chip 允許被壓縮＋各自省略號，讓固定欄寬內盡量多顯示幾個名字；
     「＋N」（.chip-more）永遠不縮、優先保留可見可點 */
  min-width: 24px;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-shell .chip-more {
  flex-shrink: 0;
}

/* ---------- A5：Name（第一欄）欄凍結，橫捲不丟對象 ---------- */
table th:first-child,
table td:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  box-shadow: 1px 0 0 var(--line);
}
table thead th:first-child {
  z-index: 3; /* 高於一般 thead th（z-index:2）與凍結 td（z-index:1），四角都不被蓋住 */
}
tbody tr:hover td:first-child {
  background: rgba(55, 53, 47, 0.03); /* 跟隨 tbody tr:hover 的列底色，凍結格不脫色 */
}

/* ---------- A10：手機（≤900px）內頁 cover 進一步縮到 40px；加側欄切換鈕 ---------- */
.menu-toggle {
  display: none;
}
@media (max-width: 900px) {
  .page-cover:not(.photo) {
    height: 40px;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 18px;
    border-radius: var(--radius);
    color: var(--muted);
    flex-shrink: 0;
  }
  .menu-toggle:hover {
    background: var(--hover);
  }
  .sidebar.mobile-open {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    height: 100vh;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.18);
  }
}
