/* ── 手账导航栏 ── */
.navbar,
.scrapbook-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--navbar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(6px + var(--safe-top)) 12px 6px;
  background: var(--bg-sheet, #fdf8f4);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px dashed rgba(241, 185, 143, 0.28);
}

.navbar-title,
.scrapbook-navbar-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-brown);
  letter-spacing: 0.02em;
}

.navbar-btn,
.scrapbook-nav-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 14px;
  background: var(--surface-card, #fffdf8);
  color: var(--accent-orange);
  box-shadow: var(--shadow-paper);
  cursor: pointer;
}

.navbar-btn:active,
.scrapbook-nav-btn:active {
  transform: scale(0.94);
}

.scrapbook-nav-spacer {
  width: 38px;
  height: 38px;
  visibility: hidden;
}

/* ── 按钮（半透明磨砂贴纸） ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  font-size: var(--font-sm);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sticker);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.15s ease, background 0.15s ease;
  /* 安卓壳里点按钮偶有「慢半拍」：这里补上跟聊天送出键同款的两条——去掉等
     双击缩放判定的合成延迟，并把按钮提到独立合成层，按下时不用连着自己这层
     毛玻璃一起重新合成一大片。全站 .btn 通用，不改视觉。 */
  touch-action: manipulation;
  transform: translateZ(0);
}

.btn:active {
  transform: scale(0.96) translateZ(0);
}

.btn-primary {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-border);
  color: var(--accent-orange-ink);
}

.btn-outline {
  background: var(--btn-outline-bg);
  border-color: var(--btn-outline-border);
  color: var(--accent-orange);
}

.btn-soft {
  background: var(--btn-soft-bg);
  border-color: var(--btn-soft-border);
  color: var(--accent-pink-ink);
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  border-width: 2px;
  border-radius: 14px;
}

.btn-xs {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
  border-width: 2px;
  border-radius: 12px;
}

/* ── AI 生成 loading（按钮 + 全页 overlay + 状态条） ── */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.78;
  cursor: wait;
}

.btn.is-loading:active {
  transform: translateZ(0);
}

.btn-loading-spinner,
.app-busy-spinner,
.social-gen-status-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  opacity: 0.85;
  animation: app-gen-spin 0.75s linear infinite;
  flex-shrink: 0;
  vertical-align: -0.12em;
}

.btn .btn-loading-spinner {
  width: 14px;
  height: 14px;
}

.navbar-btn.is-loading {
  position: relative;
  opacity: 0.65;
}

.navbar-btn.is-loading .svg-icon {
  opacity: 0.2;
}

.navbar-btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: app-gen-spin 0.75s linear infinite;
}

.app-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
}

.app-busy-overlay.is-visible {
  display: flex;
}

.app-busy-spinner {
  width: 36px;
  height: 36px;
  border-width: 3px;
  opacity: 1;
}

.app-busy-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #3d342c);
  line-height: 1.45;
  max-width: 280px;
}

.app-busy-hint {
  font-size: 12px;
  color: var(--text-hint, #8c7362);
  line-height: 1.5;
  max-width: 300px;
}

.app-busy-hint[hidden] {
  display: none;
}

.social-gen-status-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.forum-gen-status.is-active,
.anon-wall-status.is-active,
.anon-space-gen-status.is-active {
  display: block;
}

.social-gen-status-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-hint, #8c7362);
  line-height: 1.45;
}

@keyframes app-gen-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-loading-spinner,
  .app-busy-spinner,
  .social-gen-status-spinner,
  .navbar-btn.is-loading::after {
    animation-duration: 1.4s;
  }
}

/* ── 表单（网格纸输入） ── */
.form-input,
select.form-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--grid-line);
  background:
    linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 16px 16px, 16px 16px;
  color: var(--ink-brown);
  font: inherit;
}

.form-input:focus {
  outline: none;
  border-color: rgba(241, 185, 143, 0.75);
  box-shadow: 0 0 0 3px rgba(241, 185, 143, 0.15);
}

textarea.form-input {
  background: rgba(255, 255, 255, 0.94);
  resize: vertical;
}

/* 页面模块加载中 */
.route-loading {
  min-height: min(420px, calc(100vh - var(--navbar-h, 56px) - 48px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft, #8b7668);
}

.route-loading-paper {
  width: 72px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed rgba(241, 185, 143, 0.52);
  border-radius: 10px;
  background:
    linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
    linear-gradient(var(--grid-line, rgba(241,185,143,0.25)) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line, rgba(241,185,143,0.25)) 1px, transparent 1px);
  background-size: auto, 14px 14px, 14px 14px;
  box-shadow: var(--shadow-paper, 0 8px 22px rgba(140, 115, 98, 0.08));
}

.route-loading-paper span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-orange, #e18f5a);
  animation: routeLoadingDot 0.86s ease-in-out infinite;
}

.route-loading-paper span:nth-child(2) {
  animation-delay: 0.12s;
  background: var(--accent-pink, #e7a6aa);
}

.route-loading-paper span:nth-child(3) {
  animation-delay: 0.24s;
  background: var(--accent-green, #93ad79);
}

.route-loading--anon {
  color: #8d8d92;
}

.route-loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.route-loading-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #c8c8cc;
  animation: routeLoadingDot 0.86s ease-in-out infinite;
}

.route-loading-dots span:nth-child(2) { animation-delay: 0.12s; }
.route-loading-dots span:nth-child(3) { animation-delay: 0.24s; }

.route-loading-text {
  font-size: 13px;
  font-weight: 700;
}

.page--suspended {
  display: none !important;
}

@keyframes routeLoadingDot {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.58;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* ── 页面骨架 ──
   重页面首帧先同步画占位，数据就绪后整体替换；页面有内容时路由不会再显示「加载中」。 */
.page-skeleton {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-skeleton .sk-block {
  display: block;
  border-radius: 12px;
  background: rgba(140, 115, 98, 0.1);
  position: relative;
  overflow: hidden;
}

.page-skeleton .sk-block::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: pageSkeletonShimmer 1.4s ease-in-out infinite;
}

.page-skeleton--anon .sk-block {
  background: rgba(255, 255, 255, 0.07);
}

.page-skeleton--anon .sk-block::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.page-skeleton .sk-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-skeleton .sk-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.page-skeleton .sk-bar {
  height: 14px;
}

.page-skeleton .sk-bubble-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.page-skeleton .sk-bubble {
  height: 38px;
  border-radius: 14px;
}

.page-skeleton .sk-bubble--right {
  align-self: flex-end;
}

.page-skeleton .sk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.page-skeleton .sk-tile {
  height: 64px;
}

@keyframes pageSkeletonShimmer {
  to {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-skeleton .sk-block::after {
    animation: none;
  }
}

/* ── 图标 ── */
.svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  color: currentColor;
}

.svg-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.svg-icon svg path,
.svg-icon svg circle,
.svg-icon svg rect {
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── 胶带 ── */
.scrapbook-tape {
  display: inline-block;
  height: 18px;
  padding: 0 10px;
  border-radius: 2px;
  opacity: 0.88;
  mix-blend-mode: multiply;
  background-image:
    linear-gradient(rgba(255,255,255,0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.35) 1px, transparent 1px);
  background-size: 8px 8px;
}

.scrapbook-tape-orange {
  background-color: var(--tape-orange);
  transform: rotate(-4deg);
}

.scrapbook-card {
  background: var(--surface-card, var(--bg-card, #fffdf8));
  border: 1px solid var(--surface-card-border, rgba(140, 115, 98, 0.14));
  border-radius: 18px;
  box-shadow: var(--shadow-paper, 0 8px 22px rgba(140, 115, 98, 0.08));
  padding: 14px;
  margin-bottom: 12px;
}

.scrapbook-panel {
  background: var(--surface-card, #fffdf8);
  border: 1px solid var(--surface-card-border, rgba(140, 115, 98, 0.14));
}

/* ── Modal ── */
#modal-container {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

#modal-container.active {
  display: block;
  pointer-events: auto;
}

#modal-container.active.has-floating-call {
  pointer-events: none;
}

#modal-container.active.has-floating-call .voice-call-overlay {
  pointer-events: auto;
  touch-action: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(60, 48, 40, 0.38);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 501;
  animation: modalFadeIn 0.2s ease;
}

.modal-sheet {
  width: 100%;
  max-height: min(85dvh, calc(var(--app-height, 100dvh) - 12px));
  background: #fffdf8;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  animation: modalSlideUp 0.28s ease-out;
}

.modal-overlay.modal-sheet-center .modal-sheet,
.offline-ff-sheet {
  background: #fffdf8;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px dashed rgba(140, 115, 98, 0.18);
}

.modal-header h3 {
  margin: 0;
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--ink-brown);
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  max-height: min(60dvh, calc(var(--app-height, 100dvh) - 112px));
  min-height: 0;
  scroll-padding-block: 14px 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  /* 列表项多为 .btn（touch-action:manipulation），安卓 WebView 上需显式 pan-y 才能拖滚 */
  touch-action: pan-y;
}

html.pwa-standalone:not(.capacitor-native).keyboard-visible .modal-sheet.ime-panel-active {
  margin-bottom: var(--keyboard-inset, 0px);
  max-height: calc(100dvh - var(--keyboard-inset, 0px) - 12px);
}

html.pwa-standalone:not(.capacitor-native).keyboard-visible .modal-sheet.ime-panel-active .modal-body {
  max-height: calc(100dvh - var(--keyboard-inset, 0px) - 112px);
}

.modal-sheet-center {
  align-items: center;
  padding: 16px;
}

.modal-overlay.modal-sheet-center .modal-sheet {
  width: min(92vw, 440px);
  max-width: 440px;
  border-radius: var(--radius-xl);
  animation: modalSlideUp 0.28s ease-out;
}

.share-card-sheet {
  width: min(360px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 28px));
  overflow: auto;
}

.share-card-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 14px 12px 8px;
}

.share-card-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.share-card-page-label {
  font-size: 12px;
  color: var(--text-muted, #9a7b64);
  letter-spacing: 0.04em;
}

.share-card-preview canvas {
  width: min(270px, calc(100vw - 76px));
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-float);
  background: #fffaf4;
}

.share-card-actions {
  display: flex;
  padding: 0 12px 14px;
}

.share-card-actions .btn {
  flex: 1;
}

/* ── 生成失败反馈卡 ── */
.generation-error-report {
  position: fixed;
  left: 50%;
  bottom: max(18px, calc(var(--safe-bottom, 0px) + 14px));
  z-index: 2600;
  width: min(520px, calc(100vw - 24px));
  transform: translateX(-50%);
  padding: 12px;
  border: 1px solid rgba(190, 91, 78, 0.24);
  border-radius: 16px;
  background: rgba(255, 248, 242, 0.98);
  color: var(--ink-brown, #6f5140);
  box-shadow: 0 14px 36px rgba(92, 54, 42, 0.22);
}

.generation-error-report-head,
.generation-error-report-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.generation-error-report-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.generation-error-report-actions button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.generation-error-report-foot button[data-generation-error-detail] {
  border-color: rgba(166, 91, 88, 0.28);
  color: #a65b58;
  background: rgba(255, 244, 240, 0.95);
}

.generation-error-report-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.generation-error-report-head span,
.generation-error-report-foot small {
  color: var(--text-secondary, #8c7362);
  font-size: 11px;
}

.generation-error-report-head strong {
  color: #a65b58;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.generation-error-report p {
  margin: 8px 0;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.generation-error-report pre {
  max-height: min(180px, 32vh);
  margin: 8px 0;
  padding: 8px;
  overflow: auto;
  border: 1px dashed rgba(140, 115, 98, 0.18);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.86);
  color: #6f5140;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.generation-error-report button {
  border: 1px solid rgba(140, 115, 98, 0.18);
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink-brown, #6f5140);
  cursor: pointer;
  font: inherit;
}

.generation-error-report-head button {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
}

.generation-error-report-foot button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.form-label,
.api-field-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.text-hint {
  font-size: 12px;
  color: var(--text-hint);
  line-height: 1.45;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Toast（顶部，不挡输入区） ── */
#toast-container {
  position: fixed;
  left: 50%;
  top: calc(12px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 2147483001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 360px);
}

.toast {
  padding: 12px 16px;
  border-radius: 14px;
  border: 3px solid #fff;
  background: rgba(253, 248, 244, 0.96);
  color: var(--ink-brown);
  font-size: var(--font-sm);
  box-shadow: var(--shadow-float);
  text-align: center;
}

.shared-knowledge-sheet {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shared-knowledge-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 10px;
  touch-action: pan-y;
}

.sek-excerpt {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(0, 0, 0, 0.06);
  color: var(--ink-brown);
  font-size: var(--font-sm);
  max-height: 96px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.sek-field-label {
  font-size: var(--font-xs);
  color: var(--ink-soft, #9a8c80);
  font-weight: 600;
}

.sek-note {
  width: 100%;
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.85);
  padding: 8px 10px;
  font-size: var(--font-sm);
  resize: vertical;
}

.sek-char-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sek-char-item {
  touch-action: pan-y;
}

.sek-char-item.is-selected {
  background: var(--accent-pink, #ff9ec0);
  color: #fff;
  border-color: var(--accent-pink, #ff9ec0);
}

.sek-footer {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 10px;
}

/* ── 启动更新公告 / 发现新版本 ── */
.release-notes-prompt-sheet {
  display: flex;
  flex-direction: column;
  max-height: min(78dvh, calc(var(--app-height, 100dvh) - 32px));
}

.release-notes-prompt-body {
  max-height: min(52dvh, calc(var(--app-height, 100dvh) - 180px));
}

.release-notes-prompt-meta {
  margin: 0 0 8px;
  font-size: var(--font-xs, 12px);
  color: var(--ink-muted, #8a7468);
}

.release-notes-prompt-title {
  margin: 0 0 12px;
  font-size: var(--font-md, 15px);
  font-weight: 700;
  color: var(--ink-brown);
  line-height: 1.4;
}

.release-notes-prompt-block + .release-notes-prompt-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(140, 115, 98, 0.18);
}

.release-notes-prompt-block .release-notes-prompt-title {
  margin-bottom: 8px;
}

.release-notes-prompt-block .release-notes-prompt-list {
  margin-bottom: 0;
}

.release-notes-prompt-lead {
  margin: 0 0 10px;
  font-size: var(--font-sm);
  color: var(--ink-brown);
  line-height: 1.55;
}

.release-notes-prompt-list {
  margin: 0 0 12px;
  padding-left: 1.15em;
  color: var(--ink-brown);
  font-size: var(--font-sm);
  line-height: 1.55;
}

.release-notes-prompt-list li + li {
  margin-top: 6px;
}

.release-notes-prompt-hint {
  margin: 0;
  font-size: var(--font-xs, 12px);
  color: var(--ink-muted, #8a7468);
  line-height: 1.45;
}

.release-notes-prompt-footer,
.modal-footer.release-notes-prompt-footer {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px dashed rgba(140, 115, 98, 0.18);
}

.release-notes-prompt-footer .btn {
  flex: 1 1 auto;
  min-width: 0;
}

/* 选择联系人 / 选项表：独立滚动区，避免被顶栏搜索与底栏挤掉或被 .btn 抢手势 */
.participant-picker-sheet,
.option-picker-sheet {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.participant-picker-search {
  flex-shrink: 0;
  padding: 0 16px 8px;
}

.participant-picker-search-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.participant-picker-search-bar .form-input {
  flex: 1;
}

/* ── 搜索框里的"提交"按钮：复用原本装饰用的搜索图标位，改造成可点按钮 ──
   打字本身不触发搜索，点它（或回车）才提交查询词，具体尺寸/颜色沿用各页
   原有的图标类，这里只负责去掉按钮默认外观、加点按压反馈。 */
.search-icon-submit {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.search-icon-submit:active {
  transform: scale(0.92);
}

.participant-picker-body,
.option-picker-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 0;
  touch-action: pan-y;
}

.participant-picker-foot,
.option-picker-foot {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 10px;
}

.participant-picker-item,
.option-picker-item {
  flex-shrink: 0;
  touch-action: pan-y;
}

.participant-picker-item.is-selected {
  background: var(--accent-pink, #ff9ec0);
  color: #fff;
  border-color: var(--accent-pink, #ff9ec0);
}

.link-preview-sheet {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.link-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 32, 0.42);
}

.link-preview-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card, #fff);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.link-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.link-preview-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.link-preview-close {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.link-preview-body {
  position: relative;
  flex: 1;
  min-height: 240px;
  background: #f6f7f9;
}

.link-preview-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-secondary, #888);
  font-size: 13px;
}

.link-preview-frame {
  width: 100%;
  height: min(62vh, 520px);
  border: 0;
  background: #fff;
}

.link-preview-fallback {
  display: grid;
  place-content: center;
  gap: 12px;
  min-height: 200px;
  padding: 20px;
  text-align: center;
  color: var(--text-secondary, #888);
  font-size: 13px;
}
