/* ==========================================================================
   週末見 — 寬屏黃金版心比例 × 全功能完整產品樣式表 (v5.0)
   1280px 呼吸感畫廊版心 · 零截斷工具列 · 破冰私訊匣 · 實名入駐核驗 · 嚴格隱藏後台ID
   ========================================================================== */

:root {
  --canvas: #F6F6F4;
  --surface: #FFFFFF;
  --surface-soft: #EFEFED;
  --surface-soft-hover: #E6E6E3;
  --surface-glass: rgba(255, 255, 255, 0.88);

  --ink: #17181A;
  --ink-body: #3A3A37;
  --muted: #6E6D68;
  --faint: #9B9A94;

  --hairline: rgba(23, 24, 26, 0.07);
  --hairline-strong: rgba(23, 24, 26, 0.13);
  --card-ring: 0 1px 2px rgba(23, 24, 26, 0.035), 0 0 0 1px rgba(23, 24, 26, 0.065);
  --elevated-ring: 0 14px 36px -12px rgba(23, 24, 26, 0.09), 0 1px 2px rgba(23, 24, 26, 0.04), 0 0 0 1px rgba(23, 24, 26, 0.07);
  --obsidian-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(23, 24, 26, 0.16), 0 8px 18px -6px rgba(23, 24, 26, 0.22);

  --radius-card: 20px;
  --radius-inner: 14px;
  --radius-pill: 999px;

  --live: #16A34A;
  --heart: #F43F5E;
  /* 上面兩個給色塊與圖示用；當文字放在淺底上、或墊在白字底下時對比不夠，另備較深的一組（對比 4.5 以上） */
  --live-text: #15803D;
  --heart-text: #BE123C;
  --heart-strong: #E11D48;

  --font-sans: "Geist", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
  --font-mono: "Geist Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

html[data-theme="night"] {
  --canvas: #0E0F11;
  --surface: #151619;
  --surface-soft: #1E2025;
  --surface-soft-hover: #282A30;
  --surface-glass: rgba(21, 22, 25, 0.88);

  --ink: #F4F4F2;
  --ink-body: #CECECA;
  --muted: #8B8B85;
  --faint: #5E5E59;

  --live-text: #22C55E;
  --heart-text: #FB7185;

  color-scheme: dark;

  --hairline: rgba(255, 255, 255, 0.075);
  --hairline-strong: rgba(255, 255, 255, 0.15);
  --card-ring: 0 1px 2px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --elevated-ring: 0 16px 36px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.09);
  --obsidian-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.4);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 表單元件與捲軸跟著主題走；深色模式在上面的 night 區塊改成 dark */
  color-scheme: light;
  background: var(--canvas);
}

/* 主程式把第一輪畫面畫好之前先不顯示，不讓空殼先露出來再整頁跳一下。
   app.js 畫完就拿掉 is-booting；index.html 另有 4 秒保險與 noscript 備援 */
html.is-booting body {
  visibility: hidden;
}

[hidden] {
  display: none !important;
}

/* 抽屜或彈窗開著時鎖住背景頁面，滑動不會穿透到後面的動態牆（由 app.js 切換；
   捲軸消失造成的位移也由 app.js 在 body 補上同寬的內距） */
html.is-overlay-open {
  overflow: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 420px at 50% -120px, rgba(255, 255, 255, 0.75), transparent 70%),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.65;
}

html[data-theme="night"] body {
  background: var(--canvas);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.ico {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.65;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   1. 1280px 寬屏黃金版心（消除大螢幕兩側過寬留白）
   ========================================================================== */
.dock-wrap {
  position: sticky;
  top: 14px;
  z-index: 40;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 36px);
}

.floating-dock {
  height: 56px;
  padding: 0 10px 0 20px;
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: var(--elevated-ring);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dock-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dock-brand__word {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.dock-brand__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  padding: 2.5px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  flex-shrink: 0;
}

.pill-tabs {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
}

.pill-tabs__base {
  display: flex;
  gap: 2px;
}

.pill-tab-btn {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms var(--ease-out);
}

.pill-tabs__indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--surface);
  display: flex;
  gap: 2px;
  pointer-events: none;
  clip-path: inset(0 66% 0 0 round 999px);
  transition: clip-path 220ms var(--ease-out);
}

.pill-tab-mirror {
  height: 33px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.dock-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.icon-circle-btn {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 110ms var(--ease-out);
}

.icon-circle-btn:active {
  transform: scale(0.94);
}

.unread-dot-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--heart-strong);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
  border: 1.5px solid var(--surface);
}

.ghost-apply-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease-out);
}

.me-chip-btn {
  min-height: 40px;
  padding: 0 13px 0 5px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--surface-soft);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 110ms var(--ease-out);
}

.me-chip-btn:active {
  transform: scale(0.96);
}

.me-chip-btn img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.me-chip-btn span {
  max-width: 7em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.obsidian-cta {
  min-height: 40px;
  padding: 0 17px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--obsidian-shadow);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 150ms var(--ease-out), transform 120ms var(--ease-out);
}

.obsidian-cta:active {
  transform: scale(0.96);
}

/* ==========================================================================
   2. 主容器與首屏實拍畫廊（增加左右翻頁圓鈕，展示 5.35 張黃金比例）
   ========================================================================== */
.shell-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px clamp(20px, 3vw, 36px) 56px;
}

.section-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.section-header-bar__left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.section-sub {
  font-size: 13px;
  color: var(--muted);
}

.header-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.reel-arrows {
  display: inline-flex;
  gap: 4px;
}

.reel-arrow-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--card-ring);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 140ms var(--ease-out);
}

.reel-arrow-btn:active {
  transform: scale(0.92);
}

.quiet-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
}

.quiet-pill-btn {
  min-height: 40px;
  padding: 0 14px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}

.quiet-pill-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--card-ring);
}

.stories-section {
  margin-bottom: 30px;
}

.portrait-reel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 60px) / 5.25);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* 左右留 2px 給卡片外框，吸附位置跟著往內讓 2px：少了這行，載入後整排會自己滑 2px、把第一張的外框切掉。
     平滑捲動只交給左右箭頭（app.js），不寫在這裡：自動吸附若帶動畫，瀏覽器會當成訪客在捲，
     「最大內容繪製」的速度量測就此中斷 */
  padding: 2px 2px 8px;
  scroll-padding-inline: 2px;
  scrollbar-width: none;
}

.portrait-reel::-webkit-scrollbar {
  display: none;
}

.story-card {
  position: relative;
  aspect-ratio: 3 / 4.05;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: var(--card-ring);
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 220ms var(--ease-out);
}

.story-card:active {
  transform: scale(0.985);
}

.story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms var(--ease-out);
}

.story-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 12, 0.86) 0%,
    rgba(10, 10, 12, 0.36) 44%,
    rgba(10, 10, 12, 0.04) 74%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px;
  color: #FFFFFF;
}

.frost-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 9.5px;
  border-radius: var(--radius-pill);
  background: rgba(15, 15, 18, 0.48);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.story-card .frost-pill {
  white-space: nowrap;
}

/* 人像卡很窄：城市與職業那行固定一行，放不下就省略 */
.story-card .story-info__meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-info__name {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.story-info__meta {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.76);
  margin-top: 2px;
}

.frost-bubble {
  margin-top: 8px;
  padding: 5.5px 9.5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.96);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   3. 寬屏三欄黃金結構（168px 左時間脊 + 寬裕中欄 ~720px + 312px 右招人與動態欄）
   ========================================================================== */
.timeline-workspace {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 312px;
  gap: 24px;
  align-items: start;
}

.chrono-rail {
  position: sticky;
  top: 84px;
  padding: 13px 10px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-ring);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chrono-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 10px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 4px;
}

.chrono-year {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.autoplay-link {
  border: 0;
  background: transparent;
  padding: 6px 0;
  min-height: 32px;
  font-size: 11.5px;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline-strong);
}

.month-row-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 4px 11px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.month-row-btn__num {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.month-row-btn__sub {
  font-size: 11px;
  color: var(--muted);
}

.month-row-btn.is-active {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--obsidian-shadow);
}

.month-row-btn.is-active .month-row-btn__sub {
  color: rgba(255, 255, 255, 0.72);
}

html[data-theme="night"] .month-row-btn.is-active .month-row-btn__sub {
  color: rgba(20, 20, 22, 0.68);
}

/* 中欄：7 個分類籤＋搜尋框在桌面（內寬 628px）排成一列，絕不裁切半個字。
   寬度是算過的：分類籤 476＋間距 12＋搜尋框 128＝616；再加分類或把名稱加長，搜尋框會自動換到第二列 */
.stream-sheet {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--card-ring);
  overflow: hidden;
}

.stream-toolbar {
  padding: 13px 26px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
}

.channel-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  flex: 999 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.channel-tabs::-webkit-scrollbar {
  display: none;
}

/* 分類放不下時右緣淡出，提示還能橫向滑動（由 app.js 依實際寬度切換） */
.channel-tabs.is-overflowing {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}

.ch-tab-btn {
  min-height: 40px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.ch-tab-btn.is-active {
  background: var(--ink);
  color: var(--surface);
  font-weight: 500;
}

.inline-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  /* 和分類籤同一列放得下就維持 128px；放不下時整個換到下一列並撐滿，分類籤不被擠掉 */
  flex: 1 0 128px;
  min-width: 0;
  transition: background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.inline-search:focus-within {
  background: var(--surface);
  box-shadow: var(--card-ring);
}

.inline-search input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  min-width: 0;
  font-size: 12.5px;
  text-overflow: ellipsis;
}

.inline-search input::placeholder {
  color: var(--muted);
}

/* 搜尋框空著時，瀏覽器仍會替右側的「清除」鈕留一塊位置，提示文字因此被截成「…」。
   沒有輸入內容時不留這塊；打字之後清除鈕照常出現 */
.inline-search input:placeholder-shown::-webkit-search-cancel-button {
  display: none;
}

/* 頂部輕量發起動態入口條（讓社群首頁更像真實活絡產品） */
.quick-composer-bar {
  padding: 14px 26px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(to bottom, rgba(239, 239, 237, 0.28), transparent);
  cursor: pointer;
}

/* 深色模式：上面那道淺灰漸層疊在深色底上會變成一條發灰的亮帶，改用很淡的白 */
html[data-theme="night"] .quick-composer-bar {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.035), transparent);
}

.quick-composer-bar img {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
}

.quick-composer-bar__prompt {
  flex: 1;
  min-width: 0;
  height: 36px;
  line-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 貼文單列條目 */
.moment-item {
  padding: 26px 28px;
  border-bottom: 1px solid var(--hairline);
  /* 被「看留言」這類連結捲過來時，停在懸浮頂欄下方，不被它蓋住 */
  scroll-margin-top: 84px;
}

.moment-item:last-child {
  border-bottom: 0;
}

/* 跳到某一則動態時，短暫標示一下是哪一則 */
.moment-item.is-flash {
  animation: moment-flash 1.8s var(--ease-out);
}

@keyframes moment-flash {
  0%,
  30% {
    background-color: var(--surface-soft);
  }
  100% {
    background-color: transparent;
  }
}

/* 月份、分類、關鍵字篩選中的提示列 */
.filter-hint {
  padding: 10px 28px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.filter-hint .autoplay-link {
  flex-shrink: 0;
  white-space: nowrap;
}

.moment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.moment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.moment-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.moment-avatar-wrap img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: var(--card-ring);
}

.avatar-online-ring {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--live);
  border: 2px solid var(--surface);
}

.moment-author__name {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.moment-author__cohort {
  font-size: 11px;
  padding: 1.5px 7px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--muted);
}

.moment-author__meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 1px;
}

.moment-date-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.moment-title {
  margin: 0 0 8px;
  font-size: 17.5px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.44;
  color: var(--ink);
}

.moment-body {
  margin: 0 0 15px;
  font-size: 14.5px;
  line-height: 1.74;
  color: var(--ink-body);
}

/* 標題折行時讓每行長度接近，不留孤零零一個字在最後一行（瀏覽器不支援時維持原樣） */
h1,
h2,
h3 {
  text-wrap: balance;
}

/* 「時間 · 狀態 · 地點」這類用間隔號串起來的短句：每段自成一塊，折行優先斷在間隔號 */
.seg {
  display: inline-block;
}

.filter-hint__count {
  white-space: nowrap;
}

/* 相冊拼圖 */
.photo-collage {
  display: grid;
  gap: 5px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: var(--card-ring);
}

.photo-collage--1 {
  grid-template-columns: 1fr;
}

.photo-collage--1 img {
  aspect-ratio: 16 / 9.6;
}

.photo-collage--2 {
  grid-template-columns: 1fr 1fr;
}

.photo-collage--2 img {
  aspect-ratio: 4 / 3.05;
}

.photo-collage--3 {
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 154px 154px;
}

.photo-collage--3 .photo-frame:first-child {
  grid-row: 1 / span 2;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  background: var(--surface-soft);
  cursor: zoom-in;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms var(--ease-out);
}

/* 地點太長時收成一行加省略號，不在照片上折成兩行 */
.photo-loc-badge {
  position: absolute;
  left: 11px;
  bottom: 11px;
  pointer-events: none;
  display: block;
  /* 照片有亮有暗：底色比一般毛玻璃膠囊深一點，落在很亮的照片上白字也看得清楚 */
  background: rgba(15, 15, 18, 0.62);
  max-width: calc(100% - 22px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.heart-burst {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: burstAnim 540ms var(--ease-out) forwards;
}

.heart-burst svg {
  width: 54px;
  height: 54px;
  fill: #FFFFFF;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.32));
}

@keyframes burstAnim {
  0% { opacity: 0; transform: scale(0.7); }
  35% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.16); }
}

/* Luma 日曆撕頁式報名票券 */
.luma-ticket {
  margin: 4px 0 15px;
  padding: 12px 15px;
  border-radius: 16px;
  background: var(--canvas);
  box-shadow: var(--card-ring);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.cal-leaf {
  height: 50px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--obsidian-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cal-leaf__m {
  font-size: 11px;
  opacity: 0.72;
  margin-bottom: 3px;
}

.cal-leaf__d {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.ticket-mid__when {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}

.ticket-mid__sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

/* 頭像一張疊一張；人多到一行放不下時自動折到下一行，不溢出卡片 */
.face-stack {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 3px;
  padding-left: 5px;
}

.face-stack img {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--canvas);
  margin-left: -5px;
}

.seat-btn {
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--card-ring);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 110ms var(--ease-out);
}

.seat-btn.is-joined {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--obsidian-shadow);
}

.seat-btn:active {
  transform: scale(0.95);
}

/* 已額滿、活動回顧這類不能按的狀態：去掉浮起的卡片感，看得出不是按鈕 */
.seat-btn:disabled {
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  cursor: default;
  transform: none;
}

/* 底部膠囊互動列 */
.moment-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.moment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quiet-act {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 110ms var(--ease-out);
}

.quiet-act:active {
  transform: scale(0.94);
}

.quiet-act.is-liked {
  color: var(--heart-text);
  background: rgba(244, 63, 94, 0.1);
}

.quiet-act.is-liked .ico {
  fill: var(--heart);
  stroke: var(--heart);
}

.quiet-act.is-saved {
  color: var(--ink);
  font-weight: 500;
}

.quiet-act.is-saved .ico {
  fill: var(--ink);
  stroke: var(--ink);
}

.loc-whisper {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* 乾淨對話樓中樓 */
.thread-comments {
  margin-top: 15px;
  padding: 13px 16px;
  border-radius: 15px;
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-line {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.56;
}

.comment-line img {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  object-fit: cover;
  margin-top: 2px;
  cursor: pointer;
}

.comment-speaker {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  margin-right: 6px;
}

.comment-when {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
  white-space: nowrap;
}

.at-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 2px;
  cursor: pointer;
}

.unfold-reply-form {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.unfold-reply-form input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--surface);
  box-shadow: var(--card-ring);
  font-size: 13px;
  outline: none;
  text-overflow: ellipsis;
}

.unfold-reply-form button {
  flex-shrink: 0;
  white-space: nowrap;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--ink);
  color: var(--surface);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

/* 右欄：正在招人小卡 + 實名核驗申請入口卡 */
.side-column {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-ring);
}

.side-card__title {
  margin: 0 0 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.upcoming-visual-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  transition: opacity 150ms var(--ease-out);
}

.upcoming-visual-item:first-child {
  padding-top: 2px;
}

.upcoming-visual-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.upcoming-visual-item__thumb {
  width: 58px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--card-ring);
}

.upcoming-visual-item__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.upcoming-visual-item__name {
  font-size: 13px;
  font-weight: 500;
  margin: 2px 0 6px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* 行高 1.45 × 13px ≈ 18.85px，3 行 ≈ 56.5px */
  min-height: 57px;
}

.upcoming-visual-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
}

.seat-badge-dark {
  padding: 1.5px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 500;
  font-size: 11px;
}

.trust-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-body);
}

.trust-list li {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

/* ==========================================================================
   4. 視圖二：認識成員（寬屏 4 欄黃金比例）& 視圖三：週末揪團
   ========================================================================== */
.members-portrait-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.member-editorial-card {
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-ring);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.member-editorial-card__photo {
  position: relative;
  aspect-ratio: 3 / 3.65;
  overflow: hidden;
  background: var(--surface-soft);
  cursor: pointer;
}

.member-editorial-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms var(--ease-out);
}

.member-editorial-card__body {
  padding: 13px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* 卡片底部兩顆按鈕等高 */
.member-editorial-card__body .quiet-pill-btn,
.member-editorial-card__body .seat-btn {
  min-height: 38px;
}

/* 一句話自我介紹：點一下展開、再點收起。原本是語音條（播放鍵＋波形＋秒數），但站上沒有音檔，改成文字版；
   日後真的要放語音，資料裡的 voiceLine / voiceSec / voiceBars 欄位都還在 */
.voice-strip {
  width: 100%;
  min-height: 36px;
  padding: 0 12px 0 6px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--ink-body);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.voice-btn-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.voice-strip__label {
  flex: 1;
  min-width: 0;
}

.voice-strip__chev {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 180ms var(--ease-out);
}

.voice-strip.is-open .voice-strip__chev {
  transform: rotate(180deg);
}

.voice-strip__line {
  padding: 0 4px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-body);
}

/* 列表是空的時候的一行說明（右欄沒有可報名的揪團、成員還沒有任何紀錄） */
.side-empty-note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* 成員自己填的字（暱稱、城市、職業、理想的禮拜五、貼文與留言）可能是一長串沒有空格的英數字：
   一律允許在任何地方折行，不把卡片、抽屜或對話框撐破 */
.moment-title,
.moment-body,
.comment-line,
.prompt-quote-box,
.drawer-content,
.drawer-hero h3,
.drawer-hero .frost-bubble,
.dm-bubble,
.dm-empty-note,
.voice-strip__line,
.upcoming-visual-item__name,
.ticket-mid__when,
.quick-composer-bar__prompt {
  overflow-wrap: anywhere;
}

.prompt-quote-box {
  padding: 10px 12px;
  border-radius: var(--radius-inner);
  background: var(--canvas);
  font-size: 12.5px;
  line-height: 1.54;
  color: var(--ink-body);
}

.prompt-quote-box__label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.meetups-poster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.meetup-poster-card {
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-ring);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 海報高度以 16:9.6 為準；窄螢幕上標題與膠囊排不下時整塊跟著長高，不把字裁掉（overflow: clip 不會讓它變成捲動容器，高度才能跟著內容） */
.meetup-poster-card__hero {
  position: relative;
  display: flex;
  flex: 1 0 auto;
  aspect-ratio: 16 / 9.6;
  overflow: hidden;
  overflow: clip;
  background: var(--surface-soft);
  cursor: pointer;
}

.meetup-poster-card__hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms var(--ease-out);
}

.meetup-poster-card__scrim {
  position: relative;
  flex: 1;
  min-width: 0;
  gap: 10px;
  background: linear-gradient(
    to top,
    rgba(10, 10, 12, 0.88) 0%,
    rgba(10, 10, 12, 0.34) 48%,
    rgba(10, 10, 12, 0.08) 80%
  );
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #FFFFFF;
}

.meetup-poster-card__foot {
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
}

/* 海報頂端兩顆小膠囊：各自不折行；窄螢幕放不下就換到第二行，日期真的太長才省略 */
.poster-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 8px;
}

.poster-pills .frost-pill {
  white-space: nowrap;
}

.poster-pills .frost-pill:last-child {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 海報底部：人數一組、按鈕一組；一行放不下時按鈕整組換到下一行靠右，不把人數擠成兩行 */
.poster-foot-info {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.poster-foot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ==========================================================================
   5. 嚴格修復：後台 ID 透視預設 100% 隱藏（只有手動點擊頁尾開關才顯示）
   ========================================================================== */
.wp-proof-pill {
  display: none !important;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(23, 24, 26, 0.72);
  color: #FFFFFF;
}

body.xray-locked .wp-proof-pill {
  display: inline-flex !important;
}

/* ==========================================================================
   6. 抽屜、破冰私訊匣與新會員入駐申請彈窗
   ========================================================================== */
.backdrop-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12, 12, 14, 0.44);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  /* 關閉時連同裡面的按鈕、輸入框一起從鍵盤 Tab 順序與繪製中移除 */
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), visibility 0s linear 200ms;
}

.backdrop-layer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

[role="dialog"]:focus,
#photo-backdrop:focus {
  outline: none;
}

#photo-zoom-cap:empty {
  display: none;
}

.profile-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(440px, calc(100vw - 24px));
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--elevated-ring);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(calc(100% + 20px));
  transition: transform 280ms var(--ease-drawer);
  display: flex;
  flex-direction: column;
}

.backdrop-layer.is-open .profile-drawer {
  transform: translateX(0);
}

/* 名片抽屜是整個往下捲的一欄：頭圖在上、內容在中間、主要動作固定在下緣 */
#drawer-body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

#drawer-backdrop .profile-drawer {
  scroll-padding-bottom: 76px;
}

/* 頭圖接近正方形，直幅人像的臉才露得完整；視窗矮的時候最多佔一半高度 */
.drawer-hero {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 200px;
  max-height: min(52vh, 460px);
  overflow: hidden;
  background: var(--surface-soft);
  flex-shrink: 0;
}

/* 手機橫著拿時畫面只有三百多 px 高：照「最多佔一半」算，頭圖只剩兩百 px 的一條，照片只露出頭頂。
   這種高度改成佔滿底部按鈕以上的可視範圍（111px = 抽屜上下各 12px 的留邊 + 67px 的底部按鈕列 + 內容區上方 20px 的內距；
   少算這 20px，按鈕列會被擠出抽屜下緣）：
   先看到人，簡介往下捲 */
@media (max-height: 500px) and (orientation: landscape) {
  .drawer-hero {
    min-height: 140px;
    max-height: calc(100vh - 111px);
    max-height: calc(100dvh - 111px);
  }

  /* 橫拿時頭圖很矮，臉常常就落在左上角第二顆標籤的位置：這時只留認證那一顆 */
  .drawer-pills .frost-pill + .frost-pill {
    display: none;
  }
}

.drawer-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding: 20px 22px 0;
}

/* 「公開留言／傳私訊」固定在抽屜下緣，不必滑過整串互動紀錄才按得到；內容很短時也貼在最底 */
.drawer-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: auto -22px 0;
  padding: 12px 22px 14px;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}

/* 窄手機上這兩顆按鈕各只有一百二十幾 px 寬：左右內距收小，「公開留言 @名字」才不會被截成「@凱…」 */
@media (max-width: 400px) {
  .drawer-actions .seat-btn,
  .drawer-actions .obsidian-cta {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 340px) {
  .drawer-actions .seat-btn,
  .drawer-actions .obsidian-cta {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* 抽屜頭圖左上角：認證一顆、加入月份一顆，只留一行的高度。
   窄螢幕一行排不下時，後面那顆會折到第二行並被裁掉，不會疊成兩行把臉蓋住；
   右側 58px 留給固定在右上角的關閉鈕（鈕寬 50px，再隔 8px） */
.drawer-pills {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 12px 6px;
  height: 30px;
  overflow: hidden;
  padding-right: 58px;
}

/* 零寬的支柱：把第一行撐到 30px 高，膠囊才會跟關閉鈕垂直置中對齊 */
.drawer-pills::before {
  content: "";
  width: 0;
  height: 30px;
  margin-right: -6px;
}

.drawer-pills .frost-pill {
  align-self: center;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

/* 400px 以下的手機（例如 390 寬）：這兩顆的左右內距各收 1.5px，
   最長的認證字樣加上加入月份才排得進同一行 */
@media (max-width: 400px) {
  .drawer-pills .frost-pill {
    padding-left: 8px;
    padding-right: 8px;
  }
}

.drawer-pills__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 關閉鈕固定在抽屜右上角（零高度的黏性容器，不佔版面） */
.drawer-close-anchor {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 0;
  display: flex;
  justify-content: flex-end;
  padding: 0 20px;
}

.drawer-close-anchor .drawer-close-glass {
  margin-top: 16px;
  background: rgba(15, 15, 18, 0.62);
}

.drawer-close-glass {
  flex-shrink: 0;
  white-space: nowrap;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 15, 18, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-size: 12px;
  cursor: pointer;
}

/* 名片抽屜裡的互動紀錄：整列可點，用鍵盤也選得到 */
.drawer-history-row {
  display: block;
  width: 100%;
  padding: 10px 13px;
  border: 0;
  border-radius: 13px;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.drawer-history-row__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.drawer-history-row__title {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* 破冰私訊匣介面 */
.dm-peers-strip {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
  scrollbar-width: none;
}

.dm-peers-strip::-webkit-scrollbar {
  display: none;
}

.dm-peer-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 5px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--surface-soft);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}

.dm-peer-chip.is-active {
  background: var(--ink);
  color: var(--surface);
}

.dm-peer-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.dm-messages-area {
  flex: 1;
  min-height: 0;
  padding: 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dm-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
}

.dm-bubble--peer {
  align-self: flex-start;
  background: var(--surface-soft);
  color: var(--ink);
  border-bottom-left-radius: 5px;
}

.dm-bubble--me {
  align-self: flex-end;
  background: var(--ink);
  color: var(--surface);
  border-bottom-right-radius: 5px;
}

.dm-bubble__time {
  font-size: 11px;
  opacity: 0.62;
  margin-top: 4px;
}

.dm-compose-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
  display: flex;
  gap: 8px;
}

.dm-compose-bar input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--surface-soft);
  font-size: 13px;
  outline: none;
  text-overflow: ellipsis;
}

.dm-compose-bar .obsidian-cta {
  flex-shrink: 0;
}

.dm-compose-bar input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.obsidian-cta:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

/* 還沒有任何對話時的空白提示 */
.dm-empty-note {
  margin: auto;
  max-width: 270px;
  text-align: center;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.dm-empty-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}

/* 居中彈窗與回饋吐司 */
.dialog-center {
  display: grid;
  /* 單欄且可縮：卡片寬度以「螢幕扣掉兩側留白」為準，窄螢幕上才會真的置中 */
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 20px;
}

.dialog-card {
  width: min(520px, 100%);
  max-height: 86vh;
  max-height: 86dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--elevated-ring);
  padding: 24px;
  transform: scale(0.96);
  opacity: 0;
  transition: transform 200ms var(--ease-out), opacity 180ms var(--ease-out);
}

.backdrop-layer.is-open .dialog-card {
  transform: scale(1);
  opacity: 1;
}

.form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-bottom: 13px;
}

.form-item label {
  font-size: 12.5px;
  color: var(--muted);
}

.form-item input,
.form-item select,
.form-item textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 13px;
  border-radius: 12px;
  border: 0;
  background: var(--surface-soft);
  font-size: 13.5px;
  outline: none;
}

/* 輸入框和下拉選單固定同一個高度，並排時左右兩欄的標籤才對得齊；提示文字太長收成省略號 */
.form-item input,
.form-item select {
  height: 40px;
  text-overflow: ellipsis;
}

/* 輸入框拿掉了瀏覽器預設外框，這裡補一圈清楚的聚焦框線 */
.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus,
.dm-compose-bar input:focus,
.unfold-reply-form input:focus {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

/* 表單並排兩欄：標籤折成兩行時，左右輸入框仍然底部對齊 */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.dialog-head {
  gap: 12px;
}

.dialog-head h3 {
  min-width: 0;
}

#wp-modal-table-wrap {
  overflow-x: auto;
}

.wp-data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.wp-data-table th {
  white-space: nowrap;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline-strong);
  font-family: var(--font-mono);
  color: var(--muted);
  font-weight: 500;
}

.wp-data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline);
}

.toast-pill {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  transform: translate(-50%, 16px);
  /* left: 50% 會把可用寬度砍半，短短一句也被折成兩行：寬度改由文字決定，最寬到螢幕兩側各留 14px */
  width: max-content;
  max-width: calc(100vw - 28px);
  text-align: center;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--elevated-ring);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.toast-pill.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 完整產品級頁尾 */
.site-footer {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links {
  display: flex;
  gap: 4px 18px;
  align-items: center;
  flex-wrap: wrap;
}

@media (hover: hover) and (pointer: fine) {
  .story-card:hover img,
  .member-editorial-card__photo:hover img,
  .meetup-poster-card__hero:hover img {
    transform: scale(1.035);
  }
  .photo-frame:hover img {
    transform: scale(1.02);
  }
  .month-row-btn:hover:not(.is-active),
  .ch-tab-btn:hover:not(.is-active),
  .quiet-pill-btn:hover:not(.is-active),
  .icon-circle-btn:hover,
  .ghost-apply-btn:hover {
    background: var(--surface-soft);
    color: var(--ink);
  }
  .obsidian-cta:hover {
    opacity: 0.9;
  }
  .quiet-act:hover {
    color: var(--ink);
  }
  .upcoming-visual-item:hover {
    opacity: 0.82;
  }

  /* 其餘可點的元件也補上滑鼠移入的回饋：主導航、白底膠囊鈕、身分籤、左右箭頭、私訊對象、語音條、名片紀錄列、人名與頭像 */
  .pill-tab-btn:hover:not(.is-active) {
    color: var(--ink);
  }
  .dock-brand__word {
    transition: opacity 150ms var(--ease-out);
  }
  .dock-brand:hover .dock-brand__word {
    opacity: 0.7;
  }
  .me-chip-btn,
  .dm-peer-chip,
  .voice-strip,
  .quick-composer-bar__prompt,
  .drawer-history-row,
  .drawer-close-glass {
    transition: background-color 150ms var(--ease-out), transform 110ms var(--ease-out);
  }
  .me-chip-btn:hover,
  .dm-peer-chip:hover:not(.is-active),
  .voice-strip:hover,
  .quick-composer-bar:hover .quick-composer-bar__prompt {
    background: var(--surface-soft-hover);
  }
  /* 成員卡上的「揪團紀錄」本來就是淺灰底（寫在行內），移入時再深一階 */
  .member-editorial-card__body .quiet-pill-btn:hover {
    background: var(--surface-soft-hover) !important;
  }
  .reel-arrow-btn:hover:not(:disabled),
  .seat-btn:hover:not(:disabled):not(.is-joined),
  .drawer-history-row:hover {
    background: var(--surface-soft);
  }
  .seat-btn.is-joined:hover,
  .unfold-reply-form button:hover {
    opacity: 0.9;
  }
  .drawer-close-glass:hover {
    background: rgba(15, 15, 18, 0.76);
  }
  .autoplay-link:hover,
  .at-link:hover {
    text-decoration-color: currentColor;
  }
  .moment-author__name:hover,
  .comment-speaker:hover {
    text-decoration: underline;
    text-decoration-color: var(--hairline-strong);
    text-underline-offset: 3px;
  }
  .moment-avatar-wrap img,
  .comment-line img {
    transition: opacity 150ms var(--ease-out);
  }
  .moment-avatar-wrap:hover img,
  .comment-line img[data-open-member]:hover {
    opacity: 0.86;
  }
}

@media (max-width: 1120px) {
  .portrait-reel {
    grid-auto-columns: calc((100% - 42px) / 4.25);
  }
  .members-portrait-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .timeline-workspace {
    grid-template-columns: 154px minmax(0, 1fr) 280px;
  }
}

@media (max-width: 960px) {
  .timeline-workspace {
    grid-template-columns: 144px minmax(0, 1fr);
  }
  .side-column {
    display: none;
  }
  .portrait-reel {
    grid-auto-columns: calc((100% - 30px) / 3.25);
  }
  .members-portrait-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 頂欄同時放品牌、分頁籤與右側按鈕：寬度不夠時收掉次要文字，避免品牌字被擠成直排 */
@media (min-width: 721px) and (max-width: 1023px) {
  .dock-brand__live {
    display: none;
  }
}

@media (min-width: 721px) and (max-width: 960px) {
  .me-chip-btn {
    padding: 0 5px;
  }
  .me-chip-btn span {
    display: none;
  }
  .floating-dock #open-compose-btn {
    padding: 0 13px;
  }
  .floating-dock #open-compose-btn span {
    display: none;
  }
  /* 右欄在這個寬度已經收掉，「申請加入」要留在頂欄才找得到：間距收一點讓出位置 */
  .floating-dock {
    gap: 9px;
  }
  .dock-right {
    gap: 5px;
  }
  .ghost-apply-btn {
    padding: 0 12px;
  }
}

/* 721–799px 頂欄最擠：按鈕只留「加入」兩個字（完整名稱寫在 aria-label） */
@media (min-width: 721px) and (max-width: 799px) {
  .floating-dock {
    padding-left: 16px;
  }
  .ghost-apply-btn .apply-prefix {
    display: none;
  }
}

@media (max-width: 720px) {
  .timeline-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .chrono-rail {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: none;
  }
  .chrono-rail::-webkit-scrollbar {
    display: none;
  }
  .chrono-rail__head {
    display: none;
  }
  #chrono-months-list {
    display: flex;
    gap: 4px;
  }
  .month-row-btn {
    width: auto;
    white-space: nowrap;
    gap: 6px;
    flex-shrink: 0;
  }
  .stream-toolbar {
    flex-wrap: wrap;
  }
  .channel-tabs {
    overflow-x: auto;
  }
  .inline-search {
    height: 38px;
  }
  /* 頁面兩側留白跟頂欄對齊，卡片內距收窄，把寬度還給內容 */
  .shell-container {
    padding: 20px 14px 44px;
  }
  .stream-toolbar {
    padding: 12px 16px;
  }
  .quick-composer-bar {
    padding: 12px 16px;
    gap: 10px;
  }
  .moment-item {
    padding: 20px 16px;
    scroll-margin-top: 72px;
  }
  .filter-hint {
    padding: 10px 16px;
  }
  /* 按鈕排不進同一行時：分類名固定在第一行右邊，不懸在兩行中間 */
  .moment-foot {
    align-items: flex-start;
  }
  .loc-whisper {
    line-height: 30px;
  }
  .form-item input,
  .form-item select {
    height: 44px;
  }
  /* 地區、狀態這類膠囊篩選列：放不下時自己橫向滑，不把整頁撐寬 */
  .quiet-pills {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .quiet-pills::-webkit-scrollbar {
    display: none;
  }
  .dialog-center {
    padding: 14px;
  }
  .dialog-card {
    padding: 20px 18px;
    border-radius: 20px;
  }
  .portrait-reel {
    grid-auto-columns: calc((100% - 24px) / 2.2);
  }
  .members-portrait-grid,
  .meetups-poster-grid {
    grid-template-columns: 1fr;
  }
  .pill-tabs {
    display: none;
  }
  /* 手機版：顯示底部導覽，並為內容預留底部空間 */
  .mobile-tabbar {
    display: grid;
  }
  /* 提示條浮在底部導覽上方，不蓋住導覽 */
  .toast-pill {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }
  .dock-wrap {
    top: 8px;
    padding: 0 14px;
  }
  .floating-dock {
    height: 52px;
    padding: 0 6px 0 12px;
    gap: 6px;
  }
  .dock-brand__word {
    font-size: 15px;
  }
  .dock-brand__live {
    font-size: 11px;
    padding: 2px 7px;
  }
  .icon-circle-btn {
    width: 36px;
    height: 36px;
  }
  .quiet-pill-btn {
    min-height: 38px;
  }
  .ch-tab-btn {
    min-height: 38px;
  }
  .seat-btn {
    min-height: 40px;
  }
  .month-row-btn {
    min-height: 40px;
  }
  .reel-arrow-btn {
    width: 40px;
    height: 40px;
  }
  .me-chip-btn {
    min-height: 36px;
  }
  .me-chip-btn img {
    width: 26px;
    height: 26px;
  }
  .obsidian-cta {
    min-height: 36px;
    padding: 0 12px;
  }
  /* 手機版頂欄保留「申請加入」：私訊與開團已移到底部導覽，位置讓給它 */
  .ghost-apply-btn {
    min-height: 36px;
    padding: 0 12px;
  }
  /* 私訊與開團在底部導覽已有入口，頂欄不重複放 */
  .floating-dock #open-inbox-btn,
  .floating-dock #open-compose-btn {
    display: none;
  }
  /* iOS Safari 在輸入框字級小於 16px 時會自動放大整頁 */
  .form-item input,
  .form-item select,
  .form-item textarea,
  .dm-compose-bar input,
  .unfold-reply-form input,
  .inline-search input {
    font-size: 16px;
  }
}

/* 小螢幕手機：人像列用手指滑就好，收掉左右圓鈕，把位置讓給地區篩選 */
@media (max-width: 480px) {
  .reel-arrows {
    display: none;
  }
  /* 頂欄要放得下「申請加入」：會員膠囊只留頭像（跟平板寬度的做法一致） */
  .me-chip-btn {
    padding: 0 5px;
  }
  .me-chip-btn span {
    display: none;
  }
  /* 揪團小票卡：報名按鈕獨立一行，把寬度讓給時間地點，不擠成三四行 */
  .luma-ticket {
    grid-template-columns: 48px minmax(0, 1fr);
    row-gap: 11px;
  }
  .luma-ticket .seat-btn {
    grid-column: 1 / -1;
  }
}

/* 窄手機：人像卡放大一點，卡片上「幾月加入」的小膠囊才不會折成兩行 */
@media (max-width: 374px) {
  .portrait-reel {
    grid-auto-columns: calc((100% - 14px) / 1.8);
  }
  /* 窄手機頂欄放不下線上人數，優先保留「申請加入」 */
  .dock-brand__live {
    display: none;
  }
}

/* ==========================================================================
   5. 廣告位系統
   ========================================================================== */
.ad-slot {
  position: relative;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-ring);
  overflow: hidden;
  margin: 16px 0;
  font-family: var(--font-sans, inherit);
}

.ad-slot__tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(15, 17, 21, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.5;
  pointer-events: none;
}

html[data-theme="night"] .ad-slot__tag {
  background: rgba(255, 255, 255, 0.14);
}

/* ---- 原生格式廣告（house ad）---- */
.ad-slot--native {
  display: flex;
  gap: 14px;
  padding: 14px 16px 14px 14px;
  align-items: center;
}

.ad-slot__img {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-soft);
}

.ad-slot__body {
  min-width: 0;
  flex: 1;
}

.ad-slot__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.4;
}

.ad-slot__text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 8px;
}

.ad-slot__cta {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 140ms var(--ease-out), transform 110ms var(--ease-out);
}

.ad-slot__cta:hover {
  opacity: 0.88;
}

.ad-slot__cta:active {
  transform: scale(0.97);
}

.ad-slot__cta.is-static {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: default;
}

/* ---- 廣告網絡格式（AdSense 等）---- */
.ad-slot--network {
  padding: 26px 12px 12px;
}

.ad-slot__frame {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-soft);
  overflow: hidden;
}

.ad-slot--network .adsbygoogle {
  width: 100%;
}

.ad-slot--banner {
  padding: 22px 10px 10px;
}

.ad-slot--banner .ad-slot__frame {
  min-height: 90px;
}

/* ---- 側欄廣告位 ---- */
.side-card .ad-slot {
  margin: 0;
}

/* ---- 網格內原生廣告：跨欄 ---- */
.ad-slot--grid-span {
  grid-column: 1 / -1;
}

/* ---- 手機版底部橫幅 ---- */
/* 只在 ≤720px 顯示；桌面版由右欄與頁尾橫幅承接 */
#ad-mobile-banner {
  display: none;
}

/* 沒有素材時整個藏起來，不留空白 */
#ad-mobile-banner.is-empty,
#ad-side-top.is-empty,
#ad-side-bottom.is-empty,
#ad-footer-banner.is-empty {
  display: none !important;
}

@media (max-width: 720px) {
  #ad-mobile-banner:not(.is-empty) {
    display: block;
  }
}

.ad-slot--mobile-banner {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  z-index: 44;
  margin: 0;
  padding: 8px 10px;
  border-radius: 14px;
  box-shadow: var(--elevated-ring);
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.ad-slot--mobile-banner .ad-slot__frame {
  min-height: 50px;
}

/* ---- 頁尾橫幅 ---- */
.ad-slot--footer-banner {
  margin: 26px 0 20px;
}

@media (max-width: 720px) {
  .ad-slot--native {
    padding: 12px;
    gap: 11px;
  }
  .ad-slot__img {
    width: 72px;
    height: 72px;
  }
  .ad-slot__title {
    font-size: 13px;
  }
  .ad-slot__text {
    font-size: 12px;
  }
}

/* ==========================================================================
   6. 手機版底部導覽（≤720px 顯示）
   ========================================================================== */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding: 0 6px env(safe-area-inset-bottom, 0px);
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  background: var(--surface-glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -8px 28px rgba(15, 17, 21, 0.08);
}

.mobile-tab-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 44px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.mobile-tab-btn .ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-tab-btn.is-active {
  color: var(--ink);
}

.mobile-tab-btn b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mobile-tab-badge {
  position: absolute;
  top: 4px;
  left: 50%;
  margin-left: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  /* 未讀數跟桌面版頂欄用同一個紅，白字對比 4.7 */
  background: var(--heart-strong);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.mobile-tab-badge.is-hidden {
  display: none;
}

/* 上面的基礎規則排在前面 ≤720px 區塊之後，這裡要再宣告一次才蓋得過 display: none */
@media (max-width: 720px) {
  .mobile-tabbar {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
