/* ===============================================
 * 圈圈 QUAN - 全域樣式
 * 主題色：珊瑚紅 #FF6B6B
 * =============================================== */

/* CSS 變數 - 暗黑模式 */
.theme-dark {
  /* 主色 - 珊瑚紅 */
  --color-primary: #ff6b6b;
  --color-primary-light: #ff9b9b;
  --color-primary-dark: #e55555;

  /* 背景 */
  --bg-base: #0a0a0a;
  --bg-card: #1c1c1e;
  --bg-elevated: #2c2c2e;

  /* 邊框 */
  --border-color: #2c2c2e;

  /* 文字 */
  --text-primary: #ffffff;
  --text-secondary: #c7c7cc;
  --text-tertiary: #8e8e93;

  /* 狀態 */
  --color-success: #4cd964;
  --color-warning: #ffcc00;
  --color-danger: #ff3b30;

  /* 陰影 */
  --shadow-glow: 0 0 60px rgba(255, 107, 107, 0.15);

  /* 毛玻璃面板（header / input / sticker / mention） */
  --bg-glass: rgba(10, 10, 10, 0.85);
  --bg-glass-heavy: rgba(10, 10, 10, 0.92);
  --bg-surface: rgba(20, 20, 20, 0.98);
  --bg-active: rgba(255, 255, 255, 0.15);
}

/* CSS 變數 - 明亮模式 */
.theme-light {
  --color-primary: #ff6b6b;
  --color-primary-light: #ff9b9b;
  --color-primary-dark: #e55555;

  --bg-base: #ffffff;
  --bg-card: #f7f7f7;
  --bg-elevated: #efeff4;

  --border-color: #e5e5ea;

  --text-primary: #000000;
  --text-secondary: #6e6e73;
  --text-tertiary: #8e8e93;

  --color-success: #34c759;
  --color-warning: #ff9500;
  --color-danger: #ff3b30;

  --shadow-glow: 0 0 60px rgba(255, 107, 107, 0.25);

  --bg-glass: rgba(247, 247, 247, 0.85);
  --bg-glass-heavy: rgba(247, 247, 247, 0.92);
  --bg-surface: rgba(239, 239, 244, 0.98);
  --bg-active: rgba(0, 0, 0, 0.08);
}

/* 自動模式：跟隨系統設定 */
@media (prefers-color-scheme: dark) {
  .theme-auto {
    --color-primary: #ff6b6b;
    --color-primary-light: #ff9b9b;
    --color-primary-dark: #e55555;
    --bg-base: #0a0a0a;
    --bg-card: #1c1c1e;
    --bg-elevated: #2c2c2e;
    --border-color: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #c7c7cc;
    --text-tertiary: #8e8e93;
    --color-success: #4cd964;
    --color-warning: #ffcc00;
    --color-danger: #ff3b30;
    --shadow-glow: 0 0 60px rgba(255, 107, 107, 0.15);
    --bg-glass: rgba(10, 10, 10, 0.85);
    --bg-glass-heavy: rgba(10, 10, 10, 0.92);
    --bg-surface: rgba(20, 20, 20, 0.98);
    --bg-active: rgba(255, 255, 255, 0.15);
  }
}
@media (prefers-color-scheme: light) {
  .theme-auto {
    --color-primary: #ff6b6b;
    --color-primary-light: #ff9b9b;
    --color-primary-dark: #e55555;
    --bg-base: #ffffff;
    --bg-card: #f7f7f7;
    --bg-elevated: #efeff4;
    --border-color: #e5e5ea;
    --text-primary: #000000;
    --text-secondary: #6e6e73;
    --text-tertiary: #8e8e93;
    --color-success: #34c759;
    --color-warning: #ff9500;
    --color-danger: #ff3b30;
    --shadow-glow: 0 0 60px rgba(255, 107, 107, 0.25);
    --bg-glass: rgba(247, 247, 247, 0.85);
    --bg-glass-heavy: rgba(247, 247, 247, 0.92);
    --bg-surface: rgba(239, 239, 244, 0.98);
    --bg-active: rgba(0, 0, 0, 0.08);
  }
}

/* ============================================
 * Reset & Base
 * ============================================ */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  touch-action: pan-y; /* 只允許垂直捲動，禁止雙指縮放與橫向滑動 */
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC",
    "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* 連結 - 全域去除底線（依全域規範） */
a,
a:hover,
a:active,
a:visited,
a:focus {
  text-decoration: none !important;
  color: var(--color-primary);
}

/* Material Symbols */
.material-symbols-rounded {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
  vertical-align: middle;
  user-select: none;
}

/* ============================================
 * Coming Soon 頁面
 * ============================================ */
.page-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  position: relative;
}

/* 背景光暈效果 */
.page-wrapper::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(255, 107, 107, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.brand-block,
.tagline-block,
.status-block,
.features-block,
.page-footer {
  position: relative;
  z-index: 1;
}

/* ============================================
 * Logo - 兩個交疊圓圈
 * ============================================ */
.brand-block {
  margin-bottom: 48px;
  animation: fadeInUp 0.8s ease;
}

.logo-circles {
  position: relative;
  width: 120px;
  height: 80px;
  margin: 0 auto 24px;
}

/* 小尺寸版（用於 header）*/
.logo-circles-sm {
  position: relative;
  width: 36px;
  height: 24px;
  flex-shrink: 0;
}

.logo-circles-sm .circle {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 107, 107, 0.4);
}

.logo-circles-sm .circle-1 {
  left: 0;
  top: 1px;
  animation: pulse-left 3s ease-in-out infinite;
}

.logo-circles-sm .circle-2 {
  right: 0;
  top: 1px;
  border-color: var(--color-primary-light);
  animation: pulse-right 3s ease-in-out infinite;
}

.logo-circles .circle {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 3px solid var(--color-primary);
  border-radius: 50%;
  box-shadow: var(--shadow-glow);
}

.logo-circles .circle-1 {
  left: 0;
  animation: pulse-left 3s ease-in-out infinite;
}

.logo-circles .circle-2 {
  right: 0;
  border-color: var(--color-primary-light);
  animation: pulse-right 3s ease-in-out infinite;
}

@keyframes pulse-left {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.9;
  }
  50% {
    transform: translateX(8px);
    opacity: 1;
  }
}

@keyframes pulse-right {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.9;
  }
  50% {
    transform: translateX(-8px);
    opacity: 1;
  }
}

.brand-name {
  font-size: 48px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: 4px;
}

.brand-en {
  font-size: 14px;
  margin: 4px 0 0;
  color: var(--color-primary);
  letter-spacing: 8px;
  font-weight: 500;
}

/* ============================================
 * Tagline
 * ============================================ */
.tagline-block {
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.tagline-main {
  font-size: 22px;
  color: var(--text-primary);
  margin: 0 0 8px;
  font-weight: 500;
  letter-spacing: 1px;
}

.tagline-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: 0.5px;
}

/* ============================================
 * Status Pill
 * ============================================ */
.status-block {
  margin-bottom: 56px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border-radius: 999px;
  color: var(--color-primary);
  font-size: 16px;
  font-weight: 500;
  border: 1px solid var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.status-pill .material-symbols-rounded {
  font-size: 18px;
}

/* ============================================
 * Features Preview
 * ============================================ */
.features-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 200px));
  gap: 12px;
  margin-bottom: 64px;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-card);
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 15px;
  text-align: left;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.feature:hover {
  border-color: var(--color-primary);
  background: var(--bg-elevated);
}

.feature .material-symbols-rounded {
  font-size: 22px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ============================================
 * Footer
 * ============================================ */
.page-footer {
  margin-top: auto;
  padding-top: 40px;
}

.page-footer p {
  font-size: 14px;
  color: var(--text-tertiary);
  margin: 0;
  letter-spacing: 0.5px;
}

/* ============================================
 * 動畫
 * ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
 * 響應式
 * ============================================ */
@media (max-width: 480px) {
  .brand-name {
    font-size: 38px;
    letter-spacing: 3px;
  }
  .brand-en {
    letter-spacing: 6px;
  }
  .tagline-main {
    font-size: 18px;
  }
  .features-block {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 280px;
  }
  .page-wrapper::before {
    width: 400px;
    height: 400px;
  }
}

/* ============================================
 * Alert / Notice 規範（依全域規範，不使用 border-left）
 * ============================================ */
.notice,
.alert {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px 20px;
  /* 不加 border-left（依全域規範） */
}

.notice-info {
  background: rgba(255, 107, 107, 0.1);
  color: var(--color-primary);
}
.notice-success {
  background: rgba(76, 217, 100, 0.1);
  color: var(--color-success);
}
.notice-warning {
  background: rgba(255, 204, 0, 0.1);
  color: var(--color-warning);
}
.notice-danger {
  background: rgba(255, 59, 48, 0.1);
  color: var(--color-danger);
}

/* ============================================
 * CTA 區塊（首頁）
 * ============================================ */
.cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

/* ============================================
 * 按鈕（依全域規範：hover 不改文字顏色）
 * ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 18px;
  min-width: 220px;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-ghost:hover {
  background: rgba(255, 107, 107, 0.1);
  color: var(--color-primary);
}

/* ============================================
 * 修正：a:visited 蓋過 .btn-primary 文字色
 * ============================================ */
a.btn-primary,
a.btn-primary:hover,
a.btn-primary:active,
a.btn-primary:visited,
a.btn-primary:focus {
  color: #ffffff;
}

/* ============================================
 * Landing - Tagline 升級
 * ============================================ */
.tagline-main {
  background: linear-gradient(
    135deg,
    var(--text-primary) 30%,
    var(--color-primary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 999px;
  font-size: 14px;
  color: var(--color-primary);
  margin-top: 4px;
}

.tagline-badge .material-symbols-rounded {
  font-size: 16px;
}

/* ============================================
 * Landing - 功能卡片
 * ============================================ */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.landing-features {
  width: 100%;
  max-width: 560px;
  margin-bottom: 60px;
  animation: fadeInUp 0.8s ease 0.8s both;
}

.landing-section-label {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 18px 16px;
  text-align: left;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.feature-card:hover {
  border-color: var(--color-primary);
  background: var(--bg-elevated);
}

.feature-card-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 107, 107, 0.12);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.feature-card-icon .material-symbols-rounded {
  font-size: 22px;
  color: var(--color-primary);
}

.feature-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 5px;
}

.feature-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* AIRE 頭像（圓角圖片，不需背景色） */
.feature-card-icon--avatar {
  background: none;
  overflow: hidden;
  padding: 0;
}
.feature-card-icon--avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  display: block;
}

/* 品牌圖示（白底，放 SVG 彩色 logo） */
.feature-card-icon--brand {
  background: #fff;
}
.feature-card-icon--brand svg {
  width: 25px;
  height: 22px;
}

/* ============================================
 * 安裝教學頁
 * ============================================ */
.install-page .settings-header {
  border-bottom: 1px solid var(--border-color);
}

.install-tabs {
  display: flex;
  gap: 8px;
  padding: 20px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.install-tabs::-webkit-scrollbar {
  display: none;
}

.install-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border-color);
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.install-tab .material-symbols-rounded {
  font-size: 18px;
}
.install-tab.active {
  border-color: var(--color-primary);
  background: rgba(255, 107, 107, 0.1);
  color: var(--color-primary);
}

.install-panels {
  padding: 20px 16px 40px;
}

.install-panel {
  display: none;
}
.install-panel.active {
  display: block;
}

.install-platform-title {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.install-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 16px;
}
.install-step-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: rgba(255, 107, 107, 0.15);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.install-step-body {
  flex: 1;
}
.install-step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.install-step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}
.install-step-desc strong {
  color: var(--color-primary);
  font-weight: 600;
}

.install-tip {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(255, 107, 107, 0.06);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* ============================================
 * Landing - Footer
 * ============================================ */
.page-footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}

.page-footer-links a,
.page-footer-links span {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ================================================================
 * 桌機版三欄佈局（quan-shell）
 * 放在 style.css 全域，避免與 chat.css 的 .circle-avatar 等規則衝突
 * 手機（< 900px）：quan-rail / quan-sidebar 隱藏，版面不受影響
 * 桌機（≥ 900px）：左欄 rail 72px + 中欄 300px + 右側彈性內容
 * ================================================================ */

/* 預設（手機）：透明包裝 */
.quan-shell {
  display: block;
}
.quan-content {
  display: block;
}
.quan-rail,
.quan-sidebar {
  display: none;
}

/* 桌機版歡迎面板預設隱藏 */
.quan-desktop-welcome {
  display: none;
}

@media (min-width: 900px) {
  /* ===== 三欄殼 ===== */
  .quan-shell {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-base);
  }

  /* ===== 左側 icon rail ===== */
  .quan-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 12px 0 16px;
  }

  .quan-rail-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
  }

  .quan-rail-logo .logo-circles-sm {
    transform: scale(0.85);
  }

  .quan-rail-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
  }

  .quan-rail-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .quan-rail-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 54px;
    height: 52px;
    border-radius: 14px;
    color: var(--text-tertiary);
    text-decoration: none !important;
    transition:
      background 0.15s,
      color 0.15s;
  }

  .quan-rail-btn .material-symbols-rounded {
    font-size: 22px;
  }

  .quan-rail-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2px;
  }

  .quan-rail-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
  }

  .quan-rail-btn.active {
    background: rgba(255, 107, 107, 0.15);
    color: var(--color-primary);
  }

  /* ===== 中欄：圈圈列表 ===== */
  .quan-sidebar {
    display: flex;
    flex-direction: column;
    width: 300px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    background: var(--bg-base);
    overflow: hidden;
  }

  .quan-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 10px;
    flex-shrink: 0;
  }

  .quan-sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
  }

  .quan-sidebar-actions {
    display: flex;
    gap: 4px;
    align-items: center;
  }

  .quan-sidebar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    outline: none;
    cursor: pointer;
    color: var(--text-secondary);
    text-decoration: none !important;
    transition:
      background 0.15s,
      color 0.15s;
  }

  .quan-sidebar-icon-btn .material-symbols-rounded {
    font-size: 20px;
  }

  .quan-sidebar-icon-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
  }

  .quan-sidebar-add {
    background: var(--color-primary) !important;
    color: #fff !important;
  }

  .quan-sidebar-add:hover {
    background: var(--color-primary-dark) !important;
  }

  .quan-sidebar-search-wrap {
    position: relative;
    margin: 0 12px 8px;
    flex-shrink: 0;
  }

  .quan-sidebar-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-tertiary);
    pointer-events: none;
  }

  .quan-sidebar-search {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 8px 12px 8px 34px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
  }

  .quan-sidebar-search:focus {
    border-color: var(--color-primary);
  }

  .quan-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0 8px;
  }

  .quan-sidebar-footer {
    padding: 10px 16px 14px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
  }

  .quan-sidebar-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    justify-content: center;
    margin-bottom: 8px;
  }

  .quan-sidebar-footer-links a {
    font-size: 15px;
    color: var(--text-tertiary);
    text-decoration: none !important;
    transition: color 0.15s;
  }

  .quan-sidebar-footer-links a:hover {
    color: var(--text-secondary);
  }

  .quan-sidebar-footer-copy {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
  }

  .quan-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    margin: 0 8px 8px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.1s;
    position: relative;
  }

  .quan-sidebar-item:hover {
    background: var(--bg-card);
  }

  .quan-sidebar-item.active {
    background: rgba(255, 107, 107, 0.12);
  }

  .quan-sidebar-avatar {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 不用 overflow:hidden — 讓 badge 可凸出；img 自帶 border-radius */
    font-size: 22px;
  }

  .quan-sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

  .quan-sidebar-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--color-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--bg-base);
  }

  .quan-sidebar-info {
    flex: 1;
    min-width: 0;
  }

  .quan-sidebar-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
  }

  .quan-sidebar-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .quan-sidebar-item.has-unread .quan-sidebar-name {
    font-weight: 700;
  }

  .quan-sidebar-item.sidebar-item-dissolved {
    opacity: 0.5;
  }

  .quan-sidebar-name .flash-name-icon {
    font-size: 14px !important;
    color: #f5c400;
    font-variation-settings:
      "FILL" 1,
      "wght" 600;
    vertical-align: middle;
    margin-right: 2px;
  }

  /* sidebar 頭像 wrapper（44px，配合 circle-avatar-wrap） */
  .quan-sidebar-item .circle-avatar-wrap {
    width: 44px;
    height: 44px;
  }
  .quan-sidebar-item .circle-avatar-wrap .quan-sidebar-avatar {
    width: 100%;
    height: 100%;
  }

  .quan-sidebar-time {
    font-size: 11px;
    color: var(--text-tertiary);
    flex-shrink: 0;
  }

  .quan-sidebar-preview {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .quan-sidebar-sender {
    font-weight: 500;
    color: var(--text-secondary);
  }

  .quan-sidebar-at {
    flex-shrink: 0;
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .quan-sidebar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
    gap: 10px;
    color: var(--text-tertiary);
  }

  .quan-sidebar-empty .material-symbols-rounded {
    font-size: 40px;
  }

  .quan-sidebar-empty p {
    margin: 0;
    font-size: 14px;
  }

  /* ===== 右側內容欄 ===== */
  .quan-content {
    flex: 1;
    overflow: hidden;
    display: block;
    flex-direction: column;
    min-width: 0;
  }

  /* ===== app-layout（settings 頁）在右側內容欄 ===== */
  .quan-content .app-layout {
    height: 100%;
    flex: 1;
  }

  /* ===== create / settings-wrapper 在右側內容欄：允許捲動 ===== */
  .quan-content .create-wrapper,
  .quan-content .settings-wrapper {
    height: 100%;
    overflow-y: auto;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  /* ===== 表單類頁面（page-form-scroll）：改用 window scroll ===== */
  body.page-form-scroll .quan-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  body.page-form-scroll .quan-content {
    overflow: visible;
  }
  body.page-form-scroll .quan-content .create-wrapper,
  body.page-form-scroll .quan-content .settings-wrapper {
    height: auto;
    overflow-y: visible;
  }

  /* ===== 首頁右側 ===== */
  .quan-content .home-layout {
    height: 100%;
    max-width: none;
    display: block;
    flex-direction: column;
  }

  .quan-content .home-header {
    display: none;
  }

  .quan-content .home-main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 32px;
  }

  .quan-content .home-circle-list,
  .quan-content .home-empty,
  .quan-content .home-tabs,
  .quan-content .home-tab-panel,
  .quan-content .install-banner,
  .quan-content .push-cta-bar,
  .quan-content footer {
    display: none !important;
  }

  .quan-desktop-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    width: 100%;
    max-width: 420px;
  }

  .quan-desktop-welcome-logo {
    opacity: 0.3;
    transform: scale(1.4);
    margin-bottom: 8px;
  }

  .quan-desktop-welcome-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
  }

  .quan-desktop-welcome-sub {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.6;
  }

  .quan-content .join-bar {
    width: 100%;
    margin: 24px auto;
  }

  /* ===== 聊天室右側 ===== */
  /* chat-container 原為 position:fixed 全螢幕，桌機版改回正常流 */
  .quan-content .chat-container {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
  }

  /* 隱藏聊天室返回按鈕（改用側邊欄導覽） */
  .quan-content .chat-header .header-btn:first-child {
    display: none;
  }

  /* 補左 padding（返回鈕消失後） */
  .quan-content .chat-header {
    padding-left: 16px;
  }
}

/* ============================================================
 * 快閃圈快捷入口（join-bar 下方）
 * ============================================================ */
.flash-entry-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  margin: 0 16px 12px;
  padding: 11px 14px;
  background: rgba(255, 200, 0, 0.08);
  border: 1px solid rgba(255, 200, 0, 0.22);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease;
}
.flash-entry-btn.flash-entry-inline {
  margin-top: 16px;
}
.flash-entry-btn:hover {
  background: rgba(255, 200, 0, 0.15);
}
.flash-entry-icon {
  font-size: 20px;
  color: #f5c400;
  flex-shrink: 0;
}
.flash-entry-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.flash-entry-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.flash-entry-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.3;
}
.flash-entry-quota {
  font-size: 11px;
  font-weight: 700;
  color: #f5c400;
  background: rgba(245, 196, 0, 0.12);
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  display: none;
}

/* 桌機版隱藏側邊欄的快閃圈按鈕和獨立 join-bar（welcome panel 內已有） */
@media (min-width: 900px) {
  .flash-entry-btn {
    display: none;
  }
  .quan-content .join-bar:not(.join-bar-desktop) {
    display: none;
  }
}
/* 桌機版 welcome panel 內的 join-bar 預設隱藏，僅桌機顯示 */
.join-bar-desktop {
  display: none;
  width: 100%;
}
@media (min-width: 900px) {
  .join-bar-desktop {
    display: flex;
    margin: 8px 0 0;
  }
}

/* 桌機版快閃圈卡片 */
.quan-desktop-flash-card {
  width: 100%;
  margin-top: 28px;
  background: rgba(245, 196, 0, 0.06);
  border: 1px solid rgba(245, 196, 0, 0.2);
  border-radius: 16px;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.quan-desktop-flash-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.quan-desktop-flash-card-icon {
  font-size: 22px;
  color: #f5c400;
  flex-shrink: 0;
  margin-top: 2px;
}
.quan-desktop-flash-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.quan-desktop-flash-card-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
  line-height: 1.5;
}
.quan-desktop-flash-quota {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
}
.quan-desktop-flash-quota strong {
  color: #f5c400;
  font-weight: 700;
}

/* 桌機版歡迎面板的快閃圈按鈕 */
.quan-desktop-flash-btn {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: rgba(255, 200, 0, 0.1);
  border: 1px solid rgba(255, 200, 0, 0.3);
  border-radius: 24px;
  color: #f5c400;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease;
  margin: 4px auto;
}
.quan-desktop-flash-btn:hover {
  background: rgba(255, 200, 0, 0.2);
}
.quan-desktop-flash-btn .material-symbols-rounded {
  font-size: 18px;
}

/* 暱稱欄位提示 */
.flash-alias-hint {
  font-size: 12px;
  color: var(--text-tertiary, #666);
  margin-top: 6px;
}

/* ── 客服圈快捷入口（行動版，與快閃圈同款視覺） ── */
/* primary = #7C3AED → rgba(124,58,237,...) */
.support-entry-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  margin: 0 16px 12px;
  padding: 11px 14px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease;
}
.support-entry-btn:hover {
  background: rgba(124, 58, 237, 0.15);
}
.support-entry-icon {
  font-size: 20px;
  color: #7c3aed;
  flex-shrink: 0;
  font-variation-settings: "FILL" 1;
}

/* 桌機版隱藏行動版客服圈按鈕 */
@media (min-width: 900px) {
  .support-entry-btn {
    display: none;
  }
}

/* ── 桌機版客服圈卡片（與快閃圈卡片同款） ── */
.quan-desktop-support-card {
  width: 100%;
  margin-top: 16px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 16px;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.quan-desktop-support-card-icon {
  font-size: 22px;
  color: #7c3aed;
  flex-shrink: 0;
  margin-top: 2px;
  font-variation-settings: "FILL" 1;
}
.quan-desktop-support-btn {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 24px;
  color: #7c3aed;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease;
  margin: 4px auto;
}
.quan-desktop-support-btn:hover {
  background: rgba(124, 58, 237, 0.2);
}
.quan-desktop-support-btn .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: "FILL" 1;
}

/* 解散時間預覽 */
.flash-dissolve-preview {
  font-size: 12px;
  color: #f5c400;
  margin-top: 6px;
  font-weight: 600;
}

/* 頭像選擇器 */
.flash-avatar-picker-wrap {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
}
.flash-avatar-cur {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-base);
  border: 2px solid #f5c400;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
  flex-shrink: 0;
}
.flash-avatar-cur img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flash-avatar-cam-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 8px 0 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.flash-avatar-cam-btn .material-symbols-rounded {
  font-size: 13px;
  color: #fff;
  line-height: 1;
}
.flash-avatar-scroll {
  flex: 1;
  max-height: 172px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.flash-avatar-scroll::-webkit-scrollbar {
  display: none;
}
.flash-avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.flash-avatar-opt {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--bg-base);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  overflow: hidden;
  gap: 2px;
  padding: 4px 2px;
}
.flash-avatar-opt:hover {
  background: var(--bg-elevated);
}
.flash-avatar-opt-sel {
  border-color: #f5c400;
  background: rgba(245, 196, 0, 0.08);
}
.flash-avatar-opt-em {
  font-size: 22px;
  line-height: 1;
}
.flash-avatar-opt img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.flash-avatar-opt-lbl {
  font-size: 9px;
  color: var(--text-tertiary);
  line-height: 1;
}
.flash-avatar-sep {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  padding: 4px 0 2px;
  letter-spacing: 0.05em;
}

/* ============================================================
 * 快閃圈 Modal
 * ============================================================ */
.flash-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 600px) {
  .flash-modal-overlay {
    align-items: center;
  }
}
.flash-modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  overflow: clip;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}
@media (min-width: 600px) {
  .flash-modal-sheet {
    border-radius: 20px;
    transform: translateY(24px);
    opacity: 0;
    transition:
      transform 0.22s ease,
      opacity 0.22s ease;
  }
}
.flash-modal-in {
  transform: translateY(0) !important;
  opacity: 1 !important;
}
.flash-modal-out {
  transform: translateY(100%) !important;
}
@media (min-width: 600px) {
  .flash-modal-out {
    transform: translateY(24px) !important;
    opacity: 0 !important;
  }
}

.flash-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
}
.flash-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.flash-modal-title .material-symbols-rounded {
  color: #f5c400;
  font-size: 22px;
}
.flash-modal-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.flash-modal-close .material-symbols-rounded {
  font-size: 22px;
}

.flash-quota-info {
  margin: 10px 20px 0;
  font-size: 12px;
  color: var(--text-tertiary);
}
.flash-quota-full {
  color: var(--color-danger, #e55);
}

.flash-modal-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.flash-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flash-anon-row,
.flash-toggle-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.flash-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.flash-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.flash-toggle-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
}
.flash-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.flash-input {
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}
.flash-input:focus {
  border-color: #f5c400;
}
.flash-input.shake {
  animation: shake 0.45s ease;
  border-color: var(--color-danger, #e55);
}

.flash-time-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.flash-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-base);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.flash-pill-active {
  border-color: #f5c400;
  background: rgba(245, 196, 0, 0.12);
  color: #f5c400;
  font-weight: 700;
}

/* Toggle */
.flash-toggle {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.flash-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.flash-toggle-track {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--border-color);
  transition: background 0.18s ease;
}
.flash-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}
.flash-toggle input:checked + .flash-toggle-track {
  background: #f5c400;
}
.flash-toggle input:checked + .flash-toggle-track::after {
  transform: translateX(18px);
}

.flash-modal-footer {
  padding: 4px 20px 24px;
}
.flash-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: #f5c400;
  color: #1a1400;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease;
}
.flash-submit-btn:hover {
  background: #e0b300;
}
.flash-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.flash-submit-btn .material-symbols-rounded {
  font-size: 20px;
}

/* 客服圈 Modal — 覆寫快閃圈黃色，改用紫色 */
#support-modal-overlay .flash-submit-btn {
  background: #7c3aed;
  color: #fff;
}
#support-modal-overlay .flash-submit-btn:hover {
  background: #6d28d9;
}
#support-modal-overlay .flash-modal-title .material-symbols-rounded {
  color: #7c3aed;
}
#support-modal-overlay .flash-input:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* 結果頁 */
.flash-result-body {
  align-items: center;
  text-align: center;
}
.flash-pin-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.flash-pin-display {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 12px;
  color: #f5c400;
  font-variant-numeric: tabular-nums;
  padding: 8px 0;
}
.flash-pin-hint {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.flash-result-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.flash-copy-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.flash-copy-btn:hover {
  background: var(--bg-hover, rgba(255, 255, 255, 0.06));
}
.flash-copy-btn .material-symbols-rounded {
  font-size: 17px;
}
.flash-dissolve-info {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spin {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

/* ================================================================
 * 行動版底部導覽列
 * 手機（< 900px）顯示，桌機隱藏
 * 聊天頁（body.chat-page）及客服圈選中後全螢幕頁隱藏
 * ================================================================ */
.quan-mobile-nav {
  display: none;
}

@media (max-width: 899px) {
  .quan-mobile-nav {
    padding: 6px 0 4px;
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--bg-base);
    border-top: 1px solid var(--border-color);
    /* 與 .chat-input 同一個公式，讓訊息框與底部選單對底部的基準一致 */
    padding-bottom: max(4px, calc(env(safe-area-inset-bottom) - 40px));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .quan-mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 4px 2px 6px; /* 五項時收窄水平 padding */
    color: var(--text-tertiary) !important; /* 蓋掉全域 a { color } */
    text-decoration: none !important;
    transition: color 0.15s;
    min-width: 0;
  }

  .quan-mobile-nav-btn .material-symbols-rounded {
    font-size: 22px; /* 五項時略縮 icon */
  }

  .quan-mobile-nav-label {
    font-size: 10px;
    font-weight: 500;
  }

  /* active：珊瑚紅 + icon 填滿 */
  .quan-mobile-nav-btn.active {
    color: var(--color-primary) !important;
  }
  .quan-mobile-nav-btn.active .material-symbols-rounded {
    font-variation-settings:
      "FILL" 1,
      "wght" 400,
      "GRAD" 0,
      "opsz" 24;
  }

  /* 聊天室頁面 & 客服圈全螢幕時隱藏 */
  body.chat-page .quan-mobile-nav,
  body.support-circle-selected .quan-mobile-nav {
    display: none;
  }

  /* 顯示底部導覽列的頁面：body 留底部空間，避免 nav 遮住內容 */
  body:not(.chat-page):not(.support-circle-selected) {
    padding-bottom: calc(50px + max(4px, calc(env(safe-area-inset-bottom) - 40px)));
  }
  /* 捲動容器也要補（有些頁面 overflow 容器在 quan-content 裡）*/
  body:not(.chat-page):not(.support-circle-selected) .quan-content,
  body:not(.chat-page):not(.support-circle-selected) .support-mobile-circles,
  body:not(.chat-page):not(.support-circle-selected) .whisper-inbox-scroll {
    padding-bottom: calc(50px + max(4px, calc(env(safe-area-inset-bottom) - 40px)));
  }
}
